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 |
|---|---|---|---|---|---|---|---|---|
105357633_1 | class RootResource {
@GET
@PermitAll
public APIRootResponse get(@Context SecurityContext context) {
final Map<String, APIRestLink> links = new HashMap<>();
links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT)));
return new APIRootResponse(links);
}
}
class RootRe... | final RootResource resource = new RootResource();
final APIRootResponse response = resource.get(TestHelpers.generateSecureSecurityContext());
assertHasKeyWithValue(
response.getLinks(),
"v1",
Constants.HTTP_V1_ROOT);
}
} | [FOCAL] @GET @PermitAll public APIRootResponse RootResource.get(SecurityContext context)
[CLASS] class RootResource
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Map<String, APIRestLink>.put/2, URI.create/1
[NEW] HashMap<>, APIRestLink, APIRootResponse
[INPUTS] branches=- | resul... | /* static context
[FOCAL] @GET @PermitAll public APIRootResponse RootResource.get(SecurityContext context)
[INPUTS] branches=- | result=- | unused=context
[NEW] HashMap<>, APIRestLink, APIRootResponse
[CALLS-EXTERNAL] Map<String, APIRestLink>.put/2, URI.create/1
*/
| /* static context
[FOCAL] @GET @PermitAll public APIRootResponse RootResource.get(SecurityContext context)
[INPUTS] branches=- | result=- | unused=context
[NEW] HashMap<>, APIRestLink, APIRootResponse
[CALLS-EXTERNAL] Map<String, APIRestLink>.put/2, URI.create/1
*/
class RootResource {
@GET
@PermitAll
publ... | true | ok | {"focal": {"class": "RootResource", "name": "get", "signature": "APIRootResponse get(SecurityContext context)", "start_line": 3, "modifiers": "@GET @PermitAll public", "params": [{"name": "context", "type": "SecurityContext"}], "return_type": "APIRootResponse"}, "class_info": {"name": "RootResource", "kind": "class", "... |
105537880_0 | class MyFirstActor extends AbstractActor {
static public Props props() {
return Props.create(MyFirstActor.class, () -> new MyFirstActor());
}
@Override public Receive createReceive();
static ActorSystem actorSystem;
static final String HELLO_WORLD;
}
class MyFirstActorTest {
static... | final TestKit probe = new TestKit(actorSystem);
final ActorRef myFirstActor = actorSystem.actorOf(MyFirstActor.props());
myFirstActor.tell(new Greeting(HELLO_WORLD), probe.getRef());
final Greeting greeting = probe.expectMsgClass(Greeting.class);
assertEquals(HELLO_WORLD, greetin... | [FOCAL] static public Props MyFirstActor.props()
[CLASS] class MyFirstActor extends AbstractActor
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Props.create/2
[NEW] MyFirstActor
[CLASS-MEMBERS] Receive createReceive()
[TEST] MyFirstActorTest: @Test public void testMyFirstActor_Gr... | /* static context
[FOCAL] static public Props MyFirstActor.props()
[NEW] MyFirstActor
[CALLS-EXTERNAL] Props.create/2
*/
| /* static context
[FOCAL] static public Props MyFirstActor.props()
[NEW] MyFirstActor
[CALLS-EXTERNAL] Props.create/2
*/
class MyFirstActor extends AbstractActor {
static public Props props() {
return Props.create(MyFirstActor.class, () -> new MyFirstActor());
}
@Override public Receive createRece... | true | ok | {"focal": {"class": "MyFirstActor", "name": "props", "signature": "Props props()", "start_line": 3, "modifiers": "static public", "params": [], "return_type": "Props"}, "class_info": {"name": "MyFirstActor", "kind": "class", "modifiers": "", "superclass": "AbstractActor", "interfaces": null, "fields": [{"name": "actorS... |
105551486_0 | class Calculator implements ICalculator {
@Override
public String add(int... values) {
int sum = 0;
for (int value : values) {
sum += value;
}
return format(sum);
}
private String format(int value);
@Override public String multiply(int... values);
@O... | assertEquals("3", mCalculator.evaluate(Matchers.anyString()));
final String result = mCalculator.add(1,2);
assertEquals("3", result);
when(mCalculator.evaluate(Matchers.anyString())).thenReturn("5");
assertEquals("5", mCalculator.evaluate(Matchers.anyString()));
}
} | [FOCAL] @Override public String Calculator.add(int... values)
[CLASS] class Calculator implements ICalculator
[METRICS] loc=8 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] String format(int value)
[PATH1] foreach(int value : values)=T -> exit loop -> return format(sum)
[PATH2] foreach(int value ... | /* static context
[FOCAL] @Override public String Calculator.add(int... values)
[PATH1] foreach(int value : values)=T -> exit loop -> return format(sum)
[PATH2] foreach(int value : values)=F -> return format(sum)
[INPUTS] branches=values | result=values
[CALLS-INTERNAL] String format(int value)
*/
| /* static context
[FOCAL] @Override public String Calculator.add(int... values)
[PATH1] foreach(int value : values)=T -> exit loop -> return format(sum)
[PATH2] foreach(int value : values)=F -> return format(sum)
[INPUTS] branches=values | result=values
[CALLS-INTERNAL] String format(int value)
*/
class Calculator impl... | true | ok | {"focal": {"class": "Calculator", "name": "add", "signature": "String add(int... values)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "values", "type": "int..."}], "return_type": "String"}, "class_info": {"name": "Calculator", "kind": "class", "modifiers": "", "superclass": null, "interfaces"... |
105563335_413 | class OpenApiConnectorGenerator extends ConnectorGenerator {
@Override
protected final String determineConnectorName(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) {
final OpenApiModelInfo modelInfo = parseSpecification(connectorSettings, APIValidationContext.NONE... | final Oas20Document openApiDoc = new Oas20Document();
assertThat(generator.determineConnectorName(ApiConnectorTemplate.SWAGGER_TEMPLATE, createSettingsFrom(openApiDoc))).isEqualTo("unspecified");
final Oas20Info info = (Oas20Info) openApiDoc.createInfo();
openApiDoc.info = info;
... | [FOCAL] @Override protected final String OpenApiConnectorGenerator.determineConnectorName(ConnectorTemplate connectorTemplate, ConnectorSettings connectorSettings)
[CLASS] class OpenApiConnectorGenerator extends ConnectorGenerator
[METRICS] loc=21 cc=4 branches=3 loops=0 returns=3 throws=1 nesting=1
[CALLS-INTERNAL] Op... | /* static context
[FOCAL] @Override protected final String OpenApiConnectorGenerator.determineConnectorName(ConnectorTemplate connectorTemplate, ConnectorSettings connectorSettings)
[THROWS-WHEN] IllegalArgumentException when !modelInfo.getErrors().isEmpty()
[PATH1] if(!modelInfo.getErrors().isEmpty())=F -> if(info == ... | /* static context
[FOCAL] @Override protected final String OpenApiConnectorGenerator.determineConnectorName(ConnectorTemplate connectorTemplate, ConnectorSettings connectorSettings)
[THROWS-WHEN] IllegalArgumentException when !modelInfo.getErrors().isEmpty()
[PATH1] if(!modelInfo.getErrors().isEmpty())=F -> if(info == ... | true | ok | {"focal": {"class": "OpenApiConnectorGenerator", "name": "determineConnectorName", "signature": "String determineConnectorName(ConnectorTemplate connectorTemplate, ConnectorSettings connectorSettings)", "start_line": 3, "modifiers": "@Override protected final", "params": [{"name": "connectorTemplate", "type": "Connecto... |
105571183_39 | class Empty extends ERE {
@Override
public ERE derive(Symbol s) {
return empty;
}
private Empty();
static public Empty get();
@Override public EREType getEREType();
@Override public boolean equals(Object o);
@Override public int compareTo(Object o);
@Override public ERE c... | ERE derived = empty.derive(Symbol.get("test"));
assertEquals(empty, derived);
}
} | [FOCAL] @Override public ERE Empty.derive(Symbol s)
[CLASS] class Empty extends ERE
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[FIELDS] read=empty:Empty
[INPUTS] branches=- | result=empty | unused=s
[DATAFLOW] this.empty@param->L3
[CLASS-MEMBERS] Empty(); Empty get(); EREType getEREType(); boo... | /* static context
[FOCAL] @Override public ERE Empty.derive(Symbol s)
[INPUTS] branches=- | result=empty | unused=s
[FIELDS] read=empty:Empty
*/
| /* static context
[FOCAL] @Override public ERE Empty.derive(Symbol s)
[INPUTS] branches=- | result=empty | unused=s
[FIELDS] read=empty:Empty
*/
class Empty extends ERE {
@Override
public ERE derive(Symbol s) {
return empty;
}
private Empty();
static public Empty get();
@Override pub... | true | ok | {"focal": {"class": "Empty", "name": "derive", "signature": "ERE derive(Symbol s)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "s", "type": "Symbol"}], "return_type": "ERE"}, "class_info": {"name": "Empty", "kind": "class", "modifiers": "", "superclass": "ERE", "interfaces": null, "fields": [... |
105585951_4 | class Url62 {
static UUID decode(String id) {
BigInteger decoded = Base62.decode(id);
return UuidConverter.toUuid(decoded);
}
static String encode(UUID uuid);
}
class Url62Test {
@Test
public void shouldExplodeWhenContainsIllegalCharacters() {
| assertThatThrownBy(() -> Url62.decode("Foo Bar"))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("contains illegal characters");
}
} | [FOCAL] static UUID Url62.decode(String id)
[CLASS] class Url62
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Base62.decode/1, UuidConverter.toUuid/1
[INPUTS] branches=- | result=id
[DATAFLOW] decoded@L2->L3; id@param->L2
[CLASS-MEMBERS] String encode(UUID uuid)
[TEST] Url62Test:... | /* static context
[FOCAL] static UUID Url62.decode(String id)
[INPUTS] branches=- | result=id
[CALLS-EXTERNAL] Base62.decode/1, UuidConverter.toUuid/1
*/
| /* static context
[FOCAL] static UUID Url62.decode(String id)
[INPUTS] branches=- | result=id
[CALLS-EXTERNAL] Base62.decode/1, UuidConverter.toUuid/1
*/
class Url62 {
static UUID decode(String id) {
BigInteger decoded = Base62.decode(id);
return UuidConverter.toUuid(decoded);
}
static String encode(UUID uuid)... | true | ok | {"focal": {"class": "Url62", "name": "decode", "signature": "UUID decode(String id)", "start_line": 3, "modifiers": "static", "params": [{"name": "id", "type": "String"}], "return_type": "UUID"}, "class_info": {"name": "Url62", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "mem... |
105662144_0 | class StringUtils {
public static String getPreview(String text, int linesCount, boolean ignoreEmptyLines, Integer maxLength) {
if (maxLength != null && maxLength < 0) {
throw new IllegalArgumentException("maxLength can't be negative");
}
if (text == null) {
return ... | String text = getResourceText("Script.groovy");
String preview = StringUtils.getPreview(text, 2, true, Integer.MAX_VALUE);
assertEquals("package com.icthh.xm.lep.script\\n\\ndef description = \"'Logic Extension Point 2017'\"", preview);
preview = StringUtils.getPreview(text, 2, false, I... | [FOCAL] public static String StringUtils.getPreview(String text, int linesCount, boolean ignoreEmptyLines, Integer maxLength)
[CLASS] class StringUtils
[METRICS] loc=16 cc=4 branches=3 loops=0 returns=3 throws=1 nesting=1
[CALLS-INTERNAL] String getPreview(int linesCount, boolean ignoreEmptyLines, Integer maxLength, Sc... | /* static context
[FOCAL] public static String StringUtils.getPreview(String text, int linesCount, boolean ignoreEmptyLines, Integer maxLength)
[THROWS-WHEN] IllegalArgumentException when maxLength != null && maxLength < 0
[PATH1] if(maxLength != null && maxLength < 0)=F -> if(text == null)=F -> if(text.isEmpty() || li... | /* static context
[FOCAL] public static String StringUtils.getPreview(String text, int linesCount, boolean ignoreEmptyLines, Integer maxLength)
[THROWS-WHEN] IllegalArgumentException when maxLength != null && maxLength < 0
[PATH1] if(maxLength != null && maxLength < 0)=F -> if(text == null)=F -> if(text.isEmpty() || li... | true | ok | {"focal": {"class": "StringUtils", "name": "getPreview", "signature": "String getPreview(String text, int linesCount, boolean ignoreEmptyLines, Integer maxLength)", "start_line": 3, "modifiers": "public static", "params": [{"name": "text", "type": "String"}, {"name": "linesCount", "type": "int"}, {"name": "ignoreEmptyL... |
105692222_4 | class Siteswap implements Comparable<Siteswap>, Iterable<Byte>, Serializable {
public static Siteswap mergeCompatible(Siteswap s1, Siteswap s2) {
Siteswap i1 = s1.toInterface().toPattern();
Siteswap i2 = s2.toInterface().toPattern();
if (!s2.rotateToInterface(i1)) {
return null;
}
int length = 2 * s1.per... | Siteswap s1 = new Siteswap("86277");
Siteswap s2 = new Siteswap("6787a");
Siteswap merged = Siteswap.mergeCompatible(s1, s2);
assertEquals(merged, null);
}
} | [FOCAL] public static Siteswap Siteswap.mergeCompatible(Siteswap s1, Siteswap s2)
[CLASS] class Siteswap implements Comparable<Siteswap>, Iterable<Byte>, Serializable
[METRICS] loc=20 cc=4 branches=2 loops=1 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] s1.toInterface().toPattern/0, Siteswap.toInterface/0, s2.toInterfa... | /* static context
[FOCAL] public static Siteswap Siteswap.mergeCompatible(Siteswap s1, Siteswap s2)
[PATH1] if(!s2.rotateToInterface(i1))=F -> for(i < s1.period_length())=T -> exit loop -> if(!mergedSiteswap.isValid())=T -> return null
[PATH2] if(!s2.rotateToInterface(i1))=F -> for(i < s1.period_length())=F -> if(!merg... | /* static context
[FOCAL] public static Siteswap Siteswap.mergeCompatible(Siteswap s1, Siteswap s2)
[PATH1] if(!s2.rotateToInterface(i1))=F -> for(i < s1.period_length())=T -> exit loop -> if(!mergedSiteswap.isValid())=T -> return null
[PATH2] if(!s2.rotateToInterface(i1))=F -> for(i < s1.period_length())=F -> if(!merg... | true | ok | {"focal": {"class": "Siteswap", "name": "mergeCompatible", "signature": "Siteswap mergeCompatible(Siteswap s1, Siteswap s2)", "start_line": 3, "modifiers": "public static", "params": [{"name": "s1", "type": "Siteswap"}, {"name": "s2", "type": "Siteswap"}], "return_type": "Siteswap"}, "class_info": {"name": "Siteswap", ... |
105770301_1 | class ExecShellScriptWorkItemHandler extends AbstractLogOrThrowWorkItemHandler {
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
try {
RequiredParameterValidator.validate(this.getClass(), workItem);
String shellScriptLocation = (String) workItem.getParame... | TestWorkItemManager manager = new TestWorkItemManager();
WorkItemImpl workItem = new WorkItemImpl();
workItem.setParameter("ShellScriptLocation", "src/test/resources/TestScript.sh");
workItem.setParameter("TimeoutInMillis", "10");
ExecShellScriptWorkItemHandler handler = new Exec... | [FOCAL] public void ExecShellScriptWorkItemHandler.executeWorkItem(WorkItem workItem, WorkItemManager manager)
[CLASS] class ExecShellScriptWorkItemHandler extends AbstractLogOrThrowWorkItemHandler
[METRICS] loc=74 cc=12 branches=4 loops=1 returns=0 throws=1 nesting=3
[CALLS-EXTERNAL] RequiredParameterValidator.validat... | /* static context
[FOCAL] public void ExecShellScriptWorkItemHandler.executeWorkItem(WorkItem workItem, WorkItemManager manager)
[THROWS-WHEN] IOException when tout != null && null != addEnvironmentVariables && !addEnvironmentVariables.isEmpty() && null != removeEnvironmentVariables && !removeEnvironmentVariables.isEmp... | /* static context
[FOCAL] public void ExecShellScriptWorkItemHandler.executeWorkItem(WorkItem workItem, WorkItemManager manager)
[THROWS-WHEN] IOException when tout != null && null != addEnvironmentVariables && !addEnvironmentVariables.isEmpty() && null != removeEnvironmentVariables && !removeEnvironmentVariables.isEmp... | true | ok | {"focal": {"class": "ExecShellScriptWorkItemHandler", "name": "executeWorkItem", "signature": "void executeWorkItem(WorkItem workItem, WorkItemManager manager)", "start_line": 3, "modifiers": "public", "params": [{"name": "workItem", "type": "WorkItem"}, {"name": "manager", "type": "WorkItemManager"}], "return_type": "... |
105789039_1 | class DiffMutationFilterFactory implements MutationInterceptorFactory {
@Override
public MutationInterceptor createInterceptor(InterceptorParameters params) {
Optional<String> path = params.getString(fileParameter);
return new DiffMutationFilter(DiffInfo.fromFile(path.orElse(defaultPath)));
... | DiffMutationFilterFactory diffMutationFilterFactory = new DiffMutationFilterFactory();
MutationInterceptor diffMutationFilter = diffMutationFilterFactory
.createInterceptor(makeFor("file", "LICENSE"));
assertEquals(InterceptorType.FILTER, diffMutationFilter.type());
}
} | [FOCAL] @Override public MutationInterceptor DiffMutationFilterFactory.createInterceptor(InterceptorParameters params)
[CLASS] class DiffMutationFilterFactory implements MutationInterceptorFactory
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] InterceptorParameters.getString/1, Di... | /* static context
[FOCAL] @Override public MutationInterceptor DiffMutationFilterFactory.createInterceptor(InterceptorParameters params)
[INPUTS] branches=- | result=params
[COLLABORATORS] param params:InterceptorParameters getString/1
[NEW] DiffMutationFilter
[CALLS-EXTERNAL] InterceptorParameters.getString/1, DiffInf... | /* static context
[FOCAL] @Override public MutationInterceptor DiffMutationFilterFactory.createInterceptor(InterceptorParameters params)
[INPUTS] branches=- | result=params
[COLLABORATORS] param params:InterceptorParameters getString/1
[NEW] DiffMutationFilter
[CALLS-EXTERNAL] InterceptorParameters.getString/1, DiffInf... | true | ok | {"focal": {"class": "DiffMutationFilterFactory", "name": "createInterceptor", "signature": "MutationInterceptor createInterceptor(InterceptorParameters params)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "params", "type": "InterceptorParameters"}], "return_type": "MutationInterceptor"}, "cla... |
105940648_2 | class ClusterStatus {
public static boolean isZookeeperReady(String zkConnectString, int timeoutMs) {
log.debug("Check if Zookeeper is ready: {} ", zkConnectString);
ZooKeeper zookeeper = null;
try {
CountDownLatch waitForConnection = new CountDownLatch(1);
boolean isSaslEnabled = false;
... | assertThat(
ClusterStatus.isZookeeperReady(this.kafka.getZookeeperConnectString(), 10000))
.isTrue();
}
} | [FOCAL] public static boolean ClusterStatus.isZookeeperReady(String zkConnectString, int timeoutMs)
[CLASS] class ClusterStatus
[METRICS] loc=54 cc=7 branches=4 loops=0 returns=4 throws=0 nesting=3
[CALLS-EXTERNAL] log.debug/2, System.getProperty/2, log.info/2, System.getProperty/1, CountDownLatch.await/2, log.error/2,... | /* static context
[FOCAL] public static boolean ClusterStatus.isZookeeperReady(String zkConnectString, int timeoutMs)
[PATH1] if(System.getProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG, null) != null)=T -> if(timedOut)=F -> if(!connectionWatcher.isSuccessful())=T -> return false -> if(zookeeper != null)=T -> try-body throws... | /* static context
[FOCAL] public static boolean ClusterStatus.isZookeeperReady(String zkConnectString, int timeoutMs)
[PATH1] if(System.getProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG, null) != null)=T -> if(timedOut)=F -> if(!connectionWatcher.isSuccessful())=T -> return false -> if(zookeeper != null)=T -> try-body throws... | true | ok | {"focal": {"class": "ClusterStatus", "name": "isZookeeperReady", "signature": "boolean isZookeeperReady(String zkConnectString, int timeoutMs)", "start_line": 3, "modifiers": "public static", "params": [{"name": "zkConnectString", "type": "String"}, {"name": "timeoutMs", "type": "int"}], "return_type": "boolean"}, "cla... |
105987593_7 | class LotteryMachine {
List<String> draw(List<String> emails) {
System.out.println("Draw for the seed: " + getSeed());
Random rnd = new Random(getSeed());
Set<String> winners = new HashSet<>();
while (winners.size() < Math.min(winnersCount, emails.size())) {
int index = ... | LotteryMachine machine = new LotteryMachine(2);
List<String> result = machine.draw(Collections.singletonList("test"));
Assert.assertEquals(1, result.size());
}
} | [FOCAL] List<String> LotteryMachine.draw(List<String> emails)
[CLASS] class LotteryMachine
[METRICS] loc=11 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] long getSeed()
[CALLS-EXTERNAL] System.out.println/1, Set<String>.size/0, Math.min/2, List<String>.size/0, Random.nextInt/1, Set<String>.add/1... | /* static context
[FOCAL] List<String> LotteryMachine.draw(List<String> emails)
[PATH1] while(winners.size() < Math.min(winnersCount, emails.size()))=T -> exit loop -> return new ArrayList<>(winners)
[PATH2] while(winners.size() < Math.min(winnersCount, emails.size()))=F -> return new ArrayList<>(winners)
[INPUTS] bran... | /* static context
[FOCAL] List<String> LotteryMachine.draw(List<String> emails)
[PATH1] while(winners.size() < Math.min(winnersCount, emails.size()))=T -> exit loop -> return new ArrayList<>(winners)
[PATH2] while(winners.size() < Math.min(winnersCount, emails.size()))=F -> return new ArrayList<>(winners)
[INPUTS] bran... | true | ok | {"focal": {"class": "LotteryMachine", "name": "draw", "signature": "List<String> draw(List<String> emails)", "start_line": 3, "modifiers": "", "params": [{"name": "emails", "type": "List<String>"}], "return_type": "List<String>"}, "class_info": {"name": "LotteryMachine", "kind": "class", "modifiers": "", "superclass": ... |
106015269_215 | class JmsPoolJMSContext implements JMSContext, AutoCloseable {
@Override
public TemporaryTopic createTemporaryTopic() {
try {
return getSession().createTemporaryTopic();
} catch (JMSException jmse) {
throw JMSExceptionSupport.createRuntimeException(jmse);
}
}... | JMSContext context = cf.createContext();
assertNotNull(context.createTemporaryTopic());
context.close();
try {
context.createTemporaryTopic();
fail("Should not be able to create resource when context is closed");
} catch (IllegalStateRuntimeException isre... | [FOCAL] @Override public TemporaryTopic JmsPoolJMSContext.createTemporaryTopic()
[CLASS] class JmsPoolJMSContext implements JMSContext, AutoCloseable
[METRICS] loc=8 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] JmsPoolSession getSession()
[CALLS-EXTERNAL] getSession().createTemporaryTopic/0, JM... | /* static context
[FOCAL] @Override public TemporaryTopic JmsPoolJMSContext.createTemporaryTopic()
[THROWS-WHEN] JMSExceptionSupport.createRuntimeException(jmse) when try-body throws
[PATH1] try-body throws -> throw JMSExceptionSupport.createRuntimeException(jmse)
[PATH2] return getSession().createTemporaryTopic()
[EXC... | /* static context
[FOCAL] @Override public TemporaryTopic JmsPoolJMSContext.createTemporaryTopic()
[THROWS-WHEN] JMSExceptionSupport.createRuntimeException(jmse) when try-body throws
[PATH1] try-body throws -> throw JMSExceptionSupport.createRuntimeException(jmse)
[PATH2] return getSession().createTemporaryTopic()
[EXC... | true | ok | {"focal": {"class": "JmsPoolJMSContext", "name": "createTemporaryTopic", "signature": "TemporaryTopic createTemporaryTopic()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "TemporaryTopic"}, "class_info": {"name": "JmsPoolJMSContext", "kind": "class", "modifiers": "", "superclass": nul... |
106220562_1 | class LambdaServer implements HttpServer {
@Override
public ReadStream<HttpServerRequest> requestStream() {
return null;
}
public LambdaServer(Vertx vertx, Context context, InputStream input, OutputStream output);
@Override public boolean isMetricsEnabled();
@Override public HttpServ... | context.assertNull(server.requestStream());
}
} | [FOCAL] @Override public ReadStream<HttpServerRequest> LambdaServer.requestStream()
[CLASS] class LambdaServer implements HttpServer
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] LambdaServer(Vertx vertx, Context context, InputStream input, OutputStream output); boolean isMetricsE... | /* static context
[FOCAL] @Override public ReadStream<HttpServerRequest> LambdaServer.requestStream()
*/
| /* static context
[FOCAL] @Override public ReadStream<HttpServerRequest> LambdaServer.requestStream()
*/
class LambdaServer implements HttpServer {
@Override
public ReadStream<HttpServerRequest> requestStream() {
return null;
}
public LambdaServer(Vertx vertx, Context context, InputStream inp... | true | ok | {"focal": {"class": "LambdaServer", "name": "requestStream", "signature": "ReadStream<HttpServerRequest> requestStream()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "ReadStream<HttpServerRequest>"}, "class_info": {"name": "LambdaServer", "kind": "class", "modifiers": "", "superclass... |
106416016_0 | class LoggerFactory {
public synchronized void useCommonsLogging() {
setImplementation(JakartaCommonsLoggingImpl.class);
}
public Logger getLog(Class<?> aClass);
public Logger getLog(String logger);
public synchronized void useCustomLogging(Class<? extends Logger> clazz);
public synchr... | LoggerFactory.useCommonsLogging();
Logger log = LoggerFactory.getLog(Object.class);
logSomething(log);
assertThat(log, instanceOf(JakartaCommonsLoggingImpl.class));
}
} | [FOCAL] public synchronized void LoggerFactory.useCommonsLogging()
[CLASS] class LoggerFactory
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void setImplementation(Class<? extends Logger> implClass)
[CLASS-MEMBERS] Logger getLog(Class<?> aClass); Logger getLog(String logger); voi... | /* static context
[FOCAL] public synchronized void LoggerFactory.useCommonsLogging()
[CALLS-INTERNAL] void setImplementation(Class<? extends Logger> implClass)
*/
| /* static context
[FOCAL] public synchronized void LoggerFactory.useCommonsLogging()
[CALLS-INTERNAL] void setImplementation(Class<? extends Logger> implClass)
*/
class LoggerFactory {
public synchronized void useCommonsLogging() {
setImplementation(JakartaCommonsLoggingImpl.class);
}
public Logge... | true | ok | {"focal": {"class": "LoggerFactory", "name": "useCommonsLogging", "signature": "void useCommonsLogging()", "start_line": 3, "modifiers": "public synchronized", "params": [], "return_type": "void"}, "class_info": {"name": "LoggerFactory", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields"... |
106459683_1 | class CoffeeHouseApp implements Terminal {
static void applySystemProperties(final Map<String, String> opts) {
opts.forEach((key, value) -> {
if (key.startsWith("-D")) System.setProperty(key.substring(2), value);
});
}
public CoffeeHouseApp(final ActorSystem system);
publ... | System.setProperty("c", "");
Map<String, String> opts = new HashMap<>();
opts.put("a", "1");
opts.put("-Dc", "2");
CoffeeHouseApp.applySystemProperties(opts);
assertThat(System.getProperty("c")).isEqualTo("2");
}
} | [FOCAL] static void CoffeeHouseApp.applySystemProperties(Map<String, String> opts)
[CLASS] class CoffeeHouseApp implements Terminal
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] Map<String, String>.forEach/1, key.startsWith/1, System.setProperty/2, key.substring/1
[COLLABORATORS]... | /* static context
[FOCAL] static void CoffeeHouseApp.applySystemProperties(Map<String, String> opts)
[COLLABORATORS] param opts:Map<String, String> forEach/1; field key startsWith/1,substring/1
[CALLS-EXTERNAL] Map<String, String>.forEach/1, key.startsWith/1, System.setProperty/2, key.substring/1
*/
| /* static context
[FOCAL] static void CoffeeHouseApp.applySystemProperties(Map<String, String> opts)
[COLLABORATORS] param opts:Map<String, String> forEach/1; field key startsWith/1,substring/1
[CALLS-EXTERNAL] Map<String, String>.forEach/1, key.startsWith/1, System.setProperty/2, key.substring/1
*/
class CoffeeHouseAp... | true | ok | {"focal": {"class": "CoffeeHouseApp", "name": "applySystemProperties", "signature": "void applySystemProperties(Map<String, String> opts)", "start_line": 3, "modifiers": "static", "params": [{"name": "opts", "type": "Map<String, String>"}], "return_type": "void"}, "class_info": {"name": "CoffeeHouseApp", "kind": "class... |
106559097_0 | class NowPlayingInteractor {
public Observable<Result> processAction(Observable<Action> actions) {
return actions.compose(transformActionIntoResults);
}
@SuppressWarnings("checkstyle:magicnumber") public NowPlayingInteractor(@NonNull ServiceController serviceControllerIn, @NonNull FilterTransform... | //
//Arrange
//
TestObserver<Result> testObserver;
NowPlayingInteractor nowPlayingInteractor = new NowPlayingInteractor(mockServiceController, filterTransformer);
List<MovieInfo> movieInfoList = new ArrayList<>();
for (int i = 0; i < 5; i++) {
movieIn... | [FOCAL] public Observable<Result> NowPlayingInteractor.processAction(Observable<Action> actions)
[CLASS] class NowPlayingInteractor
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Observable<Action>.compose/1
[INPUTS] branches=- | result=actions
[COLLABORATORS] param actions:Observ... | /* static context
[FOCAL] public Observable<Result> NowPlayingInteractor.processAction(Observable<Action> actions)
[INPUTS] branches=- | result=actions
[COLLABORATORS] param actions:Observable<Action> compose/1
[CALLS-EXTERNAL] Observable<Action>.compose/1
*/
| /* static context
[FOCAL] public Observable<Result> NowPlayingInteractor.processAction(Observable<Action> actions)
[INPUTS] branches=- | result=actions
[COLLABORATORS] param actions:Observable<Action> compose/1
[CALLS-EXTERNAL] Observable<Action>.compose/1
*/
class NowPlayingInteractor {
public Observable<Result> ... | true | ok | {"focal": {"class": "NowPlayingInteractor", "name": "processAction", "signature": "Observable<Result> processAction(Observable<Action> actions)", "start_line": 3, "modifiers": "public", "params": [{"name": "actions", "type": "Observable<Action>"}], "return_type": "Observable<Result>"}, "class_info": {"name": "NowPlayin... |
106559436_73 | class LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener {
static boolean uninstall() {
boolean uninstalled = false;
synchronized (lock) {
if (locationCollectionClient != null) {
locationCollectionClient.locationEngineController.onDestroy();
locationC... | assertThat(LocationCollectionClient.uninstall()).isFalse();
}
} | [FOCAL] static boolean LocationCollectionClient.uninstall()
[CLASS] class LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener
[METRICS] loc=13 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] locationCollectionClient.locationEngineController.onDestroy/0, locationC... | /* static context
[FOCAL] static boolean LocationCollectionClient.uninstall()
[PATH1] if(locationCollectionClient != null)=T -> return uninstalled
[PATH2] if(locationCollectionClient != null)=F -> return uninstalled
[CALLS-EXTERNAL] locationCollectionClient.locationEngineController.onDestroy/0, locationCollectionClient... | /* static context
[FOCAL] static boolean LocationCollectionClient.uninstall()
[PATH1] if(locationCollectionClient != null)=T -> return uninstalled
[PATH2] if(locationCollectionClient != null)=F -> return uninstalled
[CALLS-EXTERNAL] locationCollectionClient.locationEngineController.onDestroy/0, locationCollectionClient... | true | ok | {"focal": {"class": "LocationCollectionClient", "name": "uninstall", "signature": "boolean uninstall()", "start_line": 3, "modifiers": "static", "params": [], "return_type": "boolean"}, "class_info": {"name": "LocationCollectionClient", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "SharedPreferen... |
106613119_506 | class DefaultAtlasModuleInfo implements AtlasModuleInfo, AtlasModuleInfoMXBean {
@Override
public String toString() {
return "DefaultAtlasModuleInfo [name=" + name + ", uri=" + uri + ", sourceSupported=" + sourceSupported
+ ", targetSupported=" + targetSupported + ", moduleClass=" + mod... | assertNotNull(module.toString());
}
} | [FOCAL] @Override public String DefaultAtlasModuleInfo.toString()
[CLASS] class DefaultAtlasModuleInfo implements AtlasModuleInfo, AtlasModuleInfoMXBean
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] DefaultAtlasModuleInfo(String name, String uri, Class<AtlasModule> moduleClass, Co... | /* static context
[FOCAL] @Override public String DefaultAtlasModuleInfo.toString()
*/
| /* static context
[FOCAL] @Override public String DefaultAtlasModuleInfo.toString()
*/
class DefaultAtlasModuleInfo implements AtlasModuleInfo, AtlasModuleInfoMXBean {
@Override
public String toString() {
return "DefaultAtlasModuleInfo [name=" + name + ", uri=" + uri + ", sourceSupported=" + sourceSupp... | true | ok | {"focal": {"class": "DefaultAtlasModuleInfo", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "DefaultAtlasModuleInfo", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "AtlasModuleI... |
106668916_1 | class JazonList {
public List<JsonExpectationInput> list() {
return list;
}
public JazonList(Predicate<?>... predicates);
public JazonList(Object... objects);
public JazonList with(Object object);
public JazonList with(Predicate<T> predicate);
}
class JazonListTest {
@Test
... | // given
JazonList jazonList = new JazonList(null, null);
// when
List<JsonExpectationInput> list = jazonList.list();
// then
assertEquals(2, list.size());
assertEquals(new PredicateExpectationInput<>(null), list.get(0));
}
} | [FOCAL] public List<JsonExpectationInput> JazonList.list()
[CLASS] class JazonList
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] JazonList(Predicate<?>... predicates); JazonList(Object... objects); JazonList with(Object object); JazonList with(Predicate<T> predicate)
[TEST] JazonL... | /* static context
[FOCAL] public List<JsonExpectationInput> JazonList.list()
*/
| /* static context
[FOCAL] public List<JsonExpectationInput> JazonList.list()
*/
class JazonList {
public List<JsonExpectationInput> list() {
return list;
}
public JazonList(Predicate<?>... predicates);
public JazonList(Object... objects);
public JazonList with(Object object);
public... | true | ok | {"focal": {"class": "JazonList", "name": "list", "signature": "List<JsonExpectationInput> list()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "List<JsonExpectationInput>"}, "class_info": {"name": "JazonList", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [... |
106681970_1048 | class ContentSummary implements Writable {
@Override
public String toString() {
return toString(true);
}
@Deprecated public ContentSummary();
@Deprecated public ContentSummary(long length, long fileCount, long directoryCount);
@Deprecated public ContentSummary(
long length, long fileCount, lo... | long length = Long.MAX_VALUE;
long fileCount = 222222222;
long directoryCount = 33333;
long quota = 222256578;
long spaceConsumed = 1073741825;
long spaceQuota = 1;
ContentSummary contentSummary = new ContentSummary.Builder().length(length).
fileCount(fileCount).directoryCount(direc... | [FOCAL] @Override public String ContentSummary.toString()
[CLASS] class ContentSummary implements Writable
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String toString(boolean qOption)
[CLASS-MEMBERS] ContentSummary(); ContentSummary(long length, long fileCount, long directoryCo... | /* static context
[FOCAL] @Override public String ContentSummary.toString()
[CALLS-INTERNAL] String toString(boolean qOption)
*/
| /* static context
[FOCAL] @Override public String ContentSummary.toString()
[CALLS-INTERNAL] String toString(boolean qOption)
*/
class ContentSummary implements Writable {
@Override
public String toString() {
return toString(true);
}
@Deprecated public ContentSummary();
@Deprecated public ContentSumma... | true | ok | {"focal": {"class": "ContentSummary", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "ContentSummary", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Writable", "fields": [], "me... |
106730885_1 | class Hooks {
public static void Before(Object... args) {
addHook(args, true, false);
}
public static void World(Closure body);
public static void After(Object... args);
public static void AfterStep(Object... args);
public static void BeforeStep(Object... args);
private static void... | try {
Hooks.Before("TAG", 10D, 100, new MethodClosure(this, "dummyClosureCall"), 0.0);
fail("CucumberException was not thrown");
} catch (CucumberException e) {
assertEquals("An argument of the type java.lang.Double found, Before only allows the argument types " +
... | [FOCAL] public static void Hooks.Before(Object... args)
[CLASS] class Hooks
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void addHook(Object[] tagsExpressionsAndBody, boolean before, boolean forStep)
[DATAFLOW] args@param->L2
[CLASS-MEMBERS] void World(Closure body); void After(... | /* static context
[FOCAL] public static void Hooks.Before(Object... args)
[CALLS-INTERNAL] void addHook(Object[] tagsExpressionsAndBody, boolean before, boolean forStep)
*/
| /* static context
[FOCAL] public static void Hooks.Before(Object... args)
[CALLS-INTERNAL] void addHook(Object[] tagsExpressionsAndBody, boolean before, boolean forStep)
*/
class Hooks {
public static void Before(Object... args) {
addHook(args, true, false);
}
public static void World(Closure body... | true | ok | {"focal": {"class": "Hooks", "name": "Before", "signature": "void Before(Object... args)", "start_line": 3, "modifiers": "public static", "params": [{"name": "args", "type": "Object..."}], "return_type": "void"}, "class_info": {"name": "Hooks", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "... |
106811067_44 | class ProcessCreatedEventHandler implements QueryEventHandler {
@Override
public String getHandledEvent() {
return ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED.name();
}
public ProcessCreatedEventHandler(ProcessInstanceRepository processInstanceRepository);
@Override public void han... | //when
String handledEvent = handler.getHandledEvent();
//then
assertThat(handledEvent).isEqualTo(ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED.name());
}
} | [FOCAL] @Override public String ProcessCreatedEventHandler.getHandledEvent()
[CLASS] class ProcessCreatedEventHandler implements QueryEventHandler
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED.name/0
[CLASS-MEMBERS] ProcessCreated... | /* static context
[FOCAL] @Override public String ProcessCreatedEventHandler.getHandledEvent()
[CALLS-EXTERNAL] ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED.name/0
*/
| /* static context
[FOCAL] @Override public String ProcessCreatedEventHandler.getHandledEvent()
[CALLS-EXTERNAL] ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED.name/0
*/
class ProcessCreatedEventHandler implements QueryEventHandler {
@Override
public String getHandledEvent() {
return ProcessRuntimeEv... | true | ok | {"focal": {"class": "ProcessCreatedEventHandler", "name": "getHandledEvent", "signature": "String getHandledEvent()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "ProcessCreatedEventHandler", "kind": "class", "modifiers": "", "superclass": null, "inte... |
106813148_35 | class CompleteTaskCmdExecutor extends AbstractCommandExecutor<CompleteTaskPayload> {
public CompleteTaskCmdExecutor(TaskAdminRuntime taskAdminRuntime) {
this.taskAdminRuntime = taskAdminRuntime;
}
public CompleteTaskCmdExecutor(TaskAdminRuntime taskAdminRuntime);
@Override public TaskResult ... | Map<String, Object> variables = new HashMap<>();
CompleteTaskPayload completeTaskPayload = new CompleteTaskPayload("taskId",
variables);
assertThat(completeTaskCmdExecutor.getHandledType()).isEqualTo(CompleteTaskPayload.c... | [FOCAL] public CompleteTaskCmdExecutor.CompleteTaskCmdExecutor(TaskAdminRuntime taskAdminRuntime)
[CLASS] class CompleteTaskCmdExecutor extends AbstractCommandExecutor<CompleteTaskPayload>
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[FIELDS] write=taskAdminRuntime
[STATE] taskAdminRuntime
[DATA... | /* static context
[FOCAL] public CompleteTaskCmdExecutor.CompleteTaskCmdExecutor(TaskAdminRuntime taskAdminRuntime)
[STATE] taskAdminRuntime
[FIELDS] write=taskAdminRuntime
*/
| /* static context
[FOCAL] public CompleteTaskCmdExecutor.CompleteTaskCmdExecutor(TaskAdminRuntime taskAdminRuntime)
[STATE] taskAdminRuntime
[FIELDS] write=taskAdminRuntime
*/
class CompleteTaskCmdExecutor extends AbstractCommandExecutor<CompleteTaskPayload> {
public CompleteTaskCmdExecutor(TaskAdminRuntime taskAd... | true | ok | {"focal": {"class": "CompleteTaskCmdExecutor", "name": "CompleteTaskCmdExecutor", "signature": "CompleteTaskCmdExecutor(TaskAdminRuntime taskAdminRuntime)", "start_line": 3, "modifiers": "public", "params": [{"name": "taskAdminRuntime", "type": "TaskAdminRuntime"}], "return_type": null}, "class_info": {"name": "Complet... |
106817657_51 | class FeelParser {
public static Either<ValidationResult.Builder.ElementStep, FeelExpression> parse(final CharSequence charSequence) {
try {
return Eithers.right(PARSER.parse(charSequence));
} catch (final ParserException e) {
return Eithers.left(ValidationResult.init.messag... | final FeelExpression expression = FeelParser.PARSER.parse("\"x.y.z=false\"");
final FeelExpression expectedExpression = FeelExpressions.StringLiteral("x.y.z=false");
assertEquals(expectedExpression, expression);
}
} | [FOCAL] public static Either<ValidationResult.Builder.ElementStep, FeelExpression> FeelParser.parse(CharSequence charSequence)
[CLASS] class FeelParser
[METRICS] loc=7 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] Eithers.right/1, PARSER.parse/1, Eithers.left/1, ValidationResult.init.message/1, ... | /* static context
[FOCAL] public static Either<ValidationResult.Builder.ElementStep, FeelExpression> FeelParser.parse(CharSequence charSequence)
[PATH1] try-body throws -> return Eithers.left(ValidationResult.init.message("Could not parse '" + ch...
[PATH2] return Eithers.right(PARSER.parse(charSequence))
[INPUTS] bran... | /* static context
[FOCAL] public static Either<ValidationResult.Builder.ElementStep, FeelExpression> FeelParser.parse(CharSequence charSequence)
[PATH1] try-body throws -> return Eithers.left(ValidationResult.init.message("Could not parse '" + ch...
[PATH2] return Eithers.right(PARSER.parse(charSequence))
[INPUTS] bran... | true | ok | {"focal": {"class": "FeelParser", "name": "parse", "signature": "Either<ValidationResult.Builder.ElementStep, FeelExpression> parse(CharSequence charSequence)", "start_line": 3, "modifiers": "public static", "params": [{"name": "charSequence", "type": "CharSequence"}], "return_type": "Either<ValidationResult.Builder.El... |
106841635_350 | class Schema {
private Schema(Builder builder) {
this.fieldNames = builder.fields.stream().map(Field::name).collect(toList());
this.fields = ImmutableList.copyOf(builder.fields);
this.optionalFields = ImmutableSet.copyOf(builder.optionalFields);
this.constraints = ImmutableList.copy... | Exception e = assertThrows(InvalidSchemaException.class,
() -> schema(field("name", string()),
field("config", union("type"))
));
assertEquals("Discriminator attribute 'type' not present.", e.getMessage());
}
} | [FOCAL] private Schema.Schema(Builder builder)
[CLASS] class Schema
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] builder.fields.stream().map(Field::name).collect/1, builder.fields.stream().map/1, builder.fields.stream/0, toList/0 (inherited), ImmutableList.copyOf/1, ImmutableSet... | /* static context
[FOCAL] private Schema.Schema(Builder builder)
[STATE] constraints via constraints(), fieldNames via fieldNames(), fields via fields(), ignore via ignore(), name via name(), optionalFields via optionalFields()
[FIELDS] read=fieldNames | write=constraints, fieldNames, fields, ignore, name, optionalFiel... | /* static context
[FOCAL] private Schema.Schema(Builder builder)
[STATE] constraints via constraints(), fieldNames via fieldNames(), fields via fields(), ignore via ignore(), name via name(), optionalFields via optionalFields()
[FIELDS] read=fieldNames | write=constraints, fieldNames, fields, ignore, name, optionalFiel... | true | ok | {"focal": {"class": "Schema", "name": "Schema", "signature": "Schema(Builder builder)", "start_line": 3, "modifiers": "private", "params": [{"name": "builder", "type": "Builder"}], "return_type": null}, "class_info": {"name": "Schema", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": ... |
106872676_7 | class WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
if (env.getActiveProfiles().length != 0) {
log.info("Web application configuration, using profiles: {}", (O... | env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION);
webConfigurer.onStartup(servletContext);
assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry);
assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY))... | [FOCAL] @Override public void WebConfigurer.onStartup(ServletContext servletContext)
[CLASS] class WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer
[METRICS] loc=12 cc=3 branches=2 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] void initH2Console(ServletContext servletContex... | /* static context
[FOCAL] @Override public void WebConfigurer.onStartup(ServletContext servletContext)
[PATH1] if(env.getActiveProfiles().length != 0)=T -> if(env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))=T
[PATH2] if(env.getActiveProfiles().length != 0)=F -> if(env.acceptsProfiles(JHipsterConstant... | /* static context
[FOCAL] @Override public void WebConfigurer.onStartup(ServletContext servletContext)
[PATH1] if(env.getActiveProfiles().length != 0)=T -> if(env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))=T
[PATH2] if(env.getActiveProfiles().length != 0)=F -> if(env.acceptsProfiles(JHipsterConstant... | true | ok | {"focal": {"class": "WebConfigurer", "name": "onStartup", "signature": "void onStartup(ServletContext servletContext) throws ServletException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "servletContext", "type": "ServletContext"}], "return_type": "void"}, "class_info": {"name": "WebConfigure... |
106921925_3 | class AuditConsumerChannelHandlerImpl implements AuditConsumerChannelHandler {
@SuppressWarnings("unchecked")
@Override
@StreamListener(AuditConsumerChannels.AUDIT_CONSUMER)
public void receiveCloudRuntimeEvent(@Headers Map<String, Object> headers, CloudRuntimeEvent<?, ?>... events) {
if (event... | //given
CloudRuntimeEvent cloudRuntimeEvent = mock(CloudRuntimeEventImpl.class);
when(cloudRuntimeEvent.getEventType()).thenReturn(ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED);
EventToEntityConverter converter = mock(EventToEntityConverter.class);
when(converters.getConvert... | [FOCAL] @SuppressWarnings("unchecked") @Override @StreamListener(AuditConsumerChannels.AUDIT_CONSUMER) public void AuditConsumerChannelHandlerImpl.receiveCloudRuntimeEvent(Map<String, Object> headers, CloudRuntimeEvent<?, ?>... events)
[CLASS] class AuditConsumerChannelHandlerImpl implements AuditConsumerChannelHandler... | /* static context
[FOCAL] @SuppressWarnings("unchecked") @Override @StreamListener(AuditConsumerChannels.AUDIT_CONSUMER) public void AuditConsumerChannelHandlerImpl.receiveCloudRuntimeEvent(Map<String, Object> headers, CloudRuntimeEvent<?, ?>... events)
[PATH1] if(events != null)=T -> foreach(CloudRuntimeEvent event : ... | /* static context
[FOCAL] @SuppressWarnings("unchecked") @Override @StreamListener(AuditConsumerChannels.AUDIT_CONSUMER) public void AuditConsumerChannelHandlerImpl.receiveCloudRuntimeEvent(Map<String, Object> headers, CloudRuntimeEvent<?, ?>... events)
[PATH1] if(events != null)=T -> foreach(CloudRuntimeEvent event : ... | true | ok | {"focal": {"class": "AuditConsumerChannelHandlerImpl", "name": "receiveCloudRuntimeEvent", "signature": "void receiveCloudRuntimeEvent(Map<String, Object> headers, CloudRuntimeEvent<?, ?>... events)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") @Override @StreamListener(AuditConsumerChannels.AUDIT_C... |
106984925_0 | class LoginViewModel extends BaseViewModel {
public void login() {
if (InputHelper.isEmpty(userName) || InputHelper.isEmpty(password)) {
AlertUtils.showToastShortMessage(App.getInstance(), "Please input username and password!");
return;
}
String auth = StringUtils.ge... | String pass = "abc";
User user = sampleUser(1L);
String token = StringUtils.getBasicAuth(user.getLogin(), pass);
when(githubService.login(any())).thenReturn(successResponse(user));
when(userManager.startUserSession(any(), any())).thenReturn(null);
viewModel.setUserName... | [FOCAL] public void LoginViewModel.login()
[CLASS] class LoginViewModel extends BaseViewModel
[METRICS] loc=11 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] InputHelper.isEmpty/1, AlertUtils.showToastShortMessage/2, App.getInstance/0, StringUtils.getBasicAuth/2, execute/3 (inherited), RestHelper... | /* static context
[FOCAL] public void LoginViewModel.login()
[PATH1] if(InputHelper.isEmpty(userName) || InputHelper.isEmpty(password))=T -> return
[PATH2] if(InputHelper.isEmpty(userName) || InputHelper.isEmpty(password))=F
[COLLABORATORS] field githubService login/1; field userManager startUserSession/2; field naviga... | /* static context
[FOCAL] public void LoginViewModel.login()
[PATH1] if(InputHelper.isEmpty(userName) || InputHelper.isEmpty(password))=T -> return
[PATH2] if(InputHelper.isEmpty(userName) || InputHelper.isEmpty(password))=F
[COLLABORATORS] field githubService login/1; field userManager startUserSession/2; field naviga... | true | ok | {"focal": {"class": "LoginViewModel", "name": "login", "signature": "void login()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "LoginViewModel", "kind": "class", "modifiers": "", "superclass": "BaseViewModel", "interfaces": null, "fields": [], "members": [{"name... |
107071531_0 | class ReflectionUtil {
public static @NotNull List<String> getArgsForMethod(@NotNull List<String> args, @NotNull Method method) {
if (args.size() == 0 && method.getParameterCount() == 0) {
return Collections.emptyList();
}
List<String> argsOut = new ArrayList<>();
if (... | // Given a method with only one param, pick out that param without the others
List<String> inputStr = Arrays.asList("1", "nextMethod", "param", "param2");
Method testClass1234 = ReflTestClass.ReflSubClass.class.getMethod("get1234", int.class);
List<String> out = ReflectionUtil.getArgsFor... | [FOCAL] public static @NotNull List<String> ReflectionUtil.getArgsForMethod(List<String> args, Method method)
[CLASS] class ReflectionUtil
[METRICS] loc=17 cc=4 branches=2 loops=1 returns=2 throws=0 nesting=2
[CALLS-EXTERNAL] List<String>.size/0, Method.getParameterCount/0, Collections.emptyList/0, List<String>.addAll/... | /* static context
[FOCAL] public static @NotNull List<String> ReflectionUtil.getArgsForMethod(List<String> args, Method method)
[PATH1] if(args.size() == 0 && method.getParameterCount() == 0)=F -> if(args.size() < method.getParameterCount())=F -> for(i < method.getParameterCount())=T -> exit loop -> return argsOut
[PAT... | /* static context
[FOCAL] public static @NotNull List<String> ReflectionUtil.getArgsForMethod(List<String> args, Method method)
[PATH1] if(args.size() == 0 && method.getParameterCount() == 0)=F -> if(args.size() < method.getParameterCount())=F -> for(i < method.getParameterCount())=T -> exit loop -> return argsOut
[PAT... | true | ok | {"focal": {"class": "ReflectionUtil", "name": "getArgsForMethod", "signature": "List<String> getArgsForMethod(List<String> args, Method method)", "start_line": 3, "modifiers": "public static @NotNull", "params": [{"name": "args", "type": "List<String>"}, {"name": "method", "type": "Method"}], "return_type": "List<Strin... |
107095945_3 | class DownloadRunnable implements Runnable {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
FileDownloadConnection connection = null;
final long beginOffset = connectTask.getProfile().currentOffset;
boolean isConnected = false;
... | final FileDownloadConnection connection = mock(FileDownloadConnection.class);
when(connection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_PRECON_FAILED);
when(mockConnectTask.connect()).thenReturn(connection);
downloadRunnable.run();
// retry first.
verify(mock... | [FOCAL] @Override public void DownloadRunnable.run()
[CLASS] class DownloadRunnable implements Runnable
[METRICS] loc=79 cc=12 branches=9 loops=1 returns=2 throws=1 nesting=5
[CALLS-EXTERNAL] Process.setThreadPriority/1, connectTask.getProfile/0, connectTask.connect/0, FileDownloadConnection.getResponseCode/0, FileDown... | /* static context
[FOCAL] @Override public void DownloadRunnable.run()
[PATH1] if(paused)#1=F -> if(FileDownloadLog.NEED_LOG)=T -> if(code != HttpURLConnection.HTTP_PARTIAL && code != HttpURLConnection.HTTP_OK)=T -> throw new SocketException(FileDownloadUtils. formatString("Connection fai... -> if(callback.isRetry(e))=... | /* static context
[FOCAL] @Override public void DownloadRunnable.run()
[PATH1] if(paused)#1=F -> if(FileDownloadLog.NEED_LOG)=T -> if(code != HttpURLConnection.HTTP_PARTIAL && code != HttpURLConnection.HTTP_OK)=T -> throw new SocketException(FileDownloadUtils. formatString("Connection fai... -> if(callback.isRetry(e))=... | true | ok | {"focal": {"class": "DownloadRunnable", "name": "run", "signature": "void run()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "DownloadRunnable", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Runnable", "fields": [{"name": "mockCo... |
107103226_93 | class Card extends StripeJsonModel implements StripePaymentSource {
@NonNull
@Override
public Map<String, Object> toMap() {
Map<String, Object> map = new HashMap<>();
map.put(FIELD_NAME, name);
map.put(FIELD_ADDRESS_CITY, addressCity);
map.put(FIELD_ADDRESS_COUNTRY, addressC... | try {
JSONObject rawJsonObject = new JSONObject(JSON_CARD);
Map<String, Object> rawMap = StripeJsonUtils.jsonObjectToMap(rawJsonObject);
Card expectedCard = buildEquivalentJsonCard();
JsonTestUtils.assertMapEquals(rawMap, expectedCard.toMap());
} catch (JS... | [FOCAL] @NonNull @Override public Map<String, Object> Card.toMap()
[CLASS] class Card extends StripeJsonModel implements StripePaymentSource
[METRICS] loc=28 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Map<String, Object>.put/2, StripeNetworkUtils.removeNullAndEmptyParams/1
[NEW] HashMap<>
[DA... | /* static context
[FOCAL] @NonNull @Override public Map<String, Object> Card.toMap()
[NEW] HashMap<>
[CALLS-EXTERNAL] Map<String, Object>.put/2, StripeNetworkUtils.removeNullAndEmptyParams/1
*/
| /* static context
[FOCAL] @NonNull @Override public Map<String, Object> Card.toMap()
[NEW] HashMap<>
[CALLS-EXTERNAL] Map<String, Object>.put/2, StripeNetworkUtils.removeNullAndEmptyParams/1
*/
class Card extends StripeJsonModel implements StripePaymentSource {
@NonNull
@Override
public Map<String, Object>... | true | ok | {"focal": {"class": "Card", "name": "toMap", "signature": "Map<String, Object> toMap()", "start_line": 3, "modifiers": "@NonNull @Override public", "params": [], "return_type": "Map<String, Object>"}, "class_info": {"name": "Card", "kind": "class", "modifiers": "", "superclass": "StripeJsonModel", "interfaces": "Stripe... |
107150826_3 | class Address extends ByteArray {
public static Address from(byte[] address) {
return new Address(new ByteArray(address));
}
public Address(ByteArray byteArray);
public static Address from(String address);
@Override public String toString();
private static Address address;
private static String a... | String hexStr = "795c64c6eee9164539d679354f349779a04f57cb";
byte[] addressBytes = new BigInteger(
"111100101011100011001001100011011101110111010010001011001000101001110011101011001111001001101010100111100110100100101110111100110100000010011110101011111001011",
2).toByteArray();
Address addr... | [FOCAL] public static Address Address.from(byte[] address)
[CLASS] class Address extends ByteArray
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] Address, ByteArray
[INPUTS] branches=- | result=address
[DATAFLOW] address@param->L2
[CLASS-MEMBERS] Address(ByteArray byteArray); Address from(St... | /* static context
[FOCAL] public static Address Address.from(byte[] address)
[INPUTS] branches=- | result=address
[NEW] Address, ByteArray
*/
| /* static context
[FOCAL] public static Address Address.from(byte[] address)
[INPUTS] branches=- | result=address
[NEW] Address, ByteArray
*/
class Address extends ByteArray {
public static Address from(byte[] address) {
return new Address(new ByteArray(address));
}
public Address(ByteArray byteArray);
... | true | ok | {"focal": {"class": "Address", "name": "from", "signature": "Address from(byte[] address)", "start_line": 3, "modifiers": "public static", "params": [{"name": "address", "type": "byte[]"}], "return_type": "Address"}, "class_info": {"name": "Address", "kind": "class", "modifiers": "", "superclass": "ByteArray", "interfa... |
107165228_4 | class FileResolver {
static File resolveNextMigrationFile(File migrationDir) {
Optional<Path> lastFile = resolveExistingMigrations(migrationDir, true, false)
.stream()
.findFirst();
Long fileIndex = lastFile.map((Path input) -> FILENAME_PATTERN.matcher(input.getFileName().toString()))
.map(matcher ... | // given
File migrationsDir = tempFolder.newFolder();
migrationsDir.toPath().resolve("v1__jpa2ddl.sql").toFile().createNewFile();
migrationsDir.toPath().resolve("v2__my_description.sql").toFile().createNewFile();
// when
File file = FileResolver.resolveNextMigrationFile(migrationsDir);
// then
assertT... | [FOCAL] static File FileResolver.resolveNextMigrationFile(File migrationDir)
[CLASS] class FileResolver
[METRICS] loc=16 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] List<Path> resolveExistingMigrations(File migrationsDir, boolean reversed, boolean onlySchemaMigrations)
[CALLS-EXTERNAL] resolve... | /* static context
[FOCAL] static File FileResolver.resolveNextMigrationFile(File migrationDir)
[INPUTS] branches=- | result=migrationDir
[COLLABORATORS] field input getFileName/0; field matcher find/0,group/1; param migrationDir:File toPath/0
[CALLS-INTERNAL] List<Path> resolveExistingMigrations(File migrationsDir, boo... | /* static context
[FOCAL] static File FileResolver.resolveNextMigrationFile(File migrationDir)
[INPUTS] branches=- | result=migrationDir
[COLLABORATORS] field input getFileName/0; field matcher find/0,group/1; param migrationDir:File toPath/0
[CALLS-INTERNAL] List<Path> resolveExistingMigrations(File migrationsDir, boo... | true | ok | {"focal": {"class": "FileResolver", "name": "resolveNextMigrationFile", "signature": "File resolveNextMigrationFile(File migrationDir)", "start_line": 3, "modifiers": "static", "params": [{"name": "migrationDir", "type": "File"}], "return_type": "File"}, "class_info": {"name": "FileResolver", "kind": "class", "modifier... |
107220808_44 | class Paths {
public static Path of(String... segments) {
if (segments.length == 0) {
return ImmutablePath.EMPTY;
}
PathBuilder pathBuilder = new PathBuilder();
for (String segment : segments) {
pathBuilder.splitAndAdd(segment, false);
}
return ImmutablePath.create(pathBuilder);... | assertEquals(Paths.of("/"), Paths.of("\\"));
assertEquals(Paths.of("/path"), Paths.of("\\path"));
assertEquals(Paths.of("/path/"), Paths.of("\\path\\"));
}
} | [FOCAL] public static Path Paths.of(String... segments)
[CLASS] class Paths
[METRICS] loc=12 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] PathBuilder.splitAndAdd/2, ImmutablePath.create/1
[NEW] PathBuilder
[PATH1] if(segments.length == 0)=F -> foreach(String segment : segments)=T -> exit loop -... | /* static context
[FOCAL] public static Path Paths.of(String... segments)
[PATH1] if(segments.length == 0)=F -> foreach(String segment : segments)=T -> exit loop -> return ImmutablePath.create(pathBuilder)
[PATH2] if(segments.length == 0)=T -> return ImmutablePath.EMPTY
[PATH3] if(segments.length == 0)=F -> foreach(Str... | /* static context
[FOCAL] public static Path Paths.of(String... segments)
[PATH1] if(segments.length == 0)=F -> foreach(String segment : segments)=T -> exit loop -> return ImmutablePath.create(pathBuilder)
[PATH2] if(segments.length == 0)=T -> return ImmutablePath.EMPTY
[PATH3] if(segments.length == 0)=F -> foreach(Str... | true | ok | {"focal": {"class": "Paths", "name": "of", "signature": "Path of(String... segments)", "start_line": 3, "modifiers": "public static", "params": [{"name": "segments", "type": "String..."}], "return_type": "Path"}, "class_info": {"name": "Paths", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "... |
107254605_1 | class OpenIBANValidationClient extends RestGatewaySupport implements IBANValidationClient {
@Override
public IBANValidationResult validate(String iban) {
return getRestTemplate().getForObject(URL_TEMPLATE, IBANValidationResult.class, iban);
}
@Autowired
private OpenIBANValidationClient cl... |
mockRestServiceServer
.expect(requestTo("https://openiban.com/validate/NL28XXXX389242218?getBIC=true&validateBankCode=true"))
.andRespond(withSuccess(new ClassPathResource("NL28XXXX389242218-result.json"), MediaType.APPLICATION_JSON));
IBANValidationResult result = clie... | [FOCAL] @Override public IBANValidationResult OpenIBANValidationClient.validate(String iban)
[CLASS] class OpenIBANValidationClient extends RestGatewaySupport implements IBANValidationClient
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] getRestTemplate().getForObject/3, getRestTe... | /* static context
[FOCAL] @Override public IBANValidationResult OpenIBANValidationClient.validate(String iban)
[INPUTS] branches=- | result=iban
[CALLS-EXTERNAL] getRestTemplate().getForObject/3, getRestTemplate/0 (inherited)
*/
| /* static context
[FOCAL] @Override public IBANValidationResult OpenIBANValidationClient.validate(String iban)
[INPUTS] branches=- | result=iban
[CALLS-EXTERNAL] getRestTemplate().getForObject/3, getRestTemplate/0 (inherited)
*/
class OpenIBANValidationClient extends RestGatewaySupport implements IBANValidationClient {... | true | ok | {"focal": {"class": "OpenIBANValidationClient", "name": "validate", "signature": "IBANValidationResult validate(String iban)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "iban", "type": "String"}], "return_type": "IBANValidationResult"}, "class_info": {"name": "OpenIBANValidationClient", "kin... |
107304223_8 | class Base62Encoder implements Encoder<ByteBuffer, String> {
@Override
public String encode(final ByteBuffer unencodedData) {
final int maxBytes = unencodedData.limit();
final StringBuilder sb = new StringBuilder();
int bitSource = nextByte(unencodedData);
int unencodedBits = b... | final ByteBuffer byteBuffer = ByteBuffer.allocate(1);
byteBuffer
.put((byte) 0xF0)
.flip();
assertThat(encoder.encode(byteBuffer), is("8A"));
}
} | [FOCAL] @Override public String Base62Encoder.encode(ByteBuffer unencodedData)
[CLASS] class Base62Encoder implements Encoder<ByteBuffer, String>
[METRICS] loc=64 cc=8 branches=4 loops=3 returns=1 throws=0 nesting=4
[CALLS-INTERNAL] boolean appendBitsAsBase62Character(int bits, StringBuilder sb); boolean bitsExhausted(... | /* static context
[FOCAL] @Override public String Base62Encoder.encode(ByteBuffer unencodedData)
[PATH1] while(!bitsExhausted(bitsRead, maxBytes))=T -> if(carryOverLsb)#1=T -> for(i < bitsForAlignment)=T -> if(bitIndex == -1)=T -> if(bitsExhausted(bitsRead, maxBytes))=T -> exit loop -> while(bitIndex >= 0)=F -> if(carr... | /* static context
[FOCAL] @Override public String Base62Encoder.encode(ByteBuffer unencodedData)
[PATH1] while(!bitsExhausted(bitsRead, maxBytes))=T -> if(carryOverLsb)#1=T -> for(i < bitsForAlignment)=T -> if(bitIndex == -1)=T -> if(bitsExhausted(bitsRead, maxBytes))=T -> exit loop -> while(bitIndex >= 0)=F -> if(carr... | true | ok | {"focal": {"class": "Base62Encoder", "name": "encode", "signature": "String encode(ByteBuffer unencodedData)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "unencodedData", "type": "ByteBuffer"}], "return_type": "String"}, "class_info": {"name": "Base62Encoder", "kind": "class", "modifiers": ""... |
107325380_12 | class RestrictConflictMergeBehaviourImpl implements MergeBehaviour<SyncObject> {
@Override
public MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign) {
return revolveConflict(local, foreign);
}
private MergeResult<SyncObject> revolveConflict(SyncObject so... | SyncObject localObj = getSyncObject(SimpleObjectMother.createInstance(VALID_UUID, TEST_VALUE));
SyncObject foreignObj = getSyncObject(SimpleObjectMother.createInstance(VALID_UUID, TEST_VALUE_2));
MergeResult actual = conflictMergeBehaviour.resolveDiff(SyncObject.class, localObj, foreignObj);
Assert.assertTrue(a... | [FOCAL] @Override public MergeResult<SyncObject> RestrictConflictMergeBehaviourImpl.resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign)
[CLASS] class RestrictConflictMergeBehaviourImpl implements MergeBehaviour<SyncObject>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesti... | /* static context
[FOCAL] @Override public MergeResult<SyncObject> RestrictConflictMergeBehaviourImpl.resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign)
[INPUTS] branches=- | result=foreign, local | unused=clazz
[CALLS-INTERNAL] MergeResult<SyncObject> revolveConflict(SyncObject source... | /* static context
[FOCAL] @Override public MergeResult<SyncObject> RestrictConflictMergeBehaviourImpl.resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign)
[INPUTS] branches=- | result=foreign, local | unused=clazz
[CALLS-INTERNAL] MergeResult<SyncObject> revolveConflict(SyncObject source... | true | ok | {"focal": {"class": "RestrictConflictMergeBehaviourImpl", "name": "resolveDiff", "signature": "MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "clazz", "type": "Class<? extends SyncObject... |
107375180_161 | class PropertyElementDescriptors {
public ElementDescriptor getDescriptor(Object pmo) {
ElementDescriptor descriptor = findDescriptor(pmo);
descriptor.addAspectDefinitions(additionalAspects);
return descriptor;
}
PropertyElementDescriptors(String pmoPropertyName);
public int... | PropertyElementDescriptors descriptors = new PropertyElementDescriptors(TestPmo.DUAL_PMO_PROPERTY);
Assertions.assertThrows(IllegalStateException.class, () -> {
descriptors.getDescriptor(new TestPmo());
});
}
} | [FOCAL] public ElementDescriptor PropertyElementDescriptors.getDescriptor(Object pmo)
[CLASS] class PropertyElementDescriptors
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] ElementDescriptor findDescriptor(Object pmo)
[CALLS-EXTERNAL] ElementDescriptor.addAspectDefinitions/1
[INP... | /* static context
[FOCAL] public ElementDescriptor PropertyElementDescriptors.getDescriptor(Object pmo)
[INPUTS] branches=- | result=pmo
[CALLS-INTERNAL] ElementDescriptor findDescriptor(Object pmo)
[CALLS-EXTERNAL] ElementDescriptor.addAspectDefinitions/1
*/
| /* static context
[FOCAL] public ElementDescriptor PropertyElementDescriptors.getDescriptor(Object pmo)
[INPUTS] branches=- | result=pmo
[CALLS-INTERNAL] ElementDescriptor findDescriptor(Object pmo)
[CALLS-EXTERNAL] ElementDescriptor.addAspectDefinitions/1
*/
class PropertyElementDescriptors {
public ElementDescri... | true | ok | {"focal": {"class": "PropertyElementDescriptors", "name": "getDescriptor", "signature": "ElementDescriptor getDescriptor(Object pmo)", "start_line": 3, "modifiers": "public", "params": [{"name": "pmo", "type": "Object"}], "return_type": "ElementDescriptor"}, "class_info": {"name": "PropertyElementDescriptors", "kind": ... |
107386062_5 | class DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager {
@Override
public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) {
return new DefaultTypedProperty<T>(getProperty(key), valueParser);
}
public DefaultType... | MyConfigurationManager myManager = new MyConfigurationManager();
DefaultTypedProperty<Long> p = (DefaultTypedProperty<Long>) myManager.getProperty("long", "iKey", "9999999a");
assertNull(null, p.typedValue());
p = (DefaultTypedProperty<Long>) myManager.getProperty("long", "iKey", null);
... | [FOCAL] @Override public TypedProperty<T> DefaultTypedConfigurationManager.getProperty(String key, ValueParser<T> valueParser)
[CLASS] class DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CAL... | /* static context
[FOCAL] @Override public TypedProperty<T> DefaultTypedConfigurationManager.getProperty(String key, ValueParser<T> valueParser)
[INPUTS] branches=- | result=key, valueParser
[NEW] DefaultTypedProperty<T>
[CALLS-EXTERNAL] getProperty/1 (inherited)
*/
| /* static context
[FOCAL] @Override public TypedProperty<T> DefaultTypedConfigurationManager.getProperty(String key, ValueParser<T> valueParser)
[INPUTS] branches=- | result=key, valueParser
[NEW] DefaultTypedProperty<T>
[CALLS-EXTERNAL] getProperty/1 (inherited)
*/
class DefaultTypedConfigurationManager extends Config... | true | ok | {"focal": {"class": "DefaultTypedConfigurationManager", "name": "getProperty", "signature": "TypedProperty<T> getProperty(String key, ValueParser<T> valueParser)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "key", "type": "String"}, {"name": "valueParser", "type": "ValueParser<T>"}], "return_... |
107436391_5 | class SlingshotUtil {
public static String getUserId(final Resource resource) {
final String prefix = SlingshotConstants.APP_ROOT_PATH + "/";
String id = null;
if ( resource.getPath().startsWith(prefix) ) {
final int areaEnd = resource.getPath().indexOf('/', prefix.length());
... |
Resource resource = context.resourceResolver().getResource("/content/slingshot/users");
assertThat(SlingshotUtil.getUserId(resource), nullValue());
}
} | [FOCAL] public static String SlingshotUtil.getUserId(Resource resource)
[CLASS] class SlingshotUtil
[METRICS] loc=17 cc=4 branches=3 loops=0 returns=1 throws=0 nesting=3
[CALLS-EXTERNAL] resource.getPath().startsWith/1, Resource.getPath/0, resource.getPath().indexOf/2, String.length/0, resource.getPath().substring/1, r... | /* static context
[FOCAL] public static String SlingshotUtil.getUserId(Resource resource)
[PATH1] if(resource.getPath().startsWith(prefix))=T -> if(areaEnd != -1)=T -> if(userEnd == -1)=T -> return id
[PATH2] if(resource.getPath().startsWith(prefix))=F -> return id
[PATH3] if(resource.getPath().startsWith(prefix))=T ->... | /* static context
[FOCAL] public static String SlingshotUtil.getUserId(Resource resource)
[PATH1] if(resource.getPath().startsWith(prefix))=T -> if(areaEnd != -1)=T -> if(userEnd == -1)=T -> return id
[PATH2] if(resource.getPath().startsWith(prefix))=F -> return id
[PATH3] if(resource.getPath().startsWith(prefix))=T ->... | true | ok | {"focal": {"class": "SlingshotUtil", "name": "getUserId", "signature": "String getUserId(Resource resource)", "start_line": 3, "modifiers": "public static", "params": [{"name": "resource", "type": "Resource"}], "return_type": "String"}, "class_info": {"name": "SlingshotUtil", "kind": "class", "modifiers": "", "supercla... |
107437722_133 | class CombinedProperties implements Map<String, Object> {
@Override
public final Object get(Object key) {
if (key == null) {
return null;
}
final ComputedPropertyParameter computedPropertyParameter = new ComputedPropertyParameter((String) key);
log.trace("Getting v... | final String expected = "Test Asset";
final String actual = (String) combinedProperties.get(TitleImpl.NAME);
assertEquals(expected, actual);
}
} | [FOCAL] @Override public final Object CombinedProperties.get(Object key)
[CLASS] class CombinedProperties implements Map<String, Object>
[METRICS] loc=47 cc=11 branches=10 loops=0 returns=3 throws=0 nesting=4
[CALLS-EXTERNAL] log.trace/2, ComputedPropertyParameter.getCacheId/0, ComputedPropertyParameter.getName/0, comp... | /* static context
[FOCAL] @Override public final Object CombinedProperties.get(Object key)
[PATH1] if(key == null)=F -> if(computedPropertyParameter.getName() == null)=F -> if(computedProperty != null)=T -> if(computedProperty.isCachable() && cachedValues.containsKey(computedPropertyParameter.getCacheId()))=F -> if(com... | /* static context
[FOCAL] @Override public final Object CombinedProperties.get(Object key)
[PATH1] if(key == null)=F -> if(computedPropertyParameter.getName() == null)=F -> if(computedProperty != null)=T -> if(computedProperty.isCachable() && cachedValues.containsKey(computedPropertyParameter.getCacheId()))=F -> if(com... | true | ok | {"focal": {"class": "CombinedProperties", "name": "get", "signature": "Object get(Object key)", "start_line": 3, "modifiers": "@Override public final", "params": [{"name": "key", "type": "Object"}], "return_type": "Object"}, "class_info": {"name": "CombinedProperties", "kind": "class", "modifiers": "", "superclass": nu... |
107457897_1 | class StaggeredAnimationGroup extends Group {
@VisibleForTesting
final int[] filterNonZeroIds(int[] allIds) {
int nonZeroIdsCount = 0;
for (int id : allIds) {
if (id != 0) {
nonZeroIdsCount++;
}
}
if (nonZeroIdsCount == allIds.length) {
... | //given
StaggeredAnimationGroup spiedGroup = prepareSpiedGroup();
int[] testIds = new int[]{1, 2, 3, 4};
//when
int[] filtered = spiedGroup.filterNonZeroIds(testIds);
//then
assertThat(filtered).asList().containsExactly(1, 2, 3, 4).inOrder();
}
} | [FOCAL] @VisibleForTesting final int[] StaggeredAnimationGroup.filterNonZeroIds(int[] allIds)
[CLASS] class StaggeredAnimationGroup extends Group
[METRICS] loc=17 cc=5 branches=2 loops=2 returns=2 throws=0 nesting=2
[PATH1] foreach(int id : allIds)=T -> if(id != 0)=T -> exit loop -> if(nonZeroIdsCount == allIds.length)... | /* static context
[FOCAL] @VisibleForTesting final int[] StaggeredAnimationGroup.filterNonZeroIds(int[] allIds)
[PATH1] foreach(int id : allIds)=T -> if(id != 0)=T -> exit loop -> if(nonZeroIdsCount == allIds.length)=F -> for(i < nonZeroIdsCount)=F -> return groupIds
[PATH2] foreach(int id : allIds)=F -> if(nonZeroIdsC... | /* static context
[FOCAL] @VisibleForTesting final int[] StaggeredAnimationGroup.filterNonZeroIds(int[] allIds)
[PATH1] foreach(int id : allIds)=T -> if(id != 0)=T -> exit loop -> if(nonZeroIdsCount == allIds.length)=F -> for(i < nonZeroIdsCount)=F -> return groupIds
[PATH2] foreach(int id : allIds)=F -> if(nonZeroIdsC... | true | ok | {"focal": {"class": "StaggeredAnimationGroup", "name": "filterNonZeroIds", "signature": "int[] filterNonZeroIds(int[] allIds)", "start_line": 3, "modifiers": "@VisibleForTesting final", "params": [{"name": "allIds", "type": "int[]"}], "return_type": "int[]"}, "class_info": {"name": "StaggeredAnimationGroup", "kind": "c... |
107465031_0 | class Library {
public boolean someLibraryMethod() {
return true;
}
}
class LibraryTest {
@Test
public void testSomeLibraryMethod() {
| final Library classUnderTest = new Library();
assertThat(classUnderTest.someLibraryMethod()).isTrue();
}
} | [FOCAL] public boolean Library.someLibraryMethod()
[CLASS] class Library
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[TEST] LibraryTest: @Test public void testSomeLibraryMethod() | /* static context
[FOCAL] public boolean Library.someLibraryMethod()
*/
| /* static context
[FOCAL] public boolean Library.someLibraryMethod()
*/
class Library {
public boolean someLibraryMethod() {
return true;
}
}
class LibraryTest {
@Test
public void testSomeLibraryMethod() {
| true | ok | {"focal": {"class": "Library", "name": "someLibraryMethod", "signature": "boolean someLibraryMethod()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "Library", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": []... |
107473189_9 | class Reflection {
public static @Nullable Method getMethod(@Nullable Class<?> clazz, String methodName) {
if (clazz == null) {
return null;
}
try {
return clazz.getMethod(methodName);
} catch (Exception e) {
logger.debug(e.getMessage(), e);
... | assertThat(Reflection.getMethod(String.class, "thereWillNeverBeMethodWithThisName"))
.isNull();
}
} | [FOCAL] public static @Nullable Method Reflection.getMethod(Class<?> clazz, String methodName)
[CLASS] class Reflection
[METRICS] loc=11 cc=3 branches=1 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] Class<?>.getMethod/1, logger.debug/2, Exception.getMessage/0
[EXCEPTIONS] catches Exception e
[PATH1] if(clazz ==... | /* static context
[FOCAL] public static @Nullable Method Reflection.getMethod(Class<?> clazz, String methodName)
[PATH1] if(clazz == null)=F -> try-body throws -> return null
[PATH2] if(clazz == null)=T -> return null
[PATH3] if(clazz == null)=F -> return clazz.getMethod(methodName)
[INPUTS] branches=clazz | result=cla... | /* static context
[FOCAL] public static @Nullable Method Reflection.getMethod(Class<?> clazz, String methodName)
[PATH1] if(clazz == null)=F -> try-body throws -> return null
[PATH2] if(clazz == null)=T -> return null
[PATH3] if(clazz == null)=F -> return clazz.getMethod(methodName)
[INPUTS] branches=clazz | result=cla... | true | ok | {"focal": {"class": "Reflection", "name": "getMethod", "signature": "Method getMethod(Class<?> clazz, String methodName)", "start_line": 3, "modifiers": "public static @Nullable", "params": [{"name": "clazz", "type": "Class<?>"}, {"name": "methodName", "type": "String"}], "return_type": "Method"}, "class_info": {"name"... |
107511723_92 | class HttpRequest {
public Optional<byte[]> getBody() {
if (bodyCache != null) {
return bodyCache;
}
synchronized (this) {
if (bodyCache != null) {
return bodyCache;
}
return bodyCache = doGetBody();
}
}
privat... | final AtomicInteger counter = new AtomicInteger();
final HttpRequest httpRequest =
new HttpRequest("foo", "GET", emptyList(), emptyMap(), null, emptyMap(), (a, b) -> {
assertEquals(0, counter.getAndIncrement());
return Optional.of(new byte[0]);
... | [FOCAL] public Optional<byte[]> HttpRequest.getBody()
[CLASS] class HttpRequest
[METRICS] loc=11 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=2
[CALLS-INTERNAL] Optional<byte[]> doGetBody()
[PATH1] if(bodyCache != null)#1=F -> if(bodyCache != null)#2=T -> return bodyCache
[PATH2] if(bodyCache != null)#1=F -> if(b... | /* static context
[FOCAL] public Optional<byte[]> HttpRequest.getBody()
[PATH1] if(bodyCache != null)#1=F -> if(bodyCache != null)#2=T -> return bodyCache
[PATH2] if(bodyCache != null)#1=F -> if(bodyCache != null)#2=F -> return bodyCache = doGetBody()
[PATH3] if(bodyCache != null)#1=T -> return bodyCache
[CALLS-INTERNA... | /* static context
[FOCAL] public Optional<byte[]> HttpRequest.getBody()
[PATH1] if(bodyCache != null)#1=F -> if(bodyCache != null)#2=T -> return bodyCache
[PATH2] if(bodyCache != null)#1=F -> if(bodyCache != null)#2=F -> return bodyCache = doGetBody()
[PATH3] if(bodyCache != null)#1=T -> return bodyCache
[CALLS-INTERNA... | true | ok | {"focal": {"class": "HttpRequest", "name": "getBody", "signature": "Optional<byte[]> getBody()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Optional<byte[]>"}, "class_info": {"name": "HttpRequest", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "member... |
107515570_1 | class WechatMessageHandler implements MessageHandler<WechatMessage> {
@Override
public WechatMessage handle(JsonObject result) {
// WechatMessage msg = new WechatMessage();
WechatMessage msg = gson.fromJson(result, WechatMessage.class);
msg.setRaw(result.toString());
return msg;... | String json = p.getProperty("m.init");
WechatMessage msg = (WechatMessage) handler.handle(json);
assertEquals(WechatMessage.MSGTYPE_STATUSNOTIFY, msg.MsgType);
System.out.println(msg.getText());
assertEquals("@b07a26ddbe1bc6a60c2d6f5cbe4c8581", msg.FromUserName);
... | [FOCAL] @Override public WechatMessage WechatMessageHandler.handle(JsonObject result)
[CLASS] class WechatMessageHandler implements MessageHandler<WechatMessage>
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] gson.fromJson/2, WechatMessage.setRaw/1, JsonObject.toString/0
[INPUTS] ... | /* static context
[FOCAL] @Override public WechatMessage WechatMessageHandler.handle(JsonObject result)
[INPUTS] branches=- | result=result
[COLLABORATORS] field gson fromJson/2; param result:JsonObject toString/0
[CALLS-EXTERNAL] gson.fromJson/2, WechatMessage.setRaw/1, JsonObject.toString/0
*/
| /* static context
[FOCAL] @Override public WechatMessage WechatMessageHandler.handle(JsonObject result)
[INPUTS] branches=- | result=result
[COLLABORATORS] field gson fromJson/2; param result:JsonObject toString/0
[CALLS-EXTERNAL] gson.fromJson/2, WechatMessage.setRaw/1, JsonObject.toString/0
*/
class WechatMessageHand... | true | ok | {"focal": {"class": "WechatMessageHandler", "name": "handle", "signature": "WechatMessage handle(JsonObject result)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "result", "type": "JsonObject"}], "return_type": "WechatMessage"}, "class_info": {"name": "WechatMessageHandler", "kind": "class", "... |
107554429_150 | class StreamConnection implements Closeable {
@Override
public int hashCode() {
return streamConnectionId.hashCode();
}
public StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);
public StreamConnection(final StreamConnectionId streamConnectionId);
public Un... | StreamConnection identicalStreamConnection = new StreamConnection(StreamConnectionId.of("foo"));
assertThat(streamConnection.hashCode()).isEqualTo(identicalStreamConnection.hashCode());
StreamConnection nonIdenticalStreamConnection = new StreamConnection(StreamConnectionId.of("foo1"));
assertThat(strea... | [FOCAL] @Override public int StreamConnection.hashCode()
[CLASS] class StreamConnection implements Closeable
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] streamConnectionId.hashCode/0
[COLLABORATORS] field streamConnectionId hashCode/0
[CLASS-MEMBERS] StreamConnection(Interledge... | /* static context
[FOCAL] @Override public int StreamConnection.hashCode()
[COLLABORATORS] field streamConnectionId hashCode/0
[CALLS-EXTERNAL] streamConnectionId.hashCode/0
*/
| /* static context
[FOCAL] @Override public int StreamConnection.hashCode()
[COLLABORATORS] field streamConnectionId hashCode/0
[CALLS-EXTERNAL] streamConnectionId.hashCode/0
*/
class StreamConnection implements Closeable {
@Override
public int hashCode() {
return streamConnectionId.hashCode();
}
public S... | true | ok | {"focal": {"class": "StreamConnection", "name": "hashCode", "signature": "int hashCode()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "int"}, "class_info": {"name": "StreamConnection", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Closeable", "fields": [{"name"... |
107559907_4 | class Interval {
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Interval other = (Interval) obj;
if (endDate == null) {
... | // given
Interval interval1 = new Interval(LocalDate.of(2017, 1, 14), LocalTime.of(10, 00), LocalDate.of(2017, 1, 15), LocalTime.of(23, 00));
Interval interval2 = new Interval(LocalDate.of(2017, 1, 14), LocalTime.of(10, 00), LocalDate.of(2017, 1, 15), LocalTime.of(23, 00));
// when
... | [FOCAL] @Override public boolean Interval.equals(Object obj)
[CLASS] class Interval
[METRICS] loc=33 cc=17 branches=16 loops=0 returns=13 throws=0 nesting=2
[CALLS-EXTERNAL] getClass/0 (inherited), Object.getClass/0, endDate.equals/1, endTime.equals/1, startDate.equals/1, startTime.equals/1, zoneId.equals/1
[PATH1] if(... | /* static context
[FOCAL] @Override public boolean Interval.equals(Object obj)
[PATH1] if(this == obj)=F -> if(obj == null)=F -> if(getClass() != obj.getClass())=F -> if(endDate == null)=T -> if(other.endDate != null)=F -> if(endTime == null)=T -> if(other.endTime != null)=F -> if(startDate == null)=T -> if(other.start... | /* static context
[FOCAL] @Override public boolean Interval.equals(Object obj)
[PATH1] if(this == obj)=F -> if(obj == null)=F -> if(getClass() != obj.getClass())=F -> if(endDate == null)=T -> if(other.endDate != null)=F -> if(endTime == null)=T -> if(other.endTime != null)=F -> if(startDate == null)=T -> if(other.start... | true | ok | {"focal": {"class": "Interval", "name": "equals", "signature": "boolean equals(Object obj)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "obj", "type": "Object"}], "return_type": "boolean"}, "class_info": {"name": "Interval", "kind": "class", "modifiers": "", "superclass": null, "interfaces": ... |
107591789_1 | class JsonParser {
public static <T> T deserialize(String json, Class<T> type) {
try {
return new ObjectMapper().readValue(json,type);
}
catch (Exception ex) {
log.error(ex.getMessage(),ex);
}
return null;
}
public static String serialize(Obj... | String jsonRole = getJsonRole(getDefaultRole());
Role expectedRole = getDefaultRole();
Role role = JsonParser.deserialize(jsonRole,Role.class);
assertTrue(role.getId().equals(expectedRole.getId()));
assertTrue(role.getName().equals(expectedRole.getName()));
}
} | [FOCAL] public static T JsonParser.deserialize(String json, Class<T> type)
[CLASS] class JsonParser
[METRICS] loc=9 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] new ObjectMapper().readValue/2, log.error/2, Exception.getMessage/0
[NEW] ObjectMapper
[EXCEPTIONS] catches Exception ex
[PATH1] try-b... | /* static context
[FOCAL] public static T JsonParser.deserialize(String json, Class<T> type)
[PATH1] try-body throws -> return null
[PATH2] return new ObjectMapper().readValue(json,type)
[INPUTS] branches=- | result=json, type
[EXCEPTIONS] catches Exception ex
[NEW] ObjectMapper
[CALLS-EXTERNAL] new ObjectMapper().read... | /* static context
[FOCAL] public static T JsonParser.deserialize(String json, Class<T> type)
[PATH1] try-body throws -> return null
[PATH2] return new ObjectMapper().readValue(json,type)
[INPUTS] branches=- | result=json, type
[EXCEPTIONS] catches Exception ex
[NEW] ObjectMapper
[CALLS-EXTERNAL] new ObjectMapper().read... | true | ok | {"focal": {"class": "JsonParser", "name": "deserialize", "signature": "T deserialize(String json, Class<T> type)", "start_line": 3, "modifiers": "public static", "params": [{"name": "json", "type": "String"}, {"name": "type", "type": "Class<T>"}], "return_type": "T"}, "class_info": {"name": "JsonParser", "kind": "class... |
107655600_15 | class MultipartUtils {
public static List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts) {
return parts.stream()
.map(part -> {
final MultiPartSpecification specification;
final String name = part.get(TestCaseUtils.JSON_FIELD_MULTIPA... | final List<Map<String, String>> parts = ImmutableList.of(
ImmutableMap.of(
TestCaseUtils.JSON_FIELD_MULTIPART_NAME, "simpleField",
TestCaseUtils.JSON_FIELD_MULTIPART_VALUE, "simpleValue"
)
);
final List<MultiPartSpecification> spec = Multi... | [FOCAL] public static List<MultiPartSpecification> MultipartUtils.convertToMultipart(List<Map<String, String>> parts)
[CLASS] class MultipartUtils
[METRICS] loc=45 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] File resolve(String filepath)
[CALLS-EXTERNAL] parts.stream() .map(part -> { final Mul... | /* static context
[FOCAL] public static List<MultiPartSpecification> MultipartUtils.convertToMultipart(List<Map<String, String>> parts)
[INPUTS] branches=- | result=parts
[COLLABORATORS] param parts:List<Map<String, String>> stream/0; field part get/1,containsKey/1
[CALLS-INTERNAL] File resolve(String filepath)
[NEW] M... | /* static context
[FOCAL] public static List<MultiPartSpecification> MultipartUtils.convertToMultipart(List<Map<String, String>> parts)
[INPUTS] branches=- | result=parts
[COLLABORATORS] param parts:List<Map<String, String>> stream/0; field part get/1,containsKey/1
[CALLS-INTERNAL] File resolve(String filepath)
[NEW] M... | true | ok | {"focal": {"class": "MultipartUtils", "name": "convertToMultipart", "signature": "List<MultiPartSpecification> convertToMultipart(List<Map<String, String>> parts)", "start_line": 3, "modifiers": "public static", "params": [{"name": "parts", "type": "List<Map<String, String>>"}], "return_type": "List<MultiPartSpecificat... |
107676801_25 | class SecretSourceResolver {
@Deprecated
@Restricted(DoNotUse.class)
public static String resolve(ConfigurationContext context, String toInterpolate) {
return context.getSecretSourceResolver().resolve(toInterpolate);
}
public SecretSourceResolver(ConfigurationContext configurationContext)... | environment.set("base64", "foo");
environment.set("file", "foo");
assertThat(resolve("${base64}"), equalTo("foo"));
assertThat(resolve("${file}"), equalTo("foo"));
}
} | [FOCAL] @Deprecated @Restricted(DoNotUse.class) public static String SecretSourceResolver.resolve(ConfigurationContext context, String toInterpolate)
[CLASS] class SecretSourceResolver
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] context.getSecretSourceResolver().resolve/1, Conf... | /* static context
[FOCAL] @Deprecated @Restricted(DoNotUse.class) public static String SecretSourceResolver.resolve(ConfigurationContext context, String toInterpolate)
[INPUTS] branches=- | result=context, toInterpolate
[COLLABORATORS] param context:ConfigurationContext getSecretSourceResolver/0
[CALLS-EXTERNAL] contex... | /* static context
[FOCAL] @Deprecated @Restricted(DoNotUse.class) public static String SecretSourceResolver.resolve(ConfigurationContext context, String toInterpolate)
[INPUTS] branches=- | result=context, toInterpolate
[COLLABORATORS] param context:ConfigurationContext getSecretSourceResolver/0
[CALLS-EXTERNAL] contex... | true | ok | {"focal": {"class": "SecretSourceResolver", "name": "resolve", "signature": "String resolve(ConfigurationContext context, String toInterpolate)", "start_line": 3, "modifiers": "@Deprecated @Restricted(DoNotUse.class) public static", "params": [{"name": "context", "type": "ConfigurationContext"}, {"name": "toInterpolate... |
107785408_7 | class RuntimeSampler {
public static ObjectMapper objectMapper() {
return new ObjectMapper()
// Property visibility
.setDefaultPropertyInclusion(JsonInclude.Include.ALWAYS)
.setDefaultVisibility(JsonAutoDetect.Value.construct(PropertyAccessor.FIELD, JsonAutoD... | String expectedJson = "{\"aBoolean\":false,\"booleanWrapper\":false,\"bytePrimitive\":0,\"byteWrapper\":0,\"charPrimitive\":\"\\u0000\",\"charWrapper\":\"\\u0000\",\"doublePrimitive\":0.0,\"doubleWrapper\":0.0,\"floatPrimitive\":0.0,\"floatWrapper\":0.0,\"intPrimitive\":0,\"intWrapper\":0,\"longPrimitive\":0,\"... | [FOCAL] public static ObjectMapper RuntimeSampler.objectMapper()
[CLASS] class RuntimeSampler
[METRICS] loc=19 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] new ObjectMapper() // Property visibility .setDefaultProp....setLocale/1, new ObjectMapper() // Property visibility .setDefaultProp....setD... | /* static context
[FOCAL] public static ObjectMapper RuntimeSampler.objectMapper()
[NEW] ObjectMapper, SimpleDateFormat, DefaultPrettyPrinter
[CALLS-EXTERNAL] new ObjectMapper() // Property visibility .setDefaultProp....setLocale/1, new ObjectMapper() // Property visibility .setDefaultProp....setDefaultPrettyPrinter/1,... | /* static context
[FOCAL] public static ObjectMapper RuntimeSampler.objectMapper()
[NEW] ObjectMapper, SimpleDateFormat, DefaultPrettyPrinter
[CALLS-EXTERNAL] new ObjectMapper() // Property visibility .setDefaultProp....setLocale/1, new ObjectMapper() // Property visibility .setDefaultProp....setDefaultPrettyPrinter/1,... | true | ok | {"focal": {"class": "RuntimeSampler", "name": "objectMapper", "signature": "ObjectMapper objectMapper()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "ObjectMapper"}, "class_info": {"name": "RuntimeSampler", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "field... |
107839447_17 | class Matrix implements Serializable {
public Matrix plusTo(@NonNull Matrix matrix) {
checkNotNull(matrix);
return Matrix.plusTo(this, matrix);
}
private Matrix(double[] array, int row, int col);
public int[] shape();
public double[] getArray();
public double[][] getArrays(... | final Matrix a = Matrix.array(new double[]{
1, 2, 3, 4, 5, 6
}, 3);
final Matrix b = Matrix.array(new double[]{
6, 5, 4, 3, 2, 1
}, 3);
final Matrix c = a.plusTo(b);
assertSame(c, a);
assertArrayEquals(a.getArray(), new double[]{... | [FOCAL] public Matrix Matrix.plusTo(Matrix matrix)
[CLASS] class Matrix implements Serializable
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] checkNotNull/1 (inherited), Matrix.plusTo/2
[INPUTS] branches=- | result=matrix
[DATAFLOW] matrix@param->L2,L4
[CLASS-MEMBERS] Matrix(doub... | /* static context
[FOCAL] public Matrix Matrix.plusTo(Matrix matrix)
[INPUTS] branches=- | result=matrix
[CALLS-EXTERNAL] checkNotNull/1 (inherited), Matrix.plusTo/2
*/
| /* static context
[FOCAL] public Matrix Matrix.plusTo(Matrix matrix)
[INPUTS] branches=- | result=matrix
[CALLS-EXTERNAL] checkNotNull/1 (inherited), Matrix.plusTo/2
*/
class Matrix implements Serializable {
public Matrix plusTo(@NonNull Matrix matrix) {
checkNotNull(matrix);
return Matrix.plusTo(... | true | ok | {"focal": {"class": "Matrix", "name": "plusTo", "signature": "Matrix plusTo(Matrix matrix)", "start_line": 3, "modifiers": "public", "params": [{"name": "matrix", "type": "Matrix"}], "return_type": "Matrix"}, "class_info": {"name": "Matrix", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Serializa... |
107873649_2 | class ConfigManager {
List<FillOption> getOptions() {
final List<FillOption> savedOptions = readConfigsFromStore();
final List<FillOption> result = new ArrayList<>(fillConfig.getOptions().size() + savedOptions.size());
result.addAll(savedOptions);
result.addAll(fillConfig.getOptions... | when(store.read(eq(ConfigManager.ORDER))).thenReturn(Arrays.asList("n1", "n2"));
when(store.read(eq(ConfigManager.KEY_PREFIX + "n1"))).thenReturn(Collections.singletonList("v1"));
when(store.read(eq(ConfigManager.KEY_PREFIX + "n1"))).thenReturn(Arrays.asList("v1", "v2", "v3"));
assertEq... | [FOCAL] List<FillOption> ConfigManager.getOptions()
[CLASS] class ConfigManager
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] List<FillOption> readConfigsFromStore()
[CALLS-EXTERNAL] fillConfig.getOptions().size/0, fillConfig.getOptions/0, List<FillOption>.size/0, List<FillOption... | /* static context
[FOCAL] List<FillOption> ConfigManager.getOptions()
[COLLABORATORS] field fillConfig getOptions/0
[CALLS-INTERNAL] List<FillOption> readConfigsFromStore()
[NEW] ArrayList<>
[CALLS-EXTERNAL] fillConfig.getOptions().size/0, fillConfig.getOptions/0, List<FillOption>.size/0, List<FillOption>.addAll/1
*/
| /* static context
[FOCAL] List<FillOption> ConfigManager.getOptions()
[COLLABORATORS] field fillConfig getOptions/0
[CALLS-INTERNAL] List<FillOption> readConfigsFromStore()
[NEW] ArrayList<>
[CALLS-EXTERNAL] fillConfig.getOptions().size/0, fillConfig.getOptions/0, List<FillOption>.size/0, List<FillOption>.addAll/1
*/
c... | true | ok | {"focal": {"class": "ConfigManager", "name": "getOptions", "signature": "List<FillOption> getOptions()", "start_line": 3, "modifiers": "", "params": [], "return_type": "List<FillOption>"}, "class_info": {"name": "ConfigManager", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name... |
107914762_0 | class StripPrefixFilter extends HttpInboundSyncFilter {
@Override
public boolean shouldFilter(HttpRequestMessage msg) {
for (String target: prefixPatterns) {
if (msg.getPath().matches(target)) {
return true;
}
}
return false;
}
public St... | StripPrefixFilter filter = new StripPrefixFilter(Arrays.asList("/path1/.*"));
assertThat(filter.shouldFilter(sampleHttpMessage("/path1/testRemaining?query1=val1"))).isTrue();
assertThat(filter.shouldFilter(sampleHttpMessage("/path2/testRemaining?query1=val1"))).isFalse();
}
} | [FOCAL] @Override public boolean StripPrefixFilter.shouldFilter(HttpRequestMessage msg)
[CLASS] class StripPrefixFilter extends HttpInboundSyncFilter
[METRICS] loc=9 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=2
[CALLS-EXTERNAL] msg.getPath().matches/1, HttpRequestMessage.getPath/0
[PATH1] foreach(String target ... | /* static context
[FOCAL] @Override public boolean StripPrefixFilter.shouldFilter(HttpRequestMessage msg)
[PATH1] foreach(String target : prefixPatterns)=T -> if(msg.getPath().matches(target))=F -> exit loop -> return false
[PATH2] foreach(String target : prefixPatterns)=T -> if(msg.getPath().matches(target))=T -> retu... | /* static context
[FOCAL] @Override public boolean StripPrefixFilter.shouldFilter(HttpRequestMessage msg)
[PATH1] foreach(String target : prefixPatterns)=T -> if(msg.getPath().matches(target))=F -> exit loop -> return false
[PATH2] foreach(String target : prefixPatterns)=T -> if(msg.getPath().matches(target))=T -> retu... | true | ok | {"focal": {"class": "StripPrefixFilter", "name": "shouldFilter", "signature": "boolean shouldFilter(HttpRequestMessage msg)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "msg", "type": "HttpRequestMessage"}], "return_type": "boolean"}, "class_info": {"name": "StripPrefixFilter", "kind": "class... |
107930307_0 | class SagaInstanceFactory {
public <SagaData> SagaInstance create(Saga<SagaData> saga, SagaData data) {
SagaManager<SagaData> sagaManager = (SagaManager<SagaData>)sagaManagers.get(saga);
if (sagaManager == null)
throw new RuntimeException(("No SagaManager for " + saga));
return sagaManager.create(... |
when(sagaManager.create(sagaData1)).thenReturn(expectedSi1);
when(sagaManager.create(sagaData2)).thenReturn(expectedSi2);
SagaInstance si1 = sagaInstanceFactory.create(saga, sagaData1);
assertEquals(expectedSi1, si1);
verify(sagaManagerFactory, times(1)).make(saga);
SagaInstance si2 = sagaIns... | [FOCAL] public SagaInstance SagaInstanceFactory.create(Saga<SagaData> saga, SagaData data)
[CLASS] class SagaInstanceFactory
[METRICS] loc=6 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] sagaManagers.get/1, SagaManager<SagaData>.create/1
[NEW] RuntimeException
[EXCEPTIONS] throws RuntimeExceptio... | /* static context
[FOCAL] public SagaInstance SagaInstanceFactory.create(Saga<SagaData> saga, SagaData data)
[THROWS-WHEN] RuntimeException when sagaManager == null
[PATH1] if(sagaManager == null)=T -> throw new RuntimeException(("No SagaManager for " + saga))
[PATH2] if(sagaManager == null)=F -> return sagaManager.cre... | /* static context
[FOCAL] public SagaInstance SagaInstanceFactory.create(Saga<SagaData> saga, SagaData data)
[THROWS-WHEN] RuntimeException when sagaManager == null
[PATH1] if(sagaManager == null)=T -> throw new RuntimeException(("No SagaManager for " + saga))
[PATH2] if(sagaManager == null)=F -> return sagaManager.cre... | true | ok | {"focal": {"class": "SagaInstanceFactory", "name": "create", "signature": "SagaInstance create(Saga<SagaData> saga, SagaData data)", "start_line": 3, "modifiers": "public", "params": [{"name": "saga", "type": "Saga<SagaData>"}, {"name": "data", "type": "SagaData"}], "return_type": "SagaInstance"}, "class_info": {"name"... |
108043571_0 | class ExtensibleFirefoxDriver extends FirefoxDriver {
public void uninstallAddon(AddonUninstallRequest request) throws IOException {
addonSupport.uninstallAddon(request);
}
public ExtensibleFirefoxDriver(GeckoDriverService service, FirefoxOptions options);
public void installAddon(AddonInsta... | File sampleExtensionZipFile = buildSampleExtension();
AddonInstallRequest installRequest = AddonInstallRequest.fromFile(sampleExtensionZipFile, AddonPersistence.TEMPORARY);
BehaviorVerifier<Void> verifier = (driver, baseUri) -> {
AddonUninstallRequest uninstallRequest = AddonUninstal... | [FOCAL] public void ExtensibleFirefoxDriver.uninstallAddon(AddonUninstallRequest request)
[CLASS] class ExtensibleFirefoxDriver extends FirefoxDriver
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] addonSupport.uninstallAddon/1
[EXCEPTIONS] declares IOException
[COLLABORATORS] fiel... | /* static context
[FOCAL] public void ExtensibleFirefoxDriver.uninstallAddon(AddonUninstallRequest request)
[COLLABORATORS] field addonSupport uninstallAddon/1
[EXCEPTIONS] declares IOException
[CALLS-EXTERNAL] addonSupport.uninstallAddon/1
*/
| /* static context
[FOCAL] public void ExtensibleFirefoxDriver.uninstallAddon(AddonUninstallRequest request)
[COLLABORATORS] field addonSupport uninstallAddon/1
[EXCEPTIONS] declares IOException
[CALLS-EXTERNAL] addonSupport.uninstallAddon/1
*/
class ExtensibleFirefoxDriver extends FirefoxDriver {
public void unins... | true | ok | {"focal": {"class": "ExtensibleFirefoxDriver", "name": "uninstallAddon", "signature": "void uninstallAddon(AddonUninstallRequest request) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "request", "type": "AddonUninstallRequest"}], "return_type": "void"}, "class_info": {"name": "Extensi... |
108180205_0 | class SPAlgorithms {
public static List<Path> kShortestPaths(Graph g, Node origin, Node destination, Integer K) throws Exception{
List<Path> A = new LinkedList<Path>();
PriorityQueue<Path> B = new PriorityQueue<Path>();
A.add(SPAlgorithms.dijkstra(g, origin,destination));
if (A.get(0) == null) throw new Excep... |
List<Path> shortPath = null;
try {
shortPath = SPAlgorithms.kShortestPaths(graph, A, D,3);
} catch (Exception e) {
// TODO Auto-generated catch block
fail(e);
}
Path abd = new Path(); abd.add(AB); abd.add(BD);
Path acd = new Path(); acd.add(AC); acd.add(CD);
Path abcd = new Path(); abcd.add(AB... | [FOCAL] public static List<Path> SPAlgorithms.kShortestPaths(Graph g, Node origin, Node destination, Integer K)
[CLASS] class SPAlgorithms
[METRICS] loc=40 cc=10 branches=5 loops=4 returns=1 throws=1 nesting=4
[CALLS-EXTERNAL] List<Path>.add/1, SPAlgorithms.dijkstra/3, List<Path>.get/1, A.get(k-1).size/0, A.get(k-1).no... | /* static context
[FOCAL] public static List<Path> SPAlgorithms.kShortestPaths(Graph g, Node origin, Node destination, Integer K)
[THROWS-WHEN] Exception when A.get(0) == null
[PATH1] if(A.get(0) == null)=F -> for(k < K)=T -> for(i < A.get(k-1).size())=T -> foreach(Path p : A)=T -> if(rootPath.equals(p.subPath(0,i)))=T... | /* static context
[FOCAL] public static List<Path> SPAlgorithms.kShortestPaths(Graph g, Node origin, Node destination, Integer K)
[THROWS-WHEN] Exception when A.get(0) == null
[PATH1] if(A.get(0) == null)=F -> for(k < K)=T -> for(i < A.get(k-1).size())=T -> foreach(Path p : A)=T -> if(rootPath.equals(p.subPath(0,i)))=T... | true | ok | {"focal": {"class": "SPAlgorithms", "name": "kShortestPaths", "signature": "List<Path> kShortestPaths(Graph g, Node origin, Node destination, Integer K) throws Exception", "start_line": 3, "modifiers": "public static", "params": [{"name": "g", "type": "Graph"}, {"name": "origin", "type": "Node"}, {"name": "destination"... |
108181481_18 | class Gateway {
public static boolean handle3DSecureResult(int requestCode, int resultCode, Intent data, Gateway3DSecureCallback callback) {
if (callback == null) {
return false;
}
if (requestCode == REQUEST_3D_SECURE) {
if (resultCode == Activity.RESULT_OK) {
... | assertFalse(Gateway.handle3DSecureResult(0, 0, null, null));
}
} | [FOCAL] public static boolean Gateway.handle3DSecureResult(int requestCode, int resultCode, Intent data, Gateway3DSecureCallback callback)
[CLASS] class Gateway
[METRICS] loc=20 cc=4 branches=3 loops=0 returns=3 throws=0 nesting=2
[CALLS-EXTERNAL] Intent.getStringExtra/1, Gateway3DSecureCallback.on3DSecureComplete/1, G... | /* static context
[FOCAL] public static boolean Gateway.handle3DSecureResult(int requestCode, int resultCode, Intent data, Gateway3DSecureCallback callback)
[PATH1] if(callback == null)=F -> if(requestCode == REQUEST_3D_SECURE)=T -> if(resultCode == Activity.RESULT_OK)=T -> return true
[PATH2] if(callback == null)=T ->... | /* static context
[FOCAL] public static boolean Gateway.handle3DSecureResult(int requestCode, int resultCode, Intent data, Gateway3DSecureCallback callback)
[PATH1] if(callback == null)=F -> if(requestCode == REQUEST_3D_SECURE)=T -> if(resultCode == Activity.RESULT_OK)=T -> return true
[PATH2] if(callback == null)=T ->... | true | ok | {"focal": {"class": "Gateway", "name": "handle3DSecureResult", "signature": "boolean handle3DSecureResult(int requestCode, int resultCode, Intent data, Gateway3DSecureCallback callback)", "start_line": 3, "modifiers": "public static", "params": [{"name": "requestCode", "type": "int"}, {"name": "resultCode", "type": "in... |
108511089_7 | class MudrodEngine {
public void startLogIngest() {
DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark);
wd.preprocess();
wd.process();
LOG.info("Logs have been ingested successfully");
}
public MudrodEngine();
public ESDriver startESDriver();
public SparkDriver startS... | fail("Not yet implemented"); // TODO
}
} | [FOCAL] public void MudrodEngine.startLogIngest()
[CLASS] class MudrodEngine
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] DiscoveryEngineAbstract.preprocess/0, DiscoveryEngineAbstract.process/0, LOG.info/1
[NEW] WeblogDiscoveryEngine
[DATAFLOW] wd@L2->L3,L4
[CLASS-MEMBERS] Mudro... | /* static context
[FOCAL] public void MudrodEngine.startLogIngest()
[NEW] WeblogDiscoveryEngine
[CALLS-EXTERNAL] DiscoveryEngineAbstract.preprocess/0, DiscoveryEngineAbstract.process/0, LOG.info/1
*/
| /* static context
[FOCAL] public void MudrodEngine.startLogIngest()
[NEW] WeblogDiscoveryEngine
[CALLS-EXTERNAL] DiscoveryEngineAbstract.preprocess/0, DiscoveryEngineAbstract.process/0, LOG.info/1
*/
class MudrodEngine {
public void startLogIngest() {
DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props,... | true | ok | {"focal": {"class": "MudrodEngine", "name": "startLogIngest", "signature": "void startLogIngest()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "MudrodEngine", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"n... |
108538904_1 | class SimilarityParser extends QParser {
public Query parse() throws SyntaxError {
//
// parse query string into terms -> use analyzer pipeline
//
final IndexSchema schema = req.getSchema();
String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.D... |
// arrange
QParser parser = new SimilarityParser("first second",new ModifiableSolrParams(),mockCorrectParams,req("first second"));
// act
Query luceneQuery = parser.parse();
// assert
Assert.assertEquals(BooleanQuery.class, luceneQuery.getClass());
BooleanQuery... | [FOCAL] public Query SimilarityParser.parse()
[CLASS] class SimilarityParser extends QParser
[METRICS] loc=67 cc=9 branches=4 loops=2 returns=1 throws=2 nesting=2
[CALLS-INTERNAL] String[] termsFromTokenStream(TokenStream stream)
[CALLS-EXTERNAL] req.getSchema/0, QueryParsing.getDefaultField/2, getParam/1 (inherited), ... | /* static context
[FOCAL] public Query SimilarityParser.parse()
[THROWS-WHEN] SyntaxError when defaultField == null && try-body throws
[THROWS-WHEN] RuntimeException when defaultField == null && try-body throws && failOnConnectionError
[THROWS-WHEN] SyntaxError when !(defaultField == null) && try-body throws
[THROWS-WH... | /* static context
[FOCAL] public Query SimilarityParser.parse()
[THROWS-WHEN] SyntaxError when defaultField == null && try-body throws
[THROWS-WHEN] RuntimeException when defaultField == null && try-body throws && failOnConnectionError
[THROWS-WHEN] SyntaxError when !(defaultField == null) && try-body throws
[THROWS-WH... | true | ok | {"focal": {"class": "SimilarityParser", "name": "parse", "signature": "Query parse() throws SyntaxError", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Query"}, "class_info": {"name": "SimilarityParser", "kind": "class", "modifiers": "", "superclass": "QParser", "interfaces": null, "fields": [{"... |
108542665_125 | class AbstractValueSpecifier implements ValueSpecifier<B> {
@Override
public final B value(String value) {
setValue(value);
return builder;
}
protected AbstractValueSpecifier(B builder, Attribute.Name name);
@Override public final B value(Integer value);
@Override public fina... | ValueBuilder valueBuilder = new ValueBuilder();
String name = "attr-name";
ValueBuilder builder = valueBuilder.withAttribute(Attribute.Name.valueOf(name)).value(Instant.EPOCH);
assertNotNull(builder);
}
} | [FOCAL] @Override public final B AbstractValueSpecifier.value(String value)
[CLASS] class AbstractValueSpecifier implements ValueSpecifier<B>
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] void setValue(Object value)
[DATAFLOW] value@param->L3
[CLASS-MEMBERS] AbstractValueSpecifie... | /* static context
[FOCAL] @Override public final B AbstractValueSpecifier.value(String value)
[CALLS-INTERNAL] void setValue(Object value)
*/
| /* static context
[FOCAL] @Override public final B AbstractValueSpecifier.value(String value)
[CALLS-INTERNAL] void setValue(Object value)
*/
class AbstractValueSpecifier implements ValueSpecifier<B> {
@Override
public final B value(String value) {
setValue(value);
return builder;
}
pr... | true | ok | {"focal": {"class": "AbstractValueSpecifier", "name": "value", "signature": "B value(String value)", "start_line": 3, "modifiers": "@Override public final", "params": [{"name": "value", "type": "String"}], "return_type": "B"}, "class_info": {"name": "AbstractValueSpecifier", "kind": "class", "modifiers": "", "superclas... |
108706261_0 | class LogoEnvPLS extends AbstractLocalStateOfEnvironment implements Cloneable {
@Override
public Object clone() {
Set<TurtlePLSInLogo>[][] turtleSet = new Set[this.width][this.height];
Set<Mark>[][] markSet = new Set[this.width][this.height];
for(int x = 0; x < this.width; x++) {
for(int y = 0; y < this.... | LogoEnvPLS e2 = (LogoEnvPLS) e1.clone();
assertEquals(e1, e2);
assertNotSame(e1,e2);
assertEquals(e1.getClass(),e2.getClass());
}
} | [FOCAL] @Override public Object LogoEnvPLS.clone()
[CLASS] class LogoEnvPLS extends AbstractLocalStateOfEnvironment implements Cloneable
[METRICS] loc=29 cc=6 branches=1 loops=4 returns=1 throws=0 nesting=4
[CALLS-EXTERNAL] this.marks[x][y].isEmpty/0, markSet[x][y].add/1, Mark.clone/0, this.pheromoneField.entrySet/0, M... | /* static context
[FOCAL] @Override public Object LogoEnvPLS.clone()
[PATH1] for(x < this.width)=T -> for(y < this.height)=T -> if(!this.marks[x][y].isEmpty())=T -> foreach(Mark mark : this.marks[x][y])=F -> exit loop -> exit loop -> foreach(Map.Entry<Pheromone, double[][]> pheromone : this.pheromoneField.entrySet())=F... | /* static context
[FOCAL] @Override public Object LogoEnvPLS.clone()
[PATH1] for(x < this.width)=T -> for(y < this.height)=T -> if(!this.marks[x][y].isEmpty())=T -> foreach(Mark mark : this.marks[x][y])=F -> exit loop -> exit loop -> foreach(Map.Entry<Pheromone, double[][]> pheromone : this.pheromoneField.entrySet())=F... | true | ok | {"focal": {"class": "LogoEnvPLS", "name": "clone", "signature": "Object clone()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Object"}, "class_info": {"name": "LogoEnvPLS", "kind": "class", "modifiers": "", "superclass": "AbstractLocalStateOfEnvironment", "interfaces": "Cloneable", "... |
108730056_24 | class Slf4JOutput implements Output {
@Override
public void write(final LogContext log) {
final LogLevel level = log.level();
final Throwable throwable = log.throwable();
final ArrayList<Throwable> suppressedThrowables = log.suppressedThrowables();
if (throwable != null && supp... | final Exception exception = new Exception();
when(logger.isWarnEnabled()).thenReturn(true);
when(ctx.level()).thenReturn(LogLevel.WARN);
when(ctx.throwable()).thenReturn(exception);
output.write(ctx);
Mockito.verify(logger).warn(anyString(), eq(exception));
}
} | [FOCAL] @Override public void Slf4JOutput.write(LogContext log)
[CLASS] class Slf4JOutput implements Output
[METRICS] loc=59 cc=15 branches=10 loops=1 returns=0 throws=0 nesting=3
[CALLS-INTERNAL] String format(LogContext log)
[CALLS-EXTERNAL] LogContext.level/0, LogContext.throwable/0, LogContext.suppressedThrowables/... | /* static context
[FOCAL] @Override public void Slf4JOutput.write(LogContext log)
[PATH1] if(throwable != null && suppressedThrowables != null)=T -> foreach(Throwable t : suppressedThrowables)=T -> exit loop -> switch(level != null ? level : LogLevel.INFO)=case DEBUG -> if(logger.isDebugEnabled())=T -> if(throwable != ... | /* static context
[FOCAL] @Override public void Slf4JOutput.write(LogContext log)
[PATH1] if(throwable != null && suppressedThrowables != null)=T -> foreach(Throwable t : suppressedThrowables)=T -> exit loop -> switch(level != null ? level : LogLevel.INFO)=case DEBUG -> if(logger.isDebugEnabled())=T -> if(throwable != ... | true | ok | {"focal": {"class": "Slf4JOutput", "name": "write", "signature": "void write(LogContext log)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "log", "type": "LogContext"}], "return_type": "void"}, "class_info": {"name": "Slf4JOutput", "kind": "class", "modifiers": "", "superclass": null, "interfa... |
108986590_1 | class Loader {
public abstract void load() throws Exceptionpublic abstract void load() throws Exception;
public abstract void load() throws Exception Loader(final String databaseName, final SparkSession spark, final DatabaseStatistics statistics);
public abstract void load() throws Exception String getValidHiveName... | final Settings settings = new Settings.Builder("testingDB").build();
final DatabaseStatistics statistics = new DatabaseStatistics("testingDB");
final VerticalPartitioningLoader vp_loader = new VerticalPartitioningLoader(settings, spark, statistics);
vp_loader.load();
final Dataset<Row> tables_list = spark.sql... | [FOCAL] public abstract void Loader.load()
[CLASS] class Loader
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[EXCEPTIONS] declares Exception
[CLASS-MEMBERS] Loader(String databaseName, SparkSession spark, DatabaseStatistics statistics); String getValidHiveName(String columnName); void useOutputD... | /* static context
[FOCAL] public abstract void Loader.load()
[EXCEPTIONS] declares Exception
*/
| /* static context
[FOCAL] public abstract void Loader.load()
[EXCEPTIONS] declares Exception
*/
class Loader {
public abstract void load() throws Exceptionpublic abstract void load() throws Exception;
public abstract void load() throws Exception Loader(final String databaseName, final SparkSession spark, final Datab... | true | partial | {"focal": {"class": "Loader", "name": "load", "signature": "void load() throws Exception", "start_line": 3, "modifiers": "public abstract", "params": [], "return_type": "void"}, "class_info": {"name": "Loader", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "spark", "type"... |
108987781_0 | class FileService {
@Transactional
public List listAllFiles(){
return fileDao.listAllFiles();
}
@Autowired public void setFileDao(FileDao fileDao);
public boolean insert(File file);
@Transactional public boolean deleteFile(int id);
@Autowired
private FileService fileService;
... | List files = fileService.listAllFiles();
File file = (File)files.get(0);
assertEquals(files.isEmpty(), false);
}
} | [FOCAL] @Transactional public List FileService.listAllFiles()
[CLASS] class FileService
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] fileDao.listAllFiles/0
[COLLABORATORS] field fileDao listAllFiles/0
[CLASS-MEMBERS] void setFileDao(FileDao fileDao); boolean insert(File file); b... | /* static context
[FOCAL] @Transactional public List FileService.listAllFiles()
[COLLABORATORS] field fileDao listAllFiles/0
[CALLS-EXTERNAL] fileDao.listAllFiles/0
*/
| /* static context
[FOCAL] @Transactional public List FileService.listAllFiles()
[COLLABORATORS] field fileDao listAllFiles/0
[CALLS-EXTERNAL] fileDao.listAllFiles/0
*/
class FileService {
@Transactional
public List listAllFiles(){
return fileDao.listAllFiles();
}
@Autowired public void setFile... | true | ok | {"focal": {"class": "FileService", "name": "listAllFiles", "signature": "List listAllFiles()", "start_line": 3, "modifiers": "@Transactional public", "params": [], "return_type": "List"}, "class_info": {"name": "FileService", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": ... |
109141516_0 | class Telemetry {
public synchronized static Telemetry getInstance() {
// If sTelemetryInstance is not initialized, telemetry will be disabled.
if (sTelemetryInstance == null) {
new Builder().build();
}
return sTelemetryInstance;
}
private Telemetry(final Buil... | Telemetry telemetry = Telemetry.getInstance();
Assert.assertNotNull(telemetry);
}
} | [FOCAL] public synchronized static Telemetry Telemetry.getInstance()
[CLASS] class Telemetry
[METRICS] loc=8 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] new Builder().build/0
[NEW] Builder
[PATH1] if(sTelemetryInstance == null)=T -> return sTelemetryInstance
[PATH2] if(sTelemetryInstance == nu... | /* static context
[FOCAL] public synchronized static Telemetry Telemetry.getInstance()
[PATH1] if(sTelemetryInstance == null)=T -> return sTelemetryInstance
[PATH2] if(sTelemetryInstance == null)=F -> return sTelemetryInstance
[NEW] Builder
[CALLS-EXTERNAL] new Builder().build/0
*/
| /* static context
[FOCAL] public synchronized static Telemetry Telemetry.getInstance()
[PATH1] if(sTelemetryInstance == null)=T -> return sTelemetryInstance
[PATH2] if(sTelemetryInstance == null)=F -> return sTelemetryInstance
[NEW] Builder
[CALLS-EXTERNAL] new Builder().build/0
*/
class Telemetry {
public synchro... | true | ok | {"focal": {"class": "Telemetry", "name": "getInstance", "signature": "Telemetry getInstance()", "start_line": 3, "modifiers": "public synchronized static", "params": [], "return_type": "Telemetry"}, "class_info": {"name": "Telemetry", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [... |
109154869_141 | class SetDataType extends CollectionDataType {
@Override
public boolean is_abstract() {
return false;
}
public SetDataType(DataType inner_type, AnyType any);
public static final String build_set_name(DataType inner);
public static SetDataType set_of(DataType inner, PrimitiveScope pscope);
@Override public ... | assertEquals("set<b>", m_set_type.name());
assertTrue(m_set_type.sub_of(m_scope.any()));
assertFalse(m_set_type.is_abstract());
assertEquals(m_type, m_set_type.inner_type());
}
} | [FOCAL] @Override public boolean SetDataType.is_abstract()
[CLASS] class SetDataType extends CollectionDataType
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] SetDataType(DataType inner_type, AnyType any); String build_set_name(DataType inner); SetDataType set_of(DataType inner, Pr... | /* static context
[FOCAL] @Override public boolean SetDataType.is_abstract()
*/
| /* static context
[FOCAL] @Override public boolean SetDataType.is_abstract()
*/
class SetDataType extends CollectionDataType {
@Override
public boolean is_abstract() {
return false;
}
public SetDataType(DataType inner_type, AnyType any);
public static final String build_set_name(DataType inner);
public stat... | true | ok | {"focal": {"class": "SetDataType", "name": "is_abstract", "signature": "boolean is_abstract()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "boolean"}, "class_info": {"name": "SetDataType", "kind": "class", "modifiers": "", "superclass": "CollectionDataType", "interfaces": null, "fiel... |
109219866_0 | class Services {
public static Services getDefault() {
return INSTANCE;
}
public Services(Require require, Global global, Worker worker);
public void postInit(Algorithms newAlgorithms);
public BigInteger factorial(int value);
end end;
}
class ServicesTest {
end end;
@T... | String n = Services.getDefault().algorithms.ruby(3);
assertEquals("Factorial of 3", "6", n);
}
} | [FOCAL] public static Services Services.getDefault()
[CLASS] class Services
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] Services(Require require, Global global, Worker worker); void postInit(Algorithms newAlgorithms); BigInteger factorial(int value)
[TEST] ServicesTest: @Test pu... | /* static context
[FOCAL] public static Services Services.getDefault()
*/
| /* static context
[FOCAL] public static Services Services.getDefault()
*/
class Services {
public static Services getDefault() {
return INSTANCE;
}
public Services(Require require, Global global, Worker worker);
public void postInit(Algorithms newAlgorithms);
public BigInteger factorial(... | true | ok | {"focal": {"class": "Services", "name": "getDefault", "signature": "Services getDefault()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "Services"}, "class_info": {"name": "Services", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "end", "ty... |
109246147_11 | class ValidateUtils {
@NonNull
static List<String> validatePromptParams(@NonNull Mode mode, @NonNull Goldfinger.PromptParams params) {
List<String> errors = new ArrayList<>();
if (!(params.dialogOwner() instanceof Fragment) && !(params.dialogOwner() instanceof FragmentActivity)) {
... | Goldfinger.PromptParams params = new Goldfinger.PromptParams.Builder(activity)
.title(TITLE)
.deviceCredentialsAllowed(true)
.build();
assertTrue(ValidateUtils.validatePromptParams(Mode.AUTHENTICATION, params).isEmpty());
}
} | [FOCAL] @NonNull static List<String> ValidateUtils.validatePromptParams(Mode mode, Goldfinger.PromptParams params)
[CLASS] class ValidateUtils
[METRICS] loc=22 cc=5 branches=4 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] Goldfinger.PromptParams.dialogOwner/0, List<String>.add/1, StringUtils.isBlankOrNull/1, Go... | /* static context
[FOCAL] @NonNull static List<String> ValidateUtils.validatePromptParams(Mode mode, Goldfinger.PromptParams params)
[PATH1] if(!(params.dialogOwner() instanceof Fragment) && !(params.dialogOwner() instanceof FragmentActivity))=T -> if(StringUtils.isBlankOrNull(params.title()))=T -> if(!params.deviceCre... | /* static context
[FOCAL] @NonNull static List<String> ValidateUtils.validatePromptParams(Mode mode, Goldfinger.PromptParams params)
[PATH1] if(!(params.dialogOwner() instanceof Fragment) && !(params.dialogOwner() instanceof FragmentActivity))=T -> if(StringUtils.isBlankOrNull(params.title()))=T -> if(!params.deviceCre... | true | ok | {"focal": {"class": "ValidateUtils", "name": "validatePromptParams", "signature": "List<String> validatePromptParams(Mode mode, Goldfinger.PromptParams params)", "start_line": 3, "modifiers": "@NonNull static", "params": [{"name": "mode", "type": "Mode"}, {"name": "params", "type": "Goldfinger.PromptParams"}], "return_... |
109294216_4 | class PhotoRepository implements PhotoDataSource {
@Override
public void savePhoto(@NonNull Photo photo) {
photoLocalDataSource.savePhoto(photo);
cachedPhotos.put(photo.getPhotoId(), photo);
}
public PhotoRepository(@NonNull PhotoDataSource photoRemoteDataSource,
... | final Photo photo = new Photo(1, 10, "a");
repository.savePhoto(photo);
verify(remoteDataSource, never()).savePhoto(photo);
verify(localDataSource, times(1)).savePhoto(photo);
assertThat(repository.cachedPhotos.size(), is(1));
}
} | [FOCAL] @Override public void PhotoRepository.savePhoto(Photo photo)
[CLASS] class PhotoRepository implements PhotoDataSource
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] photoLocalDataSource.savePhoto/1, cachedPhotos.put/2, Photo.getPhotoId/0
[COLLABORATORS] field photoLocalDat... | /* static context
[FOCAL] @Override public void PhotoRepository.savePhoto(Photo photo)
[COLLABORATORS] field photoLocalDataSource savePhoto/1; field cachedPhotos put/2; param photo:Photo getPhotoId/0
[CALLS-EXTERNAL] photoLocalDataSource.savePhoto/1, cachedPhotos.put/2, Photo.getPhotoId/0
*/
| /* static context
[FOCAL] @Override public void PhotoRepository.savePhoto(Photo photo)
[COLLABORATORS] field photoLocalDataSource savePhoto/1; field cachedPhotos put/2; param photo:Photo getPhotoId/0
[CALLS-EXTERNAL] photoLocalDataSource.savePhoto/1, cachedPhotos.put/2, Photo.getPhotoId/0
*/
class PhotoRepository imple... | true | ok | {"focal": {"class": "PhotoRepository", "name": "savePhoto", "signature": "void savePhoto(Photo photo)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "photo", "type": "Photo"}], "return_type": "void"}, "class_info": {"name": "PhotoRepository", "kind": "class", "modifiers": "", "superclass": null... |
109329697_14 | class ZawgyiDetector {
public double getZawgyiProbability(String input, boolean verbose) {
return model.predict(input, verbose);
}
public ZawgyiDetector();
ZawgyiDetector(InputStream inStream);
public double getZawgyiProbability(String input);
private static ZawgyiDetector detector;
}
class Zaw... | // Digits/numerals are ignored and treated like non-Myanmar code points.
assertThat(detector.getZawgyiProbability("၉၆.၀ kHz")).isNegativeInfinity();
assertThat(detector.getZawgyiProbability("၂၄၀၉ ဒဂုန်"))
.isEqualTo(detector.getZawgyiProbability("ဒဂုန်"));
}
} | [FOCAL] public double ZawgyiDetector.getZawgyiProbability(String input, boolean verbose)
[CLASS] class ZawgyiDetector
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] model.predict/2
[INPUTS] branches=- | result=input, verbose
[COLLABORATORS] field model predict/2
[DATAFLOW] input@p... | /* static context
[FOCAL] public double ZawgyiDetector.getZawgyiProbability(String input, boolean verbose)
[INPUTS] branches=- | result=input, verbose
[COLLABORATORS] field model predict/2
[CALLS-EXTERNAL] model.predict/2
*/
| /* static context
[FOCAL] public double ZawgyiDetector.getZawgyiProbability(String input, boolean verbose)
[INPUTS] branches=- | result=input, verbose
[COLLABORATORS] field model predict/2
[CALLS-EXTERNAL] model.predict/2
*/
class ZawgyiDetector {
public double getZawgyiProbability(String input, boolean verbose) {
... | true | ok | {"focal": {"class": "ZawgyiDetector", "name": "getZawgyiProbability", "signature": "double getZawgyiProbability(String input, boolean verbose)", "start_line": 3, "modifiers": "public", "params": [{"name": "input", "type": "String"}, {"name": "verbose", "type": "boolean"}], "return_type": "double"}, "class_info": {"name... |
109339072_9 | class Operand {
public Operand(OperandType type, int value) {
this.type = type;
this.value = value;
}
public Operand(OperandType type, int value);
public Operand(OperandType type, int value, int data);
public Operand(String text, RegisterSet registerSet, int line);
public O... |
RegisterSet registerSet = new DefaultRegisterSet();
HashMap<String, Character> labels = new HashMap<>(10);
labels.put("label1", (char) 10);
labels.put("label2", (char) 20);
labels.put("label3", (char) 30);
labels.put("label4", (char) 40);
//Valid operands
... | [FOCAL] public Operand.Operand(OperandType type, int value)
[CLASS] class Operand
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[FIELDS] write=type, value
[STATE] type via getType(), value via getValue()
[DATAFLOW] type@param->L2; value@param->L3
[CLASS-MEMBERS] Operand(OperandType type, int valu... | class Operand {
public Operand(OperandType type, int value) {
this.type = type;
this.value = value;
}
public Operand(OperandType type, int value);
public Operand(OperandType type, int value, int data);
public Operand(String text, RegisterSet registerSet, int line);
public O... | false | ok | {"focal": {"class": "Operand", "name": "Operand", "signature": "Operand(OperandType type, int value)", "start_line": 3, "modifiers": "public", "params": [{"name": "type", "type": "OperandType"}, {"name": "value", "type": "int"}], "return_type": null}, "class_info": {"name": "Operand", "kind": "class", "modifiers": "", ... | |
109361137_91 | class WXImage extends WXComponent<ImageView> {
@WXComponentProp(name = Constants.Name.RESIZE)
public void setResize(String resize) {
(getHostView()).setScaleType(getResizeMode(resize));
}
@Deprecated public WXImage(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean i... | ImageView imageView = mWXImage.initComponentHostView(Robolectric.setupActivity(TestActivity.class));
mWXImage.mHost = imageView;
mWXImage.setResize("cover");
ImageView.ScaleType scaleType = mWXImage.getHostView().getScaleType();
assertEquals(scaleType, ImageView.ScaleType.CENTER_CROP);
}
} | [FOCAL] @WXComponentProp(name = Constants.Name.RESIZE) public void WXImage.setResize(String resize)
[CLASS] class WXImage extends WXComponent<ImageView>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] ScaleType getResizeMode(String resizeMode)
[CALLS-EXTERNAL] (getHostView()).setSc... | /* static context
[FOCAL] @WXComponentProp(name = Constants.Name.RESIZE) public void WXImage.setResize(String resize)
[CALLS-INTERNAL] ScaleType getResizeMode(String resizeMode)
[CALLS-EXTERNAL] (getHostView()).setScaleType/1, getHostView/0 (inherited)
*/
| /* static context
[FOCAL] @WXComponentProp(name = Constants.Name.RESIZE) public void WXImage.setResize(String resize)
[CALLS-INTERNAL] ScaleType getResizeMode(String resizeMode)
[CALLS-EXTERNAL] (getHostView()).setScaleType/1, getHostView/0 (inherited)
*/
class WXImage extends WXComponent<ImageView> {
@WXComponentPr... | true | ok | {"focal": {"class": "WXImage", "name": "setResize", "signature": "void setResize(String resize)", "start_line": 3, "modifiers": "@WXComponentProp(name = Constants.Name.RESIZE) public", "params": [{"name": "resize", "type": "String"}], "return_type": "void"}, "class_info": {"name": "WXImage", "kind": "class", "modifiers... |
109377658_13 | class TypeUtils {
public static double string2Double(String str, double defaultValue) {
try {
if (!StringUtils.isBlank(str)) {
return Double.parseDouble(str);
}
} catch (NumberFormatException ex) {
if (logger.isWarnEnabled()) {
log... | assertEquals(0, TypeUtils.string2Double(null, 0), 5);
assertEquals(0, TypeUtils.string2Double("", 0), 5);
assertEquals(0, TypeUtils.string2Double("0", 0), 5);
assertEquals(0.1, TypeUtils.string2Double("0.1", 0), 5);
assertEquals(1.1234, TypeUtils.string2Double("1.1234", 0), 5);
... | [FOCAL] public static double TypeUtils.string2Double(String str, double defaultValue)
[CLASS] class TypeUtils
[METRICS] loc=12 cc=4 branches=2 loops=0 returns=2 throws=0 nesting=2
[CALLS-EXTERNAL] StringUtils.isBlank/1, Double.parseDouble/1, logger.isWarnEnabled/0, logger.warn/1, String.format/3
[EXCEPTIONS] catches Nu... | /* static context
[FOCAL] public static double TypeUtils.string2Double(String str, double defaultValue)
[PATH1] try-body throws -> if(logger.isWarnEnabled())=T -> return defaultValue
[PATH2] if(!StringUtils.isBlank(str))=T -> return Double.parseDouble(str)
[PATH3] if(!StringUtils.isBlank(str))=F -> return defaultValue
... | /* static context
[FOCAL] public static double TypeUtils.string2Double(String str, double defaultValue)
[PATH1] try-body throws -> if(logger.isWarnEnabled())=T -> return defaultValue
[PATH2] if(!StringUtils.isBlank(str))=T -> return Double.parseDouble(str)
[PATH3] if(!StringUtils.isBlank(str))=F -> return defaultValue
... | true | ok | {"focal": {"class": "TypeUtils", "name": "string2Double", "signature": "double string2Double(String str, double defaultValue)", "start_line": 3, "modifiers": "public static", "params": [{"name": "str", "type": "String"}, {"name": "defaultValue", "type": "double"}], "return_type": "double"}, "class_info": {"name": "Type... |
109394368_32 | class User {
public void setUserId(int userId) {
this.userId = userId;
}
public User(int userId,
String username,
boolean isFriend,
boolean isBlocked,
boolean isRequesting,
boolean requestPending,
Loca... | user2.setUserId(12121);
assertEquals(12121, user2.getUserId());
}
} | [FOCAL] public void User.setUserId(int userId)
[CLASS] class User
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[FIELDS] write=userId
[STATE] userId via getUserId()
[DATAFLOW] userId@param->L2
[CLASS-MEMBERS] User(int userId, String username, boolean isFriend, boolean isBlocked, boolean isRequest... | /* static context
[FOCAL] public void User.setUserId(int userId)
[STATE] userId via getUserId()
[FIELDS] write=userId
*/
| /* static context
[FOCAL] public void User.setUserId(int userId)
[STATE] userId via getUserId()
[FIELDS] write=userId
*/
class User {
public void setUserId(int userId) {
this.userId = userId;
}
public User(int userId,
String username,
boolean isFriend,
... | true | ok | {"focal": {"class": "User", "name": "setUserId", "signature": "void setUserId(int userId)", "start_line": 3, "modifiers": "public", "params": [{"name": "userId", "type": "int"}], "return_type": "void"}, "class_info": {"name": "User", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{... |
109401796_2 | class FeatureServiceImpl {
private FeatureExtension[] mergeExtensions(Feature f1, Feature f2, MergeContext ctx) {
Map<String,FeatureExtension> extensions = new HashMap<>(f1.getExtensions());
Map<String,FeatureExtension> addExtensions = new HashMap<>();
for (Map.Entry<String,FeatureExtensio... | BuilderFactory bf = Features.getBuilderFactory();
URL res1 = getClass().getResource("/features/test-exfeat1.json");
Feature f1;
try (Reader r = new InputStreamReader(res1.openStream())) {
f1 = Features.readFeature(r);
}
URL res2 = getClass().getResource("/fe... | [FOCAL] private FeatureExtension[] FeatureServiceImpl.mergeExtensions(Feature f1, Feature f2, MergeContext ctx)
[CLASS] class FeatureServiceImpl
[METRICS] loc=22 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=3
[CALLS-EXTERNAL] Feature.getExtensions/0, f2.getExtensions().entrySet/0, Map.Entry<String,FeatureExtensio... | /* static context
[FOCAL] private FeatureExtension[] FeatureServiceImpl.mergeExtensions(Feature f1, Feature f2, MergeContext ctx)
[PATH1] foreach(Map.Entry<String,FeatureExtension> exEntry : f2.getExtensions().entrySet())=T -> if(orgEx != null)=T -> if(!resEx.equals(orgEx))=T -> exit loop -> return extensions.values().... | /* static context
[FOCAL] private FeatureExtension[] FeatureServiceImpl.mergeExtensions(Feature f1, Feature f2, MergeContext ctx)
[PATH1] foreach(Map.Entry<String,FeatureExtension> exEntry : f2.getExtensions().entrySet())=T -> if(orgEx != null)=T -> if(!resEx.equals(orgEx))=T -> exit loop -> return extensions.values().... | true | ok | {"focal": {"class": "FeatureServiceImpl", "name": "mergeExtensions", "signature": "FeatureExtension[] mergeExtensions(Feature f1, Feature f2, MergeContext ctx)", "start_line": 3, "modifiers": "private", "params": [{"name": "f1", "type": "Feature"}, {"name": "f2", "type": "Feature"}, {"name": "ctx", "type": "MergeContex... |
109413088_0 | class ReflectionHelper {
static <T> T instantiate(Class<T> type, Object... args) {
try {
if (args.length == 0) {
//return type.newInstance(); //deprecated
return type.getDeclaredConstructor().newInstance();
} else {
Class<?>[] classes ... | TestClass testClass = ReflectionHelper.instantiate(TestClass.class);
Assert.assertEquals(0, testClass.getA());
Assert.assertEquals("", testClass.getS());
Assert.assertEquals(1, ReflectionHelper.instantiate(TestClass.class, 1).getA());
Assert.assertEquals("A", ReflectionHelper.in... | [FOCAL] static T ReflectionHelper.instantiate(Class<T> type, Object... args)
[CLASS] class ReflectionHelper
[METRICS] loc=14 cc=3 branches=1 loops=0 returns=3 throws=0 nesting=2
[CALLS-INTERNAL] Class<?>[] toClasses(Object[] args)
[CALLS-EXTERNAL] type.getDeclaredConstructor().newInstance/0, Class<T>.getDeclaredConstru... | /* static context
[FOCAL] static T ReflectionHelper.instantiate(Class<T> type, Object... args)
[PATH1] try-body throws -> return null
[PATH2] if(args.length == 0)=T -> return type.getDeclaredConstructor().newInstance()
[PATH3] if(args.length == 0)=F -> return type.getDeclaredConstructor(classes).newInstance(args)
[INPU... | /* static context
[FOCAL] static T ReflectionHelper.instantiate(Class<T> type, Object... args)
[PATH1] try-body throws -> return null
[PATH2] if(args.length == 0)=T -> return type.getDeclaredConstructor().newInstance()
[PATH3] if(args.length == 0)=F -> return type.getDeclaredConstructor(classes).newInstance(args)
[INPU... | true | ok | {"focal": {"class": "ReflectionHelper", "name": "instantiate", "signature": "T instantiate(Class<T> type, Object... args)", "start_line": 3, "modifiers": "static", "params": [{"name": "type", "type": "Class<T>"}, {"name": "args", "type": "Object..."}], "return_type": "T"}, "class_info": {"name": "ReflectionHelper", "ki... |
109754092_3 | class AuditLogDirectParser implements AuditCommandParser {
@Override
public AuditReplayCommand parse(Text inputLine, Function<Long, Long> relativeToAbsolute) throws IOException {
Matcher m = MESSAGE_ONLY_PATTERN.matcher(inputLine.toString());
if (!m.find()) {
throw new IOException("Unable to find val... | Text in = getAuditString("1970-01-01 00:00:11,000", "fakeUser", "listStatus", "sourcePath", "null");
AuditReplayCommand expected =
new AuditReplayCommand(1000, "fakeUser", "listStatus", "sourcePath", "null", "0.0.0.0");
assertEquals(expected, parser.parse(in, IDENTITY_FN));
}
} | [FOCAL] @Override public AuditReplayCommand AuditLogDirectParser.parse(Text inputLine, Function<Long, Long> relativeToAbsolute)
[CLASS] class AuditLogDirectParser implements AuditCommandParser
[METRICS] loc=21 cc=3 branches=1 loops=0 returns=1 throws=2 nesting=1
[CALLS-EXTERNAL] MESSAGE_ONLY_PATTERN.matcher/1, Text.toS... | /* static context
[FOCAL] @Override public AuditReplayCommand AuditLogDirectParser.parse(Text inputLine, Function<Long, Long> relativeToAbsolute)
[THROWS-WHEN] IOException when !m.find()
[THROWS-WHEN] IOException when m.find() && try-body throws
[PATH1] if(!m.find())=F -> try-body throws -> throw new IOException("Excep... | /* static context
[FOCAL] @Override public AuditReplayCommand AuditLogDirectParser.parse(Text inputLine, Function<Long, Long> relativeToAbsolute)
[THROWS-WHEN] IOException when !m.find()
[THROWS-WHEN] IOException when m.find() && try-body throws
[PATH1] if(!m.find())=F -> try-body throws -> throw new IOException("Excep... | true | ok | {"focal": {"class": "AuditLogDirectParser", "name": "parse", "signature": "AuditReplayCommand parse(Text inputLine, Function<Long, Long> relativeToAbsolute) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "inputLine", "type": "Text"}, {"name": "relativeToAbsolute", "type": "Fu... |
109754107_0 | class ParallelProcessor implements AutoCloseable, BatchIterator<R> {
@Override
public long skip(long count) {
long skipped = 0;
while (skipped < count) {
try {
if (!ensureBuffer()) {
return skipped; // end of results
}
} catch (InterruptedException e) {
Thread.... | DummyProcessor dp = new DummyProcessor(false);
for (int i = 0; i < 10000; i += 5) {
Integer res = dp.nextInterruptable();
assertEquals(i, (int) res);
dp.skip(4);
}
}
} | [FOCAL] @Override public long ParallelProcessor.skip(long count)
[CLASS] class ParallelProcessor implements AutoCloseable, BatchIterator<R>
[METRICS] loc=23 cc=4 branches=1 loops=1 returns=2 throws=1 nesting=3
[CALLS-INTERNAL] boolean ensureBuffer()
[CALLS-EXTERNAL] Thread.currentThread().interrupt/0, Thread.currentThr... | /* static context
[FOCAL] @Override public long ParallelProcessor.skip(long count)
[THROWS-WHEN] UncheckedInterruptedException when skipped < count && try-body throws
[PATH1] while(skipped < count)=T -> if(!ensureBuffer())=F -> exit loop -> return skipped
[PATH2] while(skipped < count)=T -> try-body throws -> throw new... | /* static context
[FOCAL] @Override public long ParallelProcessor.skip(long count)
[THROWS-WHEN] UncheckedInterruptedException when skipped < count && try-body throws
[PATH1] while(skipped < count)=T -> if(!ensureBuffer())=F -> exit loop -> return skipped
[PATH2] while(skipped < count)=T -> try-body throws -> throw new... | true | ok | {"focal": {"class": "ParallelProcessor", "name": "skip", "signature": "long skip(long count)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "count", "type": "long"}], "return_type": "long"}, "class_info": {"name": "ParallelProcessor", "kind": "class", "modifiers": "", "superclass": null, "inter... |
109774858_2 | class LRUCache {
public LRUCache(int capacity) {
this.capacity = capacity;
map = new HashMap<>();
head = new Node(-1, -1);
tail = new Node(-1, -1);
head.next = tail;
tail.prev = head;
}
public LRUCache(int capacity);
public Integer lookup(Integer key);
private void pushToHead(Node ... | final int capacity = 8;
final Map<Integer, Integer> map = new HashMap<>();
final List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
final LRUCache cache = new LRUCache(capacity);
list.forEach(i -> {
cache.insert(i, i);
});
//FIRST TWO HAVE BEEN REPLACED
assertNull(... | [FOCAL] public LRUCache.LRUCache(int capacity)
[CLASS] class LRUCache
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[NEW] HashMap<>, Node
[FIELDS] write=capacity
[STATE] capacity
[DATAFLOW] capacity@param->L2; head@L4->L6,L7; tail@L5->L6,L7
[CLASS-MEMBERS] LRUCache(int capacity); Integer lookup(I... | /* static context
[FOCAL] public LRUCache.LRUCache(int capacity)
[STATE] capacity
[FIELDS] write=capacity
[NEW] HashMap<>, Node
*/
| /* static context
[FOCAL] public LRUCache.LRUCache(int capacity)
[STATE] capacity
[FIELDS] write=capacity
[NEW] HashMap<>, Node
*/
class LRUCache {
public LRUCache(int capacity) {
this.capacity = capacity;
map = new HashMap<>();
head = new Node(-1, -1);
tail = new Node(-1, -1);
head.next = tail;
... | true | ok | {"focal": {"class": "LRUCache", "name": "LRUCache", "signature": "LRUCache(int capacity)", "start_line": 3, "modifiers": "public", "params": [{"name": "capacity", "type": "int"}], "return_type": null}, "class_info": {"name": "LRUCache", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields":... |
109902579_117 | class ServiceHost implements ServiceRequestSender {
public ServiceHost setPublicUri(URI publicUri) {
this.state.publicUri = publicUri;
clearUriAndLogPrefix();
return this;
}
protected ServiceHost();
public static ServiceHost create(String... args);
public ServiceHost init... | setUp(false);
ExampleServiceHost h = new ExampleServiceHost();
try {
// try invalid arguments
ServiceHost.Arguments hostArgs = new ServiceHost.Arguments();
hostArgs.publicUri = "";
try {
h.initialize(hostArgs);
thr... | [FOCAL] public ServiceHost ServiceHost.setPublicUri(URI publicUri)
[CLASS] class ServiceHost implements ServiceRequestSender
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] void clearUriAndLogPrefix()
[FIELDS] read=state
[DATAFLOW] publicUri@param->L2
[CLASS-MEMBERS] ServiceHost();... | class ServiceHost implements ServiceRequestSender {
public ServiceHost setPublicUri(URI publicUri) {
this.state.publicUri = publicUri;
clearUriAndLogPrefix();
return this;
}
protected ServiceHost();
public static ServiceHost create(String... args);
public ServiceHost init... | false | ok | {"focal": {"class": "ServiceHost", "name": "setPublicUri", "signature": "ServiceHost setPublicUri(URI publicUri)", "start_line": 3, "modifiers": "public", "params": [{"name": "publicUri", "type": "URI"}], "return_type": "ServiceHost"}, "class_info": {"name": "ServiceHost", "kind": "class", "modifiers": "", "superclass"... | |
109917787_31 | class TopicClusterSubCommand implements SubCommand {
@Override
public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException {
DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook);
defaultMQAdminExt.setInstanceName(Long.toS... | TopicClusterSubCommand cmd = new TopicClusterSubCommand();
Options options = ServerUtil.buildCommandlineOptions(new Options());
String[] subargs = new String[] {"-t unit-test"};
final CommandLine commandLine =
ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs, c... | [FOCAL] @Override public void TopicClusterSubCommand.execute(CommandLine commandLine, Options options, RPCHook rpcHook)
[CLASS] class TopicClusterSubCommand implements SubCommand
[METRICS] loc=17 cc=3 branches=0 loops=1 returns=0 throws=1 nesting=2
[CALLS-EXTERNAL] DefaultMQAdminExt.setInstanceName/1, Long.toString/1, ... | /* static context
[FOCAL] @Override public void TopicClusterSubCommand.execute(CommandLine commandLine, Options options, RPCHook rpcHook)
[THROWS-WHEN] SubCommandException when try-body throws
[PATH1] try-body throws -> throw new SubCommandException(this.getClass().getSimpleName() + " command...
[PATH2] foreach(String ... | /* static context
[FOCAL] @Override public void TopicClusterSubCommand.execute(CommandLine commandLine, Options options, RPCHook rpcHook)
[THROWS-WHEN] SubCommandException when try-body throws
[PATH1] try-body throws -> throw new SubCommandException(this.getClass().getSimpleName() + " command...
[PATH2] foreach(String ... | true | ok | {"focal": {"class": "TopicClusterSubCommand", "name": "execute", "signature": "void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "commandLine", "type": "CommandLine"}, {"name": "options", "type": "Op... |
109999895_30 | class Guard implements Internal<Guard<S, T>, T> {
public static <T> Guard<Chain<T>, T> call(@NonNull Callable<T> callable) {
return new Guard<>(new Chain<T>(null, InternalConfiguration.getInstance(null)).access(),
callable);
}
private Guard(Proxy<S, T> proxy, Exception error);
... |
final TestClass[] result = {new TestClass()};
Guard.call(new Callable<TestClass>()
{
@Override
public TestClass call() throws Exception {
result[0].text = "!";
return result[0];
}
});
assertEquals("!", result[0... | [FOCAL] public static Guard<Chain<T>, T> Guard.call(Callable<T> callable)
[CLASS] class Guard implements Internal<Guard<S, T>, T>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] new Chain<T>(null, InternalConfiguration.getInstance(null)).access/0, InternalConfiguration.getInstance/... | /* static context
[FOCAL] public static Guard<Chain<T>, T> Guard.call(Callable<T> callable)
[INPUTS] branches=- | result=callable
[NEW] Guard<>, Chain<T>
[CALLS-EXTERNAL] new Chain<T>(null, InternalConfiguration.getInstance(null)).access/0, InternalConfiguration.getInstance/1
*/
| /* static context
[FOCAL] public static Guard<Chain<T>, T> Guard.call(Callable<T> callable)
[INPUTS] branches=- | result=callable
[NEW] Guard<>, Chain<T>
[CALLS-EXTERNAL] new Chain<T>(null, InternalConfiguration.getInstance(null)).access/0, InternalConfiguration.getInstance/1
*/
class Guard implements Internal<Guard<S,... | true | ok | {"focal": {"class": "Guard", "name": "call", "signature": "Guard<Chain<T>, T> call(Callable<T> callable)", "start_line": 3, "modifiers": "public static", "params": [{"name": "callable", "type": "Callable<T>"}], "return_type": "Guard<Chain<T>, T>"}, "class_info": {"name": "Guard", "kind": "class", "modifiers": "", "supe... |
110054572_6 | class Root {
public State getState() {
return state;
}
public Root(State state);
@Override public String toString();
@Override public boolean equals(Object o);
@Override public int hashCode();
@Rule public MockitoRule rule;
@Mock RxCmdShell.Builder shellBuilder;
@Mock Rx... | when(shell.open()).thenReturn(Single.just(shellSession));
when(shellSession.submit(any(Cmd.class))).thenAnswer(invocation -> Single.just(new Cmd.Result(invocation.getArgument(0), Cmd.ExitCode.TIMEOUT, new ArrayList<>(), new ArrayList<>())));
Root.Builder builder = new Root.Builder().timeout(100... | [FOCAL] public State Root.getState()
[CLASS] class Root
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] Root(State state); String toString(); boolean equals(Object o); int hashCode()
[TEST] RootTest: @Test public void testCommand_timeout()
[TEST-FIELDS] MockitoRule rule, RxCmdShell.... | /* static context
[FOCAL] public State Root.getState()
*/
| /* static context
[FOCAL] public State Root.getState()
*/
class Root {
public State getState() {
return state;
}
public Root(State state);
@Override public String toString();
@Override public boolean equals(Object o);
@Override public int hashCode();
@Rule public MockitoRule rul... | true | ok | {"focal": {"class": "Root", "name": "getState", "signature": "State getState()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "State"}, "class_info": {"name": "Root", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "rule", "type": "MockitoRule", "mod... |
110117973_41 | class ParallelQueryBuilder implements Serializable {
protected static List<String> queriesForBounds(
long min, long max, int parallelism, String splitColumn, QueryBuilder queryBuilder) {
List<QueryRange> ranges = generateRanges(min, max, parallelism);
return ranges.stream()
.map(
... | final List<String> actual = ParallelQueryBuilder.queriesForBounds(1, 2, 2, "sp", QUERY_FORMAT);
assertThat(
actual,
Matchers.is(
Lists.newArrayList(
format("%s AND sp >= %s AND sp < %s", QUERY_BASE, 1, 2),
format("%s AND sp >= %s AND sp <= %s", QUERY_... | [FOCAL] protected static List<String> ParallelQueryBuilder.queriesForBounds(long min, long max, int parallelism, String splitColumn, QueryBuilder queryBuilder)
[CLASS] class ParallelQueryBuilder implements Serializable
[METRICS] loc=14 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] List<QueryRang... | /* static context
[FOCAL] protected static List<String> ParallelQueryBuilder.queriesForBounds(long min, long max, int parallelism, String splitColumn, QueryBuilder queryBuilder)
[INPUTS] branches=- | result=max, min, parallelism, queryBuilder, splitColumn
[COLLABORATORS] param queryBuilder:QueryBuilder withParallelizat... | /* static context
[FOCAL] protected static List<String> ParallelQueryBuilder.queriesForBounds(long min, long max, int parallelism, String splitColumn, QueryBuilder queryBuilder)
[INPUTS] branches=- | result=max, min, parallelism, queryBuilder, splitColumn
[COLLABORATORS] param queryBuilder:QueryBuilder withParallelizat... | true | ok | {"focal": {"class": "ParallelQueryBuilder", "name": "queriesForBounds", "signature": "List<String> queriesForBounds(long min, long max, int parallelism, String splitColumn, QueryBuilder queryBuilder)", "start_line": 3, "modifiers": "protected static", "params": [{"name": "min", "type": "long"}, {"name": "max", "type": ... |
110121462_2 | class PathUtils {
public static void removeRecursive(final Path path) throws IOException {
Files.walkFileTree(
path,
new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)
throws IOException {
... | final Path root = Files.createDirectory(fs.getPath("/", "root"));
final Path unrelated = Files.write(root.resolve("unrelated"), new byte[] {0x0f});
final Path dir = Files.createDirectory(root.resolve("dir"));
Files.write(dir.resolve("a"), new byte[] {0x00});
Files.write(dir.resolve("b"), new byte[]... | [FOCAL] public static void PathUtils.removeRecursive(Path path)
[CLASS] class PathUtils
[METRICS] loc=19 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] Files.walkFileTree/2, Files.deleteIfExists/1
[NEW] SimpleFileVisitor<Path>
[EXCEPTIONS] declares IOException
[DATAFLOW] path@param->L2
[CLASS-MEM... | /* static context
[FOCAL] public static void PathUtils.removeRecursive(Path path)
[EXCEPTIONS] declares IOException
[NEW] SimpleFileVisitor<Path>
[CALLS-EXTERNAL] Files.walkFileTree/2, Files.deleteIfExists/1
*/
| /* static context
[FOCAL] public static void PathUtils.removeRecursive(Path path)
[EXCEPTIONS] declares IOException
[NEW] SimpleFileVisitor<Path>
[CALLS-EXTERNAL] Files.walkFileTree/2, Files.deleteIfExists/1
*/
class PathUtils {
public static void removeRecursive(final Path path) throws IOException {
Files.walkF... | true | ok | {"focal": {"class": "PathUtils", "name": "removeRecursive", "signature": "void removeRecursive(Path path) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "path", "type": "Path"}], "return_type": "void"}, "class_info": {"name": "PathUtils", "kind": "class", "modifiers": "", "super... |
110164590_0 | class AuthUserDetailsService implements UserDetailsService {
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User user = repository.findOne(username);
if (user == null) {
throw new UsernameNotFoundException(username);
}
... |
final User user = new User();
when(repository.findOne(any())).thenReturn(user);
UserDetails loaded = service.loadUserByUsername("Username");
assertEquals(user, loaded);
}
} | [FOCAL] @Override public UserDetails AuthUserDetailsService.loadUserByUsername(String username)
[CLASS] class AuthUserDetailsService implements UserDetailsService
[METRICS] loc=11 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] UserRepository.findOne/1, log.debug/2, User.toString/0
[NEW] UsernameN... | /* static context
[FOCAL] @Override public UserDetails AuthUserDetailsService.loadUserByUsername(String username)
[THROWS-WHEN] UsernameNotFoundException when user == null
[PATH1] if(user == null)=T -> throw new UsernameNotFoundException(username)
[PATH2] if(user == null)=F -> return user
[INPUTS] branches=username, re... | /* static context
[FOCAL] @Override public UserDetails AuthUserDetailsService.loadUserByUsername(String username)
[THROWS-WHEN] UsernameNotFoundException when user == null
[PATH1] if(user == null)=T -> throw new UsernameNotFoundException(username)
[PATH2] if(user == null)=F -> return user
[INPUTS] branches=username, re... | true | ok | {"focal": {"class": "AuthUserDetailsService", "name": "loadUserByUsername", "signature": "UserDetails loadUserByUsername(String username) throws UsernameNotFoundException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "username", "type": "String"}], "return_type": "UserDetails"}, "class_info": ... |
110344150_1 | class SelectIndexDataActivity extends BaseActivity {
public static int randomizedSelect(int[] a, int p, int r, int i) {
if (p == r) {
return a[p];//这种情况就是数组内只有一个元素
}
// 查找p r中间点 q
int q = randomizedPartition(a, p, r);
// 这里都是基于游标的,因为k是第几个,所以要加 1
int k = q... |
int a[]={2,5,3,0,2,3,0,3};
int result= selectIndexDataActivity.randomizedSelect(a,0,a.length-1,3);//产生第三小的数
System.out.println("快速选择算法求出的,第"+3+"个最小数是:"+result);
assertEquals(2,result);
}
} | [FOCAL] public static int SelectIndexDataActivity.randomizedSelect(int[] a, int p, int r, int i)
[CLASS] class SelectIndexDataActivity extends BaseActivity
[METRICS] loc=20 cc=4 branches=3 loops=0 returns=4 throws=0 nesting=2
[CALLS-INTERNAL] int randomizedPartition(int[] a, int p, int r)
[CALLS-EXTERNAL] randomizedSel... | /* static context
[FOCAL] public static int SelectIndexDataActivity.randomizedSelect(int[] a, int p, int r, int i)
[PATH1] if(p == r)=F -> if(i == k)=F -> if(i < k)=T -> return randomizedSelect(a, p, q - 1, i)
[PATH2] if(p == r)=T -> return a[p]
[PATH3] if(p == r)=F -> if(i == k)=T -> return a[q]
[PATH4] if(p == r)=F -... | /* static context
[FOCAL] public static int SelectIndexDataActivity.randomizedSelect(int[] a, int p, int r, int i)
[PATH1] if(p == r)=F -> if(i == k)=F -> if(i < k)=T -> return randomizedSelect(a, p, q - 1, i)
[PATH2] if(p == r)=T -> return a[p]
[PATH3] if(p == r)=F -> if(i == k)=T -> return a[q]
[PATH4] if(p == r)=F -... | true | ok | {"focal": {"class": "SelectIndexDataActivity", "name": "randomizedSelect", "signature": "int randomizedSelect(int[] a, int p, int r, int i)", "start_line": 3, "modifiers": "public static", "params": [{"name": "a", "type": "int[]"}, {"name": "p", "type": "int"}, {"name": "r", "type": "int"}, {"name": "i", "type": "int"}... |
110449600_0 | class AddAnimalPresenter extends BasePresenter<AddAnimalContract.View> implements AddAnimalContract.Presenter<AddAnimalContract.View> {
@Override
public void addNewDog(DogFirebase dogFirebase) {
firebaseRepository.addNew(dogFirebase);
}
public AddAnimalPresenter(Repository.Firebase<DogFireba... | InMemoryDogRepository repository = InMemoryDogRepository.getInstance();
AddAnimalPresenter presenter = new AddAnimalPresenter(repository);
presenter.attachView(mockView);
presenter.addNewDog(new DogFirebase());
assertThat(repository.getCachedDogs().size(), is(1));
}
} | [FOCAL] @Override public void AddAnimalPresenter.addNewDog(DogFirebase dogFirebase)
[CLASS] class AddAnimalPresenter extends BasePresenter<AddAnimalContract.View> implements AddAnimalContract.Presenter<AddAnimalContract.View>
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] firebase... | /* static context
[FOCAL] @Override public void AddAnimalPresenter.addNewDog(DogFirebase dogFirebase)
[COLLABORATORS] field firebaseRepository addNew/1
[CALLS-EXTERNAL] firebaseRepository.addNew/1
*/
| /* static context
[FOCAL] @Override public void AddAnimalPresenter.addNewDog(DogFirebase dogFirebase)
[COLLABORATORS] field firebaseRepository addNew/1
[CALLS-EXTERNAL] firebaseRepository.addNew/1
*/
class AddAnimalPresenter extends BasePresenter<AddAnimalContract.View> implements AddAnimalContract.Presenter<AddAnimalC... | true | ok | {"focal": {"class": "AddAnimalPresenter", "name": "addNewDog", "signature": "void addNewDog(DogFirebase dogFirebase)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "dogFirebase", "type": "DogFirebase"}], "return_type": "void"}, "class_info": {"name": "AddAnimalPresenter", "kind": "class", "modi... |
110454850_13 | class EditMessageMedia extends SendableInputFileInlineRequest<Message> {
public static EditMessageMediaBuilder forMessage(AudioMessage message) {
Objects.requireNonNull(message, "audio message cannot be null");
return builder()
.chatId(message.getChat().getChatId())
... | EditMessageMedia expected = EditMessageMedia.forMessage(videoMessageMock).build();
EditMessageMedia actual = videoMessageMock.toEditMediaRequest().build();
assertEquals(expected, actual);
}
} | [FOCAL] public static EditMessageMediaBuilder EditMessageMedia.forMessage(AudioMessage message)
[CLASS] class EditMessageMedia extends SendableInputFileInlineRequest<Message>
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Objects.requireNonNull/2, builder() .chatId(message.getChat... | /* static context
[FOCAL] public static EditMessageMediaBuilder EditMessageMedia.forMessage(AudioMessage message)
[INPUTS] branches=- | result=message
[COLLABORATORS] param message:AudioMessage getChat/0,getMessageId/0
[CALLS-EXTERNAL] Objects.requireNonNull/2, builder() .chatId(message.getChat().getChatId()).messageId... | /* static context
[FOCAL] public static EditMessageMediaBuilder EditMessageMedia.forMessage(AudioMessage message)
[INPUTS] branches=- | result=message
[COLLABORATORS] param message:AudioMessage getChat/0,getMessageId/0
[CALLS-EXTERNAL] Objects.requireNonNull/2, builder() .chatId(message.getChat().getChatId()).messageId... | true | ok | {"focal": {"class": "EditMessageMedia", "name": "forMessage", "signature": "EditMessageMediaBuilder forMessage(AudioMessage message)", "start_line": 3, "modifiers": "public static", "params": [{"name": "message", "type": "AudioMessage"}], "return_type": "EditMessageMediaBuilder"}, "class_info": {"name": "EditMessageMed... |
110526820_8 | class ReferenceIdOverrider implements ReferenceOverrider {
@Override
public void override(UserTask userTask) {
String oldFormKey = userTask.getFormKey();
String newFormKey = modelIdentifiers.get(oldFormKey);
if (newFormKey != null) {
userTask.setFormKey(newFormKey);
... | UserTask userTask = new UserTask();
userTask.setFormKey("oldFormKey");
referenceIdOverrider.override(userTask);
assertThat(userTask.getFormKey()).isEqualTo("newFormKey");
}
} | [FOCAL] @Override public void ReferenceIdOverrider.override(UserTask userTask)
[CLASS] class ReferenceIdOverrider implements ReferenceOverrider
[METRICS] loc=8 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] UserTask.getFormKey/0, modelIdentifiers.get/1, UserTask.setFormKey/1
[PATH1] if(newFormKey... | /* static context
[FOCAL] @Override public void ReferenceIdOverrider.override(UserTask userTask)
[PATH1] if(newFormKey != null)=T
[PATH2] if(newFormKey != null)=F
[INPUTS] branches=userTask | result=-
[COLLABORATORS] param userTask:UserTask getFormKey/0,setFormKey/1; field modelIdentifiers get/1
[CALLS-EXTERNAL] UserTa... | /* static context
[FOCAL] @Override public void ReferenceIdOverrider.override(UserTask userTask)
[PATH1] if(newFormKey != null)=T
[PATH2] if(newFormKey != null)=F
[INPUTS] branches=userTask | result=-
[COLLABORATORS] param userTask:UserTask getFormKey/0,setFormKey/1; field modelIdentifiers get/1
[CALLS-EXTERNAL] UserTa... | true | ok | {"focal": {"class": "ReferenceIdOverrider", "name": "override", "signature": "void override(UserTask userTask)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "userTask", "type": "UserTask"}], "return_type": "void"}, "class_info": {"name": "ReferenceIdOverrider", "kind": "class", "modifiers": ""... |
110547066_3 | class RemoveUnusedDefinitions implements Consumer<Swagger> {
@Override
public void accept(Swagger swagger) {
int initial = swagger.getDefinitions().size();
Pruner pruner = new Pruner(buildHierarchy(swagger));
while(pruner.hasPruneable()) {
Stream<String> prune = pruner.prune... | int initial = swagger.getDefinitions().size();
Map<String, Path> paths = swagger.getPaths().entrySet().stream()
.filter(p -> !p.getKey().startsWith("/c")).collect(toMap());
swagger.setPaths(paths);
new RemoveUnusedDefinitions().accept(swagger);
assertEquals(init... | [FOCAL] @Override public void RemoveUnusedDefinitions.accept(Swagger swagger)
[CLASS] class RemoveUnusedDefinitions implements Consumer<Swagger>
[METRICS] loc=16 cc=2 branches=0 loops=1 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] Map<String, TypeNode> buildHierarchy(Swagger swagger)
[CALLS-EXTERNAL] swagger.getDefini... | /* static context
[FOCAL] @Override public void RemoveUnusedDefinitions.accept(Swagger swagger)
[PATH1] while(pruner.hasPruneable())=T -> exit loop
[PATH2] while(pruner.hasPruneable())=F
[INPUTS] branches=swagger | result=-
[COLLABORATORS] param swagger:Swagger getDefinitions/0,setDefinitions/1
[CALLS-INTERNAL] Map<Str... | /* static context
[FOCAL] @Override public void RemoveUnusedDefinitions.accept(Swagger swagger)
[PATH1] while(pruner.hasPruneable())=T -> exit loop
[PATH2] while(pruner.hasPruneable())=F
[INPUTS] branches=swagger | result=-
[COLLABORATORS] param swagger:Swagger getDefinitions/0,setDefinitions/1
[CALLS-INTERNAL] Map<Str... | true | ok | {"focal": {"class": "RemoveUnusedDefinitions", "name": "accept", "signature": "void accept(Swagger swagger)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "swagger", "type": "Swagger"}], "return_type": "void"}, "class_info": {"name": "RemoveUnusedDefinitions", "kind": "class", "modifiers": "", ... |
110686293_62 | class LocationUtil {
public static List<Location> getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp) {
List<Location> matchingLocations = new ArrayList<>();
for (Location location : locationList) {
if (location.getTimestamp() < minimumTimestam... | final Location firstLocation = LocationTest.SOCCER_FIELD_TOP_LEFT;
final Location secondLocation = LocationTest.SOCCER_FIELD_TOP_RIGHT;
final Location thirdLocation = LocationTest.SOCCER_FIELD_BOTTOM_LEFT;
firstLocation.setTimestamp(0);
secondLocation.setTimestamp(1);
thi... | [FOCAL] public static List<Location> LocationUtil.getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp)
[CLASS] class LocationUtil
[METRICS] loc=10 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] Location.getTimestamp/0, List<Location>.add/1
[NEW] ArrayList... | /* static context
[FOCAL] public static List<Location> LocationUtil.getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp)
[PATH1] foreach(Location location : locationList)=T -> if(location.getTimestamp() < minimumTimestamp || location.getTimestamp() >= maximumTimestamp)=T -> exi... | /* static context
[FOCAL] public static List<Location> LocationUtil.getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp)
[PATH1] foreach(Location location : locationList)=T -> if(location.getTimestamp() < minimumTimestamp || location.getTimestamp() >= maximumTimestamp)=T -> exi... | true | ok | {"focal": {"class": "LocationUtil", "name": "getLocationsBetween", "signature": "List<Location> getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp)", "start_line": 3, "modifiers": "public static", "params": [{"name": "locationList", "type": "List<Location>"}, {"name": "minimum... |
110719900_2 | class CommonUtils {
public static boolean isEmailValid(String email) {
Pattern pattern;
Matcher matcher;
final String EMAIL_PATTERN =
"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
pattern = ... | assertFalse(CommonUtils.isEmailValid(NO_AT_THE_RATE));
}
} | [FOCAL] public static boolean CommonUtils.isEmailValid(String email)
[CLASS] class CommonUtils
[METRICS] loc=13 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Pattern.compile/1, Pattern.matcher/1, Matcher.matches/0
[INPUTS] branches=- | result=email
[DATAFLOW] EMAIL_PATTERN@L5->L9; email@param->L... | /* static context
[FOCAL] public static boolean CommonUtils.isEmailValid(String email)
[INPUTS] branches=- | result=email
[CALLS-EXTERNAL] Pattern.compile/1, Pattern.matcher/1, Matcher.matches/0
*/
| /* static context
[FOCAL] public static boolean CommonUtils.isEmailValid(String email)
[INPUTS] branches=- | result=email
[CALLS-EXTERNAL] Pattern.compile/1, Pattern.matcher/1, Matcher.matches/0
*/
class CommonUtils {
public static boolean isEmailValid(String email) {
Pattern pattern;
Matcher match... | true | ok | {"focal": {"class": "CommonUtils", "name": "isEmailValid", "signature": "boolean isEmailValid(String email)", "start_line": 3, "modifiers": "public static", "params": [{"name": "email", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "CommonUtils", "kind": "class", "modifiers": "", "superclass": n... |
110837893_0 | class FileTaskAccessor implements TaskAccessor {
@Override
public List<Task> loadTasks() {
List<Task> tasks = new ArrayList<>();
// 1. 获取task配置文件
File[] taskFiles = FileAccessSupport.getTaskFiles(DEFAULT_TASK_PATH);
// 2. 解析task配置文件
for (File taskFile : taskFiles) {
... | List<Task> tasks = fileTaskLoader.loadTasks();
Assert.assertEquals(1, tasks.size());
}
} | [FOCAL] @Override public List<Task> FileTaskAccessor.loadTasks()
[CLASS] class FileTaskAccessor implements TaskAccessor
[METRICS] loc=13 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] FileAccessSupport.getTaskFiles/1, FileParser.parseTask/2, List<Task>.add/1
[NEW] ArrayList<>
[PATH1] foreach(File... | /* static context
[FOCAL] @Override public List<Task> FileTaskAccessor.loadTasks()
[PATH1] foreach(File taskFile : taskFiles)=T -> exit loop -> return tasks
[PATH2] foreach(File taskFile : taskFiles)=F -> return tasks
[NEW] ArrayList<>
[CALLS-EXTERNAL] FileAccessSupport.getTaskFiles/1, FileParser.parseTask/2, List<Task... | /* static context
[FOCAL] @Override public List<Task> FileTaskAccessor.loadTasks()
[PATH1] foreach(File taskFile : taskFiles)=T -> exit loop -> return tasks
[PATH2] foreach(File taskFile : taskFiles)=F -> return tasks
[NEW] ArrayList<>
[CALLS-EXTERNAL] FileAccessSupport.getTaskFiles/1, FileParser.parseTask/2, List<Task... | true | ok | {"focal": {"class": "FileTaskAccessor", "name": "loadTasks", "signature": "List<Task> loadTasks()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "List<Task>"}, "class_info": {"name": "FileTaskAccessor", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "TaskAccessor",... |
110988186_211 | class KleinbergSmallWorldGraphGenerator implements GraphGenerator<V, E, V> {
@Override
public void generateGraph(
Graph<V, E> target, VertexFactory<V> vertexFactory, Map<String, V> resultMap)
{
/*
* Special cases
*/
if (n == 0) {
return;
} else ... | final long seed = 5;
GraphGenerator<Integer, DefaultEdge, Integer> gen =
new KleinbergSmallWorldGraphGenerator<>(5, 2, 3, 2, seed);
Graph<Integer, DefaultEdge> g = new SimpleDirectedGraph<>(DefaultEdge.class);
gen.generateGraph(g, new IntegerVertexFactory(), null);
... | [FOCAL] @Override public void KleinbergSmallWorldGraphGenerator.generateGraph(Graph<V, E> target, VertexFactory<V> vertexFactory, Map<String, V> resultMap)
[CLASS] class KleinbergSmallWorldGraphGenerator implements GraphGenerator<V, E, V>
[METRICS] loc=94 cc=19 branches=7 loops=11 returns=2 throws=1 nesting=5
[CALLS-EX... | /* static context
[FOCAL] @Override public void KleinbergSmallWorldGraphGenerator.generateGraph(Graph<V, E> target, VertexFactory<V> vertexFactory, Map<String, V> resultMap)
[THROWS-WHEN] IllegalArgumentException when !(n == 0) && !(n == 1) && i < n * n && !target.addVertex(v)
[PATH1] if(n == 0)=F -> if(n == 1)=F -> fo... | /* static context
[FOCAL] @Override public void KleinbergSmallWorldGraphGenerator.generateGraph(Graph<V, E> target, VertexFactory<V> vertexFactory, Map<String, V> resultMap)
[THROWS-WHEN] IllegalArgumentException when !(n == 0) && !(n == 1) && i < n * n && !target.addVertex(v)
[PATH1] if(n == 0)=F -> if(n == 1)=F -> fo... | true | ok | {"focal": {"class": "KleinbergSmallWorldGraphGenerator", "name": "generateGraph", "signature": "void generateGraph(Graph<V, E> target, VertexFactory<V> vertexFactory, Map<String, V> resultMap)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "target", "type": "Graph<V, E>"}, {"name": "vertexFacto... |
110995785_4 | class ValueSets extends AbstractValueSets<ValueSet, ValueSets> {
public static ValueSets getEmpty(SparkSession spark) {
Dataset<ValueSet> emptyValueSets = spark.emptyDataset(VALUE_SET_ENCODER)
.withColumn("timestamp", lit(null).cast("timestamp"))
.as(VALUE_SET_ENCODER);
return new ValueSets... |
ValueSets valueSets = ValueSets.getEmpty(spark)
.withValueSetsFromDirectory("src/test/resources/json/valuesets");
ValueSet marriedValueSet = valueSets.getValueSet(
"urn:cerner:bunsen:valueset:married_maritalstatus",
"0.0.1");
Assert.assertNotNull(marriedValueSet);
Assert.asser... | [FOCAL] public static ValueSets ValueSets.getEmpty(SparkSession spark)
[CLASS] class ValueSets extends AbstractValueSets<ValueSet, ValueSets>
[METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] spark.emptyDataset(VALUE_SET_ENCODER) .withColumn("timest....as/1, spark.emptyDataset(VALUE... | /* static context
[FOCAL] public static ValueSets ValueSets.getEmpty(SparkSession spark)
[INPUTS] branches=- | result=spark
[COLLABORATORS] param spark:SparkSession emptyDataset/1
[NEW] ValueSets
[CALLS-EXTERNAL] spark.emptyDataset(VALUE_SET_ENCODER) .withColumn("timest....as/1, spark.emptyDataset(VALUE_SET_ENCODER).wi... | /* static context
[FOCAL] public static ValueSets ValueSets.getEmpty(SparkSession spark)
[INPUTS] branches=- | result=spark
[COLLABORATORS] param spark:SparkSession emptyDataset/1
[NEW] ValueSets
[CALLS-EXTERNAL] spark.emptyDataset(VALUE_SET_ENCODER) .withColumn("timest....as/1, spark.emptyDataset(VALUE_SET_ENCODER).wi... | true | ok | {"focal": {"class": "ValueSets", "name": "getEmpty", "signature": "ValueSets getEmpty(SparkSession spark)", "start_line": 3, "modifiers": "public static", "params": [{"name": "spark", "type": "SparkSession"}], "return_type": "ValueSets"}, "class_info": {"name": "ValueSets", "kind": "class", "modifiers": "", "superclass... |
111026852_397 | class ResponseConverter implements Function<Sc2Api.Response, Response> {
@Override
public Response apply(Sc2Api.Response sc2ApiResponse) {
require("sc2api response", sc2ApiResponse);
if (sc2ApiResponse.getErrorCount() > 0) {
return ResponseError.from(sc2ApiResponse);
}
... | assertThat(new ResponseConverter().apply(sc2ApiResponseWithReplayInfo()))
.as("creates ResponseReplayInfo instance from sc2api response")
.isInstanceOf(ResponseReplayInfo.class);
}
} | [FOCAL] @Override public Response ResponseConverter.apply(Sc2Api.Response sc2ApiResponse)
[CLASS] class ResponseConverter implements Function<Sc2Api.Response, Response>
[METRICS] loc=71 cc=23 branches=22 loops=0 returns=22 throws=1 nesting=1
[CALLS-EXTERNAL] require/2 (inherited), Sc2Api.Response.getErrorCount/0, Respo... | /* static context
[FOCAL] @Override public Response ResponseConverter.apply(Sc2Api.Response sc2ApiResponse)
[THROWS-WHEN] AssertionError when !(sc2ApiResponse.getErrorCount() > 0) && !sc2ApiResponse.hasPing() && !sc2ApiResponse.hasAvailableMaps() && !sc2ApiResponse.hasCreateGame() && !sc2ApiResponse.hasJoinGame() && !s... | /* static context
[FOCAL] @Override public Response ResponseConverter.apply(Sc2Api.Response sc2ApiResponse)
[THROWS-WHEN] AssertionError when !(sc2ApiResponse.getErrorCount() > 0) && !sc2ApiResponse.hasPing() && !sc2ApiResponse.hasAvailableMaps() && !sc2ApiResponse.hasCreateGame() && !sc2ApiResponse.hasJoinGame() && !s... | true | ok | {"focal": {"class": "ResponseConverter", "name": "apply", "signature": "Response apply(Sc2Api.Response sc2ApiResponse)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "sc2ApiResponse", "type": "Sc2Api.Response"}], "return_type": "Response"}, "class_info": {"name": "ResponseConverter", "kind": "c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.