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
45780307_43
class StarTreeRecordStoreDefaultImpl implements StarTreeRecordStore { @Override public Number[] getMetricSums(StarTreeQuery query) { return doQuery(query).getMetricSums(); } public StarTreeRecordStoreDefaultImpl(StarTreeConfig config, DimensionStore dimensionStor...
StarTreeQuery query = new StarTreeQueryImpl.Builder() .setDimensionKey(getDimensionKey("A0", StarTreeConstants.STAR, StarTreeConstants.STAR)) .setTimeRange(new TimeRange(0L, 7L)) .build(config); Number[] sums = recordStore.getMetricSums(query); Assert.assertEquals(sums,...
[FOCAL] @Override public Number[] StarTreeRecordStoreDefaultImpl.getMetricSums(StarTreeQuery query) [CLASS] class StarTreeRecordStoreDefaultImpl implements StarTreeRecordStore [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] MetricTimeSeries doQuery(StarTreeQuery query) [CALLS-EXTER...
/* static context [FOCAL] @Override public Number[] StarTreeRecordStoreDefaultImpl.getMetricSums(StarTreeQuery query) [INPUTS] branches=- | result=query [CALLS-INTERNAL] MetricTimeSeries doQuery(StarTreeQuery query) [CALLS-EXTERNAL] doQuery(query).getMetricSums/0 */
/* static context [FOCAL] @Override public Number[] StarTreeRecordStoreDefaultImpl.getMetricSums(StarTreeQuery query) [INPUTS] branches=- | result=query [CALLS-INTERNAL] MetricTimeSeries doQuery(StarTreeQuery query) [CALLS-EXTERNAL] doQuery(query).getMetricSums/0 */ class StarTreeRecordStoreDefaultImpl implements StarT...
true
ok
{"focal": {"class": "StarTreeRecordStoreDefaultImpl", "name": "getMetricSums", "signature": "Number[] getMetricSums(StarTreeQuery query)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "query", "type": "StarTreeQuery"}], "return_type": "Number[]"}, "class_info": {"name": "StarTreeRecordStoreDefa...
45824158_11
class RestUri implements Serializable { public RestUri withoutPath() { try { URI parsedUri = new URI(uri); return new RestUri(parsedUri.getScheme() + "://" + parsedUri.getHost() + ((parsedUri.getPort() > -1) ? ":" + parsedUri.getPort() : "") + "/"); } catch (URISyntaxExcepti...
RestUri restUri = new RestUri("http://1.1.1.1:8888/some_path"); assertEquals("http://1.1.1.1:8888/", restUri.withoutPath().getUri()); } }
[FOCAL] public RestUri RestUri.withoutPath() [CLASS] class RestUri implements Serializable [METRICS] loc=9 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] URI.getScheme/0, URI.getHost/0, URI.getPort/0, log.warn/2 [NEW] URI, RestUri [EXCEPTIONS] catches URISyntaxException e [PATH1] try-body throws ...
/* static context [FOCAL] public RestUri RestUri.withoutPath() [PATH1] try-body throws -> return new RestUri(uri) [PATH2] return new RestUri(parsedUri.getScheme() + "://" + parsedUri.getHost() + (... [EXCEPTIONS] catches URISyntaxException e [NEW] URI, RestUri [CALLS-EXTERNAL] URI.getScheme/0, URI.getHost/0, URI.getPor...
/* static context [FOCAL] public RestUri RestUri.withoutPath() [PATH1] try-body throws -> return new RestUri(uri) [PATH2] return new RestUri(parsedUri.getScheme() + "://" + parsedUri.getHost() + (... [EXCEPTIONS] catches URISyntaxException e [NEW] URI, RestUri [CALLS-EXTERNAL] URI.getScheme/0, URI.getHost/0, URI.getPor...
true
ok
{"focal": {"class": "RestUri", "name": "withoutPath", "signature": "RestUri withoutPath()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "RestUri"}, "class_info": {"name": "RestUri", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Serializable", "fields": [], "members": [{"n...
45832751_0
class JsonNodeComparator implements Comparator<JsonNode>, Serializable { public int compare(final JsonNode o1, final JsonNode o2) { final int r = orderValue(o1) - orderValue(o2); if (r != 0) return r; final JsonNodeType type = o1 != null ? o1.getNodeType() : null; if (type == null || type == JsonNodeType....
final ObjectMapper mapper = new ObjectMapper(); final JsonNode j3 = mapper.readTree("3"); final JsonNode j10 = mapper.readTree("10"); final JsonNode jhoge = mapper.readTree("\"hoge\""); final JsonNodeComparator sut = new JsonNodeComparator(); assertTrue(sut.compare(j3, j10) < 0); assertTrue(sut.compare(...
[FOCAL] public int JsonNodeComparator.compare(JsonNode o1, JsonNode o2) [CLASS] class JsonNodeComparator implements Comparator<JsonNode>, Serializable [METRICS] loc=66 cc=17 branches=13 loops=3 returns=13 throws=1 nesting=3 [CALLS-INTERNAL] int orderValue(JsonNode node) [CALLS-EXTERNAL] JsonNode.getNodeType/0, Boolean....
/* static context [FOCAL] public int JsonNodeComparator.compare(JsonNode o1, JsonNode o2) [THROWS-WHEN] IllegalArgumentException when !(r != 0) && !(type == null || type == JsonNodeType.MISSING || type == JsonNodeType.NULL) && !(type == JsonNodeType.BOOLEAN) && !(type == JsonNodeType.NUMBER) && !(type == JsonNodeType.S...
/* static context [FOCAL] public int JsonNodeComparator.compare(JsonNode o1, JsonNode o2) [THROWS-WHEN] IllegalArgumentException when !(r != 0) && !(type == null || type == JsonNodeType.MISSING || type == JsonNodeType.NULL) && !(type == JsonNodeType.BOOLEAN) && !(type == JsonNodeType.NUMBER) && !(type == JsonNodeType.S...
true
ok
{"focal": {"class": "JsonNodeComparator", "name": "compare", "signature": "int compare(JsonNode o1, JsonNode o2)", "start_line": 3, "modifiers": "public", "params": [{"name": "o1", "type": "JsonNode"}, {"name": "o2", "type": "JsonNode"}], "return_type": "int"}, "class_info": {"name": "JsonNodeComparator", "kind": "clas...
45860898_137
class MaintenanceScheduleHelper { public static void validateDuration(final String duration) { try { if (StringUtils.hasText(duration)) { convertDurationToLocalTime(duration); } } catch (final DateTimeParseException e) { throw new InvalidMaintenan...
final String duration = "10"; assertThatThrownBy(() -> MaintenanceScheduleHelper.validateDuration(duration)) .isInstanceOf(InvalidMaintenanceScheduleException.class).hasMessage("Provided duration is not valid") .extracting("durationErrorIndex").containsExactly(2); } ...
[FOCAL] public static void MaintenanceScheduleHelper.validateDuration(String duration) [CLASS] class MaintenanceScheduleHelper [METRICS] loc=9 cc=3 branches=1 loops=0 returns=0 throws=1 nesting=2 [CALLS-INTERNAL] LocalTime convertDurationToLocalTime(String timeInterval) [CALLS-EXTERNAL] StringUtils.hasText/1, DateTimeP...
/* static context [FOCAL] public static void MaintenanceScheduleHelper.validateDuration(String duration) [THROWS-WHEN] InvalidMaintenanceScheduleException when try-body throws [PATH1] try-body throws -> throw new InvalidMaintenanceScheduleException("Provided duration is not v... [PATH2] if(StringUtils.hasText(duration)...
/* static context [FOCAL] public static void MaintenanceScheduleHelper.validateDuration(String duration) [THROWS-WHEN] InvalidMaintenanceScheduleException when try-body throws [PATH1] try-body throws -> throw new InvalidMaintenanceScheduleException("Provided duration is not v... [PATH2] if(StringUtils.hasText(duration)...
true
ok
{"focal": {"class": "MaintenanceScheduleHelper", "name": "validateDuration", "signature": "void validateDuration(String duration)", "start_line": 3, "modifiers": "public static", "params": [{"name": "duration", "type": "String"}], "return_type": "void"}, "class_info": {"name": "MaintenanceScheduleHelper", "kind": "clas...
45932568_14
class KafkaUtilities { public VerifyTopicState verifySupportTopic( KafkaZkClient zkClient, String topic, int expPartitions, int expReplication ) { Objects.requireNonNull(zkClient, "zkClient must not be null"); if (topic == null || topic.isEmpty()) { throw new IllegalArgumentE...
// Given KafkaUtilities kUtil = new KafkaUtilities(); // When/Then try { kUtil.verifySupportTopic(null, anyTopic, anyPartitions, anyReplication); fail("IllegalArgumentException expected because zkClient is null"); } catch (NullPointerException e) { // ignore } } }
[FOCAL] public VerifyTopicState KafkaUtilities.verifySupportTopic(KafkaZkClient zkClient, String topic, int expPartitions, int expReplication) [CLASS] class KafkaUtilities [METRICS] loc=71 cc=9 branches=7 loops=0 returns=1 throws=3 nesting=4 [CALLS-EXTERNAL] Objects.requireNonNull/2, String.isEmpty/0, Set<String>.add/1...
/* static context [FOCAL] public VerifyTopicState KafkaUtilities.verifySupportTopic(KafkaZkClient zkClient, String topic, int expPartitions, int expReplication) [THROWS-WHEN] IllegalArgumentException when topic == null || topic.isEmpty() [THROWS-WHEN] IllegalArgumentException when !(topic == null || topic.isEmpty()) &&...
/* static context [FOCAL] public VerifyTopicState KafkaUtilities.verifySupportTopic(KafkaZkClient zkClient, String topic, int expPartitions, int expReplication) [THROWS-WHEN] IllegalArgumentException when topic == null || topic.isEmpty() [THROWS-WHEN] IllegalArgumentException when !(topic == null || topic.isEmpty()) &&...
true
ok
{"focal": {"class": "KafkaUtilities", "name": "verifySupportTopic", "signature": "VerifyTopicState verifySupportTopic(KafkaZkClient zkClient, String topic, int expPartitions, int expReplication)", "start_line": 3, "modifiers": "public", "params": [{"name": "zkClient", "type": "KafkaZkClient"}, {"name": "topic", "type":...
45953328_0
class BaseInfo implements java.io.Serializable { public void mock() { } public static T mockObject(Class<T> clazz); public static List<T> mockList(int max, Class<T> clazz); } class BaseInfoTest { @Test public void testMock() {
// object MyBaseInfo info = BaseInfo.mockObject(MyBaseInfo.class); Assert.assertTrue(info.id.equals("1")); // BaseListInfo MyBaseListInfo listInfo = new MyBaseListInfo(); listInfo.mock(); Assert.assertTrue(listInfo.count >= 0); if (listIn...
[FOCAL] public void BaseInfo.mock() [CLASS] class BaseInfo implements java.io.Serializable [METRICS] loc=2 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CLASS-MEMBERS] T mockObject(Class<T> clazz); List<T> mockList(int max, Class<T> clazz) [TEST] BaseInfoTest: @Test public void testMock()
/* static context [FOCAL] public void BaseInfo.mock() */
/* static context [FOCAL] public void BaseInfo.mock() */ class BaseInfo implements java.io.Serializable { public void mock() { } public static T mockObject(Class<T> clazz); public static List<T> mockList(int max, Class<T> clazz); } class BaseInfoTest { @Test public void testMock() {
true
ok
{"focal": {"class": "BaseInfo", "name": "mock", "signature": "void mock()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "BaseInfo", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "java.io.Serializable", "fields": [], "members": [{"name": "moc...
45970905_0
class XercesSax implements ContentHandler { public String getElementContent(String tagName) { // suche erstes Element mit tagName int startIndex = this.result.indexOf(tagName); String content = ""; if (startIndex > -1) { // für jedes nachfolgende Element for (int ...
parser.setProperty("http://xml.org/sax/properties/declaration-handler", myDeclHandler); parser.parse("../../xml_files/dtd/internalSubset_PEReferenceIn_ExternalSubsetInternalGeneralEntity.xml"); assertEquals("file:///home/phoenix/masterthesis/Christopher_Spaeth/code/xml_files/dtd/internalSubset_P...
[FOCAL] public String XercesSax.getElementContent(String tagName) [CLASS] class XercesSax implements ContentHandler [METRICS] loc=26 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=3 [CALLS-EXTERNAL] this.result.indexOf/1, this.result.size/0, this.result.get/1, String.replaceAll/2 [FIELDS] read=result [PATH1] if(sta...
/* static context [FOCAL] public String XercesSax.getElementContent(String tagName) [PATH1] if(startIndex > -1)=T -> for(i < this.result.size())=T -> if(this.result.get(i) != tagName)=T -> exit loop -> return content [PATH2] if(startIndex > -1)=F -> return content [PATH3] if(startIndex > -1)=T -> for(i < this.result.si...
/* static context [FOCAL] public String XercesSax.getElementContent(String tagName) [PATH1] if(startIndex > -1)=T -> for(i < this.result.size())=T -> if(this.result.get(i) != tagName)=T -> exit loop -> return content [PATH2] if(startIndex > -1)=F -> return content [PATH3] if(startIndex > -1)=T -> for(i < this.result.si...
true
ok
{"focal": {"class": "XercesSax", "name": "getElementContent", "signature": "String getElementContent(String tagName)", "start_line": 3, "modifiers": "public", "params": [{"name": "tagName", "type": "String"}], "return_type": "String"}, "class_info": {"name": "XercesSax", "kind": "class", "modifiers": "", "superclass": ...
45986064_19
class OverlapHelper { public static void evaluateOverlap(AnnotationFS gold, AnnotationFS sys, RecognitionMeasures measures) { if (gold.getEnd() <= sys.getBegin() || sys.getEnd() <= gold.getBegin()) { throw new IllegalArgumentException(String.format( ...
RecognitionMeasures rm = new RecognitionMeasures(); OverlapHelper.evaluateOverlap(anno(5, 10), anno(7, 10), rm); assertEquals(0.6, rm.getMatchedScore(), 0.001d); assertEquals(0.4, rm.getMissedScore(), 0.001d); assertEquals(0, rm.getSpuriousScore(), 0.001d); } }
[FOCAL] public static void OverlapHelper.evaluateOverlap(AnnotationFS gold, AnnotationFS sys, RecognitionMeasures measures) [CLASS] class OverlapHelper [METRICS] loc=47 cc=6 branches=5 loops=0 returns=0 throws=3 nesting=1 [CALLS-EXTERNAL] AnnotationFS.getEnd/0, AnnotationFS.getBegin/0, String.format/3, RecognitionMeasu...
/* static context [FOCAL] public static void OverlapHelper.evaluateOverlap(AnnotationFS gold, AnnotationFS sys, RecognitionMeasures measures) [THROWS-WHEN] IllegalArgumentException when gold.getEnd() <= sys.getBegin() || sys.getEnd() <= gold.getBegin() [THROWS-WHEN] IllegalStateException when !(gold.getEnd() <= sys.get...
/* static context [FOCAL] public static void OverlapHelper.evaluateOverlap(AnnotationFS gold, AnnotationFS sys, RecognitionMeasures measures) [THROWS-WHEN] IllegalArgumentException when gold.getEnd() <= sys.getBegin() || sys.getEnd() <= gold.getBegin() [THROWS-WHEN] IllegalStateException when !(gold.getEnd() <= sys.get...
true
ok
{"focal": {"class": "OverlapHelper", "name": "evaluateOverlap", "signature": "void evaluateOverlap(AnnotationFS gold, AnnotationFS sys, RecognitionMeasures measures)", "start_line": 3, "modifiers": "public static", "params": [{"name": "gold", "type": "AnnotationFS"}, {"name": "sys", "type": "AnnotationFS"}, {"name": "m...
45997449_24
class ResourceArgumentsUrn extends ResourceUrn implements IResourceArgumentsUrn { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; ResourceArgumentsU...
Map<String, Object> arguments = new HashMap<String, Object>(); arguments.put("key1", "value1"); arguments.put("key2", "value2"); ResourceArgumentsUrn urn = new ResourceArgumentsUrn("js", "local", "/js/sample/sample.js", arguments); Assert.assertTrue(urn.equals(urn)); ResourceArgument...
[FOCAL] @Override public boolean ResourceArgumentsUrn.equals(Object obj) [CLASS] class ResourceArgumentsUrn extends ResourceUrn implements IResourceArgumentsUrn [METRICS] loc=16 cc=7 branches=6 loops=0 returns=6 throws=0 nesting=2 [CALLS-EXTERNAL] ResourceUrn.equals/1, getClass/0 (inherited), Object.getClass/0, m_argum...
/* static context [FOCAL] @Override public boolean ResourceArgumentsUrn.equals(Object obj) [PATH1] if(this == obj)=F -> if(!super.equals(obj))=F -> if(getClass() != obj.getClass())=F -> if(m_argument == null)=T -> if(other.m_argument != null)=T -> return false [PATH2] if(this == obj)=F -> if(!super.equals(obj))=F -> if...
/* static context [FOCAL] @Override public boolean ResourceArgumentsUrn.equals(Object obj) [PATH1] if(this == obj)=F -> if(!super.equals(obj))=F -> if(getClass() != obj.getClass())=F -> if(m_argument == null)=T -> if(other.m_argument != null)=T -> return false [PATH2] if(this == obj)=F -> if(!super.equals(obj))=F -> if...
true
ok
{"focal": {"class": "ResourceArgumentsUrn", "name": "equals", "signature": "boolean equals(Object obj)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "obj", "type": "Object"}], "return_type": "boolean"}, "class_info": {"name": "ResourceArgumentsUrn", "kind": "class", "modifiers": "", "superclas...
46000465_198
class SceneUpdateManager { SceneUpdate getApiKeyUpdate(String apiKey) { return new SceneUpdate(STYLE_GLOBAL_VAR_API_KEY, apiKey); } List<SceneUpdate> getUpdatesFor(String apiKey, Locale locale, boolean transitOverlayEnabled, boolean bikeOverlayEnabled, boolean pathOverlayEnabled); SceneUpdate getT...
SceneUpdate update = manager.getApiKeyUpdate("api-key"); assertThat(update.getPath()).isEqualTo("global.sdk_mapzen_api_key"); assertThat(update.getValue()).isEqualTo("api-key"); } }
[FOCAL] SceneUpdate SceneUpdateManager.getApiKeyUpdate(String apiKey) [CLASS] class SceneUpdateManager [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] SceneUpdate [INPUTS] branches=- | result=apiKey [DATAFLOW] apiKey@param->L2 [CLASS-MEMBERS] List<SceneUpdate> getUpdatesFor(String apiKey, Loc...
/* static context [FOCAL] SceneUpdate SceneUpdateManager.getApiKeyUpdate(String apiKey) [INPUTS] branches=- | result=apiKey [NEW] SceneUpdate */
/* static context [FOCAL] SceneUpdate SceneUpdateManager.getApiKeyUpdate(String apiKey) [INPUTS] branches=- | result=apiKey [NEW] SceneUpdate */ class SceneUpdateManager { SceneUpdate getApiKeyUpdate(String apiKey) { return new SceneUpdate(STYLE_GLOBAL_VAR_API_KEY, apiKey); } List<SceneUpdate> getUpdatesFo...
true
ok
{"focal": {"class": "SceneUpdateManager", "name": "getApiKeyUpdate", "signature": "SceneUpdate getApiKeyUpdate(String apiKey)", "start_line": 3, "modifiers": "", "params": [{"name": "apiKey", "type": "String"}], "return_type": "SceneUpdate"}, "class_info": {"name": "SceneUpdateManager", "kind": "class", "modifiers": ""...
46007735_2
class StringUtils { public static boolean isEmpty(String string) { return string == null || string.length() == 0; } private StringUtils(); } class StringUtilsTest { @Test public void testStringNotEmpty() throws Exception {
boolean empty = StringUtils.isEmpty("test"); assertFalse(empty); } }
[FOCAL] public static boolean StringUtils.isEmpty(String string) [CLASS] class StringUtils [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] String.length/0 [INPUTS] branches=- | result=string [DATAFLOW] string@param->L2 [CLASS-MEMBERS] StringUtils() [TEST] StringUtilsTest: @Test pub...
/* static context [FOCAL] public static boolean StringUtils.isEmpty(String string) [INPUTS] branches=- | result=string [CALLS-EXTERNAL] String.length/0 */
/* static context [FOCAL] public static boolean StringUtils.isEmpty(String string) [INPUTS] branches=- | result=string [CALLS-EXTERNAL] String.length/0 */ class StringUtils { public static boolean isEmpty(String string) { return string == null || string.length() == 0; } private StringUtils(); } ...
true
ok
{"focal": {"class": "StringUtils", "name": "isEmpty", "signature": "boolean isEmpty(String string)", "start_line": 3, "modifiers": "public static", "params": [{"name": "string", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "StringUtils", "kind": "class", "modifiers": "", "superclass": null, "in...
46035308_5
class Sensey { public void startProximityDetection(ProximityListener proximityListener) { startLibrarySensorDetection(new ProximityDetector(proximityListener), proximityListener); } private Sensey(); public static Sensey getInstance(); public void init(Context context, int samplingPeriod...
addSensor(TYPE_PROXIMITY); ProximityListener fakeListener = mock(ProximityListener.class); sensey.startProximityDetection(fakeListener); ProximityDetector detector = getDetector(fakeListener, ProximityDetector.class); if (detector != null) { assertTrue("Sensor Manager...
[FOCAL] public void Sensey.startProximityDetection(ProximityListener proximityListener) [CLASS] class Sensey [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void startLibrarySensorDetection(SensorDetector detector, Object clientListener) [NEW] ProximityDetector [DATAFLOW] proximity...
/* static context [FOCAL] public void Sensey.startProximityDetection(ProximityListener proximityListener) [CALLS-INTERNAL] void startLibrarySensorDetection(SensorDetector detector, Object clientListener) [NEW] ProximityDetector */
/* static context [FOCAL] public void Sensey.startProximityDetection(ProximityListener proximityListener) [CALLS-INTERNAL] void startLibrarySensorDetection(SensorDetector detector, Object clientListener) [NEW] ProximityDetector */ class Sensey { public void startProximityDetection(ProximityListener proximityListen...
true
ok
{"focal": {"class": "Sensey", "name": "startProximityDetection", "signature": "void startProximityDetection(ProximityListener proximityListener)", "start_line": 3, "modifiers": "public", "params": [{"name": "proximityListener", "type": "ProximityListener"}], "return_type": "void"}, "class_info": {"name": "Sensey", "kin...
46045563_14
class FluentIterator implements ImmutableIterator<T> { public T reduce(BinaryOperator<T> f) { return Iterators.reduce(this, f); } public FluentIterator(Iterator<T> t); public static FluentIterator<T> fluent(Iterator<T> t); @Override public boolean hasNext(); @Override public T next()...
FluentIterator<Integer> t = fluent(repeat(10, 5)); BinaryOperator<Integer> op = (a, b) -> a + b; int sum = t.reduce(op); assertEquals(50, sum); t = fluent(repeat(10, 5)); BinaryOperator<Integer> mul = (a, b) -> a * b; int prod = t.reduce(mul); assertEqual...
[FOCAL] public T FluentIterator.reduce(BinaryOperator<T> f) [CLASS] class FluentIterator implements ImmutableIterator<T> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Iterators.reduce/2 [INPUTS] branches=- | result=f [DATAFLOW] f@param->L2 [CLASS-MEMBERS] FluentIterator(Iterator<...
/* static context [FOCAL] public T FluentIterator.reduce(BinaryOperator<T> f) [INPUTS] branches=- | result=f [CALLS-EXTERNAL] Iterators.reduce/2 */
/* static context [FOCAL] public T FluentIterator.reduce(BinaryOperator<T> f) [INPUTS] branches=- | result=f [CALLS-EXTERNAL] Iterators.reduce/2 */ class FluentIterator implements ImmutableIterator<T> { public T reduce(BinaryOperator<T> f) { return Iterators.reduce(this, f); } public FluentIterat...
true
ok
{"focal": {"class": "FluentIterator", "name": "reduce", "signature": "T reduce(BinaryOperator<T> f)", "start_line": 3, "modifiers": "public", "params": [{"name": "f", "type": "BinaryOperator<T>"}], "return_type": "T"}, "class_info": {"name": "FluentIterator", "kind": "class", "modifiers": "", "superclass": null, "inter...
46057717_11
class AuthorizationCodeVerifier implements CodeVerifier { @Override public boolean verify(CodeChallenge codeChallenge, String providedCodeVerifier) { try { //no code verifier was provided and no code challenge was saved so this is a normal OAuth2 code flow if (providedCodeVerifier.isEmpty() && !cod...
String codeVerifierValue = "::code::"; byte[] hashedCodeChallenge = MessageDigest.getInstance("SHA-256").digest(codeVerifierValue.getBytes(StandardCharsets.UTF_8)); String transformedCodeChallenge = BaseEncoding.base64Url().encode(hashedCodeChallenge); CodeChallenge codeChallenge = new CodeChallenge(tr...
[FOCAL] @Override public boolean AuthorizationCodeVerifier.verify(CodeChallenge codeChallenge, String providedCodeVerifier) [CLASS] class AuthorizationCodeVerifier implements CodeVerifier [METRICS] loc=30 cc=7 branches=5 loops=0 returns=7 throws=0 nesting=2 [CALLS-EXTERNAL] String.isEmpty/0, CodeChallenge.isProvided/0,...
/* static context [FOCAL] @Override public boolean AuthorizationCodeVerifier.verify(CodeChallenge codeChallenge, String providedCodeVerifier) [PATH1] if(providedCodeVerifier.isEmpty() && !codeChallenge.isProvided())=F -> if(providedCodeVerifier.isEmpty() && codeChallenge.isProvided())=F -> if(!providedCodeVerifier.isEm...
/* static context [FOCAL] @Override public boolean AuthorizationCodeVerifier.verify(CodeChallenge codeChallenge, String providedCodeVerifier) [PATH1] if(providedCodeVerifier.isEmpty() && !codeChallenge.isProvided())=F -> if(providedCodeVerifier.isEmpty() && codeChallenge.isProvided())=F -> if(!providedCodeVerifier.isEm...
true
ok
{"focal": {"class": "AuthorizationCodeVerifier", "name": "verify", "signature": "boolean verify(CodeChallenge codeChallenge, String providedCodeVerifier)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "codeChallenge", "type": "CodeChallenge"}, {"name": "providedCodeVerifier", "type": "String"}]...
46113606_80
class CustomSegment extends Segment { @Override public boolean evaluate() { if (!TextUtils.isEmpty(mType) && mType.equals(AppConstants.CUSTOM_SEGMENT)) { return CustomSegmentEvaluateEnum.getEvaluator(mType, mSegmentOperator).evaluate(vwo, mOperandValue, lOperandValue); } ret...
VWO vwo = new VWOMock().getVWOMockObject(); PowerMockito.mockStatic(VWOPersistData.class); PowerMockito.when(VWOPersistData.isReturningUser(ArgumentMatchers.any(VWO.class))).thenReturn(false); String json = TestUtils.readJsonFile(getClass(), "com/vwo/mobile/segmentation/screen_height_l...
[FOCAL] @Override public boolean CustomSegment.evaluate() [CLASS] class CustomSegment extends Segment [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] TextUtils.isEmpty/1, mType.equals/1, CustomSegmentEvaluateEnum.getEvaluator(mType, mSegmentOpe....evaluate/3, CustomSegmentEvaluateE...
/* static context [FOCAL] @Override public boolean CustomSegment.evaluate() [PATH1] if(!TextUtils.isEmpty(mType) && mType.equals(AppConstants.CUSTOM_SEGMENT))=T -> return CustomSegmentEvaluateEnum.getEvaluator(mType, mSegmentOperator).eva... [PATH2] if(!TextUtils.isEmpty(mType) && mType.equals(AppConstants.CUSTOM_SEGME...
/* static context [FOCAL] @Override public boolean CustomSegment.evaluate() [PATH1] if(!TextUtils.isEmpty(mType) && mType.equals(AppConstants.CUSTOM_SEGMENT))=T -> return CustomSegmentEvaluateEnum.getEvaluator(mType, mSegmentOperator).eva... [PATH2] if(!TextUtils.isEmpty(mType) && mType.equals(AppConstants.CUSTOM_SEGME...
true
ok
{"focal": {"class": "CustomSegment", "name": "evaluate", "signature": "boolean evaluate()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "boolean"}, "class_info": {"name": "CustomSegment", "kind": "class", "modifiers": "", "superclass": "Segment", "interfaces": null, "fields": [{"name"...
46121851_23
class MplProcessMaterializer extends ProcessCommandsHelper { public @Nullable CommandChain visitProcess(MplProgram program, MplProcess process) { if (process.getType() == INLINE) { return null; } List<ChainPart> chainParts = new CopyScope().copy(process.getChainParts()); List<ChainLink> result ...
// given: MplCommand first = some($MplCommand().withConditional(UNCONDITIONAL)); MplCommand second = some($MplCommand().withConditional(INVERT)); MplProcess process = some($MplProcess()// .withRepeating(false)// .withChainParts(listOf(first, second))); // when: CommandChain res...
[FOCAL] public @Nullable CommandChain MplProcessMaterializer.visitProcess(MplProgram program, MplProcess process) [CLASS] class MplProcessMaterializer extends ProcessCommandsHelper [METRICS] loc=49 cc=12 branches=9 loops=1 returns=2 throws=1 nesting=4 [CALLS-INTERNAL] MplProcessAstVisitor.Context newVisitorContext(MplP...
/* static context [FOCAL] public @Nullable CommandChain MplProcessMaterializer.visitProcess(MplProgram program, MplProcess process) [THROWS-WHEN] IllegalStateException when !(process.getType() == INLINE) && name != null && process.isRepeating() && options.hasOption(TRANSMITTER) && chainParts.isEmpty() && try-body throw...
/* static context [FOCAL] public @Nullable CommandChain MplProcessMaterializer.visitProcess(MplProgram program, MplProcess process) [THROWS-WHEN] IllegalStateException when !(process.getType() == INLINE) && name != null && process.isRepeating() && options.hasOption(TRANSMITTER) && chainParts.isEmpty() && try-body throw...
true
ok
{"focal": {"class": "MplProcessMaterializer", "name": "visitProcess", "signature": "CommandChain visitProcess(MplProgram program, MplProcess process)", "start_line": 3, "modifiers": "public @Nullable", "params": [{"name": "program", "type": "MplProgram"}, {"name": "process", "type": "MplProcess"}], "return_type": "Comm...
46130071_18
class ZeromqConsumer extends DefaultConsumer { @Override protected void doStart() throws Exception { super.doStart(); executor = endpoint.getCamelContext().getExecutorServiceManager().newFixedThreadPool(this, endpoint.getEndpointUri(), 1); listener = new Listener(endpoint, processor, so...
ExecutorService executor = Executors.newFixedThreadPool(1); when(manager.newFixedThreadPool(any(ZeromqConsumer.class), anyString(), anyInt())).thenReturn(executor); // CONNECT mode by default consumer.doStart(); Thread.sleep(50); verify(socket).connect(endpoint.getSocketAddress()); } ...
[FOCAL] @Override protected void ZeromqConsumer.doStart() [CLASS] class ZeromqConsumer extends DefaultConsumer [METRICS] loc=7 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] DefaultConsumer.doStart/0, endpoint.getCamelContext().getExecutorServiceManager().newFixedThreadPool/3, endpoint.getCamelCo...
/* static context [FOCAL] @Override protected void ZeromqConsumer.doStart() [COLLABORATORS] field endpoint:ZeromqEndpoint getCamelContext/0,getEndpointUri/0; field executor:ExecutorService submit/1 [STATE] executor [EXCEPTIONS] declares Exception [FIELDS] read=endpoint:ZeromqEndpoint, executor:ExecutorService, processo...
/* static context [FOCAL] @Override protected void ZeromqConsumer.doStart() [COLLABORATORS] field endpoint:ZeromqEndpoint getCamelContext/0,getEndpointUri/0; field executor:ExecutorService submit/1 [STATE] executor [EXCEPTIONS] declares Exception [FIELDS] read=endpoint:ZeromqEndpoint, executor:ExecutorService, processo...
true
ok
{"focal": {"class": "ZeromqConsumer", "name": "doStart", "signature": "void doStart() throws Exception", "start_line": 3, "modifiers": "@Override protected", "params": [], "return_type": "void"}, "class_info": {"name": "ZeromqConsumer", "kind": "class", "modifiers": "", "superclass": "DefaultConsumer", "interfaces": nu...
46181665_20
class RelationCollisionUtil { protected Namer getOneToManyNamerFromConf(OneToManyConfig o2m, Namer fromEntityNamer) { if (o2m != null) { if (o2m.hasElementVar() && !o2m.hasVar()) { // the plural is calculated return new AccessorNamer(fromEntityNamer, o2m.getElem...
RelationCollisionUtil relationUtil = new RelationCollisionUtil(); Namer fromEntityNamer = getNamer("account", "Account"); Namer result = relationUtil.getOneToManyNamerFromConf(getOneToManyConfig("unAccount", null), fromEntityNamer); assertThat(result.getVar()).isEqualTo("unAccount"); ...
[FOCAL] protected Namer RelationCollisionUtil.getOneToManyNamerFromConf(OneToManyConfig o2m, Namer fromEntityNamer) [CLASS] class RelationCollisionUtil [METRICS] loc=19 cc=5 branches=4 loops=0 returns=4 throws=0 nesting=2 [CALLS-EXTERNAL] OneToManyConfig.hasElementVar/0, OneToManyConfig.hasVar/0, OneToManyConfig.getEle...
/* static context [FOCAL] protected Namer RelationCollisionUtil.getOneToManyNamerFromConf(OneToManyConfig o2m, Namer fromEntityNamer) [PATH1] if(o2m != null)=T -> if(o2m.hasElementVar() && !o2m.hasVar())=F -> if(o2m.hasElementVar() && o2m.hasVar())=F -> if(!o2m.hasElementVar() && o2m.hasVar())=T -> return new AccessorN...
/* static context [FOCAL] protected Namer RelationCollisionUtil.getOneToManyNamerFromConf(OneToManyConfig o2m, Namer fromEntityNamer) [PATH1] if(o2m != null)=T -> if(o2m.hasElementVar() && !o2m.hasVar())=F -> if(o2m.hasElementVar() && o2m.hasVar())=F -> if(!o2m.hasElementVar() && o2m.hasVar())=T -> return new AccessorN...
true
ok
{"focal": {"class": "RelationCollisionUtil", "name": "getOneToManyNamerFromConf", "signature": "Namer getOneToManyNamerFromConf(OneToManyConfig o2m, Namer fromEntityNamer)", "start_line": 3, "modifiers": "protected", "params": [{"name": "o2m", "type": "OneToManyConfig"}, {"name": "fromEntityNamer", "type": "Namer"}], "...
46187719_395
class BorderRightWidth extends AbstractCssProperty<BorderRightWidth> { public BorderRightWidth() { setCssValue(MEDIUM); } public BorderRightWidth(); public BorderRightWidth(final String cssValue); public BorderRightWidth(final BorderRightWidth borderRightWidth); public BorderRightW...
BorderRightWidth borderRightWidth = new BorderRightWidth(); assertEquals(BorderRightWidth.MEDIUM, borderRightWidth.getCssValue()); } }
[FOCAL] public BorderRightWidth.BorderRightWidth() [CLASS] class BorderRightWidth extends AbstractCssProperty<BorderRightWidth> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] BorderRightWidth setCssValue(String cssValue) [CLASS-MEMBERS] BorderRightWidth(); BorderRightWidth(String ...
/* static context [FOCAL] public BorderRightWidth.BorderRightWidth() [CALLS-INTERNAL] BorderRightWidth setCssValue(String cssValue) */
/* static context [FOCAL] public BorderRightWidth.BorderRightWidth() [CALLS-INTERNAL] BorderRightWidth setCssValue(String cssValue) */ class BorderRightWidth extends AbstractCssProperty<BorderRightWidth> { public BorderRightWidth() { setCssValue(MEDIUM); } public BorderRightWidth(); public B...
true
ok
{"focal": {"class": "BorderRightWidth", "name": "BorderRightWidth", "signature": "BorderRightWidth()", "start_line": 3, "modifiers": "public", "params": [], "return_type": null}, "class_info": {"name": "BorderRightWidth", "kind": "class", "modifiers": "", "superclass": "AbstractCssProperty<BorderRightWidth>", "interfac...
46204890_4
class AutomatorAction { public static AutomatorAction clearTextField() { return new AutomatorAction() { @Override public void wrappedPerform(UiSelector selector, UiObject object) throws UiObjectNotFoundException { object.clearTextField(); } }; ...
UiObject object = mock(UiObject.class); AutomatorAction.clearTextField().perform(null, object); verify(object).clearTextField(); } }
[FOCAL] public static AutomatorAction AutomatorAction.clearTextField() [CLASS] class AutomatorAction [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] object.clearTextField/0 [NEW] AutomatorAction [COLLABORATORS] field object clearTextField/0 [CLASS-MEMBERS] AutomatorAction click(); ...
/* static context [FOCAL] public static AutomatorAction AutomatorAction.clearTextField() [COLLABORATORS] field object clearTextField/0 [NEW] AutomatorAction [CALLS-EXTERNAL] object.clearTextField/0 */
/* static context [FOCAL] public static AutomatorAction AutomatorAction.clearTextField() [COLLABORATORS] field object clearTextField/0 [NEW] AutomatorAction [CALLS-EXTERNAL] object.clearTextField/0 */ class AutomatorAction { public static AutomatorAction clearTextField() { return new AutomatorAction() { ...
true
ok
{"focal": {"class": "AutomatorAction", "name": "clearTextField", "signature": "AutomatorAction clearTextField()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "AutomatorAction"}, "class_info": {"name": "AutomatorAction", "kind": "class", "modifiers": "", "superclass": null, "interfaces": ...
46223235_0
class WXBizMsgCrypt { String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appid...
try { WXBizMsgCrypt pc = new WXBizMsgCrypt(token, encodingAesKey, appId); assertEquals(afterAesEncrypt, pc.encrypt(randomStr, replyMsg)); } catch (AesException e) { e.printStackTrace(); fail("no异常"); } } }
[FOCAL] String WXBizMsgCrypt.encrypt(String randomStr, String text) [CLASS] class WXBizMsgCrypt [METRICS] loc=39 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] byte[] getNetworkBytesOrder(int sourceNumber) [CALLS-EXTERNAL] String.getBytes/1, ByteGroup.addBytes/1, PKCS7Encoder.encode/1, ByteGroup....
/* static context [FOCAL] String WXBizMsgCrypt.encrypt(String randomStr, String text) [THROWS-WHEN] AesException when try-body throws [PATH1] try-body throws -> throw new AesException(AesException.EncryptAESError) [PATH2] return base64Encrypted [COLLABORATORS] field appId:String getBytes/1; field base64 encodeToString/...
/* static context [FOCAL] String WXBizMsgCrypt.encrypt(String randomStr, String text) [THROWS-WHEN] AesException when try-body throws [PATH1] try-body throws -> throw new AesException(AesException.EncryptAESError) [PATH2] return base64Encrypted [COLLABORATORS] field appId:String getBytes/1; field base64 encodeToString/...
true
ok
{"focal": {"class": "WXBizMsgCrypt", "name": "encrypt", "signature": "String encrypt(String randomStr, String text) throws AesException", "start_line": 3, "modifiers": "", "params": [{"name": "randomStr", "type": "String"}, {"name": "text", "type": "String"}], "return_type": "String"}, "class_info": {"name": "WXBizMsgC...
46251204_49
class KeyStoreCredentialResolverBuilder { public CredentialResolver build() throws IOException, GeneralSecurityException { final KeyStore ks = KeyStore.getInstance(type); try (InputStream is = open()) { ks.load(is, password != null ? password.toCharArray() : null); } ret...
final File file = folder.newFile(); assertThat(file.length()).isZero(); final KeyStore keyStore = KeyStore.getInstance("JKS"); keyStore.load(null, null); keyStore.store(new FileOutputStream(file), "".toCharArray()); assertThat(file.length()).isGreaterThan(0); a...
[FOCAL] public CredentialResolver KeyStoreCredentialResolverBuilder.build() [CLASS] class KeyStoreCredentialResolverBuilder [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] InputStream open() [CALLS-EXTERNAL] KeyStore.getInstance/1, KeyStore.load/2, password.toCharArray/0 [NEW] KeyS...
/* static context [FOCAL] public CredentialResolver KeyStoreCredentialResolverBuilder.build() [COLLABORATORS] field password toCharArray/0 [EXCEPTIONS] declares IOException, GeneralSecurityException [CALLS-INTERNAL] InputStream open() [NEW] KeyStoreCredentialResolver [CALLS-EXTERNAL] KeyStore.getInstance/1, KeyStore.lo...
/* static context [FOCAL] public CredentialResolver KeyStoreCredentialResolverBuilder.build() [COLLABORATORS] field password toCharArray/0 [EXCEPTIONS] declares IOException, GeneralSecurityException [CALLS-INTERNAL] InputStream open() [NEW] KeyStoreCredentialResolver [CALLS-EXTERNAL] KeyStore.getInstance/1, KeyStore.lo...
true
ok
{"focal": {"class": "KeyStoreCredentialResolverBuilder", "name": "build", "signature": "CredentialResolver build() throws IOException, GeneralSecurityException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "CredentialResolver"}, "class_info": {"name": "KeyStoreCredentialResolverBuilder", "kind"...
46256078_4
class EntityUtils { public static void copyProperties(Object from, Object to) throws Exception { copyPropertiesExclude(from, to, null); } public static void copyPropertiesExclude(Object from, Object to, String[] excludeArray); @SuppressWarnings("unchecked") public static void copyPropertiesInc...
FromClassGetter fromClass = new FromClassGetter(); fromClass.setStringValue("[FromClass] = Save"); InnerClass innerClass = new InnerClass(); innerClass.setStringValue("[InnerClass] = Save"); fromClass.setInnerClass(innerClass); ToClassSetter toClass = new ToClassSetter()...
[FOCAL] public static void EntityUtils.copyProperties(Object from, Object to) [CLASS] class EntityUtils [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void copyPropertiesExclude(Object from, Object to, String[] excludeArray) [EXCEPTIONS] declares Exception [DATAFLOW] from@param->L...
/* static context [FOCAL] public static void EntityUtils.copyProperties(Object from, Object to) [EXCEPTIONS] declares Exception [CALLS-INTERNAL] void copyPropertiesExclude(Object from, Object to, String[] excludeArray) */
/* static context [FOCAL] public static void EntityUtils.copyProperties(Object from, Object to) [EXCEPTIONS] declares Exception [CALLS-INTERNAL] void copyPropertiesExclude(Object from, Object to, String[] excludeArray) */ class EntityUtils { public static void copyProperties(Object from, Object to) throws Exceptio...
true
ok
{"focal": {"class": "EntityUtils", "name": "copyProperties", "signature": "void copyProperties(Object from, Object to) throws Exception", "start_line": 3, "modifiers": "public static", "params": [{"name": "from", "type": "Object"}, {"name": "to", "type": "Object"}], "return_type": "void"}, "class_info": {"name": "Entit...
46297234_1
class FxWeaver { public <C, V extends Node> FxControllerAndView<C, V> load(Class<C> controllerClass) { return load(controllerClass, null); } public FxWeaver(Callback<Class<?>, Object> beanFactory, Runnable closeCommand); public V loadView(Class<C> controllerClass); public V loadView(Clas...
FxControllerAndView<SimpleBean, Node> load = fxWeaver.load(SimpleBean.class, null, null); assertThat(load).isNotNull(); assertThat(load.getController()).isNotNull().isInstanceOf(SimpleBean.class); } }
[FOCAL] public FxControllerAndView<C, V> FxWeaver.load(Class<C> controllerClass) [CLASS] class FxWeaver [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] FxControllerAndView<C, V> load(Class<C> controllerClass, ResourceBundle resourceBundle) [INPUTS] branches=- | result=controllerCla...
/* static context [FOCAL] public FxControllerAndView<C, V> FxWeaver.load(Class<C> controllerClass) [INPUTS] branches=- | result=controllerClass [CALLS-INTERNAL] FxControllerAndView<C, V> load(Class<C> controllerClass, ResourceBundle resourceBundle) */
/* static context [FOCAL] public FxControllerAndView<C, V> FxWeaver.load(Class<C> controllerClass) [INPUTS] branches=- | result=controllerClass [CALLS-INTERNAL] FxControllerAndView<C, V> load(Class<C> controllerClass, ResourceBundle resourceBundle) */ class FxWeaver { public <C, V extends Node> FxControllerAndView...
true
ok
{"focal": {"class": "FxWeaver", "name": "load", "signature": "FxControllerAndView<C, V> load(Class<C> controllerClass)", "start_line": 3, "modifiers": "public", "params": [{"name": "controllerClass", "type": "Class<C>"}], "return_type": "FxControllerAndView<C, V>"}, "class_info": {"name": "FxWeaver", "kind": "class", "...
46308509_1
class Main { public static void runSemanticAnalysis(AST ast) { new SemanticAnalysis(ast).run(); Pass.printErrorsAndWarnings(); if (generatedSourceDirectory != null) { if (AST.globalSymbolTable.getPackage().length() != 0) generatedSourceDirectory += ...
String input = generateLBJavaScript("TwoFeatLearner", "testFeature1, testFeature2", "import edu.illinois.cs.cogcomp.lbjava.features.PredefinedFeature;"); Yylex scanner = new Yylex(new ByteArrayInputStream(input.getBytes())); AST ast = (AST) new parser(scan...
[FOCAL] public static void Main.runSemanticAnalysis(AST ast) [CLASS] class Main [METRICS] loc=20 cc=5 branches=4 loops=0 returns=0 throws=0 nesting=2 [CALLS-EXTERNAL] new SemanticAnalysis(ast).run/0, Pass.printErrorsAndWarnings/0, AST.globalSymbolTable.getPackage().length/0, AST.globalSymbolTable.getPackage/0, AST.glob...
/* static context [FOCAL] public static void Main.runSemanticAnalysis(AST ast) [PATH1] if(generatedSourceDirectory != null)=T -> if(AST.globalSymbolTable.getPackage().length() != 0)=T -> if(classPackageDirectory != null && AST.globalSymbolTable.getPackage().length() != 0)=T [PATH2] if(generatedSourceDirectory != null)=...
/* static context [FOCAL] public static void Main.runSemanticAnalysis(AST ast) [PATH1] if(generatedSourceDirectory != null)=T -> if(AST.globalSymbolTable.getPackage().length() != 0)=T -> if(classPackageDirectory != null && AST.globalSymbolTable.getPackage().length() != 0)=T [PATH2] if(generatedSourceDirectory != null)=...
true
ok
{"focal": {"class": "Main", "name": "runSemanticAnalysis", "signature": "void runSemanticAnalysis(AST ast)", "start_line": 3, "modifiers": "public static", "params": [{"name": "ast", "type": "AST"}], "return_type": "void"}, "class_info": {"name": "Main", "kind": "class", "modifiers": "", "superclass": null, "interfaces...
46324355_1
class MoodleViewModel extends AndroidViewModel { public LiveData<RemoteResource<List<MoodleAssignmentCourse>>> getAssignmentCourses() { if (filteredAssignmentCourses == null || filteredAssignmentCourses.getValue() == null || filteredAssignmentCourses.getValue().data == null) { f...
// Prepare LiveData MutableLiveData<RemoteResource<List<MoodleAssignmentCourse>>> liveData = new MutableLiveData<>(); when(repository.getAssignmentCourses()).thenReturn(liveData); // Prepare Observer Observer<RemoteResource<List<MoodleAssignmentCourse>>> observer = mock(Observer...
[FOCAL] public LiveData<RemoteResource<List<MoodleAssignmentCourse>>> MoodleViewModel.getAssignmentCourses() [CLASS] class MoodleViewModel extends AndroidViewModel [METRICS] loc=16 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] void setFilteredAssignmentCourses(RemoteResource<List<MoodleAssignmen...
/* static context [FOCAL] public LiveData<RemoteResource<List<MoodleAssignmentCourse>>> MoodleViewModel.getAssignmentCourses() [PATH1] if((filteredAssignmentCourses == null || filteredAssignmentCourses.getValue() == null || filteredAssignmentCourses.getVa...)=T -> return filteredAssignmentCourses [PATH2] if((filteredAs...
/* static context [FOCAL] public LiveData<RemoteResource<List<MoodleAssignmentCourse>>> MoodleViewModel.getAssignmentCourses() [PATH1] if((filteredAssignmentCourses == null || filteredAssignmentCourses.getValue() == null || filteredAssignmentCourses.getVa...)=T -> return filteredAssignmentCourses [PATH2] if((filteredAs...
true
ok
{"focal": {"class": "MoodleViewModel", "name": "getAssignmentCourses", "signature": "LiveData<RemoteResource<List<MoodleAssignmentCourse>>> getAssignmentCourses()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "LiveData<RemoteResource<List<MoodleAssignmentCourse>>>"}, "class_info": {"name": "Moo...
46368934_70
class Rollbar { public Config config() { if (rollbar != null) { return rollbar.config(); } else { return null; } } public Rollbar(Context context); public Rollbar(Context context, String accessToken, String environment, boolean registerExceptionHandler); public Rollbar(Context con...
Config config; final String notifierVersion = "1.2.3"; final String notifierName = "custom-notifier"; Rollbar sut = new Rollbar(mockApplicationContext, ACCESS_TOKEN, ENVIRONMENT, true, false, new ConfigProvider() { @Override public Config provide(ConfigBuilder builder) { return buil...
[FOCAL] public Config Rollbar.config() [CLASS] class Rollbar [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] rollbar.config/0 [PATH1] if(rollbar != null)=T -> return rollbar.config() [PATH2] if(rollbar != null)=F -> return null [COLLABORATORS] field rollbar config/0 [CLASS-MEMBERS]...
/* static context [FOCAL] public Config Rollbar.config() [PATH1] if(rollbar != null)=T -> return rollbar.config() [PATH2] if(rollbar != null)=F -> return null [COLLABORATORS] field rollbar config/0 [CALLS-EXTERNAL] rollbar.config/0 */
/* static context [FOCAL] public Config Rollbar.config() [PATH1] if(rollbar != null)=T -> return rollbar.config() [PATH2] if(rollbar != null)=F -> return null [COLLABORATORS] field rollbar config/0 [CALLS-EXTERNAL] rollbar.config/0 */ class Rollbar { public Config config() { if (rollbar != null) { return r...
true
ok
{"focal": {"class": "Rollbar", "name": "config", "signature": "Config config()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Config"}, "class_info": {"name": "Rollbar", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "ACCESS_TOKEN", "type": "String...
46398595_6
class AbstractProxyConnection implements Connection { public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { if(this.useRandomConnection) { throw new TargetDataSourceNotFoundException("setNetworkTimeout error,"+this.getTargetDataSourceNotFoundExceptionErrorMsg()); } Jdbc...
final int[] count=new int[2]; Result result=new Result(); ExecutorService executor=Executors.newCachedThreadPool(); int milliseconds=5000; AbstractProxyConnection proxyConnection=this.createProxyConnectionForPhysical(count, "setNetworkTimeout",result,null); proxyConnection.setNetworkTimeout(executor, millis...
[FOCAL] public void AbstractProxyConnection.setNetworkTimeout(Executor executor, int milliseconds) [CLASS] class AbstractProxyConnection implements Connection [METRICS] loc=9 cc=2 branches=1 loops=0 returns=0 throws=1 nesting=1 [CALLS-INTERNAL] Connection getOrCreatePhysicalConnection(); String getTargetDataSourceNotFo...
/* static context [FOCAL] public void AbstractProxyConnection.setNetworkTimeout(Executor executor, int milliseconds) [THROWS-WHEN] TargetDataSourceNotFoundException when this.useRandomConnection [PATH1] if(this.useRandomConnection)=T -> throw new TargetDataSourceNotFoundException("setNetworkTimeout error,"+th... [PATH2...
/* static context [FOCAL] public void AbstractProxyConnection.setNetworkTimeout(Executor executor, int milliseconds) [THROWS-WHEN] TargetDataSourceNotFoundException when this.useRandomConnection [PATH1] if(this.useRandomConnection)=T -> throw new TargetDataSourceNotFoundException("setNetworkTimeout error,"+th... [PATH2...
true
ok
{"focal": {"class": "AbstractProxyConnection", "name": "setNetworkTimeout", "signature": "void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException", "start_line": 3, "modifiers": "public", "params": [{"name": "executor", "type": "Executor"}, {"name": "milliseconds", "type": "int"}], "return_type"...
46404009_117
class HBaseAuditLogParser implements Serializable { public HBaseAuditLogObject parse(String logLine) { if(logLine == null || logLine.isEmpty()) return null; HBaseAuditLogObject ret = new HBaseAuditLogObject(); String timestamp = ""; String user = ""; String scope = ""; ...
String log = "2015-08-11 13:31:03,729 TRACE SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController: Access allowed for user eagle; reason: Table permission granted; remote address: /127.0.0.1; request: get; context: (user=eagle,scope=hbase:namespace,family=info, action=READ)"; HBaseAudi...
[FOCAL] public HBaseAuditLogObject HBaseAuditLogParser.parse(String logLine) [CLASS] class HBaseAuditLogParser implements Serializable [METRICS] loc=100 cc=19 branches=9 loops=1 returns=3 throws=0 nesting=5 [CALLS-EXTERNAL] String.isEmpty/0, loggerPattern.matcher/1, Matcher.find/0, Matcher.group/1, loggerMatcher.group(...
/* static context [FOCAL] public HBaseAuditLogObject HBaseAuditLogParser.parse(String logLine) [PATH1] if(logLine == null || logLine.isEmpty())=F -> if(loggerMatcher.find())=T -> try-body throws -> try-body throws -> try-body throws -> if(contextMatcher.find())=T -> while(!kvs.isEmpty())=T -> if(kv.split("=").length < ...
/* static context [FOCAL] public HBaseAuditLogObject HBaseAuditLogParser.parse(String logLine) [PATH1] if(logLine == null || logLine.isEmpty())=F -> if(loggerMatcher.find())=T -> try-body throws -> try-body throws -> try-body throws -> if(contextMatcher.find())=T -> while(!kvs.isEmpty())=T -> if(kv.split("=").length < ...
true
ok
{"focal": {"class": "HBaseAuditLogParser", "name": "parse", "signature": "HBaseAuditLogObject parse(String logLine)", "start_line": 3, "modifiers": "public", "params": [{"name": "logLine", "type": "String"}], "return_type": "HBaseAuditLogObject"}, "class_info": {"name": "HBaseAuditLogParser", "kind": "class", "modifier...
46413020_56
class UrlFromStringModel implements IModel<URL> { @Override public URL getObject() { final String object = model.getObject(); if (object == null) { return null; } else { try { if (URL_PATTERN.matcher(object).matches()) { return...
final Model<String> innerModel = Model.of(""); final UrlFromStringModel instance = new UrlFromStringModel(innerModel); innerModel.setObject(null); assertNull(instance.getObject()); innerModel.setObject("/my/file/location"); assertEquals(new URL("file:/my/file/lo...
[FOCAL] @Override public URL UrlFromStringModel.getObject() [CLASS] class UrlFromStringModel implements IModel<URL> [METRICS] loc=17 cc=4 branches=2 loops=0 returns=3 throws=1 nesting=3 [CALLS-EXTERNAL] model.getObject/0, URL_PATTERN.matcher(object).matches/0, URL_PATTERN.matcher/1, new File(object).toURI().toURL/0, ne...
/* static context [FOCAL] @Override public URL UrlFromStringModel.getObject() [THROWS-WHEN] RuntimeException when !(object == null) && try-body throws [PATH1] if(object == null)=F -> try-body throws -> throw new RuntimeException(ex) [PATH2] if(object == null)=T -> return null [PATH3] if(object == null)=F -> if(URL_PATT...
/* static context [FOCAL] @Override public URL UrlFromStringModel.getObject() [THROWS-WHEN] RuntimeException when !(object == null) && try-body throws [PATH1] if(object == null)=F -> try-body throws -> throw new RuntimeException(ex) [PATH2] if(object == null)=T -> return null [PATH3] if(object == null)=F -> if(URL_PATT...
true
ok
{"focal": {"class": "UrlFromStringModel", "name": "getObject", "signature": "URL getObject()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "URL"}, "class_info": {"name": "UrlFromStringModel", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "IModel<URL>", "fields": ...
46427562_3
class SqlAvroSerde implements Serde<AvroData> { @Override public AvroData fromBytes(byte[] bytes) { GenericRecord data; try { data = reader.read(null, DecoderFactory.get().binaryDecoder(bytes, null)); return getAvroData(data, avroSchema); } catch (IOException e) { String errMsg = "Ca...
AvroData decodedDatum = (AvroData)serde.fromBytes(encodeMessage(sampleOrderRecord(), orderSchema)); Assert.assertTrue(decodedDatum.schema().getType() == org.apache.samza.sql.api.data.Schema.Type.STRUCT); Assert.assertTrue(decodedDatum.getFieldData("id").schema().getType() == org.apache.samza.sql.api.data.S...
[FOCAL] @Override public AvroData SqlAvroSerde.fromBytes(byte[] bytes) [CLASS] class SqlAvroSerde implements Serde<AvroData> [METRICS] loc=13 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] AvroData getAvroData(GenericRecord data, Schema type) [CALLS-EXTERNAL] reader.read/2, DecoderFactory.get().b...
/* static context [FOCAL] @Override public AvroData SqlAvroSerde.fromBytes(byte[] bytes) [THROWS-WHEN] SamzaException when try-body throws [PATH1] try-body throws -> throw new SamzaException(errMsg, e) [PATH2] return getAvroData(data, avroSchema) [INPUTS] branches=- | result=bytes [COLLABORATORS] field reader read/2 [E...
/* static context [FOCAL] @Override public AvroData SqlAvroSerde.fromBytes(byte[] bytes) [THROWS-WHEN] SamzaException when try-body throws [PATH1] try-body throws -> throw new SamzaException(errMsg, e) [PATH2] return getAvroData(data, avroSchema) [INPUTS] branches=- | result=bytes [COLLABORATORS] field reader read/2 [E...
true
ok
{"focal": {"class": "SqlAvroSerde", "name": "fromBytes", "signature": "AvroData fromBytes(byte[] bytes)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "bytes", "type": "byte[]"}], "return_type": "AvroData"}, "class_info": {"name": "SqlAvroSerde", "kind": "class", "modifiers": "", "superclass": ...
46450575_19
class FloRunner { public static <T> Result<T> runTask(Task<T> task, Config config) { return new Result<>(new FloRunner<T>(config).run(task), loadTerminationHooks(config)); } private FloRunner(Config config); private static Config defaultConfig(); private static Iterable<TerminationHook> loadTerminatio...
final Instant today = Instant.now().truncatedTo(ChronoUnit.DAYS); final Instant yesterday = today.minus(1, ChronoUnit.DAYS); final Task<String> baz = Task.named("baz", today).ofType(String.class) .process(() -> { final String bazJvm = jvmName(); log.info("baz: bazJvm={}, today=...
[FOCAL] public static Result<T> FloRunner.runTask(Task<T> task, Config config) [CLASS] class FloRunner [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Iterable<TerminationHook> loadTerminationHooks(Config config) [CALLS-EXTERNAL] new FloRunner<T>(config).run/1 [NEW] Result<>, FloRu...
/* static context [FOCAL] public static Result<T> FloRunner.runTask(Task<T> task, Config config) [INPUTS] branches=- | result=config, task [CALLS-INTERNAL] Iterable<TerminationHook> loadTerminationHooks(Config config) [NEW] Result<>, FloRunner<T> [CALLS-EXTERNAL] new FloRunner<T>(config).run/1 */
/* static context [FOCAL] public static Result<T> FloRunner.runTask(Task<T> task, Config config) [INPUTS] branches=- | result=config, task [CALLS-INTERNAL] Iterable<TerminationHook> loadTerminationHooks(Config config) [NEW] Result<>, FloRunner<T> [CALLS-EXTERNAL] new FloRunner<T>(config).run/1 */ class FloRunner { p...
true
ok
{"focal": {"class": "FloRunner", "name": "runTask", "signature": "Result<T> runTask(Task<T> task, Config config)", "start_line": 3, "modifiers": "public static", "params": [{"name": "task", "type": "Task<T>"}, {"name": "config", "type": "Config"}], "return_type": "Result<T>"}, "class_info": {"name": "FloRunner", "kind"...
46457181_2
class GetSelectedDemoUserListUseCase extends UseCase<UserDemoEntity> { @Override public Observable<UserDemoEntity> react() { return repository.getSelectedUserDemoList(); } @Inject public GetSelectedDemoUserListUseCase(UI ui, UserDemoRepository repository); private GetSelectedDemoUserListUseC...
when(userDemoRepositoryMock.getSelectedUserDemoList()).thenReturn(Observable.just(userDemoEntityMock)); TestSubscriber<UserDemoEntity> subscriberMock = new TestSubscriber<>(); getSelectedDemoUserListUseCaseUT.react().subscribe(subscriberMock); subscriberMock.awaitTerminalEvent(); ...
[FOCAL] @Override public Observable<UserDemoEntity> GetSelectedDemoUserListUseCase.react() [CLASS] class GetSelectedDemoUserListUseCase extends UseCase<UserDemoEntity> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] repository.getSelectedUserDemoList/0 [COLLABORATORS] field reposit...
/* static context [FOCAL] @Override public Observable<UserDemoEntity> GetSelectedDemoUserListUseCase.react() [COLLABORATORS] field repository getSelectedUserDemoList/0 [CALLS-EXTERNAL] repository.getSelectedUserDemoList/0 */
/* static context [FOCAL] @Override public Observable<UserDemoEntity> GetSelectedDemoUserListUseCase.react() [COLLABORATORS] field repository getSelectedUserDemoList/0 [CALLS-EXTERNAL] repository.getSelectedUserDemoList/0 */ class GetSelectedDemoUserListUseCase extends UseCase<UserDemoEntity> { @Override public Ob...
true
ok
{"focal": {"class": "GetSelectedDemoUserListUseCase", "name": "react", "signature": "Observable<UserDemoEntity> react()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Observable<UserDemoEntity>"}, "class_info": {"name": "GetSelectedDemoUserListUseCase", "kind": "class", "modifiers": "...
46504855_0
class DnsServicesDiscovery extends Configurable implements DnsDiscovery { @Override public Set<ServiceInstance> listServiceInstances(Fqdn browsingDomain, CompoundLabel type, boolean secValidation) throws LookupException, ConfigurationException { try { ValidatorUtil.isValidDo...
try { this.discovery = new DnsServicesDiscovery(); this.discovery.dnsSecDomain(Constants.DEFAULT_DNSSEC_DOMAIN) .dnsServer(InetAddress.getByName(DNS_RESOLVER)) .trustAnchorDefault(Constants.DEFAULT_TRUST_ANCHOR) ...
[FOCAL] @Override public Set<ServiceInstance> DnsServicesDiscovery.listServiceInstances(Fqdn browsingDomain, CompoundLabel type, boolean secValidation) [CLASS] class DnsServicesDiscovery extends Configurable implements DnsDiscovery [METRICS] loc=28 cc=4 branches=1 loops=0 returns=1 throws=3 nesting=2 [CALLS-EXTERNAL] V...
/* static context [FOCAL] @Override public Set<ServiceInstance> DnsServicesDiscovery.listServiceInstances(Fqdn browsingDomain, CompoundLabel type, boolean secValidation) [THROWS-WHEN] LookupException when try-body throws [THROWS-WHEN] exception when try-body throws [THROWS-WHEN] exception when result.isEmpty() && !Exce...
/* static context [FOCAL] @Override public Set<ServiceInstance> DnsServicesDiscovery.listServiceInstances(Fqdn browsingDomain, CompoundLabel type, boolean secValidation) [THROWS-WHEN] LookupException when try-body throws [THROWS-WHEN] exception when try-body throws [THROWS-WHEN] exception when result.isEmpty() && !Exce...
true
ok
{"focal": {"class": "DnsServicesDiscovery", "name": "listServiceInstances", "signature": "Set<ServiceInstance> listServiceInstances(Fqdn browsingDomain, CompoundLabel type, boolean secValidation) throws LookupException, ConfigurationException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "brow...
46506858_32
class AuthHashGenerator { String generateHash(String timestamp, String publicKey, String privateKey) throws MarvelApiException { try { String value = timestamp + privateKey + publicKey; MessageDigest md5Encoder = MessageDigest.getInstance("MD5"); byte[] md5Bytes = md5Encoder.digest(value....
AuthHashGenerator authHashGenerator = new AuthHashGenerator(); String md5 = authHashGenerator.generateHash(ANY_TIMESTAMP, ANY_PUBLIC_KEY, ANY_PRIVATE_KEY); assertEquals(VALID_MD5, md5); } }
[FOCAL] String AuthHashGenerator.generateHash(String timestamp, String publicKey, String privateKey) [CLASS] class AuthHashGenerator [METRICS] loc=16 cc=3 branches=0 loops=1 returns=1 throws=1 nesting=2 [CALLS-EXTERNAL] MessageDigest.getInstance/1, MessageDigest.digest/1, String.getBytes/0, StringBuilder.append/1, Inte...
/* static context [FOCAL] String AuthHashGenerator.generateHash(String timestamp, String publicKey, String privateKey) [THROWS-WHEN] MarvelApiException when try-body throws [PATH1] for(i < md5Bytes.length)=T -> exit loop -> return md5.toString() [PATH2] try-body throws -> throw new MarvelApiException("cannot generate t...
/* static context [FOCAL] String AuthHashGenerator.generateHash(String timestamp, String publicKey, String privateKey) [THROWS-WHEN] MarvelApiException when try-body throws [PATH1] for(i < md5Bytes.length)=T -> exit loop -> return md5.toString() [PATH2] try-body throws -> throw new MarvelApiException("cannot generate t...
true
ok
{"focal": {"class": "AuthHashGenerator", "name": "generateHash", "signature": "String generateHash(String timestamp, String publicKey, String privateKey) throws MarvelApiException", "start_line": 3, "modifiers": "", "params": [{"name": "timestamp", "type": "String"}, {"name": "publicKey", "type": "String"}, {"name": "p...
46527824_9
class ObservableGroup { public <T> ObservableTransformer<? super T, T> transform(Observer<? super T> observer, String observableTag) { return new GroupSubscriptionTransformer<>(this, Utils.getObserverTag(observer), observableTag); } ObservableGroup(long groupId); public long id(); publi...
ObservableGroup group = observableManager.newGroup(); TestObserver<Object> subscriber = new TestObserver<>(); Observable<String> sourceObservable = Observable.never(); sourceObservable.compose(group.transform(fooObserver)).subscribe(fooObserver); subscriber.assertNotComplete(); } }
[FOCAL] public ObservableTransformer<? super T, T> ObservableGroup.transform(Observer<? super T> observer, String observableTag) [CLASS] class ObservableGroup [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Utils.getObserverTag/1 [NEW] GroupSubscriptionTransformer<> [INPUTS] branch...
/* static context [FOCAL] public ObservableTransformer<? super T, T> ObservableGroup.transform(Observer<? super T> observer, String observableTag) [INPUTS] branches=- | result=observableTag, observer [NEW] GroupSubscriptionTransformer<> [CALLS-EXTERNAL] Utils.getObserverTag/1 */
/* static context [FOCAL] public ObservableTransformer<? super T, T> ObservableGroup.transform(Observer<? super T> observer, String observableTag) [INPUTS] branches=- | result=observableTag, observer [NEW] GroupSubscriptionTransformer<> [CALLS-EXTERNAL] Utils.getObserverTag/1 */ class ObservableGroup { public <T> Ob...
true
ok
{"focal": {"class": "ObservableGroup", "name": "transform", "signature": "ObservableTransformer<? super T, T> transform(Observer<? super T> observer, String observableTag)", "start_line": 3, "modifiers": "public", "params": [{"name": "observer", "type": "Observer<? super T>"}, {"name": "observableTag", "type": "String"...
46547901_35
class SearchManagerImpl implements SearchManager { @Override public Feature getRoomByLocation(String appIdentifier, Double longitude, Double latitude, Integer floor) throws RoomNotFoundException { // TODO Auto-generated method stub List<Feature> featureRooms = mapRepository.searchByLocation(appIdentifier,longitu...
//Fixture String appIdentifier="appIdentifier"; Double longitude=1.0; Double latitude=2.0; Integer floor=3; List<Feature> featureRooms=new ArrayList<Feature>(); featureRooms.add(featureRoom1); featureRooms.add(featureRoom2); List<List<Double>> coordinatesRoom1=new ArrayList<List<Double>>(); co...
[FOCAL] @Override public Feature SearchManagerImpl.getRoomByLocation(String appIdentifier, Double longitude, Double latitude, Integer floor) [CLASS] class SearchManagerImpl implements SearchManager [METRICS] loc=21 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] List<SimplePolygon2D> transformFeat...
class SearchManagerImpl implements SearchManager { @Override public Feature getRoomByLocation(String appIdentifier, Double longitude, Double latitude, Integer floor) throws RoomNotFoundException { // TODO Auto-generated method stub List<Feature> featureRooms = mapRepository.searchByLocation(appIdentifier,longitu...
false
ok
{"focal": {"class": "SearchManagerImpl", "name": "getRoomByLocation", "signature": "Feature getRoomByLocation(String appIdentifier, Double longitude, Double latitude, Integer floor) throws RoomNotFoundException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "appIdentifier", "type": "String"}, {...
46569013_6
class MyInteger { public boolean isPrime() { return isPrimeInternal(this.value); } public MyInteger(int value); public int get(); public boolean isEven(); public boolean isOdd(); private static boolean isPrimeInternal(int v); public static boolean isEven(int v); public st...
for (int p : prime) { assertTrue(MyInteger.isPrime(p)); } } }
[FOCAL] public boolean MyInteger.isPrime() [CLASS] class MyInteger [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] boolean isPrimeInternal(int v) [FIELDS] read=value [CLASS-MEMBERS] MyInteger(int value); int get(); boolean isEven(); boolean isOdd(); boolean isPrimeInternal(int v); ...
/* static context [FOCAL] public boolean MyInteger.isPrime() [CALLS-INTERNAL] boolean isPrimeInternal(int v) [FIELDS] read=value */
/* static context [FOCAL] public boolean MyInteger.isPrime() [CALLS-INTERNAL] boolean isPrimeInternal(int v) [FIELDS] read=value */ class MyInteger { public boolean isPrime() { return isPrimeInternal(this.value); } public MyInteger(int value); public int get(); public boolean isEven(); ...
true
ok
{"focal": {"class": "MyInteger", "name": "isPrime", "signature": "boolean isPrime()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "MyInteger", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "even", "type": "int", ...
46573609_80
class OcdsController extends GenericOCDSController { @ApiOperation(value = "Returns a release entity for the given project id. " + "The project id is read from planning.budget.projectID") @RequestMapping(value = "/api/ocds/release/budgetProjectId/{projectId:^[a-zA-Z0-9]*$}", method = { ...
final Release release = ocdsController.ocdsByProjectId("SP001"); Assert.assertNotNull(release); Assert.assertEquals("ocds-endpoint-001", release.getOcid()); } }
[FOCAL] @ApiOperation(value = "Returns a release entity for the given project id. " + "The project id is read from planning.b... Release OcdsController.ocdsByProjectId(String projectId) [CLASS] class OcdsController extends GenericOCDSController [METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALL...
/* static context [FOCAL] @ApiOperation(value = "Returns a release entity for the given project id. " + "The project id is read from planning.b... Release OcdsController.ocdsByProjectId(String projectId) [INPUTS] branches=- | result=projectId [COLLABORATORS] field releaseRepository findByBudgetProjectId/1 [CALLS-EXTERN...
/* static context [FOCAL] @ApiOperation(value = "Returns a release entity for the given project id. " + "The project id is read from planning.b... Release OcdsController.ocdsByProjectId(String projectId) [INPUTS] branches=- | result=projectId [COLLABORATORS] field releaseRepository findByBudgetProjectId/1 [CALLS-EXTERN...
true
ok
{"focal": {"class": "OcdsController", "name": "ocdsByProjectId", "signature": "Release ocdsByProjectId(String projectId)", "start_line": 3, "modifiers": "@ApiOperation(value = \"Returns a release entity for the given project id. \" + \"The project id is read from planning.b...", "params": [{"name": "projectId", "type":...
46615164_4
class SettingsPresenter extends BasePresenter<SettingsContract.View> implements SettingsContract.Presenter { @Override public void setNewBookNotificationSubscriptionStatus(final boolean onOff) { checkViewAttached(); analytics.trackUserToggleNewBookNotifications(onOff); settings.setNewBo...
when(mockSettings.isSubscribedToNewBookNotification()).thenReturn(Single.just(false)); when(mockSettings.setNewBookNotificationStatus(anyBoolean())).thenReturn(Single.just(true)); presenter.setNewBookNotificationSubscriptionStatus(true); verify(mockSettings).setNewBookNotificationStatu...
[FOCAL] @Override public void SettingsPresenter.setNewBookNotificationSubscriptionStatus(boolean onOff) [CLASS] class SettingsPresenter extends BasePresenter<SettingsContract.View> implements SettingsContract.Presenter [METRICS] loc=22 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] checkViewAttac...
/* static context [FOCAL] @Override public void SettingsPresenter.setNewBookNotificationSubscriptionStatus(boolean onOff) [COLLABORATORS] field analytics trackUserToggleNewBookNotifications/1; field settings setNewBookNotificationStatus/1 [NEW] Observer<Boolean> [CALLS-EXTERNAL] checkViewAttached/0 (inherited), analyti...
/* static context [FOCAL] @Override public void SettingsPresenter.setNewBookNotificationSubscriptionStatus(boolean onOff) [COLLABORATORS] field analytics trackUserToggleNewBookNotifications/1; field settings setNewBookNotificationStatus/1 [NEW] Observer<Boolean> [CALLS-EXTERNAL] checkViewAttached/0 (inherited), analyti...
true
ok
{"focal": {"class": "SettingsPresenter", "name": "setNewBookNotificationSubscriptionStatus", "signature": "void setNewBookNotificationSubscriptionStatus(boolean onOff)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "onOff", "type": "boolean"}], "return_type": "void"}, "class_info": {"name": "Se...
46621580_3
class CooldownService { public boolean isTracked(UUID uniqueId) { return cooldowns.getIfPresent(uniqueId) != null; } public CooldownService(Duration duration); public void trackPlayer(UUID uniqueId); private CooldownService cooldown; } class CooldownServiceTest { private Cooldown...
assertThat(cooldown.isTracked(UUID.randomUUID()), is(false)); } }
[FOCAL] public boolean CooldownService.isTracked(UUID uniqueId) [CLASS] class CooldownService [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] cooldowns.getIfPresent/1 [INPUTS] branches=- | result=uniqueId [COLLABORATORS] field cooldowns getIfPresent/1 [DATAFLOW] uniqueId@param->L2 ...
/* static context [FOCAL] public boolean CooldownService.isTracked(UUID uniqueId) [INPUTS] branches=- | result=uniqueId [COLLABORATORS] field cooldowns getIfPresent/1 [CALLS-EXTERNAL] cooldowns.getIfPresent/1 */
/* static context [FOCAL] public boolean CooldownService.isTracked(UUID uniqueId) [INPUTS] branches=- | result=uniqueId [COLLABORATORS] field cooldowns getIfPresent/1 [CALLS-EXTERNAL] cooldowns.getIfPresent/1 */ class CooldownService { public boolean isTracked(UUID uniqueId) { return cooldowns.getIfPresent...
true
ok
{"focal": {"class": "CooldownService", "name": "isTracked", "signature": "boolean isTracked(UUID uniqueId)", "start_line": 3, "modifiers": "public", "params": [{"name": "uniqueId", "type": "UUID"}], "return_type": "boolean"}, "class_info": {"name": "CooldownService", "kind": "class", "modifiers": "", "superclass": null...
46654747_0
class ClassNameModel { public String getClassName() { return className; } public ClassNameModel(String className); public TypeName getTypeName(); public String getPackage(); public String getSimpleName(); public String normalized(); @Override public int hashCode(); @Override public boolean equ...
assertEquals(IsApplication.class.getCanonicalName(), this.classNameModel.getClassName()); } }
[FOCAL] public String ClassNameModel.getClassName() [CLASS] class ClassNameModel [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] ClassNameModel(String className); TypeName getTypeName(); String getPackage(); String getSimpleName(); String normalized(); int hashCode(); boolean equals...
/* static context [FOCAL] public String ClassNameModel.getClassName() */
/* static context [FOCAL] public String ClassNameModel.getClassName() */ class ClassNameModel { public String getClassName() { return className; } public ClassNameModel(String className); public TypeName getTypeName(); public String getPackage(); public String getSimpleName(); public String normal...
true
ok
{"focal": {"class": "ClassNameModel", "name": "getClassName", "signature": "String getClassName()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "ClassNameModel", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "clas...
46697033_1
class ScannerServiceImpl implements ScannerService { @Override public Scanner update(Scanner scanner) { return scannerDAO.saveAndFlush(scanner); } @Autowired public ScannerServiceImpl(ScannerDAO scannerDAO, ScannerAppDAO scannerAppDAO); @Override public Scanner insert(Scanner scanner); ...
Mockito.when(mockScannerDAO.saveAndFlush(testScanner)).thenReturn(testScanner); Scanner insertedScanner = scannerService.update(testScanner); Assert.assertNotNull(insertedScanner); Assert.assertEquals("testScannerImage", insertedScanner.getImage()); } }
[FOCAL] @Override public Scanner ScannerServiceImpl.update(Scanner scanner) [CLASS] class ScannerServiceImpl implements ScannerService [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] scannerDAO.saveAndFlush/1 [INPUTS] branches=- | result=scanner [COLLABORATORS] field scannerDAO sav...
/* static context [FOCAL] @Override public Scanner ScannerServiceImpl.update(Scanner scanner) [INPUTS] branches=- | result=scanner [COLLABORATORS] field scannerDAO saveAndFlush/1 [CALLS-EXTERNAL] scannerDAO.saveAndFlush/1 */
/* static context [FOCAL] @Override public Scanner ScannerServiceImpl.update(Scanner scanner) [INPUTS] branches=- | result=scanner [COLLABORATORS] field scannerDAO saveAndFlush/1 [CALLS-EXTERNAL] scannerDAO.saveAndFlush/1 */ class ScannerServiceImpl implements ScannerService { @Override public Scanner update(S...
true
ok
{"focal": {"class": "ScannerServiceImpl", "name": "update", "signature": "Scanner update(Scanner scanner)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "scanner", "type": "Scanner"}], "return_type": "Scanner"}, "class_info": {"name": "ScannerServiceImpl", "kind": "class", "modifiers": "", "sup...
46709421_0
class Timber { public static int treeCount() { synchronized (FOREST) { return FOREST.size(); } } private Timber(); public static void v(@NonNls String message, Object... args); public static void v(Throwable t, @NonNls String message, Object... args); public static void d(@NonNls String me...
// inserts trees and checks if the amount of returned trees matches. assertThat(Timber.treeCount()).isEqualTo(0); for(int i= 1 ; i < 50 ; i++){ Timber.plant(new Timber.DebugTree()); assertThat(Timber.treeCount()).isEqualTo(i); } Timber.uprootAll(); assertThat(Timber.treeCount()).isEq...
[FOCAL] public static int Timber.treeCount() [CLASS] class Timber [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] FOREST.size/0 [CLASS-MEMBERS] Timber(); void v(String message, Object... args); void v(Throwable t, String message, Object... args); void d(String message, Object... ar...
/* static context [FOCAL] public static int Timber.treeCount() [CALLS-EXTERNAL] FOREST.size/0 */
/* static context [FOCAL] public static int Timber.treeCount() [CALLS-EXTERNAL] FOREST.size/0 */ class Timber { public static int treeCount() { synchronized (FOREST) { return FOREST.size(); } } private Timber(); public static void v(@NonNls String message, Object... args); public static void...
true
ok
{"focal": {"class": "Timber", "name": "treeCount", "signature": "int treeCount()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "int"}, "class_info": {"name": "Timber", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "Timber", "...
46713982_6
class AnnotationOptionsResolver implements OptionsResolver { @Override public Options resolve(final String key, final JoinPoint joinPoint) throws OptionsException { // find most specific @RateLimited annotation for invoked join point final RateLimited rateLimited = findAnnotation(joinPoint, RateLimited.cl...
initMocks("correctWithRetry"); assertThat(new AnnotationOptionsResolver().resolve("test", joinPoint)).isEqualTo(InternalOptions .enabled("test", 5, InternalOptions.intervalOf(30L, TimeUnit.SECONDS)) .enableRetry(4, InternalOptions.intervalOf(100L, TimeUnit.MILLISECONDS))); } }
[FOCAL] @Override public Options AnnotationOptionsResolver.resolve(String key, JoinPoint joinPoint) [CLASS] class AnnotationOptionsResolver implements OptionsResolver [METRICS] loc=41 cc=6 branches=5 loops=0 returns=2 throws=3 nesting=2 [CALLS-EXTERNAL] findAnnotation/2 (inherited), RateLimited.enabled/0, InternalOptio...
/* static context [FOCAL] @Override public Options AnnotationOptionsResolver.resolve(String key, JoinPoint joinPoint) [THROWS-WHEN] AmbiguousOptionsException when rateLimited == null [THROWS-WHEN] IllegalConfigurationException when !(rateLimited == null) && rateLimited.enabled() && rateLimited.maxRequests() == -1 || ra...
/* static context [FOCAL] @Override public Options AnnotationOptionsResolver.resolve(String key, JoinPoint joinPoint) [THROWS-WHEN] AmbiguousOptionsException when rateLimited == null [THROWS-WHEN] IllegalConfigurationException when !(rateLimited == null) && rateLimited.enabled() && rateLimited.maxRequests() == -1 || ra...
true
ok
{"focal": {"class": "AnnotationOptionsResolver", "name": "resolve", "signature": "Options resolve(String key, JoinPoint joinPoint) throws OptionsException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "key", "type": "String"}, {"name": "joinPoint", "type": "JoinPoint"}], "return_type": "Option...
46714751_4
class VisumPresenter { public final int getViewCount() { return viewHolders.size(); } private ViewHolder<V> findViewHolderByViewId(int id); @NonNull private ViewHolder<V> findViewHolderByViewIdOrThrow(int id); public final void setView(int id, @Nullable V view); private V removeView(in...
BaseTestView viewOne = getClient(); viewOne.attachPresenter(); assertPresenterAttached(presenter, VIEW_ID, viewOne); viewTwo.attachPresenter(); assertPresenterAttached(presenter, VIEW_ID_TWO, viewTwo); Assert.assertEquals("Invalid view count", 2, presenter.getViewCoun...
[FOCAL] public final int VisumPresenter.getViewCount() [CLASS] class VisumPresenter [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] viewHolders.size/0 [COLLABORATORS] field viewHolders size/0 [CLASS-MEMBERS] ViewHolder<V> findViewHolderByViewId(int id); ViewHolder<V> findViewHolder...
/* static context [FOCAL] public final int VisumPresenter.getViewCount() [COLLABORATORS] field viewHolders size/0 [CALLS-EXTERNAL] viewHolders.size/0 */
/* static context [FOCAL] public final int VisumPresenter.getViewCount() [COLLABORATORS] field viewHolders size/0 [CALLS-EXTERNAL] viewHolders.size/0 */ class VisumPresenter { public final int getViewCount() { return viewHolders.size(); } private ViewHolder<V> findViewHolderByViewId(int id); @...
true
ok
{"focal": {"class": "VisumPresenter", "name": "getViewCount", "signature": "int getViewCount()", "start_line": 3, "modifiers": "public final", "params": [], "return_type": "int"}, "class_info": {"name": "VisumPresenter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "VIEW...
46776191_4
class SFDCServiceImpl implements SFDCService { @Override public Map<String, Object> getLimits() { if (!isConnected()) { return null; } String baseUrl = null; try { baseUrl = sfdcSession.getEndPoint() + REST_ENDPOINT_URI + "/limits"; HttpGet ge...
if (!checkCanRunTests()) return; Map<String,Object> limits = sfdcServiceImpl.getLimits(); assertNotNull("Limits object is null, an error occurred !", limits); } }
[FOCAL] @Override public Map<String, Object> SFDCServiceImpl.getLimits() [CLASS] class SFDCServiceImpl implements SFDCService [METRICS] loc=33 cc=8 branches=3 loops=0 returns=8 throws=0 nesting=2 [CALLS-INTERNAL] Object handleRequest(HttpUriRequest request); boolean isConnected() [CALLS-EXTERNAL] sfdcSession.getEndPoin...
/* static context [FOCAL] @Override public Map<String, Object> SFDCServiceImpl.getLimits() [PATH1] if(!isConnected())=F -> if(responseObject == null)=F -> if(responseObject instanceof Map)=T -> return (Map<String, Object>) responseObject [PATH2] if(!isConnected())=T -> return null [PATH3] if(!isConnected())=F -> try-bo...
/* static context [FOCAL] @Override public Map<String, Object> SFDCServiceImpl.getLimits() [PATH1] if(!isConnected())=F -> if(responseObject == null)=F -> if(responseObject instanceof Map)=T -> return (Map<String, Object>) responseObject [PATH2] if(!isConnected())=T -> return null [PATH3] if(!isConnected())=F -> try-bo...
true
ok
{"focal": {"class": "SFDCServiceImpl", "name": "getLimits", "signature": "Map<String, Object> getLimits()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Map<String, Object>"}, "class_info": {"name": "SFDCServiceImpl", "kind": "class", "modifiers": "", "superclass": null, "interfaces":...
46795972_1
class HybrisHTTPRequest { public String getHybrisConsoleOutput(String json, ServerAnwserTypes type) { if(type == ServerAnwserTypes.EXECUTION_RESULT) { return returnFromJSON(json, "executionResult"); } if(type == ServerAnwserTypes.OUTPUT_TEXT) { return returnFromJSON(...
assertEquals("Groovy Rocks!", HybrisHTTPRequest.getHybrisConsoleOutput("{\"executionResult\":\"Groovy Rocks!\",\"outputText\":\"org.springframework.security.filterChains\\norg.springframework.security.filterChainProxy\\norg.springframework.security.web.DefaultSecurityFilterChain#0\\norg.springframework.security...
[FOCAL] public String HybrisHTTPRequest.getHybrisConsoleOutput(String json, ServerAnwserTypes type) [CLASS] class HybrisHTTPRequest [METRICS] loc=12 cc=4 branches=3 loops=0 returns=4 throws=0 nesting=1 [CALLS-INTERNAL] String returnFromJSON(String json, String type) [PATH1] if(type == ServerAnwserTypes.EXECUTION_RESULT...
/* static context [FOCAL] public String HybrisHTTPRequest.getHybrisConsoleOutput(String json, ServerAnwserTypes type) [PATH1] if(type == ServerAnwserTypes.EXECUTION_RESULT)=F -> if(type == ServerAnwserTypes.OUTPUT_TEXT)=F -> if(type== ServerAnwserTypes.STACKTRACE_TEXT)=T -> return returnFromJSON(json, "stacktraceText")...
/* static context [FOCAL] public String HybrisHTTPRequest.getHybrisConsoleOutput(String json, ServerAnwserTypes type) [PATH1] if(type == ServerAnwserTypes.EXECUTION_RESULT)=F -> if(type == ServerAnwserTypes.OUTPUT_TEXT)=F -> if(type== ServerAnwserTypes.STACKTRACE_TEXT)=T -> return returnFromJSON(json, "stacktraceText")...
true
ok
{"focal": {"class": "HybrisHTTPRequest", "name": "getHybrisConsoleOutput", "signature": "String getHybrisConsoleOutput(String json, ServerAnwserTypes type)", "start_line": 3, "modifiers": "public", "params": [{"name": "json", "type": "String"}, {"name": "type", "type": "ServerAnwserTypes"}], "return_type": "String"}, "...
46804199_121
class SimpleIntimaciesContent extends AbstractSubBoxContent implements ListSubBoxContent { @Override public List<String> getPrintEntries() { List<String> printIntimacies = new ArrayList<>(); for (Intimacy intimacy : getModel().getEntries()) { String text = getTextForIntimacy(intimacy); printInt...
resources.putString("Intimacies.Sheet.Strength.Minor", "Mi"); createIntimacy("Intimacy", Negative, Minor, Tie); assertThat(content.getPrintEntries().get(0), containsString("Mi")); } }
[FOCAL] @Override public List<String> SimpleIntimaciesContent.getPrintEntries() [CLASS] class SimpleIntimaciesContent extends AbstractSubBoxContent implements ListSubBoxContent [METRICS] loc=9 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] IntimaciesModel getModel(); String getTextForIntimacy(Int...
/* static context [FOCAL] @Override public List<String> SimpleIntimaciesContent.getPrintEntries() [PATH1] foreach(Intimacy intimacy : getModel().getEntries())=T -> exit loop -> return printIntimacies [PATH2] foreach(Intimacy intimacy : getModel().getEntries())=F -> return printIntimacies [CALLS-INTERNAL] IntimaciesMode...
/* static context [FOCAL] @Override public List<String> SimpleIntimaciesContent.getPrintEntries() [PATH1] foreach(Intimacy intimacy : getModel().getEntries())=T -> exit loop -> return printIntimacies [PATH2] foreach(Intimacy intimacy : getModel().getEntries())=F -> return printIntimacies [CALLS-INTERNAL] IntimaciesMode...
true
ok
{"focal": {"class": "SimpleIntimaciesContent", "name": "getPrintEntries", "signature": "List<String> getPrintEntries()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "List<String>"}, "class_info": {"name": "SimpleIntimaciesContent", "kind": "class", "modifiers": "", "superclass": "Abst...
46847195_57
class SqlRunner { public List<Map<String, Object>> selectAll(String sql, Object... args) throws SQLException { PreparedStatement ps = connection.prepareStatement(sql); try { setParameters(ps, args); ResultSet rs = ps.executeQuery(); return getResults(rs); } finally { try { ...
DataSource ds = createUnpooledDataSource(JPETSTORE_PROPERTIES); runScript(ds, JPETSTORE_DDL); runScript(ds, JPETSTORE_DATA); Connection connection = ds.getConnection(); SqlRunner exec = new SqlRunner(connection); List<Map<String, Object>> rows = exec.selectAll("SELECT * FROM PRODUCT"); conne...
[FOCAL] public List<Map<String, Object>> SqlRunner.selectAll(String sql, Object... args) [CLASS] class SqlRunner [METRICS] loc=14 cc=3 branches=0 loops=0 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] List<Map<String, Object>> getResults(ResultSet rs); void setParameters(PreparedStatement ps, Object... args) [CALLS-EXTE...
/* static context [FOCAL] public List<Map<String, Object>> SqlRunner.selectAll(String sql, Object... args) [PATH1] return getResults(rs) -> try-body throws [INPUTS] branches=- | result=sql [COLLABORATORS] field connection prepareStatement/1 [EXCEPTIONS] declares SQLException; catches SQLException e [CALLS-INTERNAL] Lis...
/* static context [FOCAL] public List<Map<String, Object>> SqlRunner.selectAll(String sql, Object... args) [PATH1] return getResults(rs) -> try-body throws [INPUTS] branches=- | result=sql [COLLABORATORS] field connection prepareStatement/1 [EXCEPTIONS] declares SQLException; catches SQLException e [CALLS-INTERNAL] Lis...
true
ok
{"focal": {"class": "SqlRunner", "name": "selectAll", "signature": "List<Map<String, Object>> selectAll(String sql, Object... args) throws SQLException", "start_line": 3, "modifiers": "public", "params": [{"name": "sql", "type": "String"}, {"name": "args", "type": "Object..."}], "return_type": "List<Map<String, Object>...
46855060_6
class Bus { public void unregister(Object object) { if (object == null) { throw new NullPointerException("Object to unregister must not be null."); } enforcer.enforce(this); Map<EventType, ProducerEvent> producersInListener = finder.findAllProducers(object); for...
StringCatcher catcher1 = new StringCatcher(); StringCatcher catcher2 = new StringCatcher(); try { bus.unregister(catcher1); fail("Attempting to unregister an unregistered object succeeded"); } catch (IllegalArgumentException expected) { // OK. ...
[FOCAL] public void Bus.unregister(Object object) [CLASS] class Bus [METRICS] loc=39 cc=8 branches=4 loops=3 returns=0 throws=3 nesting=3 [CALLS-INTERNAL] ProducerEvent getProducerForEventType(EventType type); Set<SubscriberEvent> getSubscribersForEventType(EventType type) [CALLS-EXTERNAL] enforcer.enforce/1, finder.fi...
/* static context [FOCAL] public void Bus.unregister(Object object) [THROWS-WHEN] NullPointerException when object == null [THROWS-WHEN] IllegalArgumentException when !(object == null) && foreach(Map.Entry<EventType, ProducerEvent> entry : producersInListener.entrySet())=T && value == null || !value.equals(producer) [T...
/* static context [FOCAL] public void Bus.unregister(Object object) [THROWS-WHEN] NullPointerException when object == null [THROWS-WHEN] IllegalArgumentException when !(object == null) && foreach(Map.Entry<EventType, ProducerEvent> entry : producersInListener.entrySet())=T && value == null || !value.equals(producer) [T...
true
ok
{"focal": {"class": "Bus", "name": "unregister", "signature": "void unregister(Object object)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "Object"}], "return_type": "void"}, "class_info": {"name": "Bus", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "field...
46898785_44
class ConfigBuilderArgParser extends ArgParser<ConfigBuilder> { public ConfigBuilder setTreeshake(ConfigBuilder configBuilder, String value) { configBuilder.treeShakerMode(Config.TreeShakerMode.valueOf(value)); return configBuilder; } public ConfigBuilderArgParser(Options options, String[...
configBuilder = configBuilderArgParser.setTreeshake(configBuilder, Config.TreeShakerMode.aggressive.toString()); assert(configBuilder.getConfig().getTreeShakerMode().equals(Config.TreeShakerMode.aggressive)); exception.expect(IllegalArgumentException.class); configBuilder = configBuilde...
[FOCAL] public ConfigBuilder ConfigBuilderArgParser.setTreeshake(ConfigBuilder configBuilder, String value) [CLASS] class ConfigBuilderArgParser extends ArgParser<ConfigBuilder> [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] ConfigBuilder.treeShakerMode/1, Config.TreeShakerMode.va...
/* static context [FOCAL] public ConfigBuilder ConfigBuilderArgParser.setTreeshake(ConfigBuilder configBuilder, String value) [INPUTS] branches=- | result=configBuilder [COLLABORATORS] param configBuilder:ConfigBuilder treeShakerMode/1 [CALLS-EXTERNAL] ConfigBuilder.treeShakerMode/1, Config.TreeShakerMode.valueOf/1 */
/* static context [FOCAL] public ConfigBuilder ConfigBuilderArgParser.setTreeshake(ConfigBuilder configBuilder, String value) [INPUTS] branches=- | result=configBuilder [COLLABORATORS] param configBuilder:ConfigBuilder treeShakerMode/1 [CALLS-EXTERNAL] ConfigBuilder.treeShakerMode/1, Config.TreeShakerMode.valueOf/1 */ ...
true
ok
{"focal": {"class": "ConfigBuilderArgParser", "name": "setTreeshake", "signature": "ConfigBuilder setTreeshake(ConfigBuilder configBuilder, String value)", "start_line": 3, "modifiers": "public", "params": [{"name": "configBuilder", "type": "ConfigBuilder"}, {"name": "value", "type": "String"}], "return_type": "ConfigB...
46900323_10
class CouponUtil { public static long parseDuration(String text) { // Given a string like 1w3d4h5m, we will return a millisecond duration long result = 0; int numIdx = 0; for (int i = 0; i < text.length(); i++) { char at = text.charAt(i); if (at == 'd' || at ...
Assert.assertEquals(TimeUnit.DAYS.toMillis(7), CouponUtil.parseDuration("xyz")); } }
[FOCAL] public static long CouponUtil.parseDuration(String text) [CLASS] class CouponUtil [METRICS] loc=36 cc=9 branches=4 loops=1 returns=1 throws=1 nesting=3 [CALLS-EXTERNAL] String.length/0, String.charAt/1, String.substring/2, String.isEmpty/0, Integer.parseInt/1, TimeUnit.DAYS.toMillis/1, TimeUnit.HOURS.toMillis/1...
/* static context [FOCAL] public static long CouponUtil.parseDuration(String text) [THROWS-WHEN] IllegalArgumentException when i < text.length() && !(at == 'd' || at == 'w' || at == 'm' || at == 'h') && !Character.isDigit(at) [PATH1] for(i < text.length())=T -> if(at == 'd' || at == 'w' || at == 'm' || at == 'h')=T -> ...
/* static context [FOCAL] public static long CouponUtil.parseDuration(String text) [THROWS-WHEN] IllegalArgumentException when i < text.length() && !(at == 'd' || at == 'w' || at == 'm' || at == 'h') && !Character.isDigit(at) [PATH1] for(i < text.length())=T -> if(at == 'd' || at == 'w' || at == 'm' || at == 'h')=T -> ...
true
ok
{"focal": {"class": "CouponUtil", "name": "parseDuration", "signature": "long parseDuration(String text)", "start_line": 3, "modifiers": "public static", "params": [{"name": "text", "type": "String"}], "return_type": "long"}, "class_info": {"name": "CouponUtil", "kind": "class", "modifiers": "", "superclass": null, "in...
46931835_0
class GaugePlugin implements Plugin<Project> { @Override public void apply(Project project) { project.getExtensions().create(GAUGE, GaugeExtension.class); project.getTasks().create(GAUGE, GaugeTask.class); } private static final String GAUGE; private Project project; } class Gaug...
project.getPluginManager().apply(GAUGE); assertTrue(project.getPlugins().getPlugin(GAUGE) instanceof GaugePlugin); assertFalse(project.getPlugins().getPlugin(GAUGE) instanceof JavaPlugin); } }
[FOCAL] @Override public void GaugePlugin.apply(Project project) [CLASS] class GaugePlugin implements Plugin<Project> [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] project.getExtensions().create/2, Project.getExtensions/0, project.getTasks().create/2, Project.getTasks/0 [FIELDS] ...
/* static context [FOCAL] @Override public void GaugePlugin.apply(Project project) [COLLABORATORS] param project:Project getExtensions/0,getTasks/0 [FIELDS] read=GAUGE:String [CALLS-EXTERNAL] project.getExtensions().create/2, Project.getExtensions/0, project.getTasks().create/2, Project.getTasks/0 */
/* static context [FOCAL] @Override public void GaugePlugin.apply(Project project) [COLLABORATORS] param project:Project getExtensions/0,getTasks/0 [FIELDS] read=GAUGE:String [CALLS-EXTERNAL] project.getExtensions().create/2, Project.getExtensions/0, project.getTasks().create/2, Project.getTasks/0 */ class GaugePlugin ...
true
ok
{"focal": {"class": "GaugePlugin", "name": "apply", "signature": "void apply(Project project)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "project", "type": "Project"}], "return_type": "void"}, "class_info": {"name": "GaugePlugin", "kind": "class", "modifiers": "", "superclass": null, "inter...
46981783_17
class WindowsSettingsGenerator implements ResourceGenerator<UserCredentials> { @NotNull @Override public String create(@NotNull final UserCredentials userCredentials) { final StringBuilder sb = new StringBuilder(); final String user = userCredentials.getUser(); if(!StringUtil.isEmptyOrSpaces(user)) ...
// Given final String expectedContent = "-u:nik" + ourlineSeparator + "arg1" + ourlineSeparator + "arg 2"; final List<CommandLineArgument> additionalArgs = Arrays.asList(new CommandLineArgument("arg1", CommandLineArgument.Type.PARAMETER), new CommandLineArgument("arg 2", CommandLineArgument.Type.PARAMETER))...
[FOCAL] @NotNull @Override public String WindowsSettingsGenerator.create(UserCredentials userCredentials) [CLASS] class WindowsSettingsGenerator implements ResourceGenerator<UserCredentials> [METRICS] loc=49 cc=7 branches=6 loops=0 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] UserCredentials.getUser/0, StringUtil.isEm...
/* static context [FOCAL] @NotNull @Override public String WindowsSettingsGenerator.create(UserCredentials userCredentials) [PATH1] if(!StringUtil.isEmptyOrSpaces(user))=T -> if(userCredentials.getWindowsIntegrityLevel() != WindowsIntegrityLevel.Auto)=T -> if(sb.length() > 0)#1=T -> if(userCredentials.getLoggingLevel()...
/* static context [FOCAL] @NotNull @Override public String WindowsSettingsGenerator.create(UserCredentials userCredentials) [PATH1] if(!StringUtil.isEmptyOrSpaces(user))=T -> if(userCredentials.getWindowsIntegrityLevel() != WindowsIntegrityLevel.Auto)=T -> if(sb.length() > 0)#1=T -> if(userCredentials.getLoggingLevel()...
true
ok
{"focal": {"class": "WindowsSettingsGenerator", "name": "create", "signature": "String create(UserCredentials userCredentials)", "start_line": 3, "modifiers": "@NotNull @Override public", "params": [{"name": "userCredentials", "type": "UserCredentials"}], "return_type": "String"}, "class_info": {"name": "WindowsSetting...
47021168_25
class FavoritasMainPresenter implements Presenter<FavoritasMainPresenter.View> { @Override public void initialize(View view) { this.view = view; view.showLoading(); loadFavoritas(); } public FavoritasMainPresenter(ObtainFavoritasAction obtainFavoritasAction); @Override pu...
List<Favorita> favoritas = favoritasListOf(4); when(obtainFavoritasAction.getFavoritas()).thenReturn(Observable.just(favoritas)); presenter.initialize(view); verify(view).showFavoritas(favoritas); } }
[FOCAL] @Override public void FavoritasMainPresenter.initialize(View view) [CLASS] class FavoritasMainPresenter implements Presenter<FavoritasMainPresenter.View> [METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void loadFavoritas() [CALLS-EXTERNAL] View.showLoading/0 [FIELDS] write=...
/* static context [FOCAL] @Override public void FavoritasMainPresenter.initialize(View view) [COLLABORATORS] param view:View showLoading/0 [STATE] view [CALLS-INTERNAL] void loadFavoritas() [FIELDS] write=view [CALLS-EXTERNAL] View.showLoading/0 */
/* static context [FOCAL] @Override public void FavoritasMainPresenter.initialize(View view) [COLLABORATORS] param view:View showLoading/0 [STATE] view [CALLS-INTERNAL] void loadFavoritas() [FIELDS] write=view [CALLS-EXTERNAL] View.showLoading/0 */ class FavoritasMainPresenter implements Presenter<FavoritasMainPresente...
true
ok
{"focal": {"class": "FavoritasMainPresenter", "name": "initialize", "signature": "void initialize(View view)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "view", "type": "View"}], "return_type": "void"}, "class_info": {"name": "FavoritasMainPresenter", "kind": "class", "modifiers": "", "super...
47058190_1
class BitcoinjBlockchainServiceImpl implements BlockChainService { @Override public String generateCentralWalletHash() throws BlockchainException { try { final org.bitcoinj.core.Wallet receiver = this.centralWallet(); String freshHash = null; Transaction transaction ...
when(this.transactionService.getByReceiverHash(anyString())).thenReturn(null); when(this.walletService.create(any(Wallet.class))).thenAnswer(new Answer<Wallet>() { @Override public Wallet answer(final InvocationOnMock invocation) throws Throwable { final Wallet wa...
[FOCAL] @Override public String BitcoinjBlockchainServiceImpl.generateCentralWalletHash() [CLASS] class BitcoinjBlockchainServiceImpl implements BlockChainService [METRICS] loc=20 cc=4 branches=0 loops=1 returns=1 throws=2 nesting=2 [CALLS-INTERNAL] String getFreshHash(String previous, org.bitcoinj.core.Wallet receiver...
/* static context [FOCAL] @Override public String BitcoinjBlockchainServiceImpl.generateCentralWalletHash() [THROWS-WHEN] BlockchainException when try-body throws [PATH1] try-body throws -> throw new BlockchainException(e) [PATH2] do_while(transaction != null)=F -> return freshHash [INPUTS] branches=transactionService ...
/* static context [FOCAL] @Override public String BitcoinjBlockchainServiceImpl.generateCentralWalletHash() [THROWS-WHEN] BlockchainException when try-body throws [PATH1] try-body throws -> throw new BlockchainException(e) [PATH2] do_while(transaction != null)=F -> return freshHash [INPUTS] branches=transactionService ...
true
ok
{"focal": {"class": "BitcoinjBlockchainServiceImpl", "name": "generateCentralWalletHash", "signature": "String generateCentralWalletHash() throws BlockchainException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "BitcoinjBlockchainServiceImpl", "kind"...
47133978_25
class ColorConverter { public static Float getSaturation(Color color) { float[] hsbValues = new float[MAX_COMPONENT]; Float saturation; Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), hsbValues); saturation = hsbValues[SATURATION]; return saturation; } ...
System.out.println("---- getSaturation -----"); Color colorA = Color.BLACK; Float expResult = (float) 0.0; Float result = ColorConverter.getSaturation(colorA); System.out.println("BLACK - Saturation: ["+ result +"]"); assertEquals(expResult, result); colorA ...
[FOCAL] public static Float ColorConverter.getSaturation(Color color) [CLASS] class ColorConverter [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Color.RGBtoHSB/4, Color.getRed/0, Color.getGreen/0, Color.getBlue/0 [COLLABORATORS] param color:Color getRed/0,getGreen/0,getBlue/0 [DA...
/* static context [FOCAL] public static Float ColorConverter.getSaturation(Color color) [COLLABORATORS] param color:Color getRed/0,getGreen/0,getBlue/0 [CALLS-EXTERNAL] Color.RGBtoHSB/4, Color.getRed/0, Color.getGreen/0, Color.getBlue/0 */
/* static context [FOCAL] public static Float ColorConverter.getSaturation(Color color) [COLLABORATORS] param color:Color getRed/0,getGreen/0,getBlue/0 [CALLS-EXTERNAL] Color.RGBtoHSB/4, Color.getRed/0, Color.getGreen/0, Color.getBlue/0 */ class ColorConverter { public static Float getSaturation(Color color) { ...
true
ok
{"focal": {"class": "ColorConverter", "name": "getSaturation", "signature": "Float getSaturation(Color color)", "start_line": 3, "modifiers": "public static", "params": [{"name": "color", "type": "Color"}], "return_type": "Float"}, "class_info": {"name": "ColorConverter", "kind": "class", "modifiers": "", "superclass":...
47149635_3
class PumbaCommandLineCreator { public static Collection<String> run(String chaosCommand, boolean random, CubeDockerConfiguration cubeDockerConfiguration) { String[] runningCommand = new String[8]; runningCommand[PUMBA_INDEX] = "pumba"; runningCommand[RUN_INDEX] = "run"; ru...
when(cubeDockerConfiguration.getDockerServerUri()).thenReturn("https://192.168.0.1"); final Collection<String> cli = PumbaCommandLineCreator.run("re2:^hp|10s|KILL:SIGTERM", true, cubeDockerConfiguration); assertThat(cli).containsExactly("pumba", "--host", "https://192.168.0.1", "--t...
[FOCAL] public static Collection<String> PumbaCommandLineCreator.run(String chaosCommand, boolean random, CubeDockerConfiguration cubeDockerConfiguration) [CLASS] class PumbaCommandLineCreator [METRICS] loc=22 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] Collection<String> createCommandLine(Str...
/* static context [FOCAL] public static Collection<String> PumbaCommandLineCreator.run(String chaosCommand, boolean random, CubeDockerConfiguration cubeDockerConfiguration) [PATH1] if(random)=T -> if(!isNativeDocker(cubeDockerConfiguration))=T -> return createCommandLine(runningCommand) [PATH2] if(random)=F -> if(!isNa...
/* static context [FOCAL] public static Collection<String> PumbaCommandLineCreator.run(String chaosCommand, boolean random, CubeDockerConfiguration cubeDockerConfiguration) [PATH1] if(random)=T -> if(!isNativeDocker(cubeDockerConfiguration))=T -> return createCommandLine(runningCommand) [PATH2] if(random)=F -> if(!isNa...
true
ok
{"focal": {"class": "PumbaCommandLineCreator", "name": "run", "signature": "Collection<String> run(String chaosCommand, boolean random, CubeDockerConfiguration cubeDockerConfiguration)", "start_line": 3, "modifiers": "public static", "params": [{"name": "chaosCommand", "type": "String"}, {"name": "random", "type": "boo...
47184968_47
class CoreFormHandlingServlet extends SlingAllMethodsServlet implements Filter { public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { formsHandlingServ...
FilterChain filterChain = mock(FilterChain.class); servlet.doFilter(context.request(), context.response(), filterChain); verify(formsHandlingServletHelper).handleFilter(context.request(), context.response(), filterChain, EXTENSION, SELECTOR); } }
[FOCAL] public void CoreFormHandlingServlet.doFilter(ServletRequest request, ServletResponse response, FilterChain chain) [CLASS] class CoreFormHandlingServlet extends SlingAllMethodsServlet implements Filter [METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] FormsHandlingServletHelpe...
/* static context [FOCAL] public void CoreFormHandlingServlet.doFilter(ServletRequest request, ServletResponse response, FilterChain chain) [COLLABORATORS] field formsHandlingServletHelper:FormsHandlingServletHelper handleFilter/5 [EXCEPTIONS] declares IOException, ServletException [FIELDS] read=EXTENSION:String, SELEC...
/* static context [FOCAL] public void CoreFormHandlingServlet.doFilter(ServletRequest request, ServletResponse response, FilterChain chain) [COLLABORATORS] field formsHandlingServletHelper:FormsHandlingServletHelper handleFilter/5 [EXCEPTIONS] declares IOException, ServletException [FIELDS] read=EXTENSION:String, SELEC...
true
ok
{"focal": {"class": "CoreFormHandlingServlet", "name": "doFilter", "signature": "void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException", "start_line": 3, "modifiers": "public", "params": [{"name": "request", "type": "ServletRequest"}, {"name": "response"...
47219036_277
class Lang extends SubtagSet { public Subtag getExtension() { for (Subtag subtag : this) { switch (subtag.getType()) { case PRIMARY: case EXTLANG: case SCRIPT: case REGION: case VARIANT: break; case EXTENSION: return subtag.getPrevious(); default: return null; } } return n...
Lang lang = new Lang("en"); assertNull(lang.getExtension()); lang.getLanguage().setNext(new Subtag(Type.EXTENSION, "AB")); assertEquals(new Subtag(Language.EN), lang.getExtension()); } }
[FOCAL] public Subtag Lang.getExtension() [CLASS] class Lang extends SubtagSet [METRICS] loc=17 cc=8 branches=1 loops=1 returns=3 throws=0 nesting=2 [CALLS-EXTERNAL] Subtag.getType/0, Subtag.getPrevious/0 [PATH1] foreach(Subtag subtag : this)=T -> switch(subtag.getType())=case VARIANT -> exit loop -> return null [PATH2...
/* static context [FOCAL] public Subtag Lang.getExtension() [PATH1] foreach(Subtag subtag : this)=T -> switch(subtag.getType())=case VARIANT -> exit loop -> return null [PATH2] foreach(Subtag subtag : this)=T -> switch(subtag.getType())=case EXTENSION -> return subtag.getPrevious() [PATH3] foreach(Subtag subtag : this)...
/* static context [FOCAL] public Subtag Lang.getExtension() [PATH1] foreach(Subtag subtag : this)=T -> switch(subtag.getType())=case VARIANT -> exit loop -> return null [PATH2] foreach(Subtag subtag : this)=T -> switch(subtag.getType())=case EXTENSION -> return subtag.getPrevious() [PATH3] foreach(Subtag subtag : this)...
true
ok
{"focal": {"class": "Lang", "name": "getExtension", "signature": "Subtag getExtension()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Subtag"}, "class_info": {"name": "Lang", "kind": "class", "modifiers": "", "superclass": "SubtagSet", "interfaces": null, "fields": [], "members": [{"name": "La...
47246080_3
class SaltConfigs { @SuppressWarnings({ "unchecked", "rawtypes" }) public static void addLaunchAttributes(EntitySpec<?> entity, Map<?,?> attributesMap) { entity.configure(SaltConfig.SALT_SSH_LAUNCH_ATTRIBUTES, MapModifications.add((Map)attributesMap)); } public static void addToRunList(EntityS...
app = TestApplication.Factory.newManagedInstanceForTests(); SaltConfigs.addLaunchAttributes(app, ImmutableMap.of("k1", "v1")); Map<String, Object> attribs = app.getConfig(SaltConfig.SALT_SSH_LAUNCH_ATTRIBUTES); Assert.assertEquals(attribs, ImmutableMap.of("k1", "v1")); } }
[FOCAL] @SuppressWarnings({ "unchecked", "rawtypes" }) public static void SaltConfigs.addLaunchAttributes(EntitySpec<?> entity, Map<?,?> attributesMap) [CLASS] class SaltConfigs [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] EntitySpec<?>.configure/2, MapModifications.add/1 [COLLA...
/* static context [FOCAL] @SuppressWarnings({ "unchecked", "rawtypes" }) public static void SaltConfigs.addLaunchAttributes(EntitySpec<?> entity, Map<?,?> attributesMap) [COLLABORATORS] param entity:EntitySpec<?> configure/2 [CALLS-EXTERNAL] EntitySpec<?>.configure/2, MapModifications.add/1 */
/* static context [FOCAL] @SuppressWarnings({ "unchecked", "rawtypes" }) public static void SaltConfigs.addLaunchAttributes(EntitySpec<?> entity, Map<?,?> attributesMap) [COLLABORATORS] param entity:EntitySpec<?> configure/2 [CALLS-EXTERNAL] EntitySpec<?>.configure/2, MapModifications.add/1 */ class SaltConfigs { ...
true
ok
{"focal": {"class": "SaltConfigs", "name": "addLaunchAttributes", "signature": "void addLaunchAttributes(EntitySpec<?> entity, Map<?,?> attributesMap)", "start_line": 3, "modifiers": "@SuppressWarnings({ \"unchecked\", \"rawtypes\" }) public static", "params": [{"name": "entity", "type": "EntitySpec<?>"}, {"name": "att...
47301462_84
class ImmutableBitSet implements Iterable<Integer>, Serializable, Comparable<ImmutableBitSet> { public int indexOf(int bit) { for (int i = nextSetBit(0), k = 0;; i = nextSetBit(i + 1), ++k) { if (i < 0) { return -1; } if (i == bit) { return k; } } } private Immut...
assertThat(ImmutableBitSet.of(0, 2, 4).indexOf(0), equalTo(0)); assertThat(ImmutableBitSet.of(0, 2, 4).indexOf(2), equalTo(1)); assertThat(ImmutableBitSet.of(0, 2, 4).indexOf(3), equalTo(-1)); assertThat(ImmutableBitSet.of(0, 2, 4).indexOf(4), equalTo(2)); assertThat(ImmutableBitSet.of(0, 2, 4).inde...
[FOCAL] public int ImmutableBitSet.indexOf(int bit) [CLASS] class ImmutableBitSet implements Iterable<Integer>, Serializable, Comparable<ImmutableBitSet> [METRICS] loc=10 cc=3 branches=2 loops=1 returns=2 throws=0 nesting=2 [CALLS-INTERNAL] int nextSetBit(int fromIndex) [PATH1] for(true)=T -> if(i < 0)=F -> if(i == bit...
/* static context [FOCAL] public int ImmutableBitSet.indexOf(int bit) [PATH1] for(true)=T -> if(i < 0)=F -> if(i == bit)=T -> return k [PATH2] for(true)=T -> if(i < 0)=T -> return -1 [INPUTS] branches=bit | result=- [CALLS-INTERNAL] int nextSetBit(int fromIndex) */
/* static context [FOCAL] public int ImmutableBitSet.indexOf(int bit) [PATH1] for(true)=T -> if(i < 0)=F -> if(i == bit)=T -> return k [PATH2] for(true)=T -> if(i < 0)=T -> return -1 [INPUTS] branches=bit | result=- [CALLS-INTERNAL] int nextSetBit(int fromIndex) */ class ImmutableBitSet implements Iterable<Integer>, Se...
true
ok
{"focal": {"class": "ImmutableBitSet", "name": "indexOf", "signature": "int indexOf(int bit)", "start_line": 3, "modifiers": "public", "params": [{"name": "bit", "type": "int"}], "return_type": "int"}, "class_info": {"name": "ImmutableBitSet", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Iterabl...
47309610_0
class HelloWorld { public void sayHello() { System.out.print("Hello World"); } private final ByteArrayOutputStream outStream; } class HelloWorldTest { private final ByteArrayOutputStream outStream; @Test public void testSayHello() {
HelloWorld hw = new HelloWorld(); hw.sayHello(); Assert.assertEquals("Hello World", outStream.toString()); } }
[FOCAL] public void HelloWorld.sayHello() [CLASS] class HelloWorld [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] System.out.print/1 [TEST] HelloWorldTest: @Test public void testSayHello() [TEST-FIELDS] ByteArrayOutputStream outStream
/* static context [FOCAL] public void HelloWorld.sayHello() [CALLS-EXTERNAL] System.out.print/1 */
/* static context [FOCAL] public void HelloWorld.sayHello() [CALLS-EXTERNAL] System.out.print/1 */ class HelloWorld { public void sayHello() { System.out.print("Hello World"); } private final ByteArrayOutputStream outStream; } class HelloWorldTest { private final ByteArrayOutputStream outStream; @Test pub...
true
ok
{"focal": {"class": "HelloWorld", "name": "sayHello", "signature": "void sayHello()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "HelloWorld", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "outStream", "type": "Byt...
47317834_77
class DeploymentCompleteCheckJob extends CustomCheckJob<DeploymentCompleteSpec> { @NotNull public CheckResult<DeploymentCompleteSpec> perform(UUID correlationId) { final String octopusUrl = props.get(OCTOPUS_URL); if (StringUtil.isEmptyOrSpaces(octopusUrl)) { return DeploymentComple...
DeploymentsProviderFactory deploymentsProviderFactory = new FakeDeploymentsProviderFactory(new FakeDeploymentsProviderWithNoDeployments()); String displayName = "the-display-name"; String buildType = "the-build-type"; CustomDataStorage dataStorage = new FakeCustomDataStorage(); ...
[FOCAL] @NotNull public CheckResult<DeploymentCompleteSpec> DeploymentCompleteCheckJob.perform(UUID correlationId) [CLASS] class DeploymentCompleteCheckJob extends CustomCheckJob<DeploymentCompleteSpec> [METRICS] loc=24 cc=4 branches=3 loops=0 returns=4 throws=0 nesting=1 [CALLS-INTERNAL] CheckResult<DeploymentComplete...
/* static context [FOCAL] @NotNull public CheckResult<DeploymentCompleteSpec> DeploymentCompleteCheckJob.perform(UUID correlationId) [PATH1] if(StringUtil.isEmptyOrSpaces(octopusUrl))=F -> if(StringUtil.isEmptyOrSpaces(octopusApiKey))=F -> if(StringUtil.isEmptyOrSpaces(octopusProject))=T -> return DeploymentCompleteSpe...
/* static context [FOCAL] @NotNull public CheckResult<DeploymentCompleteSpec> DeploymentCompleteCheckJob.perform(UUID correlationId) [PATH1] if(StringUtil.isEmptyOrSpaces(octopusUrl))=F -> if(StringUtil.isEmptyOrSpaces(octopusApiKey))=F -> if(StringUtil.isEmptyOrSpaces(octopusProject))=T -> return DeploymentCompleteSpe...
true
ok
{"focal": {"class": "DeploymentCompleteCheckJob", "name": "perform", "signature": "CheckResult<DeploymentCompleteSpec> perform(UUID correlationId)", "start_line": 3, "modifiers": "@NotNull public", "params": [{"name": "correlationId", "type": "UUID"}], "return_type": "CheckResult<DeploymentCompleteSpec>"}, "class_info"...
47345553_3
class CompositeReporter implements Reporter { @Override public void testBlockEnd(TestBlock testBlock, List<TestBlock> parents) { reporters.forEach(r -> r.testBlockEnd(testBlock, parents)); } public CompositeReporter(List<Reporter> reporters); @Override public void start(TestBlock rootBlo...
reporter.testBlockEnd(testBlock, parents); order.verify(mockReporter1).testBlockEnd(testBlock, parents); order.verify(mockReporter2).testBlockEnd(testBlock, parents); } }
[FOCAL] @Override public void CompositeReporter.testBlockEnd(TestBlock testBlock, List<TestBlock> parents) [CLASS] class CompositeReporter implements Reporter [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] reporters.forEach/1, r.testBlockEnd/2 [COLLABORATORS] field reporters forEa...
/* static context [FOCAL] @Override public void CompositeReporter.testBlockEnd(TestBlock testBlock, List<TestBlock> parents) [COLLABORATORS] field reporters forEach/1; field r testBlockEnd/2 [CALLS-EXTERNAL] reporters.forEach/1, r.testBlockEnd/2 */
/* static context [FOCAL] @Override public void CompositeReporter.testBlockEnd(TestBlock testBlock, List<TestBlock> parents) [COLLABORATORS] field reporters forEach/1; field r testBlockEnd/2 [CALLS-EXTERNAL] reporters.forEach/1, r.testBlockEnd/2 */ class CompositeReporter implements Reporter { @Override public...
true
ok
{"focal": {"class": "CompositeReporter", "name": "testBlockEnd", "signature": "void testBlockEnd(TestBlock testBlock, List<TestBlock> parents)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "testBlock", "type": "TestBlock"}, {"name": "parents", "type": "List<TestBlock>"}], "return_type": "void"...
47404616_3
class Spreadsheet extends AbstractTableModel { @Override public void setValueAt(Object value, int row, int column) { // Here, we will check the type of the incoming input: // Because the input is always a string, if the user wants to input a number // we first convert it to a Double (we only use Doubles)...
spreadsheet.setValueAt("blah", 1, 1); assertEquals("blah", (String)spreadsheet.getValueAt(1, 1)); } }
[FOCAL] @Override public void Spreadsheet.setValueAt(Object value, int row, int column) [CLASS] class Spreadsheet extends AbstractTableModel [METRICS] loc=56 cc=7 branches=5 loops=0 returns=0 throws=0 nesting=4 [CALLS-EXTERNAL] Double.parseDouble/1, Object.toString/0, Object.equals/1, Boolean.parseBoolean/1, Object.get...
/* static context [FOCAL] @Override public void Spreadsheet.setValueAt(Object value, int row, int column) [PATH1] try-body throws -> if(value.equals("true") || value.equals("false"))=T -> if(value.getClass() == Integer.class)=F -> if(value.getClass() == Double.class)=F -> if(value.getClass() == Boolean.class)=F -> if(v...
/* static context [FOCAL] @Override public void Spreadsheet.setValueAt(Object value, int row, int column) [PATH1] try-body throws -> if(value.equals("true") || value.equals("false"))=T -> if(value.getClass() == Integer.class)=F -> if(value.getClass() == Double.class)=F -> if(value.getClass() == Boolean.class)=F -> if(v...
true
ok
{"focal": {"class": "Spreadsheet", "name": "setValueAt", "signature": "void setValueAt(Object value, int row, int column)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "value", "type": "Object"}, {"name": "row", "type": "int"}, {"name": "column", "type": "int"}], "return_type": "void"}, "class...
47405371_1
class Tracklytics implements AspectListener { @Override public void onAspectEventTriggered(TrackEvent trackEvent, Map<String, Object> attributes) { trackEvent(new Event(trackEvent, attributes, superAttributes)); } private Tracklytics(EventSubscriber eventSubscriber); public static Tracklytics init(Event...
class Foo { @TrackEvent("event_name") public void foo() { } } TrackEvent trackEvent = Foo.class.getMethod("foo").getAnnotation(TrackEvent.class); Map<String, Object> attributes = new HashMap<>(); attributes.put("key", "value"); tracklytics.onAspectEventTriggered(trackEvent, attribu...
[FOCAL] @Override public void Tracklytics.onAspectEventTriggered(TrackEvent trackEvent, Map<String, Object> attributes) [CLASS] class Tracklytics implements AspectListener [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void trackEvent(String eventName) [NEW] Event [DATAFLOW] attri...
/* static context [FOCAL] @Override public void Tracklytics.onAspectEventTriggered(TrackEvent trackEvent, Map<String, Object> attributes) [CALLS-INTERNAL] void trackEvent(String eventName) [NEW] Event */
/* static context [FOCAL] @Override public void Tracklytics.onAspectEventTriggered(TrackEvent trackEvent, Map<String, Object> attributes) [CALLS-INTERNAL] void trackEvent(String eventName) [NEW] Event */ class Tracklytics implements AspectListener { @Override public void onAspectEventTriggered(TrackEvent trackEvent,...
true
ok
{"focal": {"class": "Tracklytics", "name": "onAspectEventTriggered", "signature": "void onAspectEventTriggered(TrackEvent trackEvent, Map<String, Object> attributes)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "trackEvent", "type": "TrackEvent"}, {"name": "attributes", "type": "Map<String, O...
47419635_10
class AcmeLazyLoadingException extends RuntimeException { public AcmeLazyLoadingException(AcmeResource resource, AcmeException cause) { this(requireNonNull(resource).getClass(), requireNonNull(resource).getLocation(), cause); } public AcmeLazyLoadingException(AcmeResource resource, AcmeException ...
Login login = mock(Login.class); AcmeResource resource = new TestResource(login, resourceUrl); AcmeException cause = new AcmeException("Something went wrong"); AcmeLazyLoadingException ex = new AcmeLazyLoadingException(resource, cause); assertThat(ex, is(instanceOf(RuntimeExcep...
[FOCAL] public AcmeLazyLoadingException.AcmeLazyLoadingException(AcmeResource resource, AcmeException cause) [CLASS] class AcmeLazyLoadingException extends RuntimeException [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] requireNonNull(resource).getClass/0, requireNonNull/1 (inheri...
/* static context [FOCAL] public AcmeLazyLoadingException.AcmeLazyLoadingException(AcmeResource resource, AcmeException cause) [CALLS-EXTERNAL] requireNonNull(resource).getClass/0, requireNonNull/1 (inherited), requireNonNull(resource).getLocation/0 */
/* static context [FOCAL] public AcmeLazyLoadingException.AcmeLazyLoadingException(AcmeResource resource, AcmeException cause) [CALLS-EXTERNAL] requireNonNull(resource).getClass/0, requireNonNull/1 (inherited), requireNonNull(resource).getLocation/0 */ class AcmeLazyLoadingException extends RuntimeException { publ...
true
ok
{"focal": {"class": "AcmeLazyLoadingException", "name": "AcmeLazyLoadingException", "signature": "AcmeLazyLoadingException(AcmeResource resource, AcmeException cause)", "start_line": 3, "modifiers": "public", "params": [{"name": "resource", "type": "AcmeResource"}, {"name": "cause", "type": "AcmeException"}], "return_t...
47428395_15
class StringSubstitutionException extends RuntimeException { public final StringSubstitutionException extend(String field) { return extend(field, false); } private StringSubstitutionException( Throwable cause, String value, StringBuilder fieldBuilder, ...
StringSubstitutionException exception = new StringSubstitutionException(cause, VALUE); assertException(exception.extend(1).extend("field1").extend("field2"), "field2.field1[1]"); } }
[FOCAL] public final StringSubstitutionException StringSubstitutionException.extend(String field) [CLASS] class StringSubstitutionException extends RuntimeException [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] StringSubstitutionException extend(String prefix, boolean prefixIsArr...
/* static context [FOCAL] public final StringSubstitutionException StringSubstitutionException.extend(String field) [INPUTS] branches=- | result=field [CALLS-INTERNAL] StringSubstitutionException extend(String prefix, boolean prefixIsArrayIndex) */
/* static context [FOCAL] public final StringSubstitutionException StringSubstitutionException.extend(String field) [INPUTS] branches=- | result=field [CALLS-INTERNAL] StringSubstitutionException extend(String prefix, boolean prefixIsArrayIndex) */ class StringSubstitutionException extends RuntimeException { publi...
true
ok
{"focal": {"class": "StringSubstitutionException", "name": "extend", "signature": "StringSubstitutionException extend(String field)", "start_line": 3, "modifiers": "public final", "params": [{"name": "field", "type": "String"}], "return_type": "StringSubstitutionException"}, "class_info": {"name": "StringSubstitutionEx...
47442408_8
class WelcomeConfiguration { public boolean getBackButtonNavigatesPages() { return builder.backButtonNavigatesPages; } public WelcomeConfiguration(Builder builder); public Context getContext(); public Fragment getFragment(int index); public Fragment createFragment(int index); pub...
builder1.backButtonNavigatesPages(true); assertTrue(builder1.build().getBackButtonNavigatesPages()); builder1.backButtonNavigatesPages(false); assertFalse(builder1.build().getBackButtonNavigatesPages()); } }
[FOCAL] public boolean WelcomeConfiguration.getBackButtonNavigatesPages() [CLASS] class WelcomeConfiguration [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] WelcomeConfiguration(Builder builder); Context getContext(); Fragment getFragment(int index); Fragment createFragment(int inde...
/* static context [FOCAL] public boolean WelcomeConfiguration.getBackButtonNavigatesPages() */
/* static context [FOCAL] public boolean WelcomeConfiguration.getBackButtonNavigatesPages() */ class WelcomeConfiguration { public boolean getBackButtonNavigatesPages() { return builder.backButtonNavigatesPages; } public WelcomeConfiguration(Builder builder); public Context getContext(); ...
true
ok
{"focal": {"class": "WelcomeConfiguration", "name": "getBackButtonNavigatesPages", "signature": "boolean getBackButtonNavigatesPages()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "WelcomeConfiguration", "kind": "class", "modifiers": "", "superclass": null, "...
47489502_6
class MoviesListingPresenterImpl implements MoviesListingPresenter { @Override public void setView(MoviesListingView view) { this.view = view; displayMovies(); } MoviesListingPresenterImpl(MoviesListingInteractor interactor); @Override public void destroy(); private void dis...
// given: Observable<List<Movie>> responseObservable = Observable.just(movies); when(interactor.fetchMovies(anyInt())).thenReturn(responseObservable); // when: presenter.setView(view); // then: verify(view).showMovies(movies); } }
[FOCAL] @Override public void MoviesListingPresenterImpl.setView(MoviesListingView view) [CLASS] class MoviesListingPresenterImpl implements MoviesListingPresenter [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void displayMovies() [FIELDS] write=view [STATE] view [DATAFLOW] view@...
/* static context [FOCAL] @Override public void MoviesListingPresenterImpl.setView(MoviesListingView view) [STATE] view [CALLS-INTERNAL] void displayMovies() [FIELDS] write=view */
/* static context [FOCAL] @Override public void MoviesListingPresenterImpl.setView(MoviesListingView view) [STATE] view [CALLS-INTERNAL] void displayMovies() [FIELDS] write=view */ class MoviesListingPresenterImpl implements MoviesListingPresenter { @Override public void setView(MoviesListingView view) { ...
true
ok
{"focal": {"class": "MoviesListingPresenterImpl", "name": "setView", "signature": "void setView(MoviesListingView view)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "view", "type": "MoviesListingView"}], "return_type": "void"}, "class_info": {"name": "MoviesListingPresenterImpl", "kind": "cla...
47492058_4
class GraphBuilder { static Collection<Graph> buildGraphs(Map<String, Module> modules) throws ProcessorException { LinkedList<Graph> graphs = new LinkedList<>(); for (Module module : modules.values()) { if (module.isCompleted) { Graph graph = buildGraph(modules, module); validateGraph(graph); graph...
try { String moduleName = "ModuleName"; Collection<Provide> provides = singleton(getFakeProvide("P", "n", singleton(new Dependency("Unknown", "?")))); Module fakeModule = getFakeModule(moduleName, provides, null, true); GraphBuilder.buildGraphs(singletonMap(moduleName, fakeModule)); fail(); } catch (...
[FOCAL] static Collection<Graph> GraphBuilder.buildGraphs(Map<String, Module> modules) [CLASS] class GraphBuilder [METRICS] loc=11 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] Graph buildGraph(Map<String, Module> modules, Module module); void validateGraph(Graph graph) [CALLS-EXTERNAL] Map<Stri...
/* static context [FOCAL] static Collection<Graph> GraphBuilder.buildGraphs(Map<String, Module> modules) [PATH1] foreach(Module module : modules.values())=T -> if(module.isCompleted)=T -> exit loop -> return graphs [PATH2] foreach(Module module : modules.values())=F -> return graphs [PATH3] foreach(Module module : modu...
/* static context [FOCAL] static Collection<Graph> GraphBuilder.buildGraphs(Map<String, Module> modules) [PATH1] foreach(Module module : modules.values())=T -> if(module.isCompleted)=T -> exit loop -> return graphs [PATH2] foreach(Module module : modules.values())=F -> return graphs [PATH3] foreach(Module module : modu...
true
ok
{"focal": {"class": "GraphBuilder", "name": "buildGraphs", "signature": "Collection<Graph> buildGraphs(Map<String, Module> modules) throws ProcessorException", "start_line": 3, "modifiers": "static", "params": [{"name": "modules", "type": "Map<String, Module>"}], "return_type": "Collection<Graph>"}, "class_info": {"nam...
47502698_12
class FingerprintEncryptionResult extends FingerprintAuthenticationResult { public String getEncrypted() { if (!isSuccess()) { throw new IllegalAccessError("Fingerprint authentication was not successful, cannot access encryption result"); } return encrypted; } public F...
String message = "help"; FingerprintEncryptionResult result = new FingerprintEncryptionResult(FingerprintResult.HELP, message, null); assertEquals(message, result.getMessage()); result.getEncrypted(); } }
[FOCAL] public String FingerprintEncryptionResult.getEncrypted() [CLASS] class FingerprintEncryptionResult extends FingerprintAuthenticationResult [METRICS] loc=6 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1 [CALLS-EXTERNAL] isSuccess/0 (inherited) [NEW] IllegalAccessError [EXCEPTIONS] throws IllegalAccessError...
/* static context [FOCAL] public String FingerprintEncryptionResult.getEncrypted() [THROWS-WHEN] IllegalAccessError when !isSuccess() [PATH1] if(!isSuccess())=T -> throw new IllegalAccessError("Fingerprint authentication was not successf... [PATH2] if(!isSuccess())=F -> return encrypted [EXCEPTIONS] throws IllegalAcces...
/* static context [FOCAL] public String FingerprintEncryptionResult.getEncrypted() [THROWS-WHEN] IllegalAccessError when !isSuccess() [PATH1] if(!isSuccess())=T -> throw new IllegalAccessError("Fingerprint authentication was not successf... [PATH2] if(!isSuccess())=F -> return encrypted [EXCEPTIONS] throws IllegalAcces...
true
ok
{"focal": {"class": "FingerprintEncryptionResult", "name": "getEncrypted", "signature": "String getEncrypted()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "FingerprintEncryptionResult", "kind": "class", "modifiers": "", "superclass": "FingerprintAuthenticatio...
47536480_11
class UnSetCommand extends AbstractCommand { public static UnSetCommand parse(String commandString, ExecutionContext sessionContext) throws ODPSConsoleException { if (StringUtils.isNullOrEmpty(commandString)) { return null; } String[] tokens = new AntlrObject(commandString).getTokenStringAr...
UnSetCommand cmd = UnSetCommand.parse("unse testkey", null); assertNull(cmd); cmd = UnSetCommand.parse("unset ", null); assertNull(cmd); cmd = UnSetCommand.parse("unalia testkey\n", null); assertNull(cmd); cmd = UnSetCommand.parse("unalias \r\n", null); assertNull(cmd); } }
[FOCAL] public static UnSetCommand UnSetCommand.parse(String commandString, ExecutionContext sessionContext) [CLASS] class UnSetCommand extends AbstractCommand [METRICS] loc=30 cc=5 branches=4 loops=0 returns=3 throws=0 nesting=2 [CALLS-EXTERNAL] StringUtils.isNullOrEmpty/1, new AntlrObject(commandString).getTokenStrin...
/* static context [FOCAL] public static UnSetCommand UnSetCommand.parse(String commandString, ExecutionContext sessionContext) [PATH1] if(StringUtils.isNullOrEmpty(commandString))=F -> if(tokens.length != 2)=F -> if("UNSET".equalsIgnoreCase(tokens[0]))=F -> if("UNALIAS".equalsIgnoreCase(tokens[0]))=T -> return command ...
/* static context [FOCAL] public static UnSetCommand UnSetCommand.parse(String commandString, ExecutionContext sessionContext) [PATH1] if(StringUtils.isNullOrEmpty(commandString))=F -> if(tokens.length != 2)=F -> if("UNSET".equalsIgnoreCase(tokens[0]))=F -> if("UNALIAS".equalsIgnoreCase(tokens[0]))=T -> return command ...
true
ok
{"focal": {"class": "UnSetCommand", "name": "parse", "signature": "UnSetCommand parse(String commandString, ExecutionContext sessionContext) throws ODPSConsoleException", "start_line": 3, "modifiers": "public static", "params": [{"name": "commandString", "type": "String"}, {"name": "sessionContext", "type": "ExecutionC...
47582051_0
class Proxy extends ProxyServlet { protected void loadProperties() { PropertyLoader.loadProperties(Property.class, "default.properties", "dumonitor.properties"); try { proxyServer = URI.create(Property.QUERY_TURVASERVER_URL.getValue()); } catch (IllegalArgumentException e) { ExceptionUtil.unc...
Proxy p = new Proxy(); p.loadProperties(); // Kontrollime tulemust: assertNotNull("Vigane konfiguratsioon", Property.QUERY_TURVASERVER_URL.getValue()); assertNotNull("Proxy serveri URL on NULL", p.proxyServer); assertEquals("Proxy serveri URL pole õige", Property.QUERY_TURVASERVER_URL.getValue(...
[FOCAL] protected void Proxy.loadProperties() [CLASS] class Proxy extends ProxyServlet [METRICS] loc=8 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] PropertyLoader.loadProperties/3, URI.create/1, Property.QUERY_TURVASERVER_URL.getValue/0, ExceptionUtil.uncheck/2 [EXCEPTIONS] catches IllegalArgum...
/* static context [FOCAL] protected void Proxy.loadProperties() [PATH1] try-body throws [EXCEPTIONS] catches IllegalArgumentException e [CALLS-EXTERNAL] PropertyLoader.loadProperties/3, URI.create/1, Property.QUERY_TURVASERVER_URL.getValue/0, ExceptionUtil.uncheck/2 */
/* static context [FOCAL] protected void Proxy.loadProperties() [PATH1] try-body throws [EXCEPTIONS] catches IllegalArgumentException e [CALLS-EXTERNAL] PropertyLoader.loadProperties/3, URI.create/1, Property.QUERY_TURVASERVER_URL.getValue/0, ExceptionUtil.uncheck/2 */ class Proxy extends ProxyServlet { protected vo...
true
ok
{"focal": {"class": "Proxy", "name": "loadProperties", "signature": "void loadProperties()", "start_line": 3, "modifiers": "protected", "params": [], "return_type": "void"}, "class_info": {"name": "Proxy", "kind": "class", "modifiers": "", "superclass": "ProxyServlet", "interfaces": null, "fields": [{"name": "PROXY_POR...
47585751_4
class ReportParser { public ZapReport parse(InputStream inputStream) { SMInputFactory inputFactory = ZapUtils.newStaxParser(); try { SMHierarchicCursor rootC = inputFactory.rootElementCursor(inputStream); SMInputCursor owaspZapReportCursor = rootC.advance(); // <OWASPZAPReport> String ger...
ReportParser parser = new ReportParser(); InputStream inputStream = getClass().getClassLoader() .getResourceAsStream("report/zaproxy-report-no-instances.xml"); ZapReport zapReport = parser.parse(inputStream); assertThat(zapReport.getGenerated()).isEqualTo("Fri, 8 Jun 2018 09:55:08"); assertT...
[FOCAL] public ZapReport ReportParser.parse(InputStream inputStream) [CLASS] class ReportParser [METRICS] loc=27 cc=4 branches=1 loops=1 returns=1 throws=1 nesting=3 [CALLS-INTERNAL] Site processSite(SMInputCursor siteCursor) [CALLS-EXTERNAL] ZapUtils.newStaxParser/0, SMInputFactory.rootElementCursor/1, SMHierarchicCur...
/* static context [FOCAL] public ZapReport ReportParser.parse(InputStream inputStream) [THROWS-WHEN] IllegalStateException when try-body throws [PATH1] while(childCursor.getNext() != null)=T -> if("site".equals(nodeName))=T -> exit loop -> return new ZapReport(gererated, versionZAP, sites) [PATH2] try-body throws -> th...
/* static context [FOCAL] public ZapReport ReportParser.parse(InputStream inputStream) [THROWS-WHEN] IllegalStateException when try-body throws [PATH1] while(childCursor.getNext() != null)=T -> if("site".equals(nodeName))=T -> exit loop -> return new ZapReport(gererated, versionZAP, sites) [PATH2] try-body throws -> th...
true
ok
{"focal": {"class": "ReportParser", "name": "parse", "signature": "ZapReport parse(InputStream inputStream)", "start_line": 3, "modifiers": "public", "params": [{"name": "inputStream", "type": "InputStream"}], "return_type": "ZapReport"}, "class_info": {"name": "ReportParser", "kind": "class", "modifiers": "", "supercl...
47607561_359
class StormStatusServiceImpl implements StormStatusService { @Override public TopologyResponse activateTopology(String name) { TopologyResponse topologyResponse = new TopologyResponse(); String id = getTopologyId(name); if (id != null) { Map result = restTemplate .postForObject(getStorm...
when(environment.getProperty(STORM_UI_SPRING_PROPERTY)).thenReturn(HTTP_STORM_UI); when(restTemplate.getForObject(HTTP_STORM_UI + TOPOLOGY_SUMMARY_URL, TopologySummary.class)).thenReturn(new TopologySummary()); TopologyResponse expected = new TopologyResponse(); expected.setErrorMessage(TopologyStatusC...
[FOCAL] @Override public TopologyResponse StormStatusServiceImpl.activateTopology(String name) [CLASS] class StormStatusServiceImpl implements StormStatusService [METRICS] loc=18 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] String getStormUiProperty(); String getTopologyId(String name) [CALLS-E...
/* static context [FOCAL] @Override public TopologyResponse StormStatusServiceImpl.activateTopology(String name) [PATH1] if(id != null)=T -> if("success".equals(result.get("status")))=T -> return topologyResponse [PATH2] if(id != null)=F -> return topologyResponse [PATH3] if(id != null)=T -> if("success".equals(result....
/* static context [FOCAL] @Override public TopologyResponse StormStatusServiceImpl.activateTopology(String name) [PATH1] if(id != null)=T -> if("success".equals(result.get("status")))=T -> return topologyResponse [PATH2] if(id != null)=F -> return topologyResponse [PATH3] if(id != null)=T -> if("success".equals(result....
true
ok
{"focal": {"class": "StormStatusServiceImpl", "name": "activateTopology", "signature": "TopologyResponse activateTopology(String name)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "name", "type": "String"}], "return_type": "TopologyResponse"}, "class_info": {"name": "StormStatusServiceImpl", ...
47613863_6
class CodeCoverageStore { public static void visitProbes(final int classId, final int offset, final boolean[] probes) { // NO_UCD final boolean[] bs = CLASS_HITS.get(classId); bs[CLASS_HIT_INDEX] = true; for (int i = 0; i != probes.length; i++) { if (probes[i]) { bs[i + offset + 1] = ...
final SideEffect2<Integer, boolean[]> se = new SideEffect2<Integer, boolean[]>() { @Override public void apply(final Integer classId, final boolean[] probes) { CodeCoverageStore.visitProbes(classId, 0, probes[0], probes[1], probes[2], probes[3]); } }; assertLineCombin...
[FOCAL] public static void CodeCoverageStore.visitProbes(int classId, int offset, boolean[] probes) [CLASS] class CodeCoverageStore [METRICS] loc=10 cc=3 branches=1 loops=1 returns=0 throws=0 nesting=2 [CALLS-EXTERNAL] CLASS_HITS.get/1 [PATH1] for(i != probes.length)=T -> if(probes[i])=T -> exit loop [PATH2] for(i != p...
/* static context [FOCAL] public static void CodeCoverageStore.visitProbes(int classId, int offset, boolean[] probes) [PATH1] for(i != probes.length)=T -> if(probes[i])=T -> exit loop [PATH2] for(i != probes.length)=F [PATH3] for(i != probes.length)=T -> if(probes[i])=F -> exit loop [INPUTS] branches=probes | result=- ...
/* static context [FOCAL] public static void CodeCoverageStore.visitProbes(int classId, int offset, boolean[] probes) [PATH1] for(i != probes.length)=T -> if(probes[i])=T -> exit loop [PATH2] for(i != probes.length)=F [PATH3] for(i != probes.length)=T -> if(probes[i])=F -> exit loop [INPUTS] branches=probes | result=- ...
true
ok
{"focal": {"class": "CodeCoverageStore", "name": "visitProbes", "signature": "void visitProbes(int classId, int offset, boolean[] probes)", "start_line": 3, "modifiers": "public static", "params": [{"name": "classId", "type": "int"}, {"name": "offset", "type": "int"}, {"name": "probes", "type": "boolean[]"}], "return_t...
47723400_14
class Router { public void resetTo(Screen screen) { if (tryHandleEmptyBackstack(screen)) { return; } resetTo(screen, TransitionDirection.EXIT); } public Router(); public Router(boolean allowEmptyStack); public boolean goBack(); public void goTo(Screen nex...
router = new TestRouter(false); Screen screenA = new ScreenA(); router.resetTo(screenA); assertTrue(router.fromPath.isEmpty()); assertEquals(screenA, router.toPath.get(0)); assertEquals(1, router.routeChangeCount); } }
[FOCAL] public void Router.resetTo(Screen screen) [CLASS] class Router [METRICS] loc=6 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] boolean tryHandleEmptyBackstack(Screen screen); void resetTo(Screen nextScreen, TransitionDirection direction) [PATH1] if(tryHandleEmptyBackstack(screen))=T -> ret...
/* static context [FOCAL] public void Router.resetTo(Screen screen) [PATH1] if(tryHandleEmptyBackstack(screen))=T -> return [PATH2] if(tryHandleEmptyBackstack(screen))=F [INPUTS] branches=screen | result=- [CALLS-INTERNAL] boolean tryHandleEmptyBackstack(Screen screen); void resetTo(Screen nextScreen, TransitionDirecti...
/* static context [FOCAL] public void Router.resetTo(Screen screen) [PATH1] if(tryHandleEmptyBackstack(screen))=T -> return [PATH2] if(tryHandleEmptyBackstack(screen))=F [INPUTS] branches=screen | result=- [CALLS-INTERNAL] boolean tryHandleEmptyBackstack(Screen screen); void resetTo(Screen nextScreen, TransitionDirecti...
true
ok
{"focal": {"class": "Router", "name": "resetTo", "signature": "void resetTo(Screen screen)", "start_line": 3, "modifiers": "public", "params": [{"name": "screen", "type": "Screen"}], "return_type": "void"}, "class_info": {"name": "Router", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "field...
47767967_0
class ApplicationIntrospector { static Class<?> mainClass() { for (Map.Entry<Thread, StackTraceElement[]> stackEntry : Thread.getAllStackTraces().entrySet()) { // thread must be called "main" if ("main".equals(stackEntry.getKey().getName())) { StackTraceElement[] ...
Class<?> mainClass = ApplicationIntrospector.mainClass(); // TODO: until https://github.com/bootique/bootique/issues/52 is available, // we can't make an exact assertion here, as tests can be started from different IDEs, etc. assertNotNull(mainClass); assertNotEquals(Bootique....
[FOCAL] static Class<?> ApplicationIntrospector.mainClass() [CLASS] class ApplicationIntrospector [METRICS] loc=30 cc=5 branches=2 loops=1 returns=4 throws=0 nesting=4 [CALLS-EXTERNAL] Thread.getAllStackTraces().entrySet/0, Thread.getAllStackTraces/0, "main".equals/1, stackEntry.getKey().getName/0, Map.Entry<Thread, St...
/* static context [FOCAL] static Class<?> ApplicationIntrospector.mainClass() [PATH1] foreach(Map.Entry<Thread, StackTraceElement[]> stackEntry : Thread.getAllStackTraces().entrySet())=T -> if("main".equals(stackEntry.getKey().getName()))=T -> if("main".equals(bottom.getMethodName()))=T -> try-body throws -> return Boo...
/* static context [FOCAL] static Class<?> ApplicationIntrospector.mainClass() [PATH1] foreach(Map.Entry<Thread, StackTraceElement[]> stackEntry : Thread.getAllStackTraces().entrySet())=T -> if("main".equals(stackEntry.getKey().getName()))=T -> if("main".equals(bottom.getMethodName()))=T -> try-body throws -> return Boo...
true
ok
{"focal": {"class": "ApplicationIntrospector", "name": "mainClass", "signature": "Class<?> mainClass()", "start_line": 3, "modifiers": "static", "params": [], "return_type": "Class<?>"}, "class_info": {"name": "ApplicationIntrospector", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields":...
47773974_1
class DailyTotalCostConverter { public static List<DailyTotalCost> convertCostsToDailyCosts(List<Cost> costList) { List<DailyTotalCost> result = new ArrayList<>(); if (costList == null || costList.size() == 0) { // return an empty array if we have nothing to convert return...
// init test mCosts = new ArrayList<>(); mCosts.add(new Cost("Transportation", "ZET", TestDateUtil.getDate(2016, Calendar.JANUARY, 4), 100.0)); mCosts.add(new Cost("Transportation", "Description", TestDateUtil.getDate(2016, Calendar.JANUARY, 2), 150.0)); mCosts.add(new Cost("Tr...
[FOCAL] public static List<DailyTotalCost> DailyTotalCostConverter.convertCostsToDailyCosts(List<Cost> costList) [CLASS] class DailyTotalCostConverter [METRICS] loc=55 cc=6 branches=4 loops=1 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] List<Cost>.size/0, costList.get(0).getDate/0, List<Cost>.get/1, Cost.getDate/0, Li...
/* static context [FOCAL] public static List<DailyTotalCost> DailyTotalCostConverter.convertCostsToDailyCosts(List<Cost> costList) [PATH1] if(costList == null || costList.size() == 0)=F -> for(idx < costList.size())=T -> if(idx == 0)=T -> if(idx == costList.size() - 1)=F -> if(!nextCost.getDate().equals(currentDate))=T...
/* static context [FOCAL] public static List<DailyTotalCost> DailyTotalCostConverter.convertCostsToDailyCosts(List<Cost> costList) [PATH1] if(costList == null || costList.size() == 0)=F -> for(idx < costList.size())=T -> if(idx == 0)=T -> if(idx == costList.size() - 1)=F -> if(!nextCost.getDate().equals(currentDate))=T...
true
ok
{"focal": {"class": "DailyTotalCostConverter", "name": "convertCostsToDailyCosts", "signature": "List<DailyTotalCost> convertCostsToDailyCosts(List<Cost> costList)", "start_line": 3, "modifiers": "public static", "params": [{"name": "costList", "type": "List<Cost>"}], "return_type": "List<DailyTotalCost>"}, "class_info...
47790264_0
class ResteasyEmbeddedServletInitializer implements BeanFactoryPostProcessor { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { logger.debug("Post process bean factory has been called"); findJaxrsApplications(beanFactory); // This is ...
Map<String, ServletRegistrationBean> servletRegistrationBeans = applicationContext.getBeansOfType(ServletRegistrationBean.class); Assert.assertNotNull(servletRegistrationBeans); // Although there are 5 sample JAX-RS Application classes, one of them is not annotated with the ApplicationPath anno...
[FOCAL] public void ResteasyEmbeddedServletInitializer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) [CLASS] class ResteasyEmbeddedServletInitializer implements BeanFactoryPostProcessor [METRICS] loc=33 cc=5 branches=3 loops=1 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] GenericBeanDefinition cre...
/* static context [FOCAL] public void ResteasyEmbeddedServletInitializer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) [PATH1] if(allResources.size() == 0)=T -> if(applications.size() == 0)=F -> foreach(Class<? extends Application> applicationClass : applications)=T -> if(path == null)=T -> exit l...
/* static context [FOCAL] public void ResteasyEmbeddedServletInitializer.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) [PATH1] if(allResources.size() == 0)=T -> if(applications.size() == 0)=F -> foreach(Class<? extends Application> applicationClass : applications)=T -> if(path == null)=T -> exit l...
true
ok
{"focal": {"class": "ResteasyEmbeddedServletInitializer", "name": "postProcessBeanFactory", "signature": "void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException", "start_line": 3, "modifiers": "public", "params": [{"name": "beanFactory", "type": "ConfigurableListableBeanFactory"}...
47810463_2
class InstrumentedJobListener implements JobListener { @Override public void onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) { JobMetrics metric = getOrCreateMetrics(jobName); metric.getActiveCounter().inc(); Timer.Context ...
FinishEventSource finishEventSource = new FinishEventSource(); InstrumentedJobListener listener = new InstrumentedJobListener(metricRegistry); listener.onJobStarted("j1", Collections.emptyMap(), finishEventSource); finishEventSource.finish(JobResult.unknown(null)); assertHasMet...
[FOCAL] @Override public void InstrumentedJobListener.onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) [CLASS] class InstrumentedJobListener implements JobListener [METRICS] loc=30 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=1 [CALLS-INTERNAL] JobMetri...
/* static context [FOCAL] @Override public void InstrumentedJobListener.onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) [INPUTS] branches=- | result=- | unused=parameters [COLLABORATORS] param finishEventSource:Consumer<Consumer<JobResult>> accept/1; field r...
/* static context [FOCAL] @Override public void InstrumentedJobListener.onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) [INPUTS] branches=- | result=- | unused=parameters [COLLABORATORS] param finishEventSource:Consumer<Consumer<JobResult>> accept/1; field r...
true
ok
{"focal": {"class": "InstrumentedJobListener", "name": "onJobStarted", "signature": "void onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "jobName", "type": "String"}, {"name": "paramete...
47840491_1
class FootwearIndustryReportParser implements Callable<FootwearIndustryReports> { @Override public FootwearIndustryReports call() throws Exception { final FootwearIndustryReports reports = new FootwearIndustryReports(); final FlatFileItemReader<FootwearIndustryReports> items = FootwearIndustryR...
final FootwearIndustryReportParser parser = new FootwearIndustryReportParser( new ClassPathResource("/" + getClass().getPackage().getName().replace(".", "/") + "/FIR_Y19.csv")); final FootwearIndustryReports reports = parser.call(); Assertions.assertThat(reports.getAvg().isHasVal...
[FOCAL] @Override public FootwearIndustryReports FootwearIndustryReportParser.call() [CLASS] class FootwearIndustryReportParser implements Callable<FootwearIndustryReports> [METRICS] loc=16 cc=3 branches=0 loops=1 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] FootwearIndustryReportParserMapper.newItemReader/2, FlatFile...
/* static context [FOCAL] @Override public FootwearIndustryReports FootwearIndustryReportParser.call() [PATH1] do_while(item != null)=F -> return reports [PATH2] try-body throws [EXCEPTIONS] declares Exception [NEW] FootwearIndustryReports, ExecutionContext [CALLS-EXTERNAL] FootwearIndustryReportParserMapper.newItemRea...
/* static context [FOCAL] @Override public FootwearIndustryReports FootwearIndustryReportParser.call() [PATH1] do_while(item != null)=F -> return reports [PATH2] try-body throws [EXCEPTIONS] declares Exception [NEW] FootwearIndustryReports, ExecutionContext [CALLS-EXTERNAL] FootwearIndustryReportParserMapper.newItemRea...
true
ok
{"focal": {"class": "FootwearIndustryReportParser", "name": "call", "signature": "FootwearIndustryReports call() throws Exception", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "FootwearIndustryReports"}, "class_info": {"name": "FootwearIndustryReportParser", "kind": "class", "modifier...
47873486_28
class IntentHelper { public static <T extends Serializable> T getExtraSerializable(final Intent intent, final String key, final T defaultValue) { //noinspection unchecked final T extra = (T) intent.getSerializableExtra(key); return extra != null ? extra : defaultValue; } private I...
final Serializable serializable = mock(Serializable.class); assertEquals(serializable, IntentHelper.getExtraSerializable(new Intent().putExtra("mySerializableKey", serializable), "mySerializableKey", null)); } }
[FOCAL] public static T IntentHelper.getExtraSerializable(Intent intent, String key, T defaultValue) [CLASS] class IntentHelper [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Intent.getSerializableExtra/1 [INPUTS] branches=- | result=defaultValue, intent, key [COLLABORATORS] param...
/* static context [FOCAL] public static T IntentHelper.getExtraSerializable(Intent intent, String key, T defaultValue) [INPUTS] branches=- | result=defaultValue, intent, key [COLLABORATORS] param intent:Intent getSerializableExtra/1 [CALLS-EXTERNAL] Intent.getSerializableExtra/1 */
/* static context [FOCAL] public static T IntentHelper.getExtraSerializable(Intent intent, String key, T defaultValue) [INPUTS] branches=- | result=defaultValue, intent, key [COLLABORATORS] param intent:Intent getSerializableExtra/1 [CALLS-EXTERNAL] Intent.getSerializableExtra/1 */ class IntentHelper { public stat...
true
ok
{"focal": {"class": "IntentHelper", "name": "getExtraSerializable", "signature": "T getExtraSerializable(Intent intent, String key, T defaultValue)", "start_line": 3, "modifiers": "public static", "params": [{"name": "intent", "type": "Intent"}, {"name": "key", "type": "String"}, {"name": "defaultValue", "type": "T"}],...
47885608_0
class HelloWorldController { @RequestMapping("/") public String sayHello() { return "Hello,World!"; } } class HelloWorldControllerTest { @Test public void testSayHello() {
assertEquals("Hello,World!",new HelloWorldController().sayHello()); } }
[FOCAL] @RequestMapping("/") public String HelloWorldController.sayHello() [CLASS] class HelloWorldController [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [TEST] HelloWorldControllerTest: @Test public void testSayHello()
/* static context [FOCAL] @RequestMapping("/") public String HelloWorldController.sayHello() */
/* static context [FOCAL] @RequestMapping("/") public String HelloWorldController.sayHello() */ class HelloWorldController { @RequestMapping("/") public String sayHello() { return "Hello,World!"; } } class HelloWorldControllerTest { @Test public void testSayHello() {
true
ok
{"focal": {"class": "HelloWorldController", "name": "sayHello", "signature": "String sayHello()", "start_line": 3, "modifiers": "@RequestMapping(\"/\") public", "params": [], "return_type": "String"}, "class_info": {"name": "HelloWorldController", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null...
47892183_0
class RxActions { public static <T> Action1<T> act(final Action1<T> action1, final Action1<T> action2) { return new Action1<T>() { @Override public void call(T t) { action1.call(t); action2.call(t); } }; } public RxAction...
Observable .just(1) .doOnNext(RxActions.act(doAction(sum), doAction(sum), doAction(sum))) .subscribe( RxActions.act(doAction(sum), doAction(sum)), RxActions.act(doError(arrayError), doError(arrayError), ...
[FOCAL] public static Action1<T> RxActions.act(Action1<T> action1, Action1<T> action2) [CLASS] class RxActions [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Action1<T>.call/1 [NEW] Action1<T> [INPUTS] branches=- | result=action1, action2 [COLLABORATORS] param action1:Action1<T> c...
/* static context [FOCAL] public static Action1<T> RxActions.act(Action1<T> action1, Action1<T> action2) [INPUTS] branches=- | result=action1, action2 [COLLABORATORS] param action1:Action1<T> call/1; param action2:Action1<T> call/1 [NEW] Action1<T> [CALLS-EXTERNAL] Action1<T>.call/1 */
/* static context [FOCAL] public static Action1<T> RxActions.act(Action1<T> action1, Action1<T> action2) [INPUTS] branches=- | result=action1, action2 [COLLABORATORS] param action1:Action1<T> call/1; param action2:Action1<T> call/1 [NEW] Action1<T> [CALLS-EXTERNAL] Action1<T>.call/1 */ class RxActions { public sta...
true
ok
{"focal": {"class": "RxActions", "name": "act", "signature": "Action1<T> act(Action1<T> action1, Action1<T> action2)", "start_line": 3, "modifiers": "public static", "params": [{"name": "action1", "type": "Action1<T>"}, {"name": "action2", "type": "Action1<T>"}], "return_type": "Action1<T>"}, "class_info": {"name": "Rx...
47921185_83
class ExternalResources { @SuppressWarnings("ConstantConditions") public static ExternalResources initialize( @NonNull Context context, Url url) { if (null == context) { throw new IllegalArgumentException("Context must not be null."); } if (null == url) { throw new IllegalArgumentExcep...
ExternalResources.singleton = null; assertNotNull(ExternalResources.initialize(null, new DefaultUrl("/"))); } }
[FOCAL] @SuppressWarnings("ConstantConditions") public static ExternalResources ExternalResources.initialize(Context context, Url url) [CLASS] class ExternalResources [METRICS] loc=20 cc=4 branches=3 loops=0 returns=1 throws=3 nesting=2 [CALLS-EXTERNAL] new Builder(context, url).build/0 [NEW] IllegalArgumentException, ...
/* static context [FOCAL] @SuppressWarnings("ConstantConditions") public static ExternalResources ExternalResources.initialize(Context context, Url url) [THROWS-WHEN] IllegalArgumentException when null == context [THROWS-WHEN] IllegalArgumentException when !(null == context) && null == url [THROWS-WHEN] IllegalStateExc...
/* static context [FOCAL] @SuppressWarnings("ConstantConditions") public static ExternalResources ExternalResources.initialize(Context context, Url url) [THROWS-WHEN] IllegalArgumentException when null == context [THROWS-WHEN] IllegalArgumentException when !(null == context) && null == url [THROWS-WHEN] IllegalStateExc...
true
ok
{"focal": {"class": "ExternalResources", "name": "initialize", "signature": "ExternalResources initialize(Context context, Url url)", "start_line": 3, "modifiers": "@SuppressWarnings(\"ConstantConditions\") public static", "params": [{"name": "context", "type": "Context"}, {"name": "url", "type": "Url"}], "return_type"...
47923936_0
class JsonUtils { public static <T> String serialize(T object) { return mGson.toJson(object); } public static T deserialize(String json, Class<T> clz); public static T deserialize(JsonObject json, Class<T> clz); public static T deserialize(String json, Type type); } class JsonUtilsTest {...
assertEquals("{\"name\":\"Lauren\",\"sex\":\"男\"}", JsonUtils.serialize(new User("Lauren", "男"))); } }
[FOCAL] public static String JsonUtils.serialize(T object) [CLASS] class JsonUtils [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] mGson.toJson/1 [INPUTS] branches=- | result=object [COLLABORATORS] field mGson toJson/1 [DATAFLOW] object@param->L2 [CLASS-MEMBERS] T deserialize(Strin...
/* static context [FOCAL] public static String JsonUtils.serialize(T object) [INPUTS] branches=- | result=object [COLLABORATORS] field mGson toJson/1 [CALLS-EXTERNAL] mGson.toJson/1 */
/* static context [FOCAL] public static String JsonUtils.serialize(T object) [INPUTS] branches=- | result=object [COLLABORATORS] field mGson toJson/1 [CALLS-EXTERNAL] mGson.toJson/1 */ class JsonUtils { public static <T> String serialize(T object) { return mGson.toJson(object); } public static T d...
true
ok
{"focal": {"class": "JsonUtils", "name": "serialize", "signature": "String serialize(T object)", "start_line": 3, "modifiers": "public static", "params": [{"name": "object", "type": "T"}], "return_type": "String"}, "class_info": {"name": "JsonUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": n...
48155157_2
class XLog { public static Logger.Builder tag(String tag) { return new Logger.Builder().tag(tag); } private XLog(); public static void init(); public static void init(int logLevel); @Deprecated public static void init(int logLevel, LogConfiguration logConfiguration); public static void init(LogCon...
XLog.i(MESSAGE); assertLog(INFO, DEFAULT_TAG, MESSAGE); logsContainer.clear(); XLog.tag(CUSTOM_TAG).i(MESSAGE); assertLog(INFO, CUSTOM_TAG, MESSAGE); } }
[FOCAL] public static Logger.Builder XLog.tag(String tag) [CLASS] class XLog [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] new Logger.Builder().tag/1 [NEW] Logger.Builder [INPUTS] branches=- | result=tag [DATAFLOW] tag@param->L2 [CLASS-MEMBERS] XLog(); void init(); void init(int ...
/* static context [FOCAL] public static Logger.Builder XLog.tag(String tag) [INPUTS] branches=- | result=tag [NEW] Logger.Builder [CALLS-EXTERNAL] new Logger.Builder().tag/1 */
/* static context [FOCAL] public static Logger.Builder XLog.tag(String tag) [INPUTS] branches=- | result=tag [NEW] Logger.Builder [CALLS-EXTERNAL] new Logger.Builder().tag/1 */ class XLog { public static Logger.Builder tag(String tag) { return new Logger.Builder().tag(tag); } private XLog(); public stat...
true
ok
{"focal": {"class": "XLog", "name": "tag", "signature": "Logger.Builder tag(String tag)", "start_line": 3, "modifiers": "public static", "params": [{"name": "tag", "type": "String"}], "return_type": "Logger.Builder"}, "class_info": {"name": "XLog", "kind": "class", "modifiers": "", "superclass": null, "interfaces": nul...
48183909_30
class CnATreeElementLabelGenerator { public static String getElementTitle(CnATreeElement element) { if (element instanceof Safeguard) { Safeguard safeguard = (Safeguard) element; return createTitleForElementWithSecurityLevel(safeguard.getIdentifier(), safeguard.g...
ItSystem itSystem = new ItSystem(null); itSystem.setPropertyValue(ItSystem.PROP_NAME, "Server 1"); Assert.assertEquals("Server 1", CnATreeElementLabelGenerator.getElementTitle(itSystem)); } }
[FOCAL] public static String CnATreeElementLabelGenerator.getElementTitle(CnATreeElement element) [CLASS] class CnATreeElementLabelGenerator [METRICS] loc=26 cc=7 branches=6 loops=0 returns=4 throws=0 nesting=3 [CALLS-INTERNAL] String createTitleForElementWithSecurityLevel(String identifier, SecurityLevel level, String...
/* static context [FOCAL] public static String CnATreeElementLabelGenerator.getElementTitle(CnATreeElement element) [PATH1] if(element instanceof Safeguard)=F -> if(element instanceof BpRequirement)=F -> if(element instanceof IIdentifiableElement)=F -> if(element instanceof IAbbreviatedElement)=T -> if(!StringUtils.isE...
/* static context [FOCAL] public static String CnATreeElementLabelGenerator.getElementTitle(CnATreeElement element) [PATH1] if(element instanceof Safeguard)=F -> if(element instanceof BpRequirement)=F -> if(element instanceof IIdentifiableElement)=F -> if(element instanceof IAbbreviatedElement)=T -> if(!StringUtils.isE...
true
ok
{"focal": {"class": "CnATreeElementLabelGenerator", "name": "getElementTitle", "signature": "String getElementTitle(CnATreeElement element)", "start_line": 3, "modifiers": "public static", "params": [{"name": "element", "type": "CnATreeElement"}], "return_type": "String"}, "class_info": {"name": "CnATreeElementLabelGen...
48203032_52
class CreateServiceInstanceBindingRequest extends AsyncParameterizedServiceInstanceRequest { public static CreateServiceInstanceBindingRequestBuilder builder() { return new CreateServiceInstanceBindingRequestBuilder(); } public CreateServiceInstanceBindingRequest(); public CreateServiceInstanceBindingRequest(...
CreateServiceInstanceBindingRequest request = CreateServiceInstanceBindingRequest .builder().platformInstanceId("platform-instance-id") .apiInfoLocation("api-info-location") .originatingIdentity(PlatformContext.builder() .platform("sample-platform").build()) .asyncAccepted(true) .serviceDefi...
[FOCAL] public static CreateServiceInstanceBindingRequestBuilder CreateServiceInstanceBindingRequest.builder() [CLASS] class CreateServiceInstanceBindingRequest extends AsyncParameterizedServiceInstanceRequest [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] CreateServiceInstanceBindingRequest...
/* static context [FOCAL] public static CreateServiceInstanceBindingRequestBuilder CreateServiceInstanceBindingRequest.builder() [NEW] CreateServiceInstanceBindingRequestBuilder */
/* static context [FOCAL] public static CreateServiceInstanceBindingRequestBuilder CreateServiceInstanceBindingRequest.builder() [NEW] CreateServiceInstanceBindingRequestBuilder */ class CreateServiceInstanceBindingRequest extends AsyncParameterizedServiceInstanceRequest { public static CreateServiceInstanceBindingRe...
true
ok
{"focal": {"class": "CreateServiceInstanceBindingRequest", "name": "builder", "signature": "CreateServiceInstanceBindingRequestBuilder builder()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "CreateServiceInstanceBindingRequestBuilder"}, "class_info": {"name": "CreateServiceInstanceBindi...
48234412_15
class SingleChoice extends ChoiceBase { public <T> T select(T defaultValue, List<T> options) { return select(defaultValue, options, null); } private SingleChoice(Builder builder); @SafeVarargs public final T select(T defaultValue, T... options); public T select(T defaultValue, List<T> op...
byte[] first = new byte[14]; byte[] second = new byte[47]; byte[] third = new byte[1024]; Arrays.fill(first, (byte)147); Arrays.fill(second, (byte)55); Arrays.fill(third, (byte)14); System.setProperty("clichoice.useDefault", "true"); assertEquals("Must ...
[FOCAL] public T SingleChoice.select(T defaultValue, List<T> options) [CLASS] class SingleChoice extends ChoiceBase [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] T select(T defaultValue, List<T> options, String systemProperty) [INPUTS] branches=- | result=defaultValue, options [D...
/* static context [FOCAL] public T SingleChoice.select(T defaultValue, List<T> options) [INPUTS] branches=- | result=defaultValue, options [CALLS-INTERNAL] T select(T defaultValue, List<T> options, String systemProperty) */
/* static context [FOCAL] public T SingleChoice.select(T defaultValue, List<T> options) [INPUTS] branches=- | result=defaultValue, options [CALLS-INTERNAL] T select(T defaultValue, List<T> options, String systemProperty) */ class SingleChoice extends ChoiceBase { public <T> T select(T defaultValue, List<T> options...
true
ok
{"focal": {"class": "SingleChoice", "name": "select", "signature": "T select(T defaultValue, List<T> options)", "start_line": 3, "modifiers": "public", "params": [{"name": "defaultValue", "type": "T"}, {"name": "options", "type": "List<T>"}], "return_type": "T"}, "class_info": {"name": "SingleChoice", "kind": "class", ...
48260005_6
class EmailIntentBuilder { @NotNull static String fixLineBreaks(String text) { return text.replaceAll("\r\n", "\n").replace('\r', '\n').replaceAll("\n", "\r\n"); } private EmailIntentBuilder(@NotNull Context context); @NotNull public static EmailIntentBuilder from(@NotNull Context contex...
String result = EmailIntentBuilder.fixLineBreaks("line one\r\nline two"); assertThat(result).isEqualTo("line one\r\nline two"); } }
[FOCAL] @NotNull static String EmailIntentBuilder.fixLineBreaks(String text) [CLASS] class EmailIntentBuilder [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] text.replaceAll("\r\n", "\n").replace('\r', '\n').replaceAll/2, text.replaceAll("\r\n", "\n").replace/2, String.replaceAll/2...
/* static context [FOCAL] @NotNull static String EmailIntentBuilder.fixLineBreaks(String text) [INPUTS] branches=- | result=text [CALLS-EXTERNAL] text.replaceAll("\r\n", "\n").replace('\r', '\n').replaceAll/2, text.replaceAll("\r\n", "\n").replace/2, String.replaceAll/2 */
/* static context [FOCAL] @NotNull static String EmailIntentBuilder.fixLineBreaks(String text) [INPUTS] branches=- | result=text [CALLS-EXTERNAL] text.replaceAll("\r\n", "\n").replace('\r', '\n').replaceAll/2, text.replaceAll("\r\n", "\n").replace/2, String.replaceAll/2 */ class EmailIntentBuilder { @NotNull s...
true
ok
{"focal": {"class": "EmailIntentBuilder", "name": "fixLineBreaks", "signature": "String fixLineBreaks(String text)", "start_line": 3, "modifiers": "@NotNull static", "params": [{"name": "text", "type": "String"}], "return_type": "String"}, "class_info": {"name": "EmailIntentBuilder", "kind": "class", "modifiers": "", "...
48295629_35
class BinaryAdapters { public static BinaryInject injectionCarrier(ByteBuffer buffer) { return new BinaryInjectAdapter(buffer); } private BinaryAdapters(); public static BinaryExtract extractionCarrier(ByteBuffer buffer); } class BinaryAdaptersTest { @Test public void testInjectBi...
ByteBuffer buffer = ByteBuffer.allocate(1); BinaryInject binary = BinaryAdapters.injectionCarrier(buffer); assertEquals(buffer, binary.injectionBuffer(1)); assertEquals(0, buffer.position()); } }
[FOCAL] public static BinaryInject BinaryAdapters.injectionCarrier(ByteBuffer buffer) [CLASS] class BinaryAdapters [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] BinaryInjectAdapter [INPUTS] branches=- | result=buffer [DATAFLOW] buffer@param->L2 [CLASS-MEMBERS] BinaryAdapters(); BinaryExtrac...
/* static context [FOCAL] public static BinaryInject BinaryAdapters.injectionCarrier(ByteBuffer buffer) [INPUTS] branches=- | result=buffer [NEW] BinaryInjectAdapter */
/* static context [FOCAL] public static BinaryInject BinaryAdapters.injectionCarrier(ByteBuffer buffer) [INPUTS] branches=- | result=buffer [NEW] BinaryInjectAdapter */ class BinaryAdapters { public static BinaryInject injectionCarrier(ByteBuffer buffer) { return new BinaryInjectAdapter(buffer); } ...
true
ok
{"focal": {"class": "BinaryAdapters", "name": "injectionCarrier", "signature": "BinaryInject injectionCarrier(ByteBuffer buffer)", "start_line": 3, "modifiers": "public static", "params": [{"name": "buffer", "type": "ByteBuffer"}], "return_type": "BinaryInject"}, "class_info": {"name": "BinaryAdapters", "kind": "class"...
48305884_0
class ColumnMapProcessor extends AbstractMarkLogicItemProcessor<Map<String, Object>> { public void setRootLocalName(String rootName) { this.rootLocalName = rootName; } public ColumnMapProcessor(ColumnMapSerializer columnMapSerializer); public ColumnMapProcessor(ColumnMapSerializer columnMapS...
ColumnMapProcessor columnMapProcessor = new ColumnMapProcessor(new DefaultStaxColumnMapSerializer()); columnMapProcessor.setRootLocalName("test"); Map<String, Object> map = new HashMap<String, Object>(); map.put("sample", "value"); DocumentWriteOperation handle = columnMapProce...
[FOCAL] public void ColumnMapProcessor.setRootLocalName(String rootName) [CLASS] class ColumnMapProcessor extends AbstractMarkLogicItemProcessor<Map<String, Object>> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [FIELDS] write=rootLocalName [STATE] rootLocalName [DATAFLOW] rootName@param->L2 [CLA...
/* static context [FOCAL] public void ColumnMapProcessor.setRootLocalName(String rootName) [STATE] rootLocalName [FIELDS] write=rootLocalName */
/* static context [FOCAL] public void ColumnMapProcessor.setRootLocalName(String rootName) [STATE] rootLocalName [FIELDS] write=rootLocalName */ class ColumnMapProcessor extends AbstractMarkLogicItemProcessor<Map<String, Object>> { public void setRootLocalName(String rootName) { this.rootLocalName = rootNa...
true
ok
{"focal": {"class": "ColumnMapProcessor", "name": "setRootLocalName", "signature": "void setRootLocalName(String rootName)", "start_line": 3, "modifiers": "public", "params": [{"name": "rootName", "type": "String"}], "return_type": "void"}, "class_info": {"name": "ColumnMapProcessor", "kind": "class", "modifiers": "", ...
48360594_494
class TextPatternUtil { public static char[] replacePatternCharacter(Integer codePointToReplace, Random random) { for (CharPattern charPattern : CharPattern.values()) { if (charPattern.getReplaceChar().charValue() == codePointToReplace) { int length = charPattern.getCodePointSiz...
Random random = new Random(569888); char n = 'C'; int input = Integer.valueOf(n); Integer codePoint = "嬶".codePointAt(0); char[] replaceCharacter = TextPatternUtil.replacePatternCharacter(input, random); Assert.assertEquals(codePoint.intValue(), new String(replaceCharacte...
[FOCAL] public static char[] TextPatternUtil.replacePatternCharacter(Integer codePointToReplace, Random random) [CLASS] class TextPatternUtil [METRICS] loc=10 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] CharPattern.values/0, charPattern.getReplaceChar().charValue/0, CharPattern.getReplaceChar/...
/* static context [FOCAL] public static char[] TextPatternUtil.replacePatternCharacter(Integer codePointToReplace, Random random) [PATH1] foreach(CharPattern charPattern : CharPattern.values())=T -> if(charPattern.getReplaceChar().charValue() == codePointToReplace)=F -> exit loop -> return Character.toChars(codePointTo...
/* static context [FOCAL] public static char[] TextPatternUtil.replacePatternCharacter(Integer codePointToReplace, Random random) [PATH1] foreach(CharPattern charPattern : CharPattern.values())=T -> if(charPattern.getReplaceChar().charValue() == codePointToReplace)=F -> exit loop -> return Character.toChars(codePointTo...
true
ok
{"focal": {"class": "TextPatternUtil", "name": "replacePatternCharacter", "signature": "char[] replacePatternCharacter(Integer codePointToReplace, Random random)", "start_line": 3, "modifiers": "public static", "params": [{"name": "codePointToReplace", "type": "Integer"}, {"name": "random", "type": "Random"}], "return_...
48363025_0
class UserEventController { @RequestMapping(value = "/createdEvent", method = RequestMethod.POST) public ResponseEntity<String> publishCreatedEvent(@RequestBody(required = true) UserCreatedEvent userCreatedEvent, HttpServletResponse response) { log.debug("Adding User [{}] '{}'", us...
// Arrange userEventController.commandGateway = gateway; //cheating a bit here, but mocking all the axon framework's beans is a pain. when(gateway.sendAndWait(any())).thenReturn(null); UserCreatedEvent userCreatedEvent = new UserCreatedEvent(); userCreatedEvent.setId(1L); ...
[FOCAL] @RequestMapping(value = "/createdEvent", method = RequestMethod.POST) public ResponseEntity<String> UserEventController.publishCreatedEvent(UserCreatedEvent userCreatedEvent, HttpServletResponse response) [CLASS] class UserEventController [METRICS] loc=12 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CA...
/* static context [FOCAL] @RequestMapping(value = "/createdEvent", method = RequestMethod.POST) public ResponseEntity<String> UserEventController.publishCreatedEvent(UserCreatedEvent userCreatedEvent, HttpServletResponse response) [COLLABORATORS] param userCreatedEvent:UserCreatedEvent getId/0,getEmail/0,getFirstName/0...
/* static context [FOCAL] @RequestMapping(value = "/createdEvent", method = RequestMethod.POST) public ResponseEntity<String> UserEventController.publishCreatedEvent(UserCreatedEvent userCreatedEvent, HttpServletResponse response) [COLLABORATORS] param userCreatedEvent:UserCreatedEvent getId/0,getEmail/0,getFirstName/0...
true
ok
{"focal": {"class": "UserEventController", "name": "publishCreatedEvent", "signature": "ResponseEntity<String> publishCreatedEvent(UserCreatedEvent userCreatedEvent, HttpServletResponse response)", "start_line": 3, "modifiers": "@RequestMapping(value = \"/createdEvent\", method = RequestMethod.POST) public", "params": ...
48401967_4
class ComponentGrid extends Grid { public FocusPreserveExtension getFocusPreserveExtension() { return componentGridDecorator.getFocusPreserveExtension(); } public ComponentGrid(Class<T> typeOfRows); public ComponentGridDecorator<T> getComponentGridDecorator(); public ComponentGrid<T> rem...
ComponentGrid grid = createTestGrid(); FocusPreserveExtension focusPreserveExtension = (FocusPreserveExtension) extractExtension(grid, FocusPreserveExtension.class); assertThat(focusPreserveExtension, is(sameInstance(grid.getFocusPreserveExtension()))); } }
[FOCAL] public FocusPreserveExtension ComponentGrid.getFocusPreserveExtension() [CLASS] class ComponentGrid extends Grid [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] componentGridDecorator.getFocusPreserveExtension/0 [COLLABORATORS] field componentGridDecorator getFocusPreserveE...
/* static context [FOCAL] public FocusPreserveExtension ComponentGrid.getFocusPreserveExtension() [COLLABORATORS] field componentGridDecorator getFocusPreserveExtension/0 [CALLS-EXTERNAL] componentGridDecorator.getFocusPreserveExtension/0 */
/* static context [FOCAL] public FocusPreserveExtension ComponentGrid.getFocusPreserveExtension() [COLLABORATORS] field componentGridDecorator getFocusPreserveExtension/0 [CALLS-EXTERNAL] componentGridDecorator.getFocusPreserveExtension/0 */ class ComponentGrid extends Grid { public FocusPreserveExtension getFocus...
true
ok
{"focal": {"class": "ComponentGrid", "name": "getFocusPreserveExtension", "signature": "FocusPreserveExtension getFocusPreserveExtension()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "FocusPreserveExtension"}, "class_info": {"name": "ComponentGrid", "kind": "class", "modifiers": "", "supercla...