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
28822832_6
class ConfigFilesRetrieverImpl implements ConfigFilesRetriever { static boolean isRelevantConfiguration(final String entryName, final String parentName, ExtendedSlingSettingsService slingSettings) { if (!entryName.endsWith(".yaml") && !entryName.equals("config") /* name 'config' without .yaml allowed for b...
Set<String> currentRunmodes = new HashSet<String>( Arrays.asList("samplecontent", "author", "netcentric", "crx3tar", "crx2", "local")); slingSettings = new ExtendedSlingSettingsServiceImpl(currentRunmodes); // testing 'or' combinations with Assert.assertTrue((ConfigFilesR...
[FOCAL] static boolean ConfigFilesRetrieverImpl.isRelevantConfiguration(String entryName, String parentName, ExtendedSlingSettingsService slingSettings) [CLASS] class ConfigFilesRetrieverImpl implements ConfigFilesRetriever [METRICS] loc=22 cc=4 branches=3 loops=0 returns=3 throws=0 nesting=1 [CALLS-INTERNAL] String ex...
/* static context [FOCAL] static boolean ConfigFilesRetrieverImpl.isRelevantConfiguration(String entryName, String parentName, ExtendedSlingSettingsService slingSettings) [PATH1] if((!entryName.endsWith(".yaml") && !entryName.equals("config") /* name 'config' without .yaml allowed for backwards com...)=F -> if(runModeS...
/* static context [FOCAL] static boolean ConfigFilesRetrieverImpl.isRelevantConfiguration(String entryName, String parentName, ExtendedSlingSettingsService slingSettings) [PATH1] if((!entryName.endsWith(".yaml") && !entryName.equals("config") /* name 'config' without .yaml allowed for backwards com...)=F -> if(runModeS...
true
ok
{"focal": {"class": "ConfigFilesRetrieverImpl", "name": "isRelevantConfiguration", "signature": "boolean isRelevantConfiguration(String entryName, String parentName, ExtendedSlingSettingsService slingSettings)", "start_line": 3, "modifiers": "static", "params": [{"name": "entryName", "type": "String"}, {"name": "parent...
28858344_28
class HexUtil { public static String convertStringToHexString(String data) { return conventBytesToHexString(data.getBytes()); } private HexUtil(); public static String conventBytesToHexString(byte[] data); public static String convertBytesToHexString(byte[] data, int offset, ...
String res = HexUtil.convertStringToHexString("hello world"); assertEquals("68656c6c6f20776f726c64", res); } }
[FOCAL] public static String HexUtil.convertStringToHexString(String data) [CLASS] class HexUtil [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String conventBytesToHexString(byte[] data) [CALLS-EXTERNAL] String.getBytes/0 [INPUTS] branches=- | result=data [DATAFLOW] data@param->L...
/* static context [FOCAL] public static String HexUtil.convertStringToHexString(String data) [INPUTS] branches=- | result=data [CALLS-INTERNAL] String conventBytesToHexString(byte[] data) [CALLS-EXTERNAL] String.getBytes/0 */
/* static context [FOCAL] public static String HexUtil.convertStringToHexString(String data) [INPUTS] branches=- | result=data [CALLS-INTERNAL] String conventBytesToHexString(byte[] data) [CALLS-EXTERNAL] String.getBytes/0 */ class HexUtil { public static String convertStringToHexString(String data) { retu...
true
ok
{"focal": {"class": "HexUtil", "name": "convertStringToHexString", "signature": "String convertStringToHexString(String data)", "start_line": 3, "modifiers": "public static", "params": [{"name": "data", "type": "String"}], "return_type": "String"}, "class_info": {"name": "HexUtil", "kind": "class", "modifiers": "", "su...
28874374_2
class DeviceUtils { public static String getDeviceID() { Context context = Appaloosa.getApplicationContext(); if(deviceHasPhoneCapabilities(context)) { return getImei(); } else { return getAndroidId(context); } } private static boolean deviceHasPhone...
mShadowTelephonyManager.setPhoneType(TelephonyManager.PHONE_TYPE_GSM); mShadowTelephonyManager.setDeviceId(IMEI); mShadowApplication.grantPermissions(Manifest.permission.READ_PHONE_STATE); assertEquals(IMEI, DeviceUtils.getDeviceID()); } }
[FOCAL] public static String DeviceUtils.getDeviceID() [CLASS] class DeviceUtils [METRICS] loc=8 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] String getAndroidId(Context context); String getImei(); boolean deviceHasPhoneCapabilities(Context context) [CALLS-EXTERNAL] Appaloosa.getApplicationCont...
/* static context [FOCAL] public static String DeviceUtils.getDeviceID() [PATH1] if(deviceHasPhoneCapabilities(context))=T -> return getImei() [PATH2] if(deviceHasPhoneCapabilities(context))=F -> return getAndroidId(context) [CALLS-INTERNAL] String getAndroidId(Context context); String getImei(); boolean deviceHasPhone...
/* static context [FOCAL] public static String DeviceUtils.getDeviceID() [PATH1] if(deviceHasPhoneCapabilities(context))=T -> return getImei() [PATH2] if(deviceHasPhoneCapabilities(context))=F -> return getAndroidId(context) [CALLS-INTERNAL] String getAndroidId(Context context); String getImei(); boolean deviceHasPhone...
true
ok
{"focal": {"class": "DeviceUtils", "name": "getDeviceID", "signature": "String getDeviceID()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "String"}, "class_info": {"name": "DeviceUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "ANDRO...
28892813_1
class ImageParser { public static int parseElixir(BufferedImage image) throws BotBadBaseException { return parseElixirFromBinary(imageToBinary(image)); } static boolean hasDE(BufferedImage image); public static int parseGold(BufferedImage image); static int parseGoldFromBinary(BufferedImage binary); static in...
int fail = 0; for (int i = 0; i < imageNames.length; i++) { String s = imageNames[i]; BufferedImage image = ImageIO.read(TestImageParser.class.getResourceAsStream(imageLocation + s)); int elixir = ImageParser.parseElixir(image); try { Assert.assertEquals(expectedElixir[i], elixir); } catch...
[FOCAL] public static int ImageParser.parseElixir(BufferedImage image) [CLASS] class ImageParser [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] BufferedImage imageToBinary(BufferedImage colored); int parseElixirFromBinary(BufferedImage binary) [EXCEPTIONS] declares BotBadBaseExcep...
/* static context [FOCAL] public static int ImageParser.parseElixir(BufferedImage image) [INPUTS] branches=- | result=image [EXCEPTIONS] declares BotBadBaseException [CALLS-INTERNAL] BufferedImage imageToBinary(BufferedImage colored); int parseElixirFromBinary(BufferedImage binary) */
/* static context [FOCAL] public static int ImageParser.parseElixir(BufferedImage image) [INPUTS] branches=- | result=image [EXCEPTIONS] declares BotBadBaseException [CALLS-INTERNAL] BufferedImage imageToBinary(BufferedImage colored); int parseElixirFromBinary(BufferedImage binary) */ class ImageParser { public stati...
true
ok
{"focal": {"class": "ImageParser", "name": "parseElixir", "signature": "int parseElixir(BufferedImage image) throws BotBadBaseException", "start_line": 3, "modifiers": "public static", "params": [{"name": "image", "type": "BufferedImage"}], "return_type": "int"}, "class_info": {"name": "ImageParser", "kind": "class", "...
28900548_16
class FileUtils { @SuppressFBWarnings("OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE") public static void copy(File src, File dest) throws IOException { if (dest.delete()) { LOGGER.debug("Removed " + dest.getPath() + " during copying"); } InputStream input = null; FileOu...
public void copy() throws IOException { File a = File.createTempFile("file-1", "tmp"); File b = File.createTempFile("file-2", "tmp"); Assert.assertTrue(a.isFile()); Assert.assertTrue(b.isFile()); try { FileUtils.write(a, "Hello world".getBytes("UTF-8")); ...
[FOCAL] @SuppressFBWarnings("OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE") public static void FileUtils.copy(File src, File dest) [CLASS] class FileUtils [METRICS] loc=47 cc=11 branches=5 loops=1 returns=0 throws=0 nesting=3 [CALLS-EXTERNAL] File.delete/0, LOGGER.debug/1, File.getPath/0, InputStream.read/1, FileOutputStr...
/* static context [FOCAL] @SuppressFBWarnings("OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE") public static void FileUtils.copy(File src, File dest) [PATH1] if(dest.delete())=T -> while((read = input.read(buf)) > 0)=T -> exit loop -> try-body throws -> if(input != null)=T -> if(output != null)=T [PATH2] if(dest.delete())=...
/* static context [FOCAL] @SuppressFBWarnings("OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE") public static void FileUtils.copy(File src, File dest) [PATH1] if(dest.delete())=T -> while((read = input.read(buf)) > 0)=T -> exit loop -> try-body throws -> if(input != null)=T -> if(output != null)=T [PATH2] if(dest.delete())=...
true
ok
{"focal": {"class": "FileUtils", "name": "copy", "signature": "void copy(File src, File dest) throws IOException", "start_line": 3, "modifiers": "@SuppressFBWarnings(\"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE\") public static", "params": [{"name": "src", "type": "File"}, {"name": "dest", "type": "File"}], "return_type...
28901545_0
class DateUtils { public static String transform(Date sourceDate, DateFormat format, TimeZone sourceTimeZone, TimeZone targetTimeZone) { Long targetTime = sourceDate.getTime() - sourceTimeZone.getRawOffset() + targetTimeZone.getRawOffset(); return DateUtils.getTime(new Date(targetTime), format); } public st...
Date startDate = new Date("07/16/2013 00:00:00"); String transformedStartDate = DateUtils.transform(startDate, dateFormat, sourceTimeZone, targetTimeZone); assertEquals(transformedStartDate, "07/16/2013 04:00:00 AM"); Date endDate = new Date("07/16/2013 23:59:59"); String transformedEndDate = DateUtils.transf...
[FOCAL] public static String DateUtils.transform(Date sourceDate, DateFormat format, TimeZone sourceTimeZone, TimeZone targetTimeZone) [CLASS] class DateUtils [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Date.getTime/0, TimeZone.getRawOffset/0, DateUtils.getTime/2 [NEW] Date [IN...
/* static context [FOCAL] public static String DateUtils.transform(Date sourceDate, DateFormat format, TimeZone sourceTimeZone, TimeZone targetTimeZone) [INPUTS] branches=- | result=format, sourceDate, sourceTimeZone, targetTimeZone [COLLABORATORS] param sourceDate:Date getTime/0; param sourceTimeZone:TimeZone getRawOf...
/* static context [FOCAL] public static String DateUtils.transform(Date sourceDate, DateFormat format, TimeZone sourceTimeZone, TimeZone targetTimeZone) [INPUTS] branches=- | result=format, sourceDate, sourceTimeZone, targetTimeZone [COLLABORATORS] param sourceDate:Date getTime/0; param sourceTimeZone:TimeZone getRawOf...
true
ok
{"focal": {"class": "DateUtils", "name": "transform", "signature": "String transform(Date sourceDate, DateFormat format, TimeZone sourceTimeZone, TimeZone targetTimeZone)", "start_line": 3, "modifiers": "public static", "params": [{"name": "sourceDate", "type": "Date"}, {"name": "format", "type": "DateFormat"}, {"name"...
28923365_4
class KmsTextEncryptor implements TextEncryptor { @Override public String decrypt(final String encryptedText) { if (encryptedText == null || encryptedText.isEmpty()) { return EMPTY_STRING; } else { final EncryptedToken token = EncryptedToken.parse(encryptedText); ...
assertThat(textEncryptor.decrypt(null)).isEqualTo(""); } }
[FOCAL] @Override public String KmsTextEncryptor.decrypt(String encryptedText) [CLASS] class KmsTextEncryptor implements TextEncryptor [METRICS] loc=28 cc=4 branches=3 loops=0 returns=2 throws=0 nesting=3 [CALLS-INTERNAL] String extractString(ByteBuffer bb, OutputMode outputMode); boolean isAsymmetricEncryption(String ...
/* static context [FOCAL] @Override public String KmsTextEncryptor.decrypt(String encryptedText) [PATH1] if(encryptedText == null || encryptedText.isEmpty())=F -> if(IS_ALGORITHM_AVAILABLE)=T -> if(isAsymmetricEncryption(algorithm))=T -> return extractString(kms.decrypt(decryptRequest).getPlaintext(), options.g... [PAT...
/* static context [FOCAL] @Override public String KmsTextEncryptor.decrypt(String encryptedText) [PATH1] if(encryptedText == null || encryptedText.isEmpty())=F -> if(IS_ALGORITHM_AVAILABLE)=T -> if(isAsymmetricEncryption(algorithm))=T -> return extractString(kms.decrypt(decryptRequest).getPlaintext(), options.g... [PAT...
true
ok
{"focal": {"class": "KmsTextEncryptor", "name": "decrypt", "signature": "String decrypt(String encryptedText)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "encryptedText", "type": "String"}], "return_type": "String"}, "class_info": {"name": "KmsTextEncryptor", "kind": "class", "modifiers": ""...
28963937_2
class FramedGraph implements AutoCloseable { @SuppressWarnings("unchecked") public <V> FramedGraphTraversal<V> V(Class<V> clazz) { return new FramedGraphTraversal(traversal.V(), this).labels(clazz, P.within(registry.labels(clazz))); } public FramedGraph(Graph graph, Package pakkage); pub...
Person p = graph.v(alice.id()); assertEquals(alice.id(), p.vertex().id()); assertEquals("alice", p.getName()); } }
[FOCAL] @SuppressWarnings("unchecked") public FramedGraphTraversal<V> FramedGraph.V(Class<V> clazz) [CLASS] class FramedGraph implements AutoCloseable [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] new FramedGraphTraversal(traversal.V(), this).labels/2, traversal.V/0, P.within/1, ...
/* static context [FOCAL] @SuppressWarnings("unchecked") public FramedGraphTraversal<V> FramedGraph.V(Class<V> clazz) [INPUTS] branches=- | result=clazz [COLLABORATORS] field traversal V/0; field registry labels/1 [NEW] FramedGraphTraversal [CALLS-EXTERNAL] new FramedGraphTraversal(traversal.V(), this).labels/2, traver...
/* static context [FOCAL] @SuppressWarnings("unchecked") public FramedGraphTraversal<V> FramedGraph.V(Class<V> clazz) [INPUTS] branches=- | result=clazz [COLLABORATORS] field traversal V/0; field registry labels/1 [NEW] FramedGraphTraversal [CALLS-EXTERNAL] new FramedGraphTraversal(traversal.V(), this).labels/2, traver...
true
ok
{"focal": {"class": "FramedGraph", "name": "V", "signature": "FramedGraphTraversal<V> V(Class<V> clazz)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") public", "params": [{"name": "clazz", "type": "Class<V>"}], "return_type": "FramedGraphTraversal<V>"}, "class_info": {"name": "FramedGraph", "kind": "...
28969897_4
class DeployMessage implements BrokerMessage { public String toString() { String serializedMessage = null; try { Gson gson = GsonParserBuilder.getInstance(); serializedMessage = gson.toJson(this); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return seriali...
DeployMessageType type = DeployMessageType.REQUEST_TO_INSTALL_PART; byte[] bytearray = new byte[] { 4, 4, 56, 35, 64, (byte) 0xfe6, 4 }; App uapp = new App(); uapp.setAppId("10"); uapp.setApplicationProfile("ciao"); uapp.setDescription("descrizione app"); uapp.setMultipart(true); uapp.setName("nome")...
[FOCAL] public String DeployMessage.toString() [CLASS] class DeployMessage implements BrokerMessage [METRICS] loc=14 cc=2 branches=0 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] GsonParserBuilder.getInstance/0, Gson.toJson/1, Exception.printStackTrace/0 [EXCEPTIONS] catches Exception e [PATH1] try-body throws ...
/* static context [FOCAL] public String DeployMessage.toString() [PATH1] try-body throws -> return serializedMessage [EXCEPTIONS] catches Exception e [CALLS-EXTERNAL] GsonParserBuilder.getInstance/0, Gson.toJson/1, Exception.printStackTrace/0 */
/* static context [FOCAL] public String DeployMessage.toString() [PATH1] try-body throws -> return serializedMessage [EXCEPTIONS] catches Exception e [CALLS-EXTERNAL] GsonParserBuilder.getInstance/0, Gson.toJson/1, Exception.printStackTrace/0 */ class DeployMessage implements BrokerMessage { public String toString() ...
true
ok
{"focal": {"class": "DeployMessage", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "DeployMessage", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "BrokerMessage", "fields": [], "members":...
28970369_10
class MessageBirdClient { public MessageResponse sendMessage(final Message message) throws UnauthorizedException, GeneralException { return messageBirdService.sendPayLoad(MESSAGESPATH, message, MessageResponse.class); } public MessageBirdClient(final MessageBirdService messageBirdService); pu...
final String body = "Body test message Über € " + messageBirdMSISDN; final MessageResponse mr = messageBirdClient.sendMessage("originator", body, Collections.singletonList(messageBirdMSISDN)); assertNotNull(mr.getId()); // Deleting of a message is not yet supported in test mode ...
[FOCAL] public MessageResponse MessageBirdClient.sendMessage(Message message) [CLASS] class MessageBirdClient [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] MessageBirdServiceImpl.sendPayLoad/3 [FIELDS] read=messageBirdService:MessageBirdServiceImpl [EXCEPTIONS] declares Unauthori...
class MessageBirdClient { public MessageResponse sendMessage(final Message message) throws UnauthorizedException, GeneralException { return messageBirdService.sendPayLoad(MESSAGESPATH, message, MessageResponse.class); } public MessageBirdClient(final MessageBirdService messageBirdService); pu...
false
ok
{"focal": {"class": "MessageBirdClient", "name": "sendMessage", "signature": "MessageResponse sendMessage(Message message) throws UnauthorizedException, GeneralException", "start_line": 3, "modifiers": "public", "params": [{"name": "message", "type": "Message"}], "return_type": "MessageResponse"}, "class_info": {"name"...
28972188_9
class KeycloakOauthPolicy extends AbstractMappedPolicy<KeycloakOauthConfigBean> { @Override protected void doApply(final ApiRequest request, final IPolicyContext context, final KeycloakOauthConfigBean config, final IPolicyChain<ApiRequest> chain) { final String rawToken = getRawAuthToken(r...
ForwardAuthInfo authInfo = new ForwardAuthInfo(); authInfo.setHeaders("X-TEST"); authInfo.setField("email"); config.getForwardAuthInfo().add(authInfo); token.setEmail("apiman@apiman.io"); String encoded = generateAndSerializeToken(); apiRequest.getHeaders().put("...
[FOCAL] @Override protected void KeycloakOauthPolicy.doApply(ApiRequest request, IPolicyContext context, KeycloakOauthConfigBean config, IPolicyChain<ApiRequest> chain) [CLASS] class KeycloakOauthPolicy extends AbstractMappedPolicy<KeycloakOauthConfigBean> [METRICS] loc=54 cc=8 branches=7 loops=0 returns=1 throws=0 nes...
/* static context [FOCAL] @Override protected void KeycloakOauthPolicy.doApply(ApiRequest request, IPolicyContext context, KeycloakOauthConfigBean config, IPolicyChain<ApiRequest> chain) [PATH1] if(rawToken == null)=F -> if(doTokenAuth(successStatus, request, context, config, chain, rawToken).getValue())=T -> if(config...
/* static context [FOCAL] @Override protected void KeycloakOauthPolicy.doApply(ApiRequest request, IPolicyContext context, KeycloakOauthConfigBean config, IPolicyChain<ApiRequest> chain) [PATH1] if(rawToken == null)=F -> if(doTokenAuth(successStatus, request, context, config, chain, rawToken).getValue())=T -> if(config...
true
ok
{"focal": {"class": "KeycloakOauthPolicy", "name": "doApply", "signature": "void doApply(ApiRequest request, IPolicyContext context, KeycloakOauthConfigBean config, IPolicyChain<ApiRequest> chain)", "start_line": 3, "modifiers": "@Override protected", "params": [{"name": "request", "type": "ApiRequest"}, {"name": "cont...
28979951_107
class DatastoreAccess implements AutoCloseable { public synchronized <T extends DataObject> boolean putSynchronous( final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType) { LOG.debug("Put synchronous {}", path); try { put(path, data,...
WriteTransaction transaction = mock(WriteTransaction.class); doReturn(CommitInfo.emptyFluentFuture()).when(transaction).commit(); InstanceIdentifier identifier = mock(InstanceIdentifier.class); DataObject dataObject = mock(DataObject.class); when(transactionChain.newWriteOnlyTra...
[FOCAL] public synchronized boolean DatastoreAccess.putSynchronous(InstanceIdentifier<T> path, T data, LogicalDatastoreType logicalDatastoreType) [CLASS] class DatastoreAccess implements AutoCloseable [METRICS] loc=15 cc=3 branches=0 loops=0 returns=3 throws=0 nesting=1 [CALLS-INTERNAL] FluentFuture<? extends CommitInf...
/* static context [FOCAL] public synchronized boolean DatastoreAccess.putSynchronous(InstanceIdentifier<T> path, T data, LogicalDatastoreType logicalDatastoreType) [PATH1] try-body throws -> return false [PATH2] return true [EXCEPTIONS] catches final InterruptedException e, final ExecutionException e [CALLS-INTERNAL] F...
/* static context [FOCAL] public synchronized boolean DatastoreAccess.putSynchronous(InstanceIdentifier<T> path, T data, LogicalDatastoreType logicalDatastoreType) [PATH1] try-body throws -> return false [PATH2] return true [EXCEPTIONS] catches final InterruptedException e, final ExecutionException e [CALLS-INTERNAL] F...
true
ok
{"focal": {"class": "DatastoreAccess", "name": "putSynchronous", "signature": "boolean putSynchronous(InstanceIdentifier<T> path, T data, LogicalDatastoreType logicalDatastoreType)", "start_line": 3, "modifiers": "public synchronized", "params": [{"name": "path", "type": "InstanceIdentifier<T>"}, {"name": "data", "type...
28991592_45
class EntryList implements Iterable<SimpleImmutableEntry<K, V>> { public int size() { return this.entries.size(); } public EntryList(); public EntryList( final int initialCapacity ); public EntryList( final Collection<? extends SimpleImmutableEntry<K, V>> c ); public EntryList( fin...
SimpleImmutableEntry<String, String> entry = new SimpleImmutableEntry<>( "key", "value" ); List<SimpleImmutableEntry<String, String>> collection = Arrays.asList( entry ); EntryList<String, String> list = new ImmutableEntryList<>( collection ); Assert.assertEquals( 1, list.size() ); }...
[FOCAL] public int EntryList.size() [CLASS] class EntryList implements Iterable<SimpleImmutableEntry<K, V>> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] this.entries.size/0 [FIELDS] read=entries [COLLABORATORS] field entries size/0 [CLASS-MEMBERS] EntryList(); EntryList(int init...
/* static context [FOCAL] public int EntryList.size() [COLLABORATORS] field entries size/0 [FIELDS] read=entries [CALLS-EXTERNAL] this.entries.size/0 */
/* static context [FOCAL] public int EntryList.size() [COLLABORATORS] field entries size/0 [FIELDS] read=entries [CALLS-EXTERNAL] this.entries.size/0 */ class EntryList implements Iterable<SimpleImmutableEntry<K, V>> { public int size() { return this.entries.size(); } public EntryList(); publ...
true
ok
{"focal": {"class": "EntryList", "name": "size", "signature": "int size()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "EntryList", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Iterable<SimpleImmutableEntry<K, V>>", "fields": [], "members"...
28992330_18
class PercentEscaper extends UnicodeEscaper { @Override public String escape(String s) { int slen = s.length(); for (int index = 0; index < slen; index++) { char c = s.charAt(index); if (c >= safeOctets.length || !safeOctets[c]) { return escapeSlow(s, index); } } return s;...
PercentEscaper escaper = new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER, false); String actual = escaper.escape("Hello there"); Assert.assertEquals("Hello%20there", actual); } }
[FOCAL] @Override public String PercentEscaper.escape(String s) [CLASS] class PercentEscaper extends UnicodeEscaper [METRICS] loc=11 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] String.length/0, String.charAt/1, escapeSlow/2 (inherited) [PATH1] for(index < slen)=T -> if(c >= safeOctets.length |...
/* static context [FOCAL] @Override public String PercentEscaper.escape(String s) [PATH1] for(index < slen)=T -> if(c >= safeOctets.length || !safeOctets[c])=F -> exit loop -> return s [PATH2] for(index < slen)=T -> if(c >= safeOctets.length || !safeOctets[c])=T -> return escapeSlow(s, index) [PATH3] for(index < slen)=...
/* static context [FOCAL] @Override public String PercentEscaper.escape(String s) [PATH1] for(index < slen)=T -> if(c >= safeOctets.length || !safeOctets[c])=F -> exit loop -> return s [PATH2] for(index < slen)=T -> if(c >= safeOctets.length || !safeOctets[c])=T -> return escapeSlow(s, index) [PATH3] for(index < slen)=...
true
ok
{"focal": {"class": "PercentEscaper", "name": "escape", "signature": "String escape(String s)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "s", "type": "String"}], "return_type": "String"}, "class_info": {"name": "PercentEscaper", "kind": "class", "modifiers": "", "superclass": "UnicodeEscape...
29008657_5
class HttpHeaderStatisticInjector implements WriterInterceptor { public String serializeStatistics(Statistics statistics) { JsonObjectBuilder stats = Json.createObjectBuilder(); stats.add("pipelineName", statistics.getPipelineName()); final String handlerName = statistics.getRejectedExecuti...
Statistics stats = new Statistics("test", 0, 1, 2, 3, 4, 5, 6, 7, 8, "duke", 9); String result = this.cut.serializeStatistics(stats); assertNotNull(result); } }
[FOCAL] public String HttpHeaderStatisticInjector.serializeStatistics(Statistics statistics) [CLASS] class HttpHeaderStatisticInjector implements WriterInterceptor [METRICS] loc=23 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] Json.createObjectBuilder/0, JsonObjectBuilder.add/2, Statistics.getPi...
/* static context [FOCAL] public String HttpHeaderStatisticInjector.serializeStatistics(Statistics statistics) [PATH1] if(handlerName != null)=T -> return writer.toString() [PATH2] if(handlerName != null)=F -> return writer.toString() [INPUTS] branches=statistics | result=- [COLLABORATORS] param statistics:Statistics g...
/* static context [FOCAL] public String HttpHeaderStatisticInjector.serializeStatistics(Statistics statistics) [PATH1] if(handlerName != null)=T -> return writer.toString() [PATH2] if(handlerName != null)=F -> return writer.toString() [INPUTS] branches=statistics | result=- [COLLABORATORS] param statistics:Statistics g...
true
ok
{"focal": {"class": "HttpHeaderStatisticInjector", "name": "serializeStatistics", "signature": "String serializeStatistics(Statistics statistics)", "start_line": 3, "modifiers": "public", "params": [{"name": "statistics", "type": "Statistics"}], "return_type": "String"}, "class_info": {"name": "HttpHeaderStatisticInjec...
29027682_0
class VaultTokenRenewalAutoConfiguration { @Scheduled(fixedRateString="${vault.token.renew.rate:60000}") // <-- Default to renew token every 60 seconds public void refreshVaultToken() { try { logger.info("Renewing Vault token " + obscuredToken + " for " + renewTTL + " milliseconds."); rest.postForObject(ref...
this.configClientProperties.setUri(new String[] { "https://foobar" }); given(rest.postForObject(anyString(), any(HttpEntity.class), any())).willReturn("foo"); ReflectionTestUtils.setField(config, "rest", this.rest); await().atMost(Duration.FIVE_SECONDS).untilAsserted(() -> { verify(config, atLeast(4)).refre...
[FOCAL] @Scheduled(fixedRateString="${vault.token.renew.rate:60000}") // <-- Default to renew token every 60 seconds public void VaultTokenRenewalAutoConfiguration.refreshVaultToken() [CLASS] class VaultTokenRenewalAutoConfiguration [METRICS] loc=9 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] l...
/* static context [FOCAL] @Scheduled(fixedRateString="${vault.token.renew.rate:60000}") // <-- Default to renew token every 60 seconds public void VaultTokenRenewalAutoConfiguration.refreshVaultToken() [PATH1] try-body throws [COLLABORATORS] field rest:RestTemplate postForObject/3 [EXCEPTIONS] catches Exception e [FIEL...
/* static context [FOCAL] @Scheduled(fixedRateString="${vault.token.renew.rate:60000}") // <-- Default to renew token every 60 seconds public void VaultTokenRenewalAutoConfiguration.refreshVaultToken() [PATH1] try-body throws [COLLABORATORS] field rest:RestTemplate postForObject/3 [EXCEPTIONS] catches Exception e [FIEL...
true
ok
{"focal": {"class": "VaultTokenRenewalAutoConfiguration", "name": "refreshVaultToken", "signature": "void refreshVaultToken()", "start_line": 3, "modifiers": "@Scheduled(fixedRateString=\"${vault.token.renew.rate:60000}\") // <-- Default to renew token every 60 seconds public", "params": [], "return_type": "void"}, "cl...
29056247_1
class TVGapsUtil { public static Map<String, List<Pair<Integer>>> getTVGaps(Future<H2PersistenceManager> dao) throws Exception { String allShowsQuery = "mediatype='tv' order by title, season, episode"; Collection<MediaFile> files = dao.get().getMediaFileDAO().query(allShowsQuery); return ge...
List<MediaFile> files = new ArrayList<>(); files.add(newMediaFile("Series1", 1, 1)); files.add(newMediaFile("Series1", 1, 2)); files.add(newMediaFile("Series1", 1, 5)); files.add(newMediaFile("Series1", 1, 6)); files.add(newMediaFile("Series1", 1, 8)); files.add(n...
[FOCAL] public static Map<String, List<Pair<Integer>>> TVGapsUtil.getTVGaps(Future<H2PersistenceManager> dao) [CLASS] class TVGapsUtil [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Map<String, List<Pair<Integer>>> getTVGaps(Collection<MediaFile> files) [CALLS-EXTERNAL] dao.get()....
/* static context [FOCAL] public static Map<String, List<Pair<Integer>>> TVGapsUtil.getTVGaps(Future<H2PersistenceManager> dao) [INPUTS] branches=- | result=dao [COLLABORATORS] param dao:Future<H2PersistenceManager> get/0 [EXCEPTIONS] declares Exception [CALLS-INTERNAL] Map<String, List<Pair<Integer>>> getTVGaps(Collec...
/* static context [FOCAL] public static Map<String, List<Pair<Integer>>> TVGapsUtil.getTVGaps(Future<H2PersistenceManager> dao) [INPUTS] branches=- | result=dao [COLLABORATORS] param dao:Future<H2PersistenceManager> get/0 [EXCEPTIONS] declares Exception [CALLS-INTERNAL] Map<String, List<Pair<Integer>>> getTVGaps(Collec...
true
ok
{"focal": {"class": "TVGapsUtil", "name": "getTVGaps", "signature": "Map<String, List<Pair<Integer>>> getTVGaps(Future<H2PersistenceManager> dao) throws Exception", "start_line": 3, "modifiers": "public static", "params": [{"name": "dao", "type": "Future<H2PersistenceManager>"}], "return_type": "Map<String, List<Pair<I...
29060759_6
class DynamicRoundRobinLoadBalancer extends RoundRobinLoadBalancer { @Override protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange exchange) { Processor answer = null; Processor defaultSelection = super.chooseProcessor(processors, exchange); Determinis...
ProcessorHolder processorHolder1 = new ProcessorHolder(); processorHolder1.setProcessor(Mockito.mock(Processor.class)); ProcessorHolder processorHolder2 = new ProcessorHolder(); processorHolder2.setProcessor(Mockito.mock(Processor.class)); RouteStatistics stat1 = new RouteStati...
[FOCAL] @Override protected synchronized Processor DynamicRoundRobinLoadBalancer.chooseProcessor(List<Processor> processors, Exchange exchange) [CLASS] class DynamicRoundRobinLoadBalancer extends RoundRobinLoadBalancer [METRICS] loc=23 cc=4 branches=3 loops=0 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] RoundRobinLoad...
/* static context [FOCAL] @Override protected synchronized Processor DynamicRoundRobinLoadBalancer.chooseProcessor(List<Processor> processors, Exchange exchange) [PATH1] if(deterministicCollectorStrategy.shouldCollect())=T -> if(stats.size() > 0)=T -> if(answer == null)=T -> return answer [PATH2] if(deterministicCollec...
/* static context [FOCAL] @Override protected synchronized Processor DynamicRoundRobinLoadBalancer.chooseProcessor(List<Processor> processors, Exchange exchange) [PATH1] if(deterministicCollectorStrategy.shouldCollect())=T -> if(stats.size() > 0)=T -> if(answer == null)=T -> return answer [PATH2] if(deterministicCollec...
true
ok
{"focal": {"class": "DynamicRoundRobinLoadBalancer", "name": "chooseProcessor", "signature": "Processor chooseProcessor(List<Processor> processors, Exchange exchange)", "start_line": 3, "modifiers": "@Override protected synchronized", "params": [{"name": "processors", "type": "List<Processor>"}, {"name": "exchange", "t...
29064349_8
class JavafxMainWindowView extends JavafxView<MainWindowPresenter, MainWindowDisplay> implements MainWindowView { @Override public void setWindowTitle(final String windowTitle) { stage.setTitle(windowTitle); } public JavafxMainWindowView(final Stage stage, final GuiTaskRunner task...
final String expected = "meh"; view.setWindowTitle(expected); final String actual = stage.getTitle(); assertThat(actual).isEqualTo(expected); } }
[FOCAL] @Override public void JavafxMainWindowView.setWindowTitle(String windowTitle) [CLASS] class JavafxMainWindowView extends JavafxView<MainWindowPresenter, MainWindowDisplay> implements MainWindowView [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] Stage.setTitle/1 [FIELDS] re...
/* static context [FOCAL] @Override public void JavafxMainWindowView.setWindowTitle(String windowTitle) [COLLABORATORS] field stage:Stage setTitle/1 [FIELDS] read=stage:Stage [CALLS-EXTERNAL] Stage.setTitle/1 */
/* static context [FOCAL] @Override public void JavafxMainWindowView.setWindowTitle(String windowTitle) [COLLABORATORS] field stage:Stage setTitle/1 [FIELDS] read=stage:Stage [CALLS-EXTERNAL] Stage.setTitle/1 */ class JavafxMainWindowView extends JavafxView<MainWindowPresenter, MainWindowDisplay> implements MainWindowV...
true
ok
{"focal": {"class": "JavafxMainWindowView", "name": "setWindowTitle", "signature": "void setWindowTitle(String windowTitle)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "windowTitle", "type": "String"}], "return_type": "void"}, "class_info": {"name": "JavafxMainWindowView", "kind": "class", "...
29089479_3
class MonetaServlet extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { super.init(config); MonetaEnvironment.setConfiguration(new MonetaConfiguration()); if (config == null) return; String IgnoredContextPathNodesStr = config.getInitParameter(CONFIG_IGNORED...
MockServletConfig config = new MockServletConfig(); servlet.init(config); Assert.assertTrue(MonetaEnvironment.getConfiguration().getIgnoredContextPathNodes()==null); config.getInitParmMap().put(MonetaServlet.CONFIG_IGNORED_CONTEXT_PATH_NODES, ""); servlet.init(config); Assert.assertTrue(MonetaEnvi...
[FOCAL] @Override public void MonetaServlet.init(ServletConfig config) [CLASS] class MonetaServlet extends HttpServlet [METRICS] loc=17 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] HttpServlet.init/1, MonetaEnvironment.setConfiguration/1, ServletConfig.getInitParameter/1, StringUtils.isEmpty/1,...
/* static context [FOCAL] @Override public void MonetaServlet.init(ServletConfig config) [PATH1] if(config == null)=F -> if(!StringUtils.isEmpty(IgnoredContextPathNodesStr))=T -> for(offset < nodeArray.length)=T -> exit loop [PATH2] if(config == null)=T -> return [PATH3] if(config == null)=F -> if(!StringUtils.isEmpty(...
/* static context [FOCAL] @Override public void MonetaServlet.init(ServletConfig config) [PATH1] if(config == null)=F -> if(!StringUtils.isEmpty(IgnoredContextPathNodesStr))=T -> for(offset < nodeArray.length)=T -> exit loop [PATH2] if(config == null)=T -> return [PATH3] if(config == null)=F -> if(!StringUtils.isEmpty(...
true
ok
{"focal": {"class": "MonetaServlet", "name": "init", "signature": "void init(ServletConfig config) throws ServletException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "config", "type": "ServletConfig"}], "return_type": "void"}, "class_info": {"name": "MonetaServlet", "kind": "class", "modifi...
29128975_17
class ParseObservable { @NonNull @CheckReturnValue public static Single<File> getFile(@NonNull final ParseFile file) { return RxTask.single(() -> file.getFileInBackground()); } @NonNull @CheckReturnValue public static Observable<R> find(@NonNull final ParseQuery<R> query); @NonNull @Ch...
rx.parse2.ParseObservable.getFile(mocker(ParseFile.class) .when(it -> it.getFileInBackground()) .thenReturn(it -> Task.forResult(new File("/"))) .mock()) .test() .assertNoErrors() .assertComplete(); }...
[FOCAL] @NonNull @CheckReturnValue public static Single<File> ParseObservable.getFile(ParseFile file) [CLASS] class ParseObservable [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] RxTask.single/1, ParseFile.getFileInBackground/0 [INPUTS] branches=- | result=file [COLLABORATORS] par...
/* static context [FOCAL] @NonNull @CheckReturnValue public static Single<File> ParseObservable.getFile(ParseFile file) [INPUTS] branches=- | result=file [COLLABORATORS] param file:ParseFile getFileInBackground/0 [CALLS-EXTERNAL] RxTask.single/1, ParseFile.getFileInBackground/0 */
/* static context [FOCAL] @NonNull @CheckReturnValue public static Single<File> ParseObservable.getFile(ParseFile file) [INPUTS] branches=- | result=file [COLLABORATORS] param file:ParseFile getFileInBackground/0 [CALLS-EXTERNAL] RxTask.single/1, ParseFile.getFileInBackground/0 */ class ParseObservable { @NonNull ...
true
ok
{"focal": {"class": "ParseObservable", "name": "getFile", "signature": "Single<File> getFile(ParseFile file)", "start_line": 3, "modifiers": "@NonNull @CheckReturnValue public static", "params": [{"name": "file", "type": "ParseFile"}], "return_type": "Single<File>"}, "class_info": {"name": "ParseObservable", "kind": "c...
29140204_6
class FtpBuildProcessAdapter extends SyncBuildProcessAdapter { @Override public BuildFinishedStatus runProcess() { FTPClient clientToDisconnect = null; try { final URL targetUrl = new URL(myTarget); final String host = targetUrl.getHost(); final int port = targetUrl.getPort(); fina...
myRunnerParameters.put(FTPRunnerConstants.PARAM_TRANSFER_MODE, FTPRunnerConstants.TRANSFER_MODE_BINARY); File sourceXml = new File("src/test/resources/data.xml"); if (!sourceXml.exists()) { sourceXml = new File("deploy-runner-agent/src/test/resources/data.xml"); } Map<File, String> map = new...
[FOCAL] @Override public BuildFinishedStatus FtpBuildProcessAdapter.runProcess() [CLASS] class FtpBuildProcessAdapter extends SyncBuildProcessAdapter [METRICS] loc=116 cc=15 branches=9 loops=0 returns=5 throws=0 nesting=3 [CALLS-INTERNAL] FTPClient createClient(); boolean isImplicit(String secureMode); boolean isNone(S...
/* static context [FOCAL] @Override public BuildFinishedStatus FtpBuildProcessAdapter.runProcess() [PATH1] if(encodedPath.length() > 0)=T -> if(port > 0)=T -> if(myIsActive)=T -> if(!loginSuccessful)=F -> if(FTPRunnerConstants.TRANSFER_MODE_BINARY.equals(myTransferMode))=F -> if(FTPRunnerConstants.TRANSFER_MODE_ASCII.e...
/* static context [FOCAL] @Override public BuildFinishedStatus FtpBuildProcessAdapter.runProcess() [PATH1] if(encodedPath.length() > 0)=T -> if(port > 0)=T -> if(myIsActive)=T -> if(!loginSuccessful)=F -> if(FTPRunnerConstants.TRANSFER_MODE_BINARY.equals(myTransferMode))=F -> if(FTPRunnerConstants.TRANSFER_MODE_ASCII.e...
true
ok
{"focal": {"class": "FtpBuildProcessAdapter", "name": "runProcess", "signature": "BuildFinishedStatus runProcess()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "BuildFinishedStatus"}, "class_info": {"name": "FtpBuildProcessAdapter", "kind": "class", "modifiers": "", "superclass": "Sy...
29201308_0
class BinaryData extends InputStream { public void close() throws IOException { // force nothing more to be read from the in-memory data, let the garbage collected free up its memory, // but avoid NPEs by setting inMemoryData to a small zero-byte array. inMemoryData = new byte[0]; i...
// because our tests use ByteArrayInputStream, close has no effect on it. // But close does have an effect on our in-memory data - closing the stream closes reads to the in-memory data BinaryData binaryData = new BinaryData(buildByteArray("123"), buildInputStream("")); // show we can st...
[FOCAL] public void BinaryData.close() [CLASS] class BinaryData extends InputStream [METRICS] loc=12 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] streamData.close/0, onCloseAction.run/0 [EXCEPTIONS] declares IOException [PATH1] if(onCloseAction != null)=T [PATH2] if(onCloseAction != null)=F [CO...
/* static context [FOCAL] public void BinaryData.close() [PATH1] if(onCloseAction != null)=T [PATH2] if(onCloseAction != null)=F [COLLABORATORS] field streamData close/0; field onCloseAction run/0 [EXCEPTIONS] declares IOException [CALLS-EXTERNAL] streamData.close/0, onCloseAction.run/0 */
/* static context [FOCAL] public void BinaryData.close() [PATH1] if(onCloseAction != null)=T [PATH2] if(onCloseAction != null)=F [COLLABORATORS] field streamData close/0; field onCloseAction run/0 [EXCEPTIONS] declares IOException [CALLS-EXTERNAL] streamData.close/0, onCloseAction.run/0 */ class BinaryData extends Inpu...
true
ok
{"focal": {"class": "BinaryData", "name": "close", "signature": "void close() throws IOException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "BinaryData", "kind": "class", "modifiers": "", "superclass": "InputStream", "interfaces": null, "fields": [], "members"...
29228340_0
class SphinxManager { public static String getCommand(String string){ int index = string.indexOf("invocabot"); // If "invocabot" is not in string. if (index == -1) return null; // If "invocabot" is last word in string. String words[] = string.split(" "); if (words[words.le...
setUp(); //ARRANGE String input = "hi my name is julio schedule an appointment with chris at twelve p m tomorrow"; String desiredOutput = null; //ACT String output = SphinxManager.getCommand(input); //ASSERT assertEquals(desiredOutput, output); tearDown(); } }
[FOCAL] public static String SphinxManager.getCommand(String string) [CLASS] class SphinxManager [METRICS] loc=30 cc=5 branches=4 loops=0 returns=4 throws=0 nesting=1 [CALLS-EXTERNAL] String.indexOf/1, String.split/1, words[words.length - 1].equals/1, String.equalsIgnoreCase/1, String.indexOf/2, "invocabot".length/0, S...
/* static context [FOCAL] public static String SphinxManager.getCommand(String string) [PATH1] if(index == -1)=F -> if(words[words.length - 1].equals("invocabot"))=F -> if(string.equalsIgnoreCase("invocabot"))=F -> if(endIndex == -1)=T -> return output [PATH2] if(index == -1)=T -> return null [PATH3] if(index == -1)=F ...
/* static context [FOCAL] public static String SphinxManager.getCommand(String string) [PATH1] if(index == -1)=F -> if(words[words.length - 1].equals("invocabot"))=F -> if(string.equalsIgnoreCase("invocabot"))=F -> if(endIndex == -1)=T -> return output [PATH2] if(index == -1)=T -> return null [PATH3] if(index == -1)=F ...
true
ok
{"focal": {"class": "SphinxManager", "name": "getCommand", "signature": "String getCommand(String string)", "start_line": 3, "modifiers": "public static", "params": [{"name": "string", "type": "String"}], "return_type": "String"}, "class_info": {"name": "SphinxManager", "kind": "class", "modifiers": "", "superclass": n...
29235999_0
class DConnectServiceSpec { public Swagger findProfileSpec(final String profileName) { if (profileName == null) { return null; } synchronized (mProfileSpecs) { return mProfileSpecs.get(profileName.toLowerCase()); } } public DConnectServiceSpec(Devic...
DevicePluginContext pluginContext = Mockito.mock(DevicePluginContext.class); String jsonString = FileLoader.readString("testProfile.json"); DConnectServiceSpec spec = new DConnectServiceSpec(pluginContext); spec.addProfileSpec("testProfile", jsonString); Operation operation = ...
[FOCAL] public Swagger DConnectServiceSpec.findProfileSpec(String profileName) [CLASS] class DConnectServiceSpec [METRICS] loc=8 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] mProfileSpecs.get/1, String.toLowerCase/0 [PATH1] if(profileName == null)=T -> return null [PATH2] if(profileName == null...
/* static context [FOCAL] public Swagger DConnectServiceSpec.findProfileSpec(String profileName) [PATH1] if(profileName == null)=T -> return null [PATH2] if(profileName == null)=F -> return mProfileSpecs.get(profileName.toLowerCase()) [INPUTS] branches=profileName | result=profileName [COLLABORATORS] field mProfileSpec...
/* static context [FOCAL] public Swagger DConnectServiceSpec.findProfileSpec(String profileName) [PATH1] if(profileName == null)=T -> return null [PATH2] if(profileName == null)=F -> return mProfileSpecs.get(profileName.toLowerCase()) [INPUTS] branches=profileName | result=profileName [COLLABORATORS] field mProfileSpec...
true
ok
{"focal": {"class": "DConnectServiceSpec", "name": "findProfileSpec", "signature": "Swagger findProfileSpec(String profileName)", "start_line": 3, "modifiers": "public", "params": [{"name": "profileName", "type": "String"}], "return_type": "Swagger"}, "class_info": {"name": "DConnectServiceSpec", "kind": "class", "modi...
29241103_0
class PluginUrlUtils { public static boolean isHostArte(String host) { return host.equals("www.arte.tv"); } public static String toPluginUrlArte(Uri playUri); public static String toPluginUrlTwitch(Uri playUri); } class PluginUrlUtilsTest { @Test public void isHostArte() throws Exce...
assertTrue(PluginUrlUtils.isHostArte("www.arte.tv")); } }
[FOCAL] public static boolean PluginUrlUtils.isHostArte(String host) [CLASS] class PluginUrlUtils [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] String.equals/1 [INPUTS] branches=- | result=host [DATAFLOW] host@param->L2 [CLASS-MEMBERS] String toPluginUrlArte(Uri playUri); String ...
/* static context [FOCAL] public static boolean PluginUrlUtils.isHostArte(String host) [INPUTS] branches=- | result=host [CALLS-EXTERNAL] String.equals/1 */
/* static context [FOCAL] public static boolean PluginUrlUtils.isHostArte(String host) [INPUTS] branches=- | result=host [CALLS-EXTERNAL] String.equals/1 */ class PluginUrlUtils { public static boolean isHostArte(String host) { return host.equals("www.arte.tv"); } public static String toPluginUrlA...
true
ok
{"focal": {"class": "PluginUrlUtils", "name": "isHostArte", "signature": "boolean isHostArte(String host)", "start_line": 3, "modifiers": "public static", "params": [{"name": "host", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "PluginUrlUtils", "kind": "class", "modifiers": "", "superclass": n...
29248824_25
class OracleRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof Timestamp) { final DateFormat df = new SimpleDateFormat(TIMESTAMP_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_timestamp('", dateString, "',...
final DataRdbms data = instance.getData("valeur espace"); Assert.assertEquals(data.getValue(), "valeur espace"); Assert.assertEquals(data.getParameter(), "'valeur espace'"); } }
[FOCAL] public DataRdbms OracleRdbmsSpecifics.getData(Object object) [CLASS] class OracleRdbmsSpecifics implements RdbmsSpecifics [METRICS] loc=15 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1 [CALLS-EXTERNAL] DateFormat.format/1, genericRdbms.getData/1 [NEW] SimpleDateFormat, GenericDataRdbms [PATH1] if(object ...
/* static context [FOCAL] public DataRdbms OracleRdbmsSpecifics.getData(Object object) [PATH1] if(object instanceof Timestamp)=F -> if(object instanceof Date)=T -> return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:... [PATH2] if(object instanceof Timestamp)=T -> return new GenericDataRdbms("to_t...
/* static context [FOCAL] public DataRdbms OracleRdbmsSpecifics.getData(Object object) [PATH1] if(object instanceof Timestamp)=F -> if(object instanceof Date)=T -> return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:... [PATH2] if(object instanceof Timestamp)=T -> return new GenericDataRdbms("to_t...
true
ok
{"focal": {"class": "OracleRdbmsSpecifics", "name": "getData", "signature": "DataRdbms getData(Object object)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "Object"}], "return_type": "DataRdbms"}, "class_info": {"name": "OracleRdbmsSpecifics", "kind": "class", "modifiers": "", "supercl...
29251742_4
class UrlUtil { public static String buildUrlWithQueryParams(@NonNull Logger logger, @NonNull String baseUrl, @NonNull Map<String, String> queryParams) { final Uri.Builder uriBuilder = Uri.parse(baseUrl).buildUpon(); for (Map.Entry<String, String> en...
String baseURL = "http://www.fakex.com/course"; Map<String, String> queryParams = new HashMap<>(); queryParams.put("search_query", "mobile linux"); String expected = "http://www.fakex.com/course?search_query=mobile%20linux"; String output = UrlUtil.buildUrlWithQueryParams(logger...
[FOCAL] public static String UrlUtil.buildUrlWithQueryParams(Logger logger, String baseUrl, Map<String, String> queryParams) [CLASS] class UrlUtil [METRICS] loc=10 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] Uri.parse(baseUrl).buildUpon/0, Uri.parse/1, Map<String, String>.entrySet/0, Uri.Build...
/* static context [FOCAL] public static String UrlUtil.buildUrlWithQueryParams(Logger logger, String baseUrl, Map<String, String> queryParams) [PATH1] foreach(Map.Entry<String, String> entry : queryParams.entrySet())=T -> exit loop -> return finalUrl [PATH2] foreach(Map.Entry<String, String> entry : queryParams.entrySe...
/* static context [FOCAL] public static String UrlUtil.buildUrlWithQueryParams(Logger logger, String baseUrl, Map<String, String> queryParams) [PATH1] foreach(Map.Entry<String, String> entry : queryParams.entrySet())=T -> exit loop -> return finalUrl [PATH2] foreach(Map.Entry<String, String> entry : queryParams.entrySe...
true
ok
{"focal": {"class": "UrlUtil", "name": "buildUrlWithQueryParams", "signature": "String buildUrlWithQueryParams(Logger logger, String baseUrl, Map<String, String> queryParams)", "start_line": 3, "modifiers": "public static", "params": [{"name": "logger", "type": "Logger"}, {"name": "baseUrl", "type": "String"}, {"name":...
29281445_29
class Dockers { static public boolean isContainerRunning( String name) { final String output = new LocalExec(Contexts.currentContext()) .command("docker") .args("ps") .runCaptureOutput() .asString() .trim(); S...
DockerTestHelper.assumeDockerIsPresent(); boolean containerRunning = Dockers.isContainerRunning("nosuchcontainer"); assertThat(containerRunning, is(false)); } }
[FOCAL] static public boolean Dockers.isContainerRunning(String name) [CLASS] class Dockers [METRICS] loc=50 cc=7 branches=2 loops=2 returns=1 throws=1 nesting=3 [CALLS-EXTERNAL] new LocalExec(Contexts.currentContext()) .command("docker....trim/0, new LocalExec(Contexts.currentContext()) .command("docker....asString/0,...
/* static context [FOCAL] static public boolean Dockers.isContainerRunning(String name) [THROWS-WHEN] BlazeException when lines == null || lines.length < 1 [PATH1] if(lines == null || lines.length < 1)=F -> for(i < lines.length)=T -> for(j < headers.size())=T -> switch(header.getName().toLowerCase())=case "container id...
/* static context [FOCAL] static public boolean Dockers.isContainerRunning(String name) [THROWS-WHEN] BlazeException when lines == null || lines.length < 1 [PATH1] if(lines == null || lines.length < 1)=F -> for(i < lines.length)=T -> for(j < headers.size())=T -> switch(header.getName().toLowerCase())=case "container id...
true
ok
{"focal": {"class": "Dockers", "name": "isContainerRunning", "signature": "boolean isContainerRunning(String name)", "start_line": 3, "modifiers": "static public", "params": [{"name": "name", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "Dockers", "kind": "class", "modifiers": "", "superclass":...
29349352_0
class DocProcessor extends AbstractProcessor<CtElement> { public void process(CtElement element) { if (element instanceof CtType || element instanceof CtField || element instanceof CtExecutable) { Set<ModifierKind> modifiers = ((CtModifiable) element).getModifiers(); if (modifiers.contains(PUBLIC) || modifier...
final String[] args = { "-i", "src/test/resources/src/DocTest.java", "-o", "target/spooned/", "-c" // It's mandatory here to enable comments }; final Launcher launcher = new Launcher(); launcher.setArgs(args); launcher.run(); final Factory factory = launcher.getFactory(); final ProcessingMan...
[FOCAL] public void DocProcessor.process(CtElement element) [CLASS] class DocProcessor extends AbstractProcessor<CtElement> [METRICS] loc=12 cc=4 branches=3 loops=0 returns=0 throws=0 nesting=3 [CALLS-EXTERNAL] ((CtModifiable) element).getModifiers/0, Set<ModifierKind>.contains/1, CtElement.getDocComment/0, String.equa...
/* static context [FOCAL] public void DocProcessor.process(CtElement element) [PATH1] if(element instanceof CtType || element instanceof CtField || element instanceof CtExecutable)=T -> if(modifiers.contains(PUBLIC) || modifiers.contains(PROTECTED))=T -> if(docComment == null || docComment.equals(""))=T [PATH2] if(elem...
/* static context [FOCAL] public void DocProcessor.process(CtElement element) [PATH1] if(element instanceof CtType || element instanceof CtField || element instanceof CtExecutable)=T -> if(modifiers.contains(PUBLIC) || modifiers.contains(PROTECTED))=T -> if(docComment == null || docComment.equals(""))=T [PATH2] if(elem...
true
ok
{"focal": {"class": "DocProcessor", "name": "process", "signature": "void process(CtElement element)", "start_line": 3, "modifiers": "public", "params": [{"name": "element", "type": "CtElement"}], "return_type": "void"}, "class_info": {"name": "DocProcessor", "kind": "class", "modifiers": "", "superclass": "AbstractPro...
29349453_21
class AeolusConfig { public String getNimbusHost() { return (String)this.config.get(NIMBUS_HOST); } public Integer getNimbusPort(); public int getNimbusPortValue(); } class AeolusConfigTest { @Test public void testNimbusHost() {
AeolusConfig config = new AeolusConfig(); String hostName = "dummy"; config.config.put(AeolusConfig.NIMBUS_HOST, hostName); Assert.assertEquals(hostName, config.getNimbusHost()); } }
[FOCAL] public String AeolusConfig.getNimbusHost() [CLASS] class AeolusConfig [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] this.config.get/1 [FIELDS] read=config [COLLABORATORS] field config get/1 [CLASS-MEMBERS] Integer getNimbusPort(); int getNimbusPortValue() [TEST] AeolusCon...
/* static context [FOCAL] public String AeolusConfig.getNimbusHost() [COLLABORATORS] field config get/1 [FIELDS] read=config [CALLS-EXTERNAL] this.config.get/1 */
/* static context [FOCAL] public String AeolusConfig.getNimbusHost() [COLLABORATORS] field config get/1 [FIELDS] read=config [CALLS-EXTERNAL] this.config.get/1 */ class AeolusConfig { public String getNimbusHost() { return (String)this.config.get(NIMBUS_HOST); } public Integer getNimbusPort(); public int getNim...
true
ok
{"focal": {"class": "AeolusConfig", "name": "getNimbusHost", "signature": "String getNimbusHost()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "AeolusConfig", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{...
29350019_17
class ImageRetinaApiImpl extends BaseRetinaApi implements Images { @Override public ByteArrayInputStream getImage(Integer scalar, ImagePlotShape shape, ImageEncoding imageEncoding, Double sparsity, Model model) throws JsonProcessingException, ApiException { validateRequiredModels(model); ...
when(api.getImageForExpression(eq(TERM_1_JSON), eq(NOT_NULL_RETINA), isNull(Integer.class), isNull(String.class), isNull(String.class), isNull(Double.class))).thenReturn(new ByteArrayInputStream(new byte[1])); imageRetinaApiImpl.getImage(TERM_1_JSON); verify(api, times(1)).getImageForExpression(...
[FOCAL] @Override public ByteArrayInputStream ImageRetinaApiImpl.getImage(Integer scalar, ImagePlotShape shape, ImageEncoding imageEncoding, Double sparsity, Model model) [CLASS] class ImageRetinaApiImpl extends BaseRetinaApi implements Images [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-...
/* static context [FOCAL] @Override public ByteArrayInputStream ImageRetinaApiImpl.getImage(Integer scalar, ImagePlotShape shape, ImageEncoding imageEncoding, Double sparsity, Model model) [INPUTS] branches=- | result=imageEncoding, model, scalar, shape, sparsity [COLLABORATORS] param model:Model toJson/0 [EXCEPTIONS] ...
/* static context [FOCAL] @Override public ByteArrayInputStream ImageRetinaApiImpl.getImage(Integer scalar, ImagePlotShape shape, ImageEncoding imageEncoding, Double sparsity, Model model) [INPUTS] branches=- | result=imageEncoding, model, scalar, shape, sparsity [COLLABORATORS] param model:Model toJson/0 [EXCEPTIONS] ...
true
ok
{"focal": {"class": "ImageRetinaApiImpl", "name": "getImage", "signature": "ByteArrayInputStream getImage(Integer scalar, ImagePlotShape shape, ImageEncoding imageEncoding, Double sparsity, Model model) throws JsonProcessingException, ApiException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": ...
29351988_0
class MyClass { public static Integer add(Integer a, Integer b){ return a + b; } } class MyClassTest { @Test public void testAdd(){
Integer a = new Integer(2); Integer b = new Integer(2); Integer result = new Integer(4); assertEquals(result, MyClass.add(a, b)); } }
[FOCAL] public static Integer MyClass.add(Integer a, Integer b) [CLASS] class MyClass [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=a, b [DATAFLOW] a@param->L2; b@param->L2 [TEST] MyClassTest: @Test public void testAdd()
/* static context [FOCAL] public static Integer MyClass.add(Integer a, Integer b) [INPUTS] branches=- | result=a, b */
/* static context [FOCAL] public static Integer MyClass.add(Integer a, Integer b) [INPUTS] branches=- | result=a, b */ class MyClass { public static Integer add(Integer a, Integer b){ return a + b; } } class MyClassTest { @Test public void testAdd(){
true
ok
{"focal": {"class": "MyClass", "name": "add", "signature": "Integer add(Integer a, Integer b)", "start_line": 3, "modifiers": "public static", "params": [{"name": "a", "type": "Integer"}, {"name": "b", "type": "Integer"}], "return_type": "Integer"}, "class_info": {"name": "MyClass", "kind": "class", "modifiers": "", "s...
29397245_126
class KmarkProcessor { public static String process(final String input) { try { return new KmarkProcessor().process(new StringReader(input)); } catch (IOException ignore) { //never happen, it's string reader return null; } } private KmarkProcessor(); public static String escape...
assertEquals(readTestFile("kmark/out11.out"), KmarkProcessor.process(readTestFile("kmark/in11.md"))); } }
[FOCAL] public static String KmarkProcessor.process(String input) [CLASS] class KmarkProcessor [METRICS] loc=8 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] new KmarkProcessor().process/1 [NEW] KmarkProcessor, StringReader [EXCEPTIONS] catches IOException ignore [PATH1] try-body throws -> return...
/* static context [FOCAL] public static String KmarkProcessor.process(String input) [PATH1] try-body throws -> return null [PATH2] return new KmarkProcessor().process(new StringReader(input)) [INPUTS] branches=- | result=input [EXCEPTIONS] catches IOException ignore [NEW] KmarkProcessor, StringReader [CALLS-EXTERNAL] n...
/* static context [FOCAL] public static String KmarkProcessor.process(String input) [PATH1] try-body throws -> return null [PATH2] return new KmarkProcessor().process(new StringReader(input)) [INPUTS] branches=- | result=input [EXCEPTIONS] catches IOException ignore [NEW] KmarkProcessor, StringReader [CALLS-EXTERNAL] n...
true
ok
{"focal": {"class": "KmarkProcessor", "name": "process", "signature": "String process(String input)", "start_line": 3, "modifiers": "public static", "params": [{"name": "input", "type": "String"}], "return_type": "String"}, "class_info": {"name": "KmarkProcessor", "kind": "class", "modifiers": "", "superclass": null, "...
29432931_27
class Experiment { public boolean hasForcedChoice() { return forcedChoice != null; } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); public ParticipatingExperiment participate(); public PrefetchedExperiment prefe...
String name = "test-experiment"; Alternative test = new Alternative("test"); Experiment experiment = new ExperimentBuilder(mockSixpack) .withName(name) .withAlternatives(test) .build(); assertFalse(experiment.hasForcedChoice()); a...
[FOCAL] public boolean Experiment.hasForcedChoice() [CLASS] class Experiment [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); ParticipatingExperiment participate...
/* static context [FOCAL] public boolean Experiment.hasForcedChoice() */
/* static context [FOCAL] public boolean Experiment.hasForcedChoice() */ class Experiment { public boolean hasForcedChoice() { return forcedChoice != null; } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); public Par...
true
ok
{"focal": {"class": "Experiment", "name": "hasForcedChoice", "signature": "boolean hasForcedChoice()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "Experiment", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "mock...
29476598_13
class StorageWriter implements IWriter { public boolean writeNonDefaultDataObject(Object object, String fileName) { try { ISerializer serializer = null; try { serializer = serializerQueue.take(); } catch (InterruptedException e1) { Thread.interrupted(); } if (null == serializer) { log.err...
doThrow(InterruptedException.class).when(serializerQueue).take(); storageWriter.writeNonDefaultDataObject(new Object(), "myFile"); verifyZeroInteractions(writingChannelManager, streamProvider, extendedByteBufferOutputStream); } }
[FOCAL] public boolean StorageWriter.writeNonDefaultDataObject(Object object, String fileName) [CLASS] class StorageWriter implements IWriter [METRICS] loc=41 cc=7 branches=2 loops=0 returns=5 throws=0 nesting=3 [CALLS-EXTERNAL] BlockingQueue<ISerializer>.take/0, Thread.interrupted/0, log.error/1, writingFolderPath.res...
/* static context [FOCAL] public boolean StorageWriter.writeNonDefaultDataObject(Object object, String fileName) [PATH1] try-body throws -> if(null == serializer)=F -> if(Files.exists(path))=T -> return true [PATH2] if(null == serializer)=T -> return false [PATH3] if(null == serializer)=F -> if(Files.exists(path))=F ->...
/* static context [FOCAL] public boolean StorageWriter.writeNonDefaultDataObject(Object object, String fileName) [PATH1] try-body throws -> if(null == serializer)=F -> if(Files.exists(path))=T -> return true [PATH2] if(null == serializer)=T -> return false [PATH3] if(null == serializer)=F -> if(Files.exists(path))=F ->...
true
ok
{"focal": {"class": "StorageWriter", "name": "writeNonDefaultDataObject", "signature": "boolean writeNonDefaultDataObject(Object object, String fileName)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "Object"}, {"name": "fileName", "type": "String"}], "return_type": "boolean"}, "class_...
29481791_16
class Factory { public static Map<URI, Object> instantiate(final Iterable<? extends Statement> model, final URI... ids) { final Map<Resource, URI> types = Maps.newLinkedHashMap(); final Multimap<Resource, Statement> stmt = ArrayListMultimap.create(); for (final Statement statem...
Assert.assertEquals(ALICE, Factory.instantiate(// ImmutableMap.<String, Object>of("name", "Alice", "age", 84), // new URIImpl(FactoryTest.BASE + "#create"), Object.class)); } }
[FOCAL] public static Map<URI, Object> Factory.instantiate(Iterable<? extends Statement> model, URI... ids) [CLASS] class Factory [METRICS] loc=75 cc=16 branches=7 loops=8 returns=1 throws=0 nesting=4 [CALLS-INTERNAL] T instantiate(Iterable<? extends Statement> model, URI id, Class<T> type) [CALLS-EXTERNAL] Maps.newLin...
/* static context [FOCAL] public static Map<URI, Object> Factory.instantiate(Iterable<? extends Statement> model, URI... ids) [PATH1] foreach(Statement statement : model)=T -> if(p.equals(RDF.TYPE) && o instanceof URI && o.stringValue().startsWith(SCHEME))=T -> exit loop -> if(ids != null && ids.length > 0)=T -> foreac...
/* static context [FOCAL] public static Map<URI, Object> Factory.instantiate(Iterable<? extends Statement> model, URI... ids) [PATH1] foreach(Statement statement : model)=T -> if(p.equals(RDF.TYPE) && o instanceof URI && o.stringValue().startsWith(SCHEME))=T -> exit loop -> if(ids != null && ids.length > 0)=T -> foreac...
true
ok
{"focal": {"class": "Factory", "name": "instantiate", "signature": "Map<URI, Object> instantiate(Iterable<? extends Statement> model, URI... ids)", "start_line": 3, "modifiers": "public static", "params": [{"name": "model", "type": "Iterable<? extends Statement>"}, {"name": "ids", "type": "URI..."}], "return_type": "Ma...
29500340_0
class FeedService { public Observable<List<FeedItem>> feed(String username) { return user.findId(username).toObservable() .flatMap(userid -> { if (StringUtils.hasText(userid)) { return Observable.from(repo.findByUserid(userid)); } else { return Observable.just(singletonFeed("Unknown user: ...
List<FeedItem> feedItems = Arrays.asList(new FeedItem(USERID, USERNAME, FEEDTEXT, Date.from(LocalDateTime.now().plusDays(1).toInstant(ZoneOffset.UTC))), new FeedItem(USERID, USERNAME, FEEDTEXT + "2")); when(repo.findByUserid(eq(USERID)))//, isA(PageRequest.class))) .thenReturn(toFuture(feedItems)); when(user....
[FOCAL] public Observable<List<FeedItem>> FeedService.feed(String username) [CLASS] class FeedService [METRICS] loc=13 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] List<FeedItem> singletonFeed(String text) [CALLS-EXTERNAL] user.findId(username).toObservable() .flatMap(userid -> {....toSortedLis...
/* static context [FOCAL] public Observable<List<FeedItem>> FeedService.feed(String username) [INPUTS] branches=- | result=username, repo, user [COLLABORATORS] field user:UserService findId/1; field repo:FeedItemRepository findByUserid/1; field feedItem2 getCreated/0; field feedItem1 getCreated/0 [CALLS-INTERNAL] List<...
/* static context [FOCAL] public Observable<List<FeedItem>> FeedService.feed(String username) [INPUTS] branches=- | result=username, repo, user [COLLABORATORS] field user:UserService findId/1; field repo:FeedItemRepository findByUserid/1; field feedItem2 getCreated/0; field feedItem1 getCreated/0 [CALLS-INTERNAL] List<...
true
ok
{"focal": {"class": "FeedService", "name": "feed", "signature": "Observable<List<FeedItem>> feed(String username)", "start_line": 3, "modifiers": "public", "params": [{"name": "username", "type": "String"}], "return_type": "Observable<List<FeedItem>>"}, "class_info": {"name": "FeedService", "kind": "class", "modifiers"...
29523538_11
class LogLevelServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { logger.debug("getting log level"); synchronized (mutex) { try { String currentLevel...
Server server = Help.getServer(LogLevelServlet.class); server.start(); try { String[] levels = {"DEBUG", "INFO", "WARN", "WARNING", "ERROR", "FATAL"}; for (String level : levels) { String url = String.format("http://127.0.0.1:%d/admin/log?level=%s", Help.P...
[FOCAL] @Override protected void LogLevelServlet.doGet(HttpServletRequest request, HttpServletResponse response) [CLASS] class LogLevelServlet extends HttpServlet [METRICS] loc=19 cc=2 branches=0 loops=0 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] Logger.debug/1, LogManager.getRootLogger().getLevel().toString/0, LogM...
/* static context [FOCAL] @Override protected void LogLevelServlet.doGet(HttpServletRequest request, HttpServletResponse response) [PATH1] try-body throws -> return [INPUTS] branches=- | result=- | unused=request [COLLABORATORS] param response:HttpServletResponse setCharacterEncoding/1,setContentType/1,setStatus/1,getO...
/* static context [FOCAL] @Override protected void LogLevelServlet.doGet(HttpServletRequest request, HttpServletResponse response) [PATH1] try-body throws -> return [INPUTS] branches=- | result=- | unused=request [COLLABORATORS] param response:HttpServletResponse setCharacterEncoding/1,setContentType/1,setStatus/1,getO...
true
ok
{"focal": {"class": "LogLevelServlet", "name": "doGet", "signature": "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException", "start_line": 3, "modifiers": "@Override protected", "params": [{"name": "request", "type": "HttpServletRequest"}, {"name": "response", "type"...
29557376_87
class LazyString implements ImmutableList<Character>,Higher<lazyString,Character>, Serializable { @Override public LazyString plus(Character value) { return fromLazySeq(string.plus(value)); } public static LazyString fromLazySeq(LazySeq<Character> string); public static LazyString fromIter...
assertThat(empty.plus('a'),equalTo(LazyString.of("a"))); assertThat(str.plus('a'),equalTo(LazyString.of("ahello world"))); } }
[FOCAL] @Override public LazyString LazyString.plus(Character value) [CLASS] class LazyString implements ImmutableList<Character>,Higher<lazyString,Character>, Serializable [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] LazyString fromLazySeq(LazySeq<Character> string) [CALLS-EXTE...
/* static context [FOCAL] @Override public LazyString LazyString.plus(Character value) [INPUTS] branches=- | result=value [COLLABORATORS] field string plus/1 [CALLS-INTERNAL] LazyString fromLazySeq(LazySeq<Character> string) [CALLS-EXTERNAL] string.plus/1 */
/* static context [FOCAL] @Override public LazyString LazyString.plus(Character value) [INPUTS] branches=- | result=value [COLLABORATORS] field string plus/1 [CALLS-INTERNAL] LazyString fromLazySeq(LazySeq<Character> string) [CALLS-EXTERNAL] string.plus/1 */ class LazyString implements ImmutableList<Character>,Higher<l...
true
ok
{"focal": {"class": "LazyString", "name": "plus", "signature": "LazyString plus(Character value)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "value", "type": "Character"}], "return_type": "LazyString"}, "class_info": {"name": "LazyString", "kind": "class", "modifiers": "", "superclass": null...
29582902_1
class TransformerFactory { static String qualifiedTransformerName(String className) { String pkg = TransformerFactory.class.getPackage().getName(); String suffix = Transformer.class.getSimpleName(); StringBuilder sb = new StringBuilder(); sb.append(pkg); sb.append('.'); sb.append(className); ...
assertThat(TransformerFactory.qualifiedTransformerName("Foo"), is(equalTo(getClass().getPackage().getName() + "." + "Foo" + Transformer.class.getSimpleName()))); assertThat(TransformerFactory.qualifiedTransformerName("FooTransformer"), is(equalTo(getClass().getPackage().getName() + ...
[FOCAL] static String TransformerFactory.qualifiedTransformerName(String className) [CLASS] class TransformerFactory [METRICS] loc=12 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] TransformerFactory.class.getPackage().getName/0, TransformerFactory.class.getPackage/0, Transformer.class.getSimpleN...
/* static context [FOCAL] static String TransformerFactory.qualifiedTransformerName(String className) [PATH1] if(!className.endsWith(suffix))=T -> return sb.toString() [PATH2] if(!className.endsWith(suffix))=F -> return sb.toString() [INPUTS] branches=className | result=- [NEW] StringBuilder [CALLS-EXTERNAL] Transforme...
/* static context [FOCAL] static String TransformerFactory.qualifiedTransformerName(String className) [PATH1] if(!className.endsWith(suffix))=T -> return sb.toString() [PATH2] if(!className.endsWith(suffix))=F -> return sb.toString() [INPUTS] branches=className | result=- [NEW] StringBuilder [CALLS-EXTERNAL] Transforme...
true
ok
{"focal": {"class": "TransformerFactory", "name": "qualifiedTransformerName", "signature": "String qualifiedTransformerName(String className)", "start_line": 3, "modifiers": "static", "params": [{"name": "className", "type": "String"}], "return_type": "String"}, "class_info": {"name": "TransformerFactory", "kind": "cla...
29603580_64
class GepardEmbedder { public void setupJBehaveEmbedder(final JBehaveTestCase testCase) { embedder.embedderControls().doVerboseFailures(true).doGenerateViewAfterStories(false).useThreads(1); embedder.useEmbedderMonitor(new NullEmbedderMonitor()); Configuration configuration = configurationF...
//GIVEN in setup Configuration configuration = Mockito.mock(Configuration.class); given(configurationFactory.create(testCase)).willReturn(configuration); //WHEN underTest.setupJBehaveEmbedder(testCase); //THEN verify(instanceStepsFactoryCreator).createForTestCase(...
[FOCAL] public void GepardEmbedder.setupJBehaveEmbedder(JBehaveTestCase testCase) [CLASS] class GepardEmbedder [METRICS] loc=8 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] embedder.embedderControls().doVerboseFailures(true).doGen....useThreads/1, embedder.embedderControls().doVerboseFailures(tr...
/* static context [FOCAL] public void GepardEmbedder.setupJBehaveEmbedder(JBehaveTestCase testCase) [COLLABORATORS] field embedder:Embedder embedderControls/0,useEmbedderMonitor/1,useStepsFactory/1,useConfiguration/1; field configurationFactory:ConfigurationFactory create/1; field instanceStepsFactoryCreator:InstanceSt...
/* static context [FOCAL] public void GepardEmbedder.setupJBehaveEmbedder(JBehaveTestCase testCase) [COLLABORATORS] field embedder:Embedder embedderControls/0,useEmbedderMonitor/1,useStepsFactory/1,useConfiguration/1; field configurationFactory:ConfigurationFactory create/1; field instanceStepsFactoryCreator:InstanceSt...
true
ok
{"focal": {"class": "GepardEmbedder", "name": "setupJBehaveEmbedder", "signature": "void setupJBehaveEmbedder(JBehaveTestCase testCase)", "start_line": 3, "modifiers": "public", "params": [{"name": "testCase", "type": "JBehaveTestCase"}], "return_type": "void"}, "class_info": {"name": "GepardEmbedder", "kind": "class",...
29629640_158
class Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener { @VisibleForTesting boolean isTxConsistent(final Transaction tx, final boolean isSpent) { boolean isActuallySpent = true; ...
Wallet wallet = new Wallet(PARAMS); TransactionOutput to = createMock(TransactionOutput.class); EasyMock.expect(to.isAvailableForSpending()).andReturn(true); EasyMock.expect(to.isMineOrWatched(wallet)).andReturn(true); EasyMock.expect(to.getSpentBy()).andReturn(new TransactionInp...
[FOCAL] @VisibleForTesting boolean Wallet.isTxConsistent(Transaction tx, boolean isSpent) [CLASS] class Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener [METRICS] loc=19 cc=6 branches=4 loops=1 returns=3...
class Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener { @VisibleForTesting boolean isTxConsistent(final Transaction tx, final boolean isSpent) { boolean isActuallySpent = true; ...
false
ok
{"focal": {"class": "Wallet", "name": "isTxConsistent", "signature": "boolean isTxConsistent(Transaction tx, boolean isSpent)", "start_line": 3, "modifiers": "@VisibleForTesting", "params": [{"name": "tx", "type": "Transaction"}, {"name": "isSpent", "type": "boolean"}], "return_type": "boolean"}, "class_info": {"name":...
29653587_37
class HackerNewsClient implements ItemManager, UserManager { @Override public void getStories(@FetchMode String filter, @CacheMode int cacheMode, final ResponseListener<Item[]> listener) { if (listener == null) { return; } Observable.defer(() -> ge...
when(TestRestServiceFactory.hnRestService.topStoriesRx()) .thenReturn(Observable.just(new int[]{1, 2})); client.getStories(ItemManager.TOP_FETCH_MODE, ItemManager.MODE_DEFAULT, storiesListener); verify(TestRestServiceFactory.hnRestService).topStoriesRx(); verify(storiesLi...
[FOCAL] @Override public void HackerNewsClient.getStories(String filter, int cacheMode, ResponseListener<Item[]> listener) [CLASS] class HackerNewsClient implements ItemManager, UserManager [METRICS] loc=12 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] Observable<Item[]> getStoriesObservable(Str...
/* static context [FOCAL] @Override public void HackerNewsClient.getStories(String filter, int cacheMode, ResponseListener<Item[]> listener) [PATH1] if(listener == null)=T -> return [PATH2] if(listener == null)=F [INPUTS] branches=listener | result=- [COLLABORATORS] param listener:ResponseListener<Item[]> onError/1; fi...
/* static context [FOCAL] @Override public void HackerNewsClient.getStories(String filter, int cacheMode, ResponseListener<Item[]> listener) [PATH1] if(listener == null)=T -> return [PATH2] if(listener == null)=F [INPUTS] branches=listener | result=- [COLLABORATORS] param listener:ResponseListener<Item[]> onError/1; fi...
true
ok
{"focal": {"class": "HackerNewsClient", "name": "getStories", "signature": "void getStories(String filter, int cacheMode, ResponseListener<Item[]> listener)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "filter", "type": "String"}, {"name": "cacheMode", "type": "int"}, {"name": "listener", "ty...
29740272_0
class SvnScmProvider extends ScmProvider { @CheckForNull public Instant forkDate(Path rootBaseDir, String referenceBranch) { try { return findFork.findDate(rootBaseDir, referenceBranch); } catch (SVNException e) { LOG.warn("Unable to find fork date with '" + referenceBranch + "'", e); ret...
assertThat(new SvnScmProvider(config, new SvnBlameCommand(config), findFork).forkDate(Paths.get(""), "branch")).isNull(); } }
[FOCAL] @CheckForNull public Instant SvnScmProvider.forkDate(Path rootBaseDir, String referenceBranch) [CLASS] class SvnScmProvider extends ScmProvider [METRICS] loc=9 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] FindFork.findDate/2, LOG.warn/2 [FIELDS] read=findFork:FindFork [EXCEPTIONS] catch...
/* static context [FOCAL] @CheckForNull public Instant SvnScmProvider.forkDate(Path rootBaseDir, String referenceBranch) [PATH1] try-body throws -> return null [PATH2] return findFork.findDate(rootBaseDir, referenceBranch) [INPUTS] branches=- | result=referenceBranch, rootBaseDir, findFork [COLLABORATORS] field findFor...
/* static context [FOCAL] @CheckForNull public Instant SvnScmProvider.forkDate(Path rootBaseDir, String referenceBranch) [PATH1] try-body throws -> return null [PATH2] return findFork.findDate(rootBaseDir, referenceBranch) [INPUTS] branches=- | result=referenceBranch, rootBaseDir, findFork [COLLABORATORS] field findFor...
true
ok
{"focal": {"class": "SvnScmProvider", "name": "forkDate", "signature": "Instant forkDate(Path rootBaseDir, String referenceBranch)", "start_line": 3, "modifiers": "@CheckForNull public", "params": [{"name": "rootBaseDir", "type": "Path"}, {"name": "referenceBranch", "type": "String"}], "return_type": "Instant"}, "class...
29740615_47
class SessionScheduler { public int doWork() { switch (state) { case DISCONNECTED: { if (duringDay) { reply = library.initiate(sessionConfiguration); state = State.CONNECTING; ret...
sessionScheduler.doWork(); verify(library, never()).initiate(sessionConfiguration); } }
[FOCAL] public int SessionScheduler.doWork() [CLASS] class SessionScheduler [METRICS] loc=85 cc=13 branches=7 loops=0 returns=12 throws=0 nesting=3 [CALLS-INTERNAL] void scheduleEnd() [CALLS-EXTERNAL] FixLibrary.initiate/1, Reply<Session>.state/0, Reply<Session>.resultIfPresent/0, ErrorHandler.onError/1, Reply<Session>...
/* static context [FOCAL] public int SessionScheduler.doWork() [PATH1] switch(state)=case CONNECTED -> if(!duringDay)=T -> if(position > 0)=T -> return 1 [PATH2] switch(state)=case DISCONNECTED -> if(duringDay)=F -> return 0 [PATH3] switch(state)=case CONNECTING -> switch(reply.state())=case COMPLETED -> return 1 [PATH...
/* static context [FOCAL] public int SessionScheduler.doWork() [PATH1] switch(state)=case CONNECTED -> if(!duringDay)=T -> if(position > 0)=T -> return 1 [PATH2] switch(state)=case DISCONNECTED -> if(duringDay)=F -> return 0 [PATH3] switch(state)=case CONNECTING -> switch(reply.state())=case COMPLETED -> return 1 [PATH...
true
ok
{"focal": {"class": "SessionScheduler", "name": "doWork", "signature": "int doWork()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "SessionScheduler", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "LONDON", "type": "...
29748259_89
class TsdrHsqlDBPersistenceServiceImpl implements TSDRMetricPersistenceService, TSDRLogPersistenceService, TSDRBinaryPersistenceService { @Override public void storeLog(TSDRLogRecord logRecord) { try { store.store(logRecord); } catch (SQLException e) { LOG.error(...
TSDRLogRecord logRecord = HsqlDBStoreTest.createLogRecord(); impl.storeLog(logRecord); Mockito.verify(store, Mockito.atLeast(1)).store(logRecord); } }
[FOCAL] @Override public void TsdrHsqlDBPersistenceServiceImpl.storeLog(TSDRLogRecord logRecord) [CLASS] class TsdrHsqlDBPersistenceServiceImpl implements TSDRMetricPersistenceService, TSDRLogPersistenceService, TSDRBinaryPersistenceService [METRICS] loc=8 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXT...
/* static context [FOCAL] @Override public void TsdrHsqlDBPersistenceServiceImpl.storeLog(TSDRLogRecord logRecord) [PATH1] try-body throws [COLLABORATORS] field store:HsqlDBStore store/1 [EXCEPTIONS] catches SQLException e [FIELDS] read=store:HsqlDBStore [CALLS-EXTERNAL] HsqlDBStore.store/1, LOG.error/2 */
/* static context [FOCAL] @Override public void TsdrHsqlDBPersistenceServiceImpl.storeLog(TSDRLogRecord logRecord) [PATH1] try-body throws [COLLABORATORS] field store:HsqlDBStore store/1 [EXCEPTIONS] catches SQLException e [FIELDS] read=store:HsqlDBStore [CALLS-EXTERNAL] HsqlDBStore.store/1, LOG.error/2 */ class TsdrHs...
true
ok
{"focal": {"class": "TsdrHsqlDBPersistenceServiceImpl", "name": "storeLog", "signature": "void storeLog(TSDRLogRecord logRecord)", "start_line": 4, "modifiers": "@Override public", "params": [{"name": "logRecord", "type": "TSDRLogRecord"}], "return_type": "void"}, "class_info": {"name": "TsdrHsqlDBPersistenceServiceImp...
29807428_0
class AssetConverter implements NativeConverter<Asset, ResourceLocation> { @Override public Asset toNova(ResourceLocation resource) { return new Asset(resource.getResourceDomain(), resource.getResourcePath()); } public static AssetConverter instance(); @Override public Class<Asset> getNovaSide(); @Override pu...
assertThat(converter.toNova(new ResourceLocation("nova", "stuff"))).isEqualTo(new Asset("nova", "stuff")); assertThat(converter.toNova(new ResourceLocation("nova:otherStuff"))).isEqualTo(new Asset("nova", "otherStuff")); assertThat(converter.toNova(new ResourceLocation("nova:otherStuff"))).isEqualTo(new Asset("no...
[FOCAL] @Override public Asset AssetConverter.toNova(ResourceLocation resource) [CLASS] class AssetConverter implements NativeConverter<Asset, ResourceLocation> [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] ResourceLocation.getResourceDomain/0, ResourceLocation.getResourcePath/0 ...
/* static context [FOCAL] @Override public Asset AssetConverter.toNova(ResourceLocation resource) [INPUTS] branches=- | result=resource [COLLABORATORS] param resource:ResourceLocation getResourceDomain/0,getResourcePath/0 [NEW] Asset [CALLS-EXTERNAL] ResourceLocation.getResourceDomain/0, ResourceLocation.getResourcePat...
/* static context [FOCAL] @Override public Asset AssetConverter.toNova(ResourceLocation resource) [INPUTS] branches=- | result=resource [COLLABORATORS] param resource:ResourceLocation getResourceDomain/0,getResourcePath/0 [NEW] Asset [CALLS-EXTERNAL] ResourceLocation.getResourceDomain/0, ResourceLocation.getResourcePat...
true
ok
{"focal": {"class": "AssetConverter", "name": "toNova", "signature": "Asset toNova(ResourceLocation resource)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "resource", "type": "ResourceLocation"}], "return_type": "Asset"}, "class_info": {"name": "AssetConverter", "kind": "class", "modifiers": ...
29876931_134
class FragaSvarServiceImpl implements FragaSvarService { @Override public Map<String, Long> getNbrOfUnhandledFragaSvarForCareUnits(List<String> vardenheterIds, Set<String> intygsTyper) { Map<String, Long> resultsMap = new HashMap<>(); if (vardenheterIds == null || vardenheterIds.isEmpty()) { ...
List<GroupableItem> queryResult = new ArrayList<>(); when(fragasvarRepositoryMock.getUnhandledWithEnhetIdsAndIntygstyper(anyList(), anySet())).thenReturn(queryResult); Map<String, Long> resultMap = new HashMap<>(); resultMap.put("HSA1", 2L); when(statisticsGroupByUtil.toSekret...
[FOCAL] @Override public Map<String, Long> FragaSvarServiceImpl.getNbrOfUnhandledFragaSvarForCareUnits(List<String> vardenheterIds, Set<String> intygsTyper) [CLASS] class FragaSvarServiceImpl implements FragaSvarService [METRICS] loc=18 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1 [CALLS-EXTERNAL] List<String>....
class FragaSvarServiceImpl implements FragaSvarService { @Override public Map<String, Long> getNbrOfUnhandledFragaSvarForCareUnits(List<String> vardenheterIds, Set<String> intygsTyper) { Map<String, Long> resultsMap = new HashMap<>(); if (vardenheterIds == null || vardenheterIds.isEmpty()) { ...
false
ok
{"focal": {"class": "FragaSvarServiceImpl", "name": "getNbrOfUnhandledFragaSvarForCareUnits", "signature": "Map<String, Long> getNbrOfUnhandledFragaSvarForCareUnits(List<String> vardenheterIds, Set<String> intygsTyper)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "vardenheterIds", "type": "Li...
29888015_19
class XmlParser implements TextParser { @Override public Component parse(String source) { try { source = "<span>" + source + "</span>"; JAXBContext context = JAXBContext.newInstance(Element.class); Unmarshaller unmarshaller = context.createUnmarshaller(); Element tag = (Element) unmarshal...
Component component = TextParsers.XML.parse("<hover action=\"show_text\" value=\"bar\">foo</hover>"); TextComponent expected = TextComponent.of("").append(TextComponent.of("foo") .hoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.of("bar")))); Assert.assertEquals(e...
[FOCAL] @Override public Component XmlParser.parse(String source) [CLASS] class XmlParser implements TextParser [METRICS] loc=14 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1 [CALLS-EXTERNAL] JAXBContext.newInstance/1, JAXBContext.createUnmarshaller/0, Unmarshaller.unmarshal/1, TextComponent.builder().content/1,...
/* static context [FOCAL] @Override public Component XmlParser.parse(String source) [THROWS-WHEN] RuntimeException when try-body throws [PATH1] try-body throws -> throw new RuntimeException("Failed to parse: " + source, e) [PATH2] return builder.build() [INPUTS] branches=- | result=source [EXCEPTIONS] throws RuntimeExc...
/* static context [FOCAL] @Override public Component XmlParser.parse(String source) [THROWS-WHEN] RuntimeException when try-body throws [PATH1] try-body throws -> throw new RuntimeException("Failed to parse: " + source, e) [PATH2] return builder.build() [INPUTS] branches=- | result=source [EXCEPTIONS] throws RuntimeExc...
true
ok
{"focal": {"class": "XmlParser", "name": "parse", "signature": "Component parse(String source)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "source", "type": "String"}], "return_type": "Component"}, "class_info": {"name": "XmlParser", "kind": "class", "modifiers": "", "superclass": null, "int...
29904381_32
class LatexSectionTitleRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Title title){render(null,title);public void render(Title title){render(null,title);} public void render(Title title){render(null,title);public LatexSectionTitleRenderer(CrossMediaManager cmm, DefaultSett...
section.setId(null); renderer.render(section,title); List<String> content = renderer.getContent(); OfxContentDebugger.debug(content); Assert.assertEquals(2, content.size()); } }
[FOCAL] public void LatexSectionTitleRenderer.render(Title title) [CLASS] class LatexSectionTitleRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer [METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void render(Section section, Title title) [DATAFLOW] title@param->L...
/* static context [FOCAL] public void LatexSectionTitleRenderer.render(Title title) [CALLS-INTERNAL] void render(Section section, Title title) */
/* static context [FOCAL] public void LatexSectionTitleRenderer.render(Title title) [CALLS-INTERNAL] void render(Section section, Title title) */ class LatexSectionTitleRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Title title){render(null,title);public void render(Title ti...
true
ok
{"focal": {"class": "LatexSectionTitleRenderer", "name": "render", "signature": "void render(Title title)", "start_line": 3, "modifiers": "public", "params": [{"name": "title", "type": "Title"}], "return_type": "void"}, "class_info": {"name": "LatexSectionTitleRenderer", "kind": "class", "modifiers": "", "superclass": ...
29917329_63
class QuestionnaireParser { public QuestionnaireParsingResult parse(String pathname) throws IOException { EncodersQLLexer lexer = new EncodersQLLexer(new ANTLRFileStream(pathname)); EncodersQLParser parser = new EncodersQLParser(new CommonTokenStream(lexer)); final List<SyntaxError> syntaxErrors = new ArrayLis...
QuestionnaireParsingResult result = parser.parse(RESOURCE_ROOT + "ql/input_form.ql"); assertThat(result, is(notNullValue())); List<SyntaxError> syntaxErrors = result.getSyntaxErrors(); assertThat(syntaxErrors.toString(), syntaxErrors.size(), is(0)); Questionnaire questionnaire = result.getQuestionnaire(); ...
[FOCAL] public QuestionnaireParsingResult QuestionnaireParser.parse(String pathname) [CLASS] class QuestionnaireParser [METRICS] loc=21 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] EncodersQLParser.addErrorListener/1, List<SyntaxError>.add/1, EncodersQLParser.questionnaire/0, ParseTreeToAbstrac...
/* static context [FOCAL] public QuestionnaireParsingResult QuestionnaireParser.parse(String pathname) [INPUTS] branches=- | result=pathname [EXCEPTIONS] declares IOException [NEW] EncodersQLLexer, ANTLRFileStream, EncodersQLParser, CommonTokenStream, ArrayList<>, BaseErrorListener, SyntaxError, TextLocation, ParseTree...
/* static context [FOCAL] public QuestionnaireParsingResult QuestionnaireParser.parse(String pathname) [INPUTS] branches=- | result=pathname [EXCEPTIONS] declares IOException [NEW] EncodersQLLexer, ANTLRFileStream, EncodersQLParser, CommonTokenStream, ArrayList<>, BaseErrorListener, SyntaxError, TextLocation, ParseTree...
true
ok
{"focal": {"class": "QuestionnaireParser", "name": "parse", "signature": "QuestionnaireParsingResult parse(String pathname) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "pathname", "type": "String"}], "return_type": "QuestionnaireParsingResult"}, "class_info": {"name": "Questionnaire...
29917907_8
class LettuceManagementImpl implements LettuceManagement { @Override public String setHash(String hashName, Map<String, String> map) { LOG.debug("Set hash map {}", hashName); return this.redisConnection.hmset(hashName, map); } @Override public boolean setHashEntry(String hashName, String key, String ...
when(this.redisConnection.hmset((String) Matchers.anyObject(), Matchers.anyMap())).thenReturn(OK); assertTrue("Hash map set", OK.equals(this.lettuceManagement.setHash(MAPNAME, TEST_MAP))); } }
[FOCAL] @Override public String LettuceManagementImpl.setHash(String hashName, Map<String, String> map) [CLASS] class LettuceManagementImpl implements LettuceManagement [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Logger.debug/2, RedisConnection<String, String>.hmset/2 [FIELDS] ...
/* static context [FOCAL] @Override public String LettuceManagementImpl.setHash(String hashName, Map<String, String> map) [INPUTS] branches=- | result=hashName, map, redisConnection [COLLABORATORS] field redisConnection:RedisConnection<String, String> hmset/2 [FIELDS] read=LOG:Logger, redisConnection:RedisConnection<St...
/* static context [FOCAL] @Override public String LettuceManagementImpl.setHash(String hashName, Map<String, String> map) [INPUTS] branches=- | result=hashName, map, redisConnection [COLLABORATORS] field redisConnection:RedisConnection<String, String> hmset/2 [FIELDS] read=LOG:Logger, redisConnection:RedisConnection<St...
true
ok
{"focal": {"class": "LettuceManagementImpl", "name": "setHash", "signature": "String setHash(String hashName, Map<String, String> map)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "hashName", "type": "String"}, {"name": "map", "type": "Map<String, String>"}], "return_type": "String"}, "class_...
29918398_1
class BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener { public void setBoardListener(BoardListener listener) { mBoardListener = listener; } public BoardView(Context context); public BoardView(Context context, AttributeSet attrs); public BoardView(Contex...
BoardView.BoardListener boardListener = mock(BoardView.BoardListener.class); subject.setBoardListener(boardListener); createColumnsAndDrag(adapter); verify(boardListener).onItemChangedPosition(anyInt(), anyInt(), anyInt(), anyInt()); } }
[FOCAL] public void BoardView.setBoardListener(BoardListener listener) [CLASS] class BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [DATAFLOW] listener@param->L2 [CLASS-MEMBERS] BoardView(Context context); BoardView(...
/* static context [FOCAL] public void BoardView.setBoardListener(BoardListener listener) */
/* static context [FOCAL] public void BoardView.setBoardListener(BoardListener listener) */ class BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener { public void setBoardListener(BoardListener listener) { mBoardListener = listener; } public BoardView(Context contex...
true
ok
{"focal": {"class": "BoardView", "name": "setBoardListener", "signature": "void setBoardListener(BoardListener listener)", "start_line": 3, "modifiers": "public", "params": [{"name": "listener", "type": "BoardListener"}], "return_type": "void"}, "class_info": {"name": "BoardView", "kind": "class", "modifiers": "", "sup...
29959880_93
class StringHelper { public static boolean isValidEmail(final String email) { return EMAIL_PATTERN.matcher(email.trim().toLowerCase()).matches(); } public static String getDataTypeFromFileName(String fileName); public static String addNumberToFileName(String fileName, int number); public s...
String validEmail = "blablubb.de"; assertThat(StringHelper.isValidEmail(validEmail)).isFalse(); } }
[FOCAL] public static boolean StringHelper.isValidEmail(String email) [CLASS] class StringHelper [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] EMAIL_PATTERN.matcher(email.trim().toLowerCase()).matches/0, EMAIL_PATTERN.matcher/1, email.trim().toLowerCase/0, String.trim/0 [INPUTS] ...
/* static context [FOCAL] public static boolean StringHelper.isValidEmail(String email) [INPUTS] branches=- | result=email [CALLS-EXTERNAL] EMAIL_PATTERN.matcher(email.trim().toLowerCase()).matches/0, EMAIL_PATTERN.matcher/1, email.trim().toLowerCase/0, String.trim/0 */
/* static context [FOCAL] public static boolean StringHelper.isValidEmail(String email) [INPUTS] branches=- | result=email [CALLS-EXTERNAL] EMAIL_PATTERN.matcher(email.trim().toLowerCase()).matches/0, EMAIL_PATTERN.matcher/1, email.trim().toLowerCase/0, String.trim/0 */ class StringHelper { public static boolean i...
true
ok
{"focal": {"class": "StringHelper", "name": "isValidEmail", "signature": "boolean isValidEmail(String email)", "start_line": 3, "modifiers": "public static", "params": [{"name": "email", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "StringHelper", "kind": "class", "modifiers": "", "superclass":...
29964541_11
class AmbariClusterImpl extends BasicStartableImpl implements AmbariCluster { protected Map<String, Map> mergeMaps(Map<String, Map> configuration, Map<String, Map> servicesConfig) { if (servicesConfig == null) { return configuration; } MutableMap<String, Map> newConfigurationMa...
Map<String, Map> tmpMap = ambariCluster.mergeMaps(null, newMap); assertEquals(tmpMap.get("oozie-site").get("oozie.service.ProxyUserService.proxyuser.hue.hosts"), "localhost"); } }
[FOCAL] protected Map<String, Map> AmbariClusterImpl.mergeMaps(Map<String, Map> configuration, Map<String, Map> servicesConfig) [CLASS] class AmbariClusterImpl extends BasicStartableImpl implements AmbariCluster [METRICS] loc=21 cc=5 branches=3 loops=1 returns=2 throws=0 nesting=3 [CALLS-EXTERNAL] MutableMap.copyOf/1, ...
/* static context [FOCAL] protected Map<String, Map> AmbariClusterImpl.mergeMaps(Map<String, Map> configuration, Map<String, Map> servicesConfig) [PATH1] if(servicesConfig == null)=F -> foreach(Map.Entry<String, Map> stringMapEntry : servicesConfig.entrySet())=T -> if(!newConfigurationMap.containsKey(stringMapEntry.get...
/* static context [FOCAL] protected Map<String, Map> AmbariClusterImpl.mergeMaps(Map<String, Map> configuration, Map<String, Map> servicesConfig) [PATH1] if(servicesConfig == null)=F -> foreach(Map.Entry<String, Map> stringMapEntry : servicesConfig.entrySet())=T -> if(!newConfigurationMap.containsKey(stringMapEntry.get...
true
ok
{"focal": {"class": "AmbariClusterImpl", "name": "mergeMaps", "signature": "Map<String, Map> mergeMaps(Map<String, Map> configuration, Map<String, Map> servicesConfig)", "start_line": 3, "modifiers": "protected", "params": [{"name": "configuration", "type": "Map<String, Map>"}, {"name": "servicesConfig", "type": "Map<S...
29969855_12
class UUIDAggregateIdentifierFactory implements AggregateIdentifierFactory { @Override public final AggregateIdentifier create() { return new UUIDAggregateIdentifier(); } @Override public final AggregateIdentifier fromString(final String aggregateId); private UUIDAggregateIdentifierFactory testee; } class U...
assertThat(testee.create()).isInstanceOf(UUIDAggregateIdentifier.class); } }
[FOCAL] @Override public final AggregateIdentifier UUIDAggregateIdentifierFactory.create() [CLASS] class UUIDAggregateIdentifierFactory implements AggregateIdentifierFactory [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] UUIDAggregateIdentifier [CLASS-MEMBERS] AggregateIdentifier fromString(...
/* static context [FOCAL] @Override public final AggregateIdentifier UUIDAggregateIdentifierFactory.create() [NEW] UUIDAggregateIdentifier */
/* static context [FOCAL] @Override public final AggregateIdentifier UUIDAggregateIdentifierFactory.create() [NEW] UUIDAggregateIdentifier */ class UUIDAggregateIdentifierFactory implements AggregateIdentifierFactory { @Override public final AggregateIdentifier create() { return new UUIDAggregateIdentifier(); } ...
true
ok
{"focal": {"class": "UUIDAggregateIdentifierFactory", "name": "create", "signature": "AggregateIdentifier create()", "start_line": 3, "modifiers": "@Override public final", "params": [], "return_type": "AggregateIdentifier"}, "class_info": {"name": "UUIDAggregateIdentifierFactory", "kind": "class", "modifiers": "", "su...
29974632_50
class CredentialsConfig extends SimpleComponent<CredentialsConfig> implements PasswordsConfig<CredentialsConfig> { @Override public CredentialsConfig merge(final CredentialsConfig config) { // empty password value means 'use existing value' - see control-point-widget.js return super.merge(confi...
Assert.assertEquals(new CredentialsConfig("new user", "pass"), new CredentialsConfig("new user", "").merge(decryptedValue)); } }
[FOCAL] @Override public CredentialsConfig CredentialsConfig.merge(CredentialsConfig config) [CLASS] class CredentialsConfig extends SimpleComponent<CredentialsConfig> implements PasswordsConfig<CredentialsConfig> [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] super.merge(config)....
/* static context [FOCAL] @Override public CredentialsConfig CredentialsConfig.merge(CredentialsConfig config) [INPUTS] branches=- | result=config [COLLABORATORS] field password isEmpty/0 [CALLS-EXTERNAL] super.merge(config).toBuilder() .password((password == nu....build/0, super.merge(config).toBuilder().password/1, s...
/* static context [FOCAL] @Override public CredentialsConfig CredentialsConfig.merge(CredentialsConfig config) [INPUTS] branches=- | result=config [COLLABORATORS] field password isEmpty/0 [CALLS-EXTERNAL] super.merge(config).toBuilder() .password((password == nu....build/0, super.merge(config).toBuilder().password/1, s...
true
ok
{"focal": {"class": "CredentialsConfig", "name": "merge", "signature": "CredentialsConfig merge(CredentialsConfig config)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "config", "type": "CredentialsConfig"}], "return_type": "CredentialsConfig"}, "class_info": {"name": "CredentialsConfig", "kin...
29993866_0
class TopicCreator { public void maybeCreateTopic(String topicName) throws ExecutionException, InterruptedException { Collection<NewTopic> topics = new ArrayList<>(); topics.add(new NewTopic(topicName, 1, (short) 1)); if (topicName.toLowerCase().startsWith("test")) { ...
TopicCreator tc = new TopicCreator(admin); tc.maybeCreateTopic("test.is.a.test.topic"); verify(admin, times(1)).createTopics(any()); } }
[FOCAL] public void TopicCreator.maybeCreateTopic(String topicName) [CLASS] class TopicCreator [METRICS] loc=21 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] Collection<NewTopic>.add/1, topicName.toLowerCase().startsWith/1, String.toLowerCase/0, AdminClient.createTopics/1, Collection<AlterConfig...
/* static context [FOCAL] public void TopicCreator.maybeCreateTopic(String topicName) [PATH1] if(topicName.toLowerCase().startsWith("test"))=T [PATH2] if(topicName.toLowerCase().startsWith("test"))=F [INPUTS] branches=topicName | result=- [COLLABORATORS] field admin:AdminClient createTopics/1,incrementalAlterConfigs/1 ...
/* static context [FOCAL] public void TopicCreator.maybeCreateTopic(String topicName) [PATH1] if(topicName.toLowerCase().startsWith("test"))=T [PATH2] if(topicName.toLowerCase().startsWith("test"))=F [INPUTS] branches=topicName | result=- [COLLABORATORS] field admin:AdminClient createTopics/1,incrementalAlterConfigs/1 ...
true
ok
{"focal": {"class": "TopicCreator", "name": "maybeCreateTopic", "signature": "void maybeCreateTopic(String topicName) throws ExecutionException, InterruptedException", "start_line": 3, "modifiers": "public", "params": [{"name": "topicName", "type": "String"}], "return_type": "void"}, "class_info": {"name": "TopicCreato...
29996210_0
class EnvironmentVariablesPropertiesSource implements PropertiesSource { @Override public Map<String,String> getProperties() { Map<String,String> envVars = System.getenv(); if (!Collections.isEmpty(envVars)) { return new LinkedHashMap<>(envVars); } return java.uti...
setEnvironmentVariable("my_special_key", "my_special_value"); Map<String, String> props = new EnvironmentVariablesPropertiesSource().getProperties(); assertEquals(props.get("my_special_key"), "my_special_value"); } }
[FOCAL] @Override public Map<String,String> EnvironmentVariablesPropertiesSource.getProperties() [CLASS] class EnvironmentVariablesPropertiesSource implements PropertiesSource [METRICS] loc=11 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] System.getenv/0, Collections.isEmpty/1, java.util.Collect...
/* static context [FOCAL] @Override public Map<String,String> EnvironmentVariablesPropertiesSource.getProperties() [PATH1] if(!Collections.isEmpty(envVars))=T -> return new LinkedHashMap<>(envVars) [PATH2] if(!Collections.isEmpty(envVars))=F -> return java.util.Collections.emptyMap() [NEW] LinkedHashMap<> [CALLS-EXTERN...
/* static context [FOCAL] @Override public Map<String,String> EnvironmentVariablesPropertiesSource.getProperties() [PATH1] if(!Collections.isEmpty(envVars))=T -> return new LinkedHashMap<>(envVars) [PATH2] if(!Collections.isEmpty(envVars))=F -> return java.util.Collections.emptyMap() [NEW] LinkedHashMap<> [CALLS-EXTERN...
true
ok
{"focal": {"class": "EnvironmentVariablesPropertiesSource", "name": "getProperties", "signature": "Map<String,String> getProperties()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Map<String,String>"}, "class_info": {"name": "EnvironmentVariablesPropertiesSource", "kind": "class", "m...
30000823_1
class RdRandException extends RuntimeException { public RdRandStatus getStatus() { return status; } public RdRandException(RdRandStatus status); private RdRandException rdRandException; private RdRandStatus testStatus; } class RdRandExceptionTest { private RdRandException rdRandException; private RdRand...
rdRandException = new RdRandException(testStatus); assertTrue(testStatus == rdRandException.getStatus()); } }
[FOCAL] public RdRandStatus RdRandException.getStatus() [CLASS] class RdRandException extends RuntimeException [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] RdRandException(RdRandStatus status) [TEST] RdRandExceptionTest: @Test public final void testGetStatus() [TEST-FIELDS] RdRan...
/* static context [FOCAL] public RdRandStatus RdRandException.getStatus() */
/* static context [FOCAL] public RdRandStatus RdRandException.getStatus() */ class RdRandException extends RuntimeException { public RdRandStatus getStatus() { return status; } public RdRandException(RdRandStatus status); private RdRandException rdRandException; private RdRandStatus testStatus; } class RdR...
true
ok
{"focal": {"class": "RdRandException", "name": "getStatus", "signature": "RdRandStatus getStatus()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "RdRandStatus"}, "class_info": {"name": "RdRandException", "kind": "class", "modifiers": "", "superclass": "RuntimeException", "interfaces": null, "fi...
30008530_24
class StaticCoordinator extends ZkCoordinator { @Override public synchronized Map<String, Integer> getRebalanceCount() { Map<String, Integer> countMap = new HashMap<String, Integer>(); try { for (String topic : m_allTopicPartitions.keySet()) { int count = 0; int toTake = getToTakePartitions(topic).siz...
String groupId1 = "test_group1"; String topic0 = "Topic.test-0"; String topic1 = "Topic.test-1"; List<String> topics1 = new ArrayList<String>(); topics1.add(topic0); topics1.add(topic1); String consumerId0 = "D-00456-consumerId-0"; String consumerId1 = "D-00456-consumerId-1"; String path0 = "/broker...
[FOCAL] @Override public synchronized Map<String, Integer> StaticCoordinator.getRebalanceCount() [CLASS] class StaticCoordinator extends ZkCoordinator [METRICS] loc=25 cc=6 branches=2 loops=1 returns=1 throws=2 nesting=4 [CALLS-INTERNAL] Set<Integer> getToReleasePartitions(String topic, int count); Set<Integer> getToTa...
/* static context [FOCAL] @Override public synchronized Map<String, Integer> StaticCoordinator.getRebalanceCount() [THROWS-WHEN] e when try-body throws [THROWS-WHEN] RuntimeException when try-body throws [PATH1] foreach(String topic : m_allTopicPartitions.keySet())=T -> if(toTake > 0)=F -> if(toRelease > 0)=T -> exit l...
/* static context [FOCAL] @Override public synchronized Map<String, Integer> StaticCoordinator.getRebalanceCount() [THROWS-WHEN] e when try-body throws [THROWS-WHEN] RuntimeException when try-body throws [PATH1] foreach(String topic : m_allTopicPartitions.keySet())=T -> if(toTake > 0)=F -> if(toRelease > 0)=T -> exit l...
true
ok
{"focal": {"class": "StaticCoordinator", "name": "getRebalanceCount", "signature": "Map<String, Integer> getRebalanceCount()", "start_line": 3, "modifiers": "@Override public synchronized", "params": [], "return_type": "Map<String, Integer>"}, "class_info": {"name": "StaticCoordinator", "kind": "class", "modifiers": ""...
30044052_147
class ScalaSnippetExecutor extends AbstractSnippetExecutor<ScalaSnippetExecutorOptions> { protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException { final StringBuilder sourceCode = new StringBuilder(); if (hasImports(codeSnippet)) { sourceCode.append(getImpor...
final CodeSnippet snippet = new CodeSnippet(); snippet.getProperties().put(CLASS_NAME_PROPERTY, "TestScala"); snippet.setCode("def main(args: Array[String]) {\n\tprintln(\"Hello\")\n}"); final String expected = IOUtils.read(ScalaSnippetExecutorTest.class.getResourceAsStream("/com/twasy...
[FOCAL] protected String ScalaSnippetExecutor.buildSourceCode(CodeSnippet codeSnippet) [CLASS] class ScalaSnippetExecutor extends AbstractSnippetExecutor<ScalaSnippetExecutorOptions> [METRICS] loc=21 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] String getImports(CodeSnippet codeSnippet); String...
/* static context [FOCAL] protected String ScalaSnippetExecutor.buildSourceCode(CodeSnippet codeSnippet) [PATH1] if(hasImports(codeSnippet))=T -> if(mustBeWrappedIn(codeSnippet, WRAP_IN_MAIN_PROPERTY))=T -> return sourceCode.toString() [PATH2] if(hasImports(codeSnippet))=F -> if(mustBeWrappedIn(codeSnippet, WRAP_IN_MAI...
/* static context [FOCAL] protected String ScalaSnippetExecutor.buildSourceCode(CodeSnippet codeSnippet) [PATH1] if(hasImports(codeSnippet))=T -> if(mustBeWrappedIn(codeSnippet, WRAP_IN_MAIN_PROPERTY))=T -> return sourceCode.toString() [PATH2] if(hasImports(codeSnippet))=F -> if(mustBeWrappedIn(codeSnippet, WRAP_IN_MAI...
true
ok
{"focal": {"class": "ScalaSnippetExecutor", "name": "buildSourceCode", "signature": "String buildSourceCode(CodeSnippet codeSnippet) throws IOException", "start_line": 3, "modifiers": "protected", "params": [{"name": "codeSnippet", "type": "CodeSnippet"}], "return_type": "String"}, "class_info": {"name": "ScalaSnippetE...
30073725_6
class Connect { public List<Data> getData() throws ConnectException { final InputStream inputStream; try { inputStream = mRequestBuilder.create().connect().getInputStream(); return mParser.getModels(inputStream); } catch (IOException e) { throw new Connec...
assertEquals(Collections.EMPTY_LIST, new Connect(mRequestBuilder, mParser).getData()); } }
[FOCAL] public List<Data> Connect.getData() [CLASS] class Connect [METRICS] loc=9 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1 [CALLS-EXTERNAL] mRequestBuilder.create().connect().getInputStream/0, mRequestBuilder.create().connect/0, RequestBuilder.create/0, Parser.getModels/1 [NEW] ConnectException, DeliveryExc...
/* static context [FOCAL] public List<Data> Connect.getData() [THROWS-WHEN] ConnectException when try-body throws [PATH1] try-body throws -> throw new ConnectException(new DeliveryException(e)) [PATH2] return mParser.getModels(inputStream) [INPUTS] branches=- | result=mParser, mRequestBuilder [COLLABORATORS] field mReq...
/* static context [FOCAL] public List<Data> Connect.getData() [THROWS-WHEN] ConnectException when try-body throws [PATH1] try-body throws -> throw new ConnectException(new DeliveryException(e)) [PATH2] return mParser.getModels(inputStream) [INPUTS] branches=- | result=mParser, mRequestBuilder [COLLABORATORS] field mReq...
true
ok
{"focal": {"class": "Connect", "name": "getData", "signature": "List<Data> getData() throws ConnectException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "List<Data>"}, "class_info": {"name": "Connect", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name...
30084378_190
class TLParsingTask extends AbstractParsingTask implements Supplier<TLParsingResult> { @Override public TLParsingResult get() { TLParsingResult result = new TLParsingResult(); TrustStatusListType jaxbObject = getJAXBObject(); parseSchemeInformation(result, jaxbObject.getSchemeInformation()); parseTrustSe...
TLParsingTask task = new TLParsingTask(IE_TL, new TLSource()); TLParsingResult result = task.get(); assertNotNull(result); assertEquals(5, result.getVersion()); assertEquals(18, result.getSequenceNumber()); assertNotNull(result.getIssueDate()); assertNotNull(result.getNextUpdateDate()); assertEquals("IE...
[FOCAL] @Override public TLParsingResult TLParsingTask.get() [CLASS] class TLParsingTask extends AbstractParsingTask implements Supplier<TLParsingResult> [METRICS] loc=13 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] void parseSchemeInformation(TLParsingResult result, TSLSchemeInformationType sc...
/* static context [FOCAL] @Override public TLParsingResult TLParsingTask.get() [CALLS-INTERNAL] void parseSchemeInformation(TLParsingResult result, TSLSchemeInformationType schemeInformation); void parseTrustServiceProviderList(TLParsingResult result, TrustServiceProviderListType trustServiceProviderList) [NEW] TLParsi...
/* static context [FOCAL] @Override public TLParsingResult TLParsingTask.get() [CALLS-INTERNAL] void parseSchemeInformation(TLParsingResult result, TSLSchemeInformationType schemeInformation); void parseTrustServiceProviderList(TLParsingResult result, TrustServiceProviderListType trustServiceProviderList) [NEW] TLParsi...
true
ok
{"focal": {"class": "TLParsingTask", "name": "get", "signature": "TLParsingResult get()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "TLParsingResult"}, "class_info": {"name": "TLParsingTask", "kind": "class", "modifiers": "", "superclass": "AbstractParsingTask", "interfaces": "Suppl...
30120639_1
class ObjectStore { @SuppressWarnings("unchecked") public E insert(E e) { OID id = odb.store(e); odb.commit(); E attached = (E) odb.getObjectFromId(id); odb.disconnect(attached); return attached; } public ObjectStore(String name, Class<E> objectType); public Collection<E> getAll(); public E get(Str...
ObjectStore<XdccRequest> store = new ObjectStore<XdccRequest>( "requests.neodatis", XdccRequest.class) { @Override public List<XdccRequest> searchByExample(XdccRequest e) { // TODO Auto-generated method stub return null; } @Override protected Class<XdccRequest> getEntityType() { retur...
[FOCAL] @SuppressWarnings("unchecked") public E ObjectStore.insert(E e) [CLASS] class ObjectStore [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] odb.store/1, odb.commit/0, odb.getObjectFromId/1, odb.disconnect/1 [INPUTS] branches=- | result=e [COLLABORATORS] field odb store/1,comm...
/* static context [FOCAL] @SuppressWarnings("unchecked") public E ObjectStore.insert(E e) [INPUTS] branches=- | result=e [COLLABORATORS] field odb store/1,commit/0,getObjectFromId/1,disconnect/1 [CALLS-EXTERNAL] odb.store/1, odb.commit/0, odb.getObjectFromId/1, odb.disconnect/1 */
/* static context [FOCAL] @SuppressWarnings("unchecked") public E ObjectStore.insert(E e) [INPUTS] branches=- | result=e [COLLABORATORS] field odb store/1,commit/0,getObjectFromId/1,disconnect/1 [CALLS-EXTERNAL] odb.store/1, odb.commit/0, odb.getObjectFromId/1, odb.disconnect/1 */ class ObjectStore { @SuppressWarning...
true
ok
{"focal": {"class": "ObjectStore", "name": "insert", "signature": "E insert(E e)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") public", "params": [{"name": "e", "type": "E"}], "return_type": "E"}, "class_info": {"name": "ObjectStore", "kind": "class", "modifiers": "", "superclass": null, "interfaces...
30124869_20
class ReduceOperation { public static void reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory) throws OWLOntologyCreationException { reduce(ontology, reasonerFactory, getDefaultOptions()); } public static Map<String, String> getDefaultOptions(); public static void reduce( OWLOntol...
OWLReasonerFactory reasonerFactory = new org.semanticweb.elk.owlapi.ElkReasonerFactory(); OWLOntology ontologyA = loadOntology("/reduce-named-only-test.ofn"); Map<String, String> optionsA = new HashMap<String, String>(); optionsA.put("named-classes-only", "true"); ReduceOperation.reduce(ontologyA, ...
[FOCAL] public static void ReduceOperation.reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory) [CLASS] class ReduceOperation [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] Map<String, String> getDefaultOptions(); void reduce(OWLOntology ontology, OWLReasonerFactory re...
/* static context [FOCAL] public static void ReduceOperation.reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory) [EXCEPTIONS] declares OWLOntologyCreationException [CALLS-INTERNAL] Map<String, String> getDefaultOptions(); void reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory, Map<String, Str...
/* static context [FOCAL] public static void ReduceOperation.reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory) [EXCEPTIONS] declares OWLOntologyCreationException [CALLS-INTERNAL] Map<String, String> getDefaultOptions(); void reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory, Map<String, Str...
true
ok
{"focal": {"class": "ReduceOperation", "name": "reduce", "signature": "void reduce(OWLOntology ontology, OWLReasonerFactory reasonerFactory) throws OWLOntologyCreationException", "start_line": 3, "modifiers": "public static", "params": [{"name": "ontology", "type": "OWLOntology"}, {"name": "reasonerFactory", "type": "O...
30125753_6
class Utils { public static boolean isValidEmail(String email) { if (email == null) { return false; } final String emailPattern = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; Matcher matcher; Pattern pattern = Pattern....
boolean invalid = Utils.isValidEmail("jay@twitter"); boolean expected = false; // Log.i(TAG, "formattedSize: " + formattedSize + " expected: " + expected); // use this method because float is not precise assertEquals("Email invalid", expected, invalid); } }
[FOCAL] public static boolean Utils.isValidEmail(String email) [CLASS] class Utils [METRICS] loc=18 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1 [CALLS-EXTERNAL] Pattern.compile/1, Pattern.matcher/1, Matcher.matches/0 [PATH1] if(email == null)=F -> if(matcher != null)=T -> return matcher.matches() [PATH2] if(em...
class Utils { public static boolean isValidEmail(String email) { if (email == null) { return false; } final String emailPattern = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; Matcher matcher; Pattern pattern = Pattern....
false
ok
{"focal": {"class": "Utils", "name": "isValidEmail", "signature": "boolean isValidEmail(String email)", "start_line": 3, "modifiers": "public static", "params": [{"name": "email", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "Utils", "kind": "class", "modifiers": "", "superclass": null, "interf...
30182457_0
class AllegroNiceApi extends AbstractService implements IAllegroNiceApi { @Override public SysStatusType getStatus() { return systemService.getStatus(); } private AllegroNiceApi(Builder builder); private ServicePort createAllegro(Builder builder); private URL getWsdlLocation(); @...
assertNotNull(api.getStatus()); } }
[FOCAL] @Override public SysStatusType AllegroNiceApi.getStatus() [CLASS] class AllegroNiceApi extends AbstractService implements IAllegroNiceApi [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] systemService.getStatus/0 [COLLABORATORS] field systemService getStatus/0 [CLASS-MEMBERS...
/* static context [FOCAL] @Override public SysStatusType AllegroNiceApi.getStatus() [COLLABORATORS] field systemService getStatus/0 [CALLS-EXTERNAL] systemService.getStatus/0 */
/* static context [FOCAL] @Override public SysStatusType AllegroNiceApi.getStatus() [COLLABORATORS] field systemService getStatus/0 [CALLS-EXTERNAL] systemService.getStatus/0 */ class AllegroNiceApi extends AbstractService implements IAllegroNiceApi { @Override public SysStatusType getStatus() { return...
true
ok
{"focal": {"class": "AllegroNiceApi", "name": "getStatus", "signature": "SysStatusType getStatus()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "SysStatusType"}, "class_info": {"name": "AllegroNiceApi", "kind": "class", "modifiers": "", "superclass": "AbstractService", "interfaces": ...
30195197_51
class OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { public boolean isOWLObjectInSubsets(OWLObject testObject, Collection<String> subsets) { return !Collections.disjoint(subsets, this.getSubsets(testObject)); } public OWLGraphWrapperEdgesExtended(OWLOntology ontology); protected OW...
Collection<String> testSubsets = new ArrayList<String>(); testSubsets.add("test_subset1"); //FOO:0006 is part of the subset test_subset1 OWLClass testClass = wrapper.getOWLClassByIdentifier("FOO:0006"); assertTrue("FOO:0006 is not seen as belonging to test_subset1", wrapper.isOWLObjectInSubsets(testClass...
[FOCAL] public boolean OWLGraphWrapperEdgesExtended.isOWLObjectInSubsets(OWLObject testObject, Collection<String> subsets) [CLASS] class OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Collections.disjoint/2, this.getSubsets...
/* static context [FOCAL] public boolean OWLGraphWrapperEdgesExtended.isOWLObjectInSubsets(OWLObject testObject, Collection<String> subsets) [INPUTS] branches=- | result=subsets, testObject [CALLS-EXTERNAL] Collections.disjoint/2, this.getSubsets/1 */
/* static context [FOCAL] public boolean OWLGraphWrapperEdgesExtended.isOWLObjectInSubsets(OWLObject testObject, Collection<String> subsets) [INPUTS] branches=- | result=subsets, testObject [CALLS-EXTERNAL] Collections.disjoint/2, this.getSubsets/1 */ class OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { ...
true
ok
{"focal": {"class": "OWLGraphWrapperEdgesExtended", "name": "isOWLObjectInSubsets", "signature": "boolean isOWLObjectInSubsets(OWLObject testObject, Collection<String> subsets)", "start_line": 3, "modifiers": "public", "params": [{"name": "testObject", "type": "OWLObject"}, {"name": "subsets", "type": "Collection<Strin...
30242992_10
class Value extends Expression { @Override public final String toHaskell() { return "(" + this.value + ")"; } public Value(final Type type, final String value); @Override public final Type inferType(); public final String getValue(); @Override public final String toString(); ...
final Expression v = new Value(this.integer, "10"); assertEquals(this.integer.prettyPrint(), v.inferType().prettyPrint()); assertEquals("(10)", v.toHaskell()); } }
[FOCAL] @Override public final String Value.toHaskell() [CLASS] class Value extends Expression [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [FIELDS] read=value [CLASS-MEMBERS] Value(Type type, String value); Type inferType(); String getValue(); String toString() [TEST] ValueTest: @Test public fi...
/* static context [FOCAL] @Override public final String Value.toHaskell() [FIELDS] read=value */
/* static context [FOCAL] @Override public final String Value.toHaskell() [FIELDS] read=value */ class Value extends Expression { @Override public final String toHaskell() { return "(" + this.value + ")"; } public Value(final Type type, final String value); @Override public final Type in...
true
ok
{"focal": {"class": "Value", "name": "toHaskell", "signature": "String toHaskell()", "start_line": 3, "modifiers": "@Override public final", "params": [], "return_type": "String"}, "class_info": {"name": "Value", "kind": "class", "modifiers": "", "superclass": "Expression", "interfaces": null, "fields": [{"name": "inte...
30258802_2399
class OptionsHelper { public static String applyRule(String ruleName, String serverOptStr, boolean value) throws OptionsException { throwOptionsExceptionIfConditionFails(isNotBlank(serverOptStr), "Null or Empty server options spec"); if (isBlank(ruleName)) { if (value) { return OPTPFX + server...
try { OptionsHelper.applyRule(null, null, "string"); fail("Expected Exception!"); } catch (Throwable e) { assertEquals(OptionsException.class, e.getClass()); } try { OptionsHelper.applyRule("notnull", null, "string"); fail("Expe...
[FOCAL] public static String OptionsHelper.applyRule(String ruleName, String serverOptStr, boolean value) [CLASS] class OptionsHelper [METRICS] loc=13 cc=3 branches=2 loops=0 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] throwOptionsExceptionIfConditionFails/2 (inherited), isNotBlank/1 (inherited), isBlank/1 (inherited...
/* static context [FOCAL] public static String OptionsHelper.applyRule(String ruleName, String serverOptStr, boolean value) [PATH1] if(isBlank(ruleName))=T -> if(value)=T -> return OPTPFX + serverOptStr [PATH2] if(isBlank(ruleName))=F -> return EMPTY [PATH3] if(isBlank(ruleName))=T -> if(value)=F -> return EMPTY [INPUT...
/* static context [FOCAL] public static String OptionsHelper.applyRule(String ruleName, String serverOptStr, boolean value) [PATH1] if(isBlank(ruleName))=T -> if(value)=T -> return OPTPFX + serverOptStr [PATH2] if(isBlank(ruleName))=F -> return EMPTY [PATH3] if(isBlank(ruleName))=T -> if(value)=F -> return EMPTY [INPUT...
true
ok
{"focal": {"class": "OptionsHelper", "name": "applyRule", "signature": "String applyRule(String ruleName, String serverOptStr, boolean value) throws OptionsException", "start_line": 3, "modifiers": "public static", "params": [{"name": "ruleName", "type": "String"}, {"name": "serverOptStr", "type": "String"}, {"name": "...
30259183_8
class BarcodeDimension { public double getXOffset() { return xOffset; } public BarcodeDimension(double w, double h); public BarcodeDimension(double w, double h, double wpq, double hpq, double xoffset, double yoffset); public double getHeight(); public double ...
System.out.println("getXOffset"); assertEquals(5, new BarcodeDimension(100, 200, 110, 204, 5, 2).getXOffset(), 0.0); assertEquals(0, new BarcodeDimension(100, 200).getXOffset(), 0.0); } }
[FOCAL] public double BarcodeDimension.getXOffset() [CLASS] class BarcodeDimension [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] BarcodeDimension(double w, double h); BarcodeDimension(double w, double h, double wpq, double hpq, double xoffset, double yoffset); double getHeight(); ...
/* static context [FOCAL] public double BarcodeDimension.getXOffset() */
/* static context [FOCAL] public double BarcodeDimension.getXOffset() */ class BarcodeDimension { public double getXOffset() { return xOffset; } public BarcodeDimension(double w, double h); public BarcodeDimension(double w, double h, double wpq, double hpq, double xof...
true
ok
{"focal": {"class": "BarcodeDimension", "name": "getXOffset", "signature": "double getXOffset()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "double"}, "class_info": {"name": "BarcodeDimension", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": ...
30322187_24
class IntentUtils { public static boolean verifyIntentActions(final Intent intent) { boolean result = true; final List<Actions> actions = intent.getActions(); if (actions == null || actions.size() != NUM_OF_SUPPORTED_ACTION) { LOG.warn("Intent's action is either null or not equa...
boolean result; Mockito.when(intentMock.getActions()).thenReturn(null); result = IntentUtils.verifyIntentActions(intentMock); Assert.assertFalse(result); Mockito.when(intentMock.getActions()).thenReturn(actionsMock); Mockito.when(actionsMock.size()).thenReturn(0); ...
[FOCAL] public static boolean IntentUtils.verifyIntentActions(Intent intent) [CLASS] class IntentUtils [METRICS] loc=10 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] Intent.getActions/0, List<Actions>.size/0, LOG.warn/3 [PATH1] if(actions == null || actions.size() != NUM_OF_SUPPORTED_ACTION)=T -...
/* static context [FOCAL] public static boolean IntentUtils.verifyIntentActions(Intent intent) [PATH1] if(actions == null || actions.size() != NUM_OF_SUPPORTED_ACTION)=T -> return result [PATH2] if(actions == null || actions.size() != NUM_OF_SUPPORTED_ACTION)=F -> return result [INPUTS] branches=intent | result=- [COLL...
/* static context [FOCAL] public static boolean IntentUtils.verifyIntentActions(Intent intent) [PATH1] if(actions == null || actions.size() != NUM_OF_SUPPORTED_ACTION)=T -> return result [PATH2] if(actions == null || actions.size() != NUM_OF_SUPPORTED_ACTION)=F -> return result [INPUTS] branches=intent | result=- [COLL...
true
ok
{"focal": {"class": "IntentUtils", "name": "verifyIntentActions", "signature": "boolean verifyIntentActions(Intent intent)", "start_line": 3, "modifiers": "public static", "params": [{"name": "intent", "type": "Intent"}], "return_type": "boolean"}, "class_info": {"name": "IntentUtils", "kind": "class", "modifiers": "",...
30330883_1
class VncRenderService implements RenderProtocol { public DoubleProperty zoomLevelProperty() { return zoomLevel; } public VncRenderService(); public VncRenderService(VncConnection con); public void setEventConsumer(BiConsumer<ServerDecoderEvent, ImageRect> c); public ProtocolConfiguration getConfig...
VncRenderService service = new VncRenderService(null); assertEquals(1.0, service.zoomLevelProperty().get(), 0.01); service.zoomLevelProperty().set(0.0); assertNotEquals(0.0, service.zoomLevelProperty().get(), 0.01); service.zoomLevelProperty().set(Double.MAX_VALUE); assertNotEquals(Double.MAX_V...
[FOCAL] public DoubleProperty VncRenderService.zoomLevelProperty() [CLASS] class VncRenderService implements RenderProtocol [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] VncRenderService(); VncRenderService(VncConnection con); void setEventConsumer(BiConsumer<ServerDecoderEvent, I...
/* static context [FOCAL] public DoubleProperty VncRenderService.zoomLevelProperty() */
/* static context [FOCAL] public DoubleProperty VncRenderService.zoomLevelProperty() */ class VncRenderService implements RenderProtocol { public DoubleProperty zoomLevelProperty() { return zoomLevel; } public VncRenderService(); public VncRenderService(VncConnection con); public void setEventConsume...
true
ok
{"focal": {"class": "VncRenderService", "name": "zoomLevelProperty", "signature": "DoubleProperty zoomLevelProperty()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "DoubleProperty"}, "class_info": {"name": "VncRenderService", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "...
30333472_14
class BusinessDateTime extends AbstractDateTime implements ReadableDateTime, Serializable { public BusinessDateTime plusSeconds(int seconds) { if (seconds == 0) { return this; } else { return move(seconds, Constants.NANOS_PER_SECOND); } } public BusinessDateTime(DateTime dateTime, ...
DateTime start = new DateTime(2014, 12, 11, 16, 59, 57, 0); DateTime expected = new DateTime(2014, 12, 11, 17, 0, 0, 0); BusinessDateTime businessStart = new BusinessDateTime(start); assertEquals("Thursday 16:59:57.0 plus 3 Seconds should return Thursday 17:00:00.0", expected, ...
[FOCAL] public BusinessDateTime BusinessDateTime.plusSeconds(int seconds) [CLASS] class BusinessDateTime extends AbstractDateTime implements ReadableDateTime, Serializable [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] BusinessDateTime move(long unitsToMove, long unitFactor) [PATH...
/* static context [FOCAL] public BusinessDateTime BusinessDateTime.plusSeconds(int seconds) [PATH1] if(seconds == 0)=T -> return this [PATH2] if(seconds == 0)=F -> return move(seconds, Constants.NANOS_PER_SECOND) [INPUTS] branches=seconds | result=seconds [CALLS-INTERNAL] BusinessDateTime move(long unitsToMove, long un...
/* static context [FOCAL] public BusinessDateTime BusinessDateTime.plusSeconds(int seconds) [PATH1] if(seconds == 0)=T -> return this [PATH2] if(seconds == 0)=F -> return move(seconds, Constants.NANOS_PER_SECOND) [INPUTS] branches=seconds | result=seconds [CALLS-INTERNAL] BusinessDateTime move(long unitsToMove, long un...
true
ok
{"focal": {"class": "BusinessDateTime", "name": "plusSeconds", "signature": "BusinessDateTime plusSeconds(int seconds)", "start_line": 3, "modifiers": "public", "params": [{"name": "seconds", "type": "int"}], "return_type": "BusinessDateTime"}, "class_info": {"name": "BusinessDateTime", "kind": "class", "modifiers": ""...
30405191_19
class BNFProcessor { public Grammar processString(String inString) { return processStream(new ByteArrayInputStream((inString).getBytes()) ); } public Grammar processStream(InputStream inStream); public Grammar processFile(String fileName); private Grammar processAntrlStream(CharStream inSt...
Grammar grammar = Fixture.grammarResource( BNFProcessor.class, "/cypher.xml"); // not doing this at the moment because two of the rules get an unnecessary { } round a single item // LOGGER.debug("Original grammar \n{}", xmlout(grammar)); String firstBNF = makeSQLBNF(grammar); LOGGER.debug("Generated \n{}", f...
[FOCAL] public Grammar BNFProcessor.processString(String inString) [CLASS] class BNFProcessor [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Grammar processStream(InputStream inStream) [CALLS-EXTERNAL] (inString).getBytes/0 [NEW] ByteArrayInputStream [INPUTS] branches=- | result=i...
/* static context [FOCAL] public Grammar BNFProcessor.processString(String inString) [INPUTS] branches=- | result=inString [CALLS-INTERNAL] Grammar processStream(InputStream inStream) [NEW] ByteArrayInputStream [CALLS-EXTERNAL] (inString).getBytes/0 */
/* static context [FOCAL] public Grammar BNFProcessor.processString(String inString) [INPUTS] branches=- | result=inString [CALLS-INTERNAL] Grammar processStream(InputStream inStream) [NEW] ByteArrayInputStream [CALLS-EXTERNAL] (inString).getBytes/0 */ class BNFProcessor { public Grammar processString(String inStr...
true
ok
{"focal": {"class": "BNFProcessor", "name": "processString", "signature": "Grammar processString(String inString)", "start_line": 3, "modifiers": "public", "params": [{"name": "inString", "type": "String"}], "return_type": "Grammar"}, "class_info": {"name": "BNFProcessor", "kind": "class", "modifiers": "", "superclass"...
30405521_62
class RequiredPackagesInstallStep extends AbstractInstallStep { protected List<Optional<Package>> resolvePackages(Collection<Package> installablePackages, List<String> minimumPackages) { return minimumPackages .stream() .map(pkgName -> installablePackages .stream() ...
// setup installable packages form Packages.txt final LocalPackageList localPackageList = new LocalPackageList(new Source(), new File("target/test-classes/Packages.txt")); List<Package> installablePackages = parsePackagesList(localPackageList).collect(Collectors.toList()); assertEquals(36, installableP...
[FOCAL] protected List<Optional<Package>> RequiredPackagesInstallStep.resolvePackages(Collection<Package> installablePackages, List<String> minimumPackages) [CLASS] class RequiredPackagesInstallStep extends AbstractInstallStep [METRICS] loc=13 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] minimu...
/* static context [FOCAL] protected List<Optional<Package>> RequiredPackagesInstallStep.resolvePackages(Collection<Package> installablePackages, List<String> minimumPackages) [INPUTS] branches=- | result=installablePackages, minimumPackages [COLLABORATORS] param minimumPackages:List<String> stream/0; param installableP...
/* static context [FOCAL] protected List<Optional<Package>> RequiredPackagesInstallStep.resolvePackages(Collection<Package> installablePackages, List<String> minimumPackages) [INPUTS] branches=- | result=installablePackages, minimumPackages [COLLABORATORS] param minimumPackages:List<String> stream/0; param installableP...
true
ok
{"focal": {"class": "RequiredPackagesInstallStep", "name": "resolvePackages", "signature": "List<Optional<Package>> resolvePackages(Collection<Package> installablePackages, List<String> minimumPackages)", "start_line": 3, "modifiers": "protected", "params": [{"name": "installablePackages", "type": "Collection<Package>"...
30417900_2
class SecurityUtils { public static boolean isAuthenticated() { SecurityContext securityContext = SecurityContextHolder.getContext(); Collection<? extends GrantedAuthority> authorities = securityContext.getAuthentication().getAuthorities(); if (authorities != null) { for (Grante...
SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); Collection<GrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); securityContext.setAuthentication(new UsernamePasswordAuthenticationTok...
[FOCAL] public static boolean SecurityUtils.isAuthenticated() [CLASS] class SecurityUtils [METRICS] loc=12 cc=4 branches=2 loops=1 returns=2 throws=0 nesting=3 [CALLS-EXTERNAL] SecurityContextHolder.getContext/0, securityContext.getAuthentication().getAuthorities/0, SecurityContext.getAuthentication/0, authority.getAut...
/* static context [FOCAL] public static boolean SecurityUtils.isAuthenticated() [PATH1] if(authorities != null)=T -> foreach(GrantedAuthority authority : authorities)=T -> if(authority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS))=F -> exit loop -> return true [PATH2] if(authorities != null)=T -> foreach(Grant...
/* static context [FOCAL] public static boolean SecurityUtils.isAuthenticated() [PATH1] if(authorities != null)=T -> foreach(GrantedAuthority authority : authorities)=T -> if(authority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS))=F -> exit loop -> return true [PATH2] if(authorities != null)=T -> foreach(Grant...
true
ok
{"focal": {"class": "SecurityUtils", "name": "isAuthenticated", "signature": "boolean isAuthenticated()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "boolean"}, "class_info": {"name": "SecurityUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": []...
30419413_26
class TlvDecoder { public static Tlv[] decode(ByteBuffer input) throws TlvException { try { List<Tlv> tlvs = new ArrayList<>(); while (input.remaining() > 0) { input.order(ByteOrder.BIG_ENDIAN); // decode type int typeByte = input.g...
String dataStr = "0011223344556677889900"; byte[] bytes = Hex.decodeHex(dataStr.toCharArray()); ByteBuffer b = ByteBuffer.wrap(bytes); try { TlvDecoder.decode(b); fail(); } catch (TlvException ex) { // this is very weak assertion since the for...
[FOCAL] public static Tlv[] TlvDecoder.decode(ByteBuffer input) [CLASS] class TlvDecoder [METRICS] loc=117 cc=24 branches=5 loops=1 returns=1 throws=8 nesting=5 [CALLS-EXTERNAL] ByteBuffer.remaining/0, ByteBuffer.order/1, ByteBuffer.get/0, ByteBuffer.getShort/0, Logger.trace/3, ByteBuffer.get/1, List<Tlv>.add/1, Logger...
/* static context [FOCAL] public static Tlv[] TlvDecoder.decode(ByteBuffer input) [THROWS-WHEN] TlvException when try-body throws [THROWS-WHEN] TlvException when input.remaining() > 0 && switch(typeByte & 0b1100_0000)=case 0b0000_0000 && try-body throws && throw new TlvException("Invalid 'identifier' length", e) [THROW...
/* static context [FOCAL] public static Tlv[] TlvDecoder.decode(ByteBuffer input) [THROWS-WHEN] TlvException when try-body throws [THROWS-WHEN] TlvException when input.remaining() > 0 && switch(typeByte & 0b1100_0000)=case 0b0000_0000 && try-body throws && throw new TlvException("Invalid 'identifier' length", e) [THROW...
true
ok
{"focal": {"class": "TlvDecoder", "name": "decode", "signature": "Tlv[] decode(ByteBuffer input) throws TlvException", "start_line": 3, "modifiers": "public static", "params": [{"name": "input", "type": "ByteBuffer"}], "return_type": "Tlv[]"}, "class_info": {"name": "TlvDecoder", "kind": "class", "modifiers": "", "supe...
30422535_28
class PermissionCheckerImpl implements PermissionChecker { @Override public boolean isAllowedTo(Operation operation, Resource resource, Persona persona) { if (null == resource) { throw new IllegalArgumentException("Resource to be checked is invalid (null)."); } if (null == ...
// persona jdoe registers himself HawkularUser jdoe = userService.getOrCreateById(UUID.randomUUID().toString()); // jdoe creates a resource as acme, acme is has all rights on this resource, including SuperUser and // Administrator String id = UUID.randomUUID().toString(); ...
[FOCAL] @Override public boolean PermissionCheckerImpl.isAllowedTo(Operation operation, Resource resource, Persona persona) [CLASS] class PermissionCheckerImpl implements PermissionChecker [METRICS] loc=40 cc=6 branches=5 loops=0 returns=3 throws=3 nesting=1 [CALLS-INTERNAL] boolean isAllowedTo(Operation operation, Str...
/* static context [FOCAL] @Override public boolean PermissionCheckerImpl.isAllowedTo(Operation operation, Resource resource, Persona persona) [THROWS-WHEN] IllegalArgumentException when null == resource [THROWS-WHEN] IllegalArgumentException when !(null == resource) && null == operation [THROWS-WHEN] IllegalArgumentExc...
/* static context [FOCAL] @Override public boolean PermissionCheckerImpl.isAllowedTo(Operation operation, Resource resource, Persona persona) [THROWS-WHEN] IllegalArgumentException when null == resource [THROWS-WHEN] IllegalArgumentException when !(null == resource) && null == operation [THROWS-WHEN] IllegalArgumentExc...
true
ok
{"focal": {"class": "PermissionCheckerImpl", "name": "isAllowedTo", "signature": "boolean isAllowedTo(Operation operation, Resource resource, Persona persona)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "operation", "type": "Operation"}, {"name": "resource", "type": "Resource"}, {"name": "pe...
30425951_0
class Source { public static String formatAligned(String fmt, Object... lines) { final String FORMAT_ELEMENT_SYMBOL = "##"; final int hashStartIndex = fmt.indexOf(FORMAT_ELEMENT_SYMBOL); final int hashEndIndex = hashStartIndex + FORMAT_ELEMENT_SYMBOL.length(); final Str...
final String EXPECTED = " line1\n" + " line2\n" + " line3"; String fmt = " ##"; String actual = Source.formatAligned(fmt, "line1", "line2", "line3"); assertEquals(EXPECTED, actual); } }
[FOCAL] public static String Source.formatAligned(String fmt, Object... lines) [CLASS] class Source [METRICS] loc=19 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] String getWhitespaceLinePrefix(String str, int idx) [CALLS-EXTERNAL] String.indexOf/1, String.length/0, String.substring/2, String.su...
/* static context [FOCAL] public static String Source.formatAligned(String fmt, Object... lines) [PATH1] for(i < lines.length)=T -> exit loop -> return fmtPrefix + String.join("\n" + linePrefix, strings) + fmtSuffix [PATH2] for(i < lines.length)=F -> return fmtPrefix + String.join("\n" + linePrefix, strings) + fmtSuffi...
/* static context [FOCAL] public static String Source.formatAligned(String fmt, Object... lines) [PATH1] for(i < lines.length)=T -> exit loop -> return fmtPrefix + String.join("\n" + linePrefix, strings) + fmtSuffix [PATH2] for(i < lines.length)=F -> return fmtPrefix + String.join("\n" + linePrefix, strings) + fmtSuffi...
true
ok
{"focal": {"class": "Source", "name": "formatAligned", "signature": "String formatAligned(String fmt, Object... lines)", "start_line": 3, "modifiers": "public static", "params": [{"name": "fmt", "type": "String"}, {"name": "lines", "type": "Object..."}], "return_type": "String"}, "class_info": {"name": "Source", "kind"...
30438494_3
class CharUtils { public static boolean isHex(char a) { return (a >= '0' && a <= '9') || (a >= 'a' && a <= 'f') || (a >= 'A' && a <= 'F'); } private CharUtils(); public static boolean isAlpha(char a); public static boolean isNumeric(char a); public static boolean isAlphaNumeric(char a); public sta...
char[] arr = { 'a', 'A', '0', '9' }; for (char a : arr) { Assert.assertTrue(CharUtils.isHex(a)); } char[] arr2 = { '~', ';', 'Z', 'g' }; for (char a : arr2) { Assert.assertFalse(CharUtils.isHex(a)); } } }
[FOCAL] public static boolean CharUtils.isHex(char a) [CLASS] class CharUtils [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=a [DATAFLOW] a@param->L2 [CLASS-MEMBERS] CharUtils(); boolean isAlpha(char a); boolean isNumeric(char a); boolean isAlphaNumeric(char a); boolea...
/* static context [FOCAL] public static boolean CharUtils.isHex(char a) [INPUTS] branches=- | result=a */
/* static context [FOCAL] public static boolean CharUtils.isHex(char a) [INPUTS] branches=- | result=a */ class CharUtils { public static boolean isHex(char a) { return (a >= '0' && a <= '9') || (a >= 'a' && a <= 'f') || (a >= 'A' && a <= 'F'); } private CharUtils(); public static boolean isAlpha(char a...
true
ok
{"focal": {"class": "CharUtils", "name": "isHex", "signature": "boolean isHex(char a)", "start_line": 3, "modifiers": "public static", "params": [{"name": "a", "type": "char"}], "return_type": "boolean"}, "class_info": {"name": "CharUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fiel...
30448037_0
class LocalNetwork { @Override public String toString() { return getClass().getSimpleName() + "(" + interfaceIp.toString() + "\\" + networkPrefixLength + ")"; } public LocalNetwork(InetAddress interfaceIp, int networkPrefixLength); public InetAddress getInterfaceIp(); public InetAddr...
InetAddress test = InetAddress.getByAddress(testAdress); LocalNetwork localNetwork = new LocalNetwork(test, 0); Assert.assertTrue(localNetwork.toString().indexOf("192.168.127.127") >= 0); } }
[FOCAL] @Override public String LocalNetwork.toString() [CLASS] class LocalNetwork [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] getClass().getSimpleName/0, getClass/0 (inherited), interfaceIp.toString/0 [COLLABORATORS] field interfaceIp toString/0 [CLASS-MEMBERS] LocalNetwork(In...
/* static context [FOCAL] @Override public String LocalNetwork.toString() [COLLABORATORS] field interfaceIp toString/0 [CALLS-EXTERNAL] getClass().getSimpleName/0, getClass/0 (inherited), interfaceIp.toString/0 */
/* static context [FOCAL] @Override public String LocalNetwork.toString() [COLLABORATORS] field interfaceIp toString/0 [CALLS-EXTERNAL] getClass().getSimpleName/0, getClass/0 (inherited), interfaceIp.toString/0 */ class LocalNetwork { @Override public String toString() { return getClass().getSimpleName...
true
ok
{"focal": {"class": "LocalNetwork", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "LocalNetwork", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "testAd...
30449481_69
class ResultSet implements Iterable<Result> { public CompletableFuture<Void> allItemsAvailableAsync() { final CompletableFuture<Void> allAvailable = new CompletableFuture<>(); readCompleted.thenRun(() -> allAvailable.complete(null)); readCompleted.exceptionally(t -> { allAvailab...
final CompletableFuture<Void> all = resultSet.allItemsAvailableAsync(); assertThat(all.isDone(), is(false)); final AtomicBoolean atLeastOnce = new AtomicBoolean(false); addToQueue(1000, 1, true, true); while (!readCompleted.isDone()) { atLeastOnce.set(true); ...
[FOCAL] public CompletableFuture<Void> ResultSet.allItemsAvailableAsync() [CLASS] class ResultSet implements Iterable<Result> [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] readCompleted.thenRun/1, CompletableFuture<Void>.complete/1, readCompleted.exceptionally/1, CompletableFutur...
/* static context [FOCAL] public CompletableFuture<Void> ResultSet.allItemsAvailableAsync() [COLLABORATORS] field readCompleted thenRun/1,exceptionally/1 [NEW] CompletableFuture<> [CALLS-EXTERNAL] readCompleted.thenRun/1, CompletableFuture<Void>.complete/1, readCompleted.exceptionally/1, CompletableFuture<Void>.complet...
/* static context [FOCAL] public CompletableFuture<Void> ResultSet.allItemsAvailableAsync() [COLLABORATORS] field readCompleted thenRun/1,exceptionally/1 [NEW] CompletableFuture<> [CALLS-EXTERNAL] readCompleted.thenRun/1, CompletableFuture<Void>.complete/1, readCompleted.exceptionally/1, CompletableFuture<Void>.complet...
true
ok
{"focal": {"class": "ResultSet", "name": "allItemsAvailableAsync", "signature": "CompletableFuture<Void> allItemsAvailableAsync()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "CompletableFuture<Void>"}, "class_info": {"name": "ResultSet", "kind": "class", "modifiers": "", "superclass": null, "...
30515411_4
class MoreSuppliers { public static <T, X extends Throwable> CloseableThrowableSupplier<T, X> lazyEx(ThrowableSupplier<T, X> delegate) { return lazyEx(delegate, true); } public static CloseableSupplier<T> lazy(Supplier<T> delegate); public static CloseableSupplier<T> lazy(Supplier<T> delegate,...
int[] counter = {0}; CloseableThrowableSupplier<String, RuntimeException> supplier = lazyEx(() -> { counter[0]++; return null; }); assertNull(supplier.get()); assertNull(supplier.get()); assertEquals(counter[0], 1); supplier.tryClose(); ...
[FOCAL] public static CloseableThrowableSupplier<T, X> MoreSuppliers.lazyEx(ThrowableSupplier<T, X> delegate) [CLASS] class MoreSuppliers [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] CloseableThrowableSupplier<T, X> lazyEx(ThrowableSupplier<T, X> delegate, boolean resetAfterClos...
/* static context [FOCAL] public static CloseableThrowableSupplier<T, X> MoreSuppliers.lazyEx(ThrowableSupplier<T, X> delegate) [INPUTS] branches=- | result=delegate [CALLS-INTERNAL] CloseableThrowableSupplier<T, X> lazyEx(ThrowableSupplier<T, X> delegate, boolean resetAfterClose) */
/* static context [FOCAL] public static CloseableThrowableSupplier<T, X> MoreSuppliers.lazyEx(ThrowableSupplier<T, X> delegate) [INPUTS] branches=- | result=delegate [CALLS-INTERNAL] CloseableThrowableSupplier<T, X> lazyEx(ThrowableSupplier<T, X> delegate, boolean resetAfterClose) */ class MoreSuppliers { public s...
true
ok
{"focal": {"class": "MoreSuppliers", "name": "lazyEx", "signature": "CloseableThrowableSupplier<T, X> lazyEx(ThrowableSupplier<T, X> delegate)", "start_line": 3, "modifiers": "public static", "params": [{"name": "delegate", "type": "ThrowableSupplier<T, X>"}], "return_type": "CloseableThrowableSupplier<T, X>"}, "class_...
30520538_2
class XformInstanceResource extends BaseResource<OpenmrsObject> { static void adjustXformDocument(Document doc, int patientId, int userId, Date dateEntered) throws SAXException, IOException { Element root = doc.getDocumentElement(); // This element sets the encounter's patient_id column. X...
Document expected = getXmlResource(getClass(), "expected-instance-add.xml"); Document doc = getXmlResource(getClass(), "original-instance-add.xml"); XformInstanceResource.adjustXformDocument(doc, 8, 1, Utils.parse8601("2014-11-15T12:34:56.789Z")); assertXmlEqual(expected, doc); } }
[FOCAL] static void XformInstanceResource.adjustXformDocument(Document doc, int patientId, int userId, Date dateEntered) [CLASS] class XformInstanceResource extends BaseResource<OpenmrsObject> [METRICS] loc=36 cc=4 branches=1 loops=2 returns=0 throws=0 nesting=3 [CALLS-INTERNAL] String fixEncounterDatetime(String text)...
/* static context [FOCAL] static void XformInstanceResource.adjustXformDocument(Document doc, int patientId, int userId, Date dateEntered) [PATH1] foreach(Element element : getChildren(root))=T -> if(!topLevelElements.contains(element.getTagName()))=T -> foreach(Element observation : getChildren(element))=F -> exit loo...
/* static context [FOCAL] static void XformInstanceResource.adjustXformDocument(Document doc, int patientId, int userId, Date dateEntered) [PATH1] foreach(Element element : getChildren(root))=T -> if(!topLevelElements.contains(element.getTagName()))=T -> foreach(Element observation : getChildren(element))=F -> exit loo...
true
ok
{"focal": {"class": "XformInstanceResource", "name": "adjustXformDocument", "signature": "void adjustXformDocument(Document doc, int patientId, int userId, Date dateEntered) throws SAXException, IOException", "start_line": 3, "modifiers": "static", "params": [{"name": "doc", "type": "Document"}, {"name": "patientId", "...
30535152_0
class CentralFileResolver implements FileResolver { @Override public InputStream openInputStream(String fileId) throws IOException { Path fileName = resolvePath(fileId); logger.trace("Reading data from file {}", fileName); InputStream ret; if (!Files.exists(fileName)) { throw new FileNotFoundException(fil...
InputStream in = fr.openInputStream(checksum); char[] read = IOUtils.toCharArray(in); assertEquals(inData.length, read.length); for (int i = 0; i < read.length; i++) { assertEquals(inData[i], read[i]); } } }
[FOCAL] @Override public InputStream CentralFileResolver.openInputStream(String fileId) [CLASS] class CentralFileResolver implements FileResolver [METRICS] loc=12 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] Path resolvePath(String fileId) [CALLS-EXTERNAL] logger.trace/2, Files.exists/1, Path.t...
/* static context [FOCAL] @Override public InputStream CentralFileResolver.openInputStream(String fileId) [THROWS-WHEN] FileNotFoundException when !Files.exists(fileName) [PATH1] if(!Files.exists(fileName))=T -> throw new FileNotFoundException(fileName.toString()) [PATH2] if(!Files.exists(fileName))=F -> return ret [IN...
/* static context [FOCAL] @Override public InputStream CentralFileResolver.openInputStream(String fileId) [THROWS-WHEN] FileNotFoundException when !Files.exists(fileName) [PATH1] if(!Files.exists(fileName))=T -> throw new FileNotFoundException(fileName.toString()) [PATH2] if(!Files.exists(fileName))=F -> return ret [IN...
true
ok
{"focal": {"class": "CentralFileResolver", "name": "openInputStream", "signature": "InputStream openInputStream(String fileId) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "fileId", "type": "String"}], "return_type": "InputStream"}, "class_info": {"name": "CentralFileResolv...
30564046_0
class Credentials { public boolean isDemoCredentials() { return this.equals(Credentials.createDemoCredentials()); } public Credentials(String serverURL, String username, String password); public static Credentials createDemoCredentials(); public String getServerURL(); public String g...
Credentials credentials = new Credentials("server", "user", "pwd"); assertThat(credentials.isDemoCredentials(), is(false)); } }
[FOCAL] public boolean Credentials.isDemoCredentials() [CLASS] class Credentials [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] boolean equals(Object o) [CALLS-EXTERNAL] Credentials.createDemoCredentials/0 [CLASS-MEMBERS] Credentials(String serverURL, String username, String passw...
/* static context [FOCAL] public boolean Credentials.isDemoCredentials() [CALLS-INTERNAL] boolean equals(Object o) [CALLS-EXTERNAL] Credentials.createDemoCredentials/0 */
/* static context [FOCAL] public boolean Credentials.isDemoCredentials() [CALLS-INTERNAL] boolean equals(Object o) [CALLS-EXTERNAL] Credentials.createDemoCredentials/0 */ class Credentials { public boolean isDemoCredentials() { return this.equals(Credentials.createDemoCredentials()); } public Cre...
true
ok
{"focal": {"class": "Credentials", "name": "isDemoCredentials", "signature": "boolean isDemoCredentials()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "Credentials", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name":...
30567918_8
class OBridge { public void generate(OBridgeConfiguration c) { // populate objects table PopulateObjectsTable.run(c); // generate objects EntityObjectGenerator.generate(c); // generate converters ConverterObjectGenerator.generate(c); // generate contexts ...
Properties p = new Properties(); p.load(getClass().getClassLoader().getResourceAsStream("datasource.properties")); OBridgeConfiguration oBridgeConfiguration = new OBridgeConfiguration(); oBridgeConfiguration.setJdbcUrl(p.getProperty("connectionString")); oBridgeConfiguration.se...
[FOCAL] public void OBridge.generate(OBridgeConfiguration c) [CLASS] class OBridge [METRICS] loc=16 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] PopulateObjectsTable.run/1, EntityObjectGenerator.generate/1, ConverterObjectGenerator.generate/1, ProcedureContextGenerator.generate/1, PackageObject...
/* static context [FOCAL] public void OBridge.generate(OBridgeConfiguration c) [CALLS-EXTERNAL] PopulateObjectsTable.run/1, EntityObjectGenerator.generate/1, ConverterObjectGenerator.generate/1, ProcedureContextGenerator.generate/1, PackageObjectGenerator.generate/1 */
/* static context [FOCAL] public void OBridge.generate(OBridgeConfiguration c) [CALLS-EXTERNAL] PopulateObjectsTable.run/1, EntityObjectGenerator.generate/1, ConverterObjectGenerator.generate/1, ProcedureContextGenerator.generate/1, PackageObjectGenerator.generate/1 */ class OBridge { public void generate(OBridgeC...
true
ok
{"focal": {"class": "OBridge", "name": "generate", "signature": "void generate(OBridgeConfiguration c)", "start_line": 3, "modifiers": "public", "params": [{"name": "c", "type": "OBridgeConfiguration"}], "return_type": "void"}, "class_info": {"name": "OBridge", "kind": "class", "modifiers": "", "superclass": null, "int...
30607695_1
class DummySearchService implements SearchService { @Override public ListenableFuture<SearchResponse> extendedSearch(ExtendedSearchRequest request) { SearchResponse response = new SearchResponse(); response.setResultList(Arrays.asList( "result 1", "result 2", ...
ListenableFuture<SearchResponse> result = service.extendedSearch(new ExtendedSearchRequest()); Assert.assertEquals(Arrays.asList("result 1", "result 2", "result 3"), result.get().getResultList()); } }
[FOCAL] @Override public ListenableFuture<SearchResponse> DummySearchService.extendedSearch(ExtendedSearchRequest request) [CLASS] class DummySearchService implements SearchService [METRICS] loc=10 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] SearchResponse.setResultList/1, Arrays.asList/3, Fut...
/* static context [FOCAL] @Override public ListenableFuture<SearchResponse> DummySearchService.extendedSearch(ExtendedSearchRequest request) [INPUTS] branches=- | result=- | unused=request [NEW] SearchResponse [CALLS-EXTERNAL] SearchResponse.setResultList/1, Arrays.asList/3, Futures.immediateFuture/1 */
/* static context [FOCAL] @Override public ListenableFuture<SearchResponse> DummySearchService.extendedSearch(ExtendedSearchRequest request) [INPUTS] branches=- | result=- | unused=request [NEW] SearchResponse [CALLS-EXTERNAL] SearchResponse.setResultList/1, Arrays.asList/3, Futures.immediateFuture/1 */ class DummySear...
true
ok
{"focal": {"class": "DummySearchService", "name": "extendedSearch", "signature": "ListenableFuture<SearchResponse> extendedSearch(ExtendedSearchRequest request)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "request", "type": "ExtendedSearchRequest"}], "return_type": "ListenableFuture<SearchRe...
30649762_4
class SubDomainDynamicExtractor extends DomainValueDynamicExtractor { public String extract(AttributeDetail attributeDetail, String url, Document articleDoc) throws Exception { String domain = super.extract(attributeDetail, url, articleDoc); if(domain.equals(UNKOWN_DOMAN)){ return null;...
String url = "abc.somesite.com/aStory"; AttributeDetail detail = new AttributeDetail(); detail.extractor_args = Arrays.asList("1"); SubDomainDynamicExtractor extr = new SubDomainDynamicExtractor(); assertEquals("abc", extr.extract(detail, url, null)); } }
[FOCAL] public String SubDomainDynamicExtractor.extract(AttributeDetail attributeDetail, String url, Document articleDoc) [CLASS] class SubDomainDynamicExtractor extends DomainValueDynamicExtractor [METRICS] loc=34 cc=9 branches=6 loops=2 returns=4 throws=0 nesting=3 [CALLS-EXTERNAL] DomainValueDynamicExtractor.extract...
/* static context [FOCAL] public String SubDomainDynamicExtractor.extract(AttributeDetail attributeDetail, String url, Document articleDoc) [PATH1] if(domain.equals(UNKOWN_DOMAN))=F -> foreach(String suffix : suffixList)=T -> if(domain.contains(suffix))=T -> foreach(String prefix : prefixList)=T -> if(domain.contains(p...
/* static context [FOCAL] public String SubDomainDynamicExtractor.extract(AttributeDetail attributeDetail, String url, Document articleDoc) [PATH1] if(domain.equals(UNKOWN_DOMAN))=F -> foreach(String suffix : suffixList)=T -> if(domain.contains(suffix))=T -> foreach(String prefix : prefixList)=T -> if(domain.contains(p...
true
ok
{"focal": {"class": "SubDomainDynamicExtractor", "name": "extract", "signature": "String extract(AttributeDetail attributeDetail, String url, Document articleDoc) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "attributeDetail", "type": "AttributeDetail"}, {"name": "url", "type": "String...
30705823_1
class Main { public void run(String[] args) throws ClientException { try { List<String> remainingArgs = readActionAndOptions(args); switch (action) { case UPLOAD: doUpload(remainingArgs); break; case DELETE: ...
MainRunner runner = new MainRunner(null, 45); runner.run("--help"); assertThat(runner.stdout, containsString("Usage: java -jar larsClient.jar action [options] [arguments] ...")); assertThat(runner.stdout, containsString("Show help for larsClient.")); assertThat(runner.stdout, con...
[FOCAL] public void Main.run(String[] args) [CLASS] class Main [METRICS] loc=38 cc=9 branches=2 loops=0 returns=0 throws=1 nesting=2 [CALLS-INTERNAL] List<String> doFind(List<String> remainingArgs); List<String> readActionAndOptions(String[] args); void doDelete(List<String> remainingArgs); void doListAll(List<String> ...
/* static context [FOCAL] public void Main.run(String[] args) [THROWS-WHEN] e when try-body throws && e.getHelpDisplay() == HelpDisplay.SHOW_HELP [THROWS-WHEN] e when try-body throws && !(e.getHelpDisplay() == HelpDisplay.SHOW_HELP) [PATH1] try-body throws -> if(e.getHelpDisplay() == HelpDisplay.SHOW_HELP)=T -> throw e...
/* static context [FOCAL] public void Main.run(String[] args) [THROWS-WHEN] e when try-body throws && e.getHelpDisplay() == HelpDisplay.SHOW_HELP [THROWS-WHEN] e when try-body throws && !(e.getHelpDisplay() == HelpDisplay.SHOW_HELP) [PATH1] try-body throws -> if(e.getHelpDisplay() == HelpDisplay.SHOW_HELP)=T -> throw e...
true
ok
{"focal": {"class": "Main", "name": "run", "signature": "void run(String[] args) throws ClientException", "start_line": 3, "modifiers": "public", "params": [{"name": "args", "type": "String[]"}], "return_type": "void"}, "class_info": {"name": "Main", "kind": "class", "modifiers": "", "superclass": null, "interfaces": n...
30761550_41
class ReconnectingClient extends AbstractRawMemcacheClient { @Override public boolean isConnected() { return client.isConnected(); } public ReconnectingClient( final BackoffFunction backoffFunction, final ScheduledExecutorService scheduledExecutorService, final HostAndPort address, ...
FakeClient delegate1 = new FakeClient(true, true); FakeClient delegate2 = new FakeClient(true, false); BackoffFunction backoffFunction = mock(BackoffFunction.class); when(backoffFunction.getBackoffTimeMillis(0)).thenReturn(0L); when(backoffFunction.getBackoffTimeMillis(1)).thenReturn(123L); Co...
[FOCAL] @Override public boolean ReconnectingClient.isConnected() [CLASS] class ReconnectingClient extends AbstractRawMemcacheClient [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] client.isConnected/0 [COLLABORATORS] field client isConnected/0 [CLASS-MEMBERS] ReconnectingClient(Ba...
/* static context [FOCAL] @Override public boolean ReconnectingClient.isConnected() [COLLABORATORS] field client isConnected/0 [CALLS-EXTERNAL] client.isConnected/0 */
/* static context [FOCAL] @Override public boolean ReconnectingClient.isConnected() [COLLABORATORS] field client isConnected/0 [CALLS-EXTERNAL] client.isConnected/0 */ class ReconnectingClient extends AbstractRawMemcacheClient { @Override public boolean isConnected() { return client.isConnected(); } publi...
true
ok
{"focal": {"class": "ReconnectingClient", "name": "isConnected", "signature": "boolean isConnected()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "boolean"}, "class_info": {"name": "ReconnectingClient", "kind": "class", "modifiers": "", "superclass": "AbstractRawMemcacheClient", "int...
30764186_37
class JCloudsCloud extends Cloud implements SlaveOptions.Holder { @Restricted(NoExternalUse.class) @RequirePOST public void doProvision(StaplerRequest req, StaplerResponse rsp, @QueryParameter String name) throws IOException { // Temporary workaround for https://issues.jenkins-ci.org/browse/JENKIN...
final JCloudsSlaveTemplate template = j.dummySlaveTemplate("asdf"); final JCloudsCloud cloudProvision = getCloudWhereUserIsAuthorizedTo(Cloud.PROVISION, template); j.executeOnServer(new DoProvision(cloudProvision, template)); final JCloudsCloud itemConfigure = getCloudWhereUserIsAuthor...
[FOCAL] @Restricted(NoExternalUse.class) @RequirePOST public void JCloudsCloud.doProvision(StaplerRequest req, StaplerResponse rsp, String name) [CLASS] class JCloudsCloud extends Cloud implements SlaveOptions.Holder [METRICS] loc=56 cc=10 branches=7 loops=1 returns=4 throws=0 nesting=2 [CALLS-INTERNAL] JCloudsSlaveTem...
/* static context [FOCAL] @Restricted(NoExternalUse.class) @RequirePOST public void JCloudsCloud.doProvision(StaplerRequest req, StaplerResponse rsp, String name) [PATH1] if(!hasPermission(Item.CONFIGURE) && !hasPermission(Cloud.PROVISION))=T -> if(rsp.getContentType() == null)=T -> if(name == null)=F -> if(t == null)=...
/* static context [FOCAL] @Restricted(NoExternalUse.class) @RequirePOST public void JCloudsCloud.doProvision(StaplerRequest req, StaplerResponse rsp, String name) [PATH1] if(!hasPermission(Item.CONFIGURE) && !hasPermission(Cloud.PROVISION))=T -> if(rsp.getContentType() == null)=T -> if(name == null)=F -> if(t == null)=...
true
ok
{"focal": {"class": "JCloudsCloud", "name": "doProvision", "signature": "void doProvision(StaplerRequest req, StaplerResponse rsp, String name) throws IOException", "start_line": 3, "modifiers": "@Restricted(NoExternalUse.class) @RequirePOST public", "params": [{"name": "req", "type": "StaplerRequest"}, {"name": "rsp",...
30803699_35
class LynxConfig implements Serializable, Cloneable { public boolean hasFilter() { return !"".equals(filter) || !TraceLevel.VERBOSE.equals(filterTraceLevel); } public LynxConfig(); public LynxConfig setMaxNumberOfTracesToShow(int maxNumberOfTracesToShow); public LynxConfig setFilter(String filter); ...
LynxConfig lynxConfig = new LynxConfig(); assertFalse(lynxConfig.hasFilter()); } }
[FOCAL] public boolean LynxConfig.hasFilter() [CLASS] class LynxConfig implements Serializable, Cloneable [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] "".equals/1, TraceLevel.VERBOSE.equals/1 [CLASS-MEMBERS] LynxConfig(); LynxConfig setMaxNumberOfTracesToShow(int maxNumberOfTrac...
/* static context [FOCAL] public boolean LynxConfig.hasFilter() [CALLS-EXTERNAL] "".equals/1, TraceLevel.VERBOSE.equals/1 */
/* static context [FOCAL] public boolean LynxConfig.hasFilter() [CALLS-EXTERNAL] "".equals/1, TraceLevel.VERBOSE.equals/1 */ class LynxConfig implements Serializable, Cloneable { public boolean hasFilter() { return !"".equals(filter) || !TraceLevel.VERBOSE.equals(filterTraceLevel); } public LynxConfig(); ...
true
ok
{"focal": {"class": "LynxConfig", "name": "hasFilter", "signature": "boolean hasFilter()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "LynxConfig", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Serializable, Cloneable", "fields": [{"nam...
30818918_39
class GenerateMojo extends AbstractMojo { @VisibleForTesting void generateParser(File cupFile) throws IOException, MojoExecutionException { String javaPackage = findJavaPackage(cupFile); // compiling the generated source in target/generated-sources/cup is // the whole point of this plugin. mavenPr...
mojo.symbolInterface = true; ClassLoader classLoader = getClass().getClassLoader(); File file = new File(classLoader.getResource("test.cup").getFile()); mojo.generateParser(file); File expectedDestDir = new File(tempTargetGeneratedCupDirectory, "/foo/bar"); verify(mockCupInvoker) .invok...
[FOCAL] @VisibleForTesting void GenerateMojo.generateParser(File cupFile) [CLASS] class GenerateMojo extends AbstractMojo [METRICS] loc=39 cc=6 branches=4 loops=0 returns=1 throws=2 nesting=3 [CALLS-INTERNAL] String findJavaPackage(File cupFile); boolean isGeneratedCodeOutdated(File cupFile, String javaPackage) [CALLS-...
/* static context [FOCAL] @VisibleForTesting void GenerateMojo.generateParser(File cupFile) [THROWS-WHEN] MojoExecutionException when !skipGeneration && force && try-body throws [THROWS-WHEN] MojoExecutionException when !skipGeneration && force && !outputDirectory.exists() && !outputDirectory.mkdirs() && throw new IOEx...
/* static context [FOCAL] @VisibleForTesting void GenerateMojo.generateParser(File cupFile) [THROWS-WHEN] MojoExecutionException when !skipGeneration && force && try-body throws [THROWS-WHEN] MojoExecutionException when !skipGeneration && force && !outputDirectory.exists() && !outputDirectory.mkdirs() && throw new IOEx...
true
ok
{"focal": {"class": "GenerateMojo", "name": "generateParser", "signature": "void generateParser(File cupFile) throws IOException, MojoExecutionException", "start_line": 3, "modifiers": "@VisibleForTesting", "params": [{"name": "cupFile", "type": "File"}], "return_type": "void"}, "class_info": {"name": "GenerateMojo", "...
30822986_0
class ArbiterCliRunner { public void runMain(String...args) throws Exception { JCommander jcmdr = new JCommander(this); try { jcmdr.parse(args); } catch(ParameterException e) { System.err.println(e.getMessage()); //User provides invalid input -> print th...
ArbiterCliRunner cliRunner = new ArbiterCliRunner(); //Define: network config (hyperparameter space) MultiLayerSpace mls = new MultiLayerSpace.Builder() .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) .updater(new SgdSpace(new ContinuousParam...
[FOCAL] public void ArbiterCliRunner.runMain(String... args) [CLASS] class ArbiterCliRunner [METRICS] loc=73 cc=10 branches=7 loops=0 returns=0 throws=0 nesting=4 [CALLS-EXTERNAL] JCommander.parse/1, System.err.println/1, ParameterException.getMessage/0, JCommander.usage/0, Thread.sleep/1, System.exit/1, Map<String,Obj...
/* static context [FOCAL] public void ArbiterCliRunner.runMain(String... args) [PATH1] try-body throws -> if(f.exists())=T -> if(problemType.equals(REGRESSION))=F -> if(problemType.equals(CLASSIFICATION))=T -> if(neuralNetType.equals(COMP_GRAPH))#2=F -> if(neuralNetType.equals(MULTI_LAYER_NETWORK))#2=T [PATH2] try-body...
/* static context [FOCAL] public void ArbiterCliRunner.runMain(String... args) [PATH1] try-body throws -> if(f.exists())=T -> if(problemType.equals(REGRESSION))=F -> if(problemType.equals(CLASSIFICATION))=T -> if(neuralNetType.equals(COMP_GRAPH))#2=F -> if(neuralNetType.equals(MULTI_LAYER_NETWORK))#2=T [PATH2] try-body...
true
ok
{"focal": {"class": "ArbiterCliRunner", "name": "runMain", "signature": "void runMain(String... args) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "args", "type": "String..."}], "return_type": "void"}, "class_info": {"name": "ArbiterCliRunner", "kind": "class", "modifiers": "", "superc...
30837244_6
class DesiredYawCalculator { public double getYaw(double droneHeading, double phoneHeading) { double difference = phoneHeading - droneHeading; if (difference > 180) { difference = difference - 180 * 2; } else if (difference < -180) { difference = difference + 180 * ...
double yaw = desiredYaw.getYaw(170, -170); assertEquals(20d, yaw); } }
[FOCAL] public double DesiredYawCalculator.getYaw(double droneHeading, double phoneHeading) [CLASS] class DesiredYawCalculator [METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=2 [PATH1] if(difference > 180)=F -> if(difference < -180)=T -> return difference [PATH2] if(difference > 180)=T -> return dif...
/* static context [FOCAL] public double DesiredYawCalculator.getYaw(double droneHeading, double phoneHeading) [PATH1] if(difference > 180)=F -> if(difference < -180)=T -> return difference [PATH2] if(difference > 180)=T -> return difference [PATH3] if(difference > 180)=F -> if(difference < -180)=F -> return difference ...
/* static context [FOCAL] public double DesiredYawCalculator.getYaw(double droneHeading, double phoneHeading) [PATH1] if(difference > 180)=F -> if(difference < -180)=T -> return difference [PATH2] if(difference > 180)=T -> return difference [PATH3] if(difference > 180)=F -> if(difference < -180)=F -> return difference ...
true
ok
{"focal": {"class": "DesiredYawCalculator", "name": "getYaw", "signature": "double getYaw(double droneHeading, double phoneHeading)", "start_line": 3, "modifiers": "public", "params": [{"name": "droneHeading", "type": "double"}, {"name": "phoneHeading", "type": "double"}], "return_type": "double"}, "class_info": {"name...
30840080_2
class NetworkBlogUrlValidator implements BlogUrlValidator { @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) static Single<String> checkGhostBlog(@NonNull String blogUrl, @NonNull OkHttpClient client) { final String adminPagePath = "/ghost/"; St...
String blogUrl = HTTPS + server.getHostName() + ":" + server.getPort() + "/THIS_DOESNT_EXIST"; server.useHttps(Helpers.LOCALHOST_SOCKET_FACTORY, false); server.enqueue(new MockResponse().setResponseCode(404)); OkHttpClient httpClient = Helpers.getProdHttpClient(); try { ...
[FOCAL] @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) static Single<String> NetworkBlogUrlValidator.checkGhostBlog(String blogUrl, OkHttpClient client) [CLASS] class NetworkBlogUrlValidator implements BlogUrlValidator [METRICS] loc=22 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] Sin...
/* static context [FOCAL] @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) static Single<String> NetworkBlogUrlValidator.checkGhostBlog(String blogUrl, OkHttpClient client) [INPUTS] branches=- | result=blogUrl, client [COLLABORATORS] field response isSuccessful/0,request/0,code/0 [CALLS-INTERNAL] Single<Respon...
/* static context [FOCAL] @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) static Single<String> NetworkBlogUrlValidator.checkGhostBlog(String blogUrl, OkHttpClient client) [INPUTS] branches=- | result=blogUrl, client [COLLABORATORS] field response isSuccessful/0,request/0,code/0 [CALLS-INTERNAL] Single<Respon...
true
ok
{"focal": {"class": "NetworkBlogUrlValidator", "name": "checkGhostBlog", "signature": "Single<String> checkGhostBlog(String blogUrl, OkHttpClient client)", "start_line": 3, "modifiers": "@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) static", "params": [{"name": "blogUrl", "type": "String"}, {"name": "client...