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 |
|---|---|---|---|---|---|---|---|---|
34633211_2 | class JJJVMInterpreter implements JJJVMConstants {
public static Object invoke(final JJJVMClass caller, final JJJVMObject instance, final JJJVMMethod methodToInvoke, final Object[] args, final Object[] stack, final Object[] vars) throws Throwable {
final int methodFlags = methodToInvoke.getFlags();
if ((meth... | final JSEProviderImpl provider = new JSEProviderImpl(this);
final JJJVMClass testKlazz = loadClassFromClassPath(provider, "com/igormaznitsa/jjjvm/testclasses/TestIssue");
final JJJVMMethod append = testKlazz.findMethod("trampoline", "()Ljava/lang/String;");
String res = (String) append.invoke(null, new ... | [FOCAL] public static Object JJJVMInterpreter.invoke(JJJVMClass caller, JJJVMObject instance, JJJVMMethod methodToInvoke, Object[] args, Object[] stack, Object[] vars)
[CLASS] class JJJVMInterpreter implements JJJVMConstants
[METRICS] loc=29 cc=4 branches=3 loops=0 returns=2 throws=1 nesting=2
[CALLS-INTERNAL] Object _... | /* static context
[FOCAL] public static Object JJJVMInterpreter.invoke(JJJVMClass caller, JJJVMObject instance, JJJVMMethod methodToInvoke, Object[] args, Object[] stack, Object[] vars)
[THROWS-WHEN] IllegalArgumentException when (methodFlags & ACC_NATIVE) != 0
[PATH1] if((methodFlags & ACC_NATIVE) != 0)=F -> if((metho... | /* static context
[FOCAL] public static Object JJJVMInterpreter.invoke(JJJVMClass caller, JJJVMObject instance, JJJVMMethod methodToInvoke, Object[] args, Object[] stack, Object[] vars)
[THROWS-WHEN] IllegalArgumentException when (methodFlags & ACC_NATIVE) != 0
[PATH1] if((methodFlags & ACC_NATIVE) != 0)=F -> if((metho... | true | ok | {"focal": {"class": "JJJVMInterpreter", "name": "invoke", "signature": "Object invoke(JJJVMClass caller, JJJVMObject instance, JJJVMMethod methodToInvoke, Object[] args, Object[] stack, Object[] vars) throws Throwable", "start_line": 3, "modifiers": "public static", "params": [{"name": "caller", "type": "JJJVMClass"}, ... |
34667720_0 | class WebLogParser {
public static Map<String, Mapper> loadRegistry(Model model) {
List<Resource> rs = model.listResourcesWithProperty(RDF.type, LSQ.WebAccessLogFormat).toList();
Map<String, Mapper> result = rs.stream()
.filter(r -> r.hasProperty(LSQ.pattern))
.collect(Coll... | // Note: using a '-' for numResponseBytes
//String expected = "140.203.154.206 - - [16/May/2014:00:29:09 +0100] \"GET http://localhost:8890/sparql?default-graph-uri=&query=SELECT+%3Fparty+%3Fpage++WHERE+%0D%0A%7B+SERVICE+%3Chttp%3A%2F%2Fdbpedia-subset.system.ip.address%3A8891%2Fsparql%3E+%7B+%3Chttp%3A%... | [FOCAL] public static Map<String, Mapper> WebLogParser.loadRegistry(Model model)
[CLASS] class WebLogParser
[METRICS] loc=12 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Mapper create(String pattern)
[CALLS-EXTERNAL] model.listResourcesWithProperty(RDF.type, LSQ.WebAccessLo....toList/0, Model.l... | /* static context
[FOCAL] public static Map<String, Mapper> WebLogParser.loadRegistry(Model model)
[INPUTS] branches=- | result=model
[COLLABORATORS] param model:Model listResourcesWithProperty/2; field r hasProperty/1,getLocalName/0,getProperty/1
[CALLS-INTERNAL] Mapper create(String pattern)
[CALLS-EXTERNAL] model.li... | /* static context
[FOCAL] public static Map<String, Mapper> WebLogParser.loadRegistry(Model model)
[INPUTS] branches=- | result=model
[COLLABORATORS] param model:Model listResourcesWithProperty/2; field r hasProperty/1,getLocalName/0,getProperty/1
[CALLS-INTERNAL] Mapper create(String pattern)
[CALLS-EXTERNAL] model.li... | true | ok | {"focal": {"class": "WebLogParser", "name": "loadRegistry", "signature": "Map<String, Mapper> loadRegistry(Model model)", "start_line": 3, "modifiers": "public static", "params": [{"name": "model", "type": "Model"}], "return_type": "Map<String, Mapper>"}, "class_info": {"name": "WebLogParser", "kind": "class", "modifie... |
34685629_7 | class VerigreenNeededLogic {
public VerigreenNeeded isVerigreenNeeded(
final String parentBranchName,
final String branchNameToVerify,
final String commitId,
final String committer) {
String reason = "";
boolean ans;
boolean shouldRejectCommit = true;
ans= (VerigreenMap.get("_protectedBranches"... |
VerigreenNeeded verigreenNeeded =
CollectorApi.getVerigreenNeededLogic().isVerigreenNeeded(
protectedBranch,
branch,
"",
"user1");
Assert.assertEquals(true, verigreenNeeded.getVerigre... | [FOCAL] public VerigreenNeeded VerigreenNeededLogic.isVerigreenNeeded(String parentBranchName, String branchNameToVerify, String commitId, String committer)
[CLASS] class VerigreenNeededLogic
[METRICS] loc=78 cc=11 branches=9 loops=1 returns=1 throws=0 nesting=5
[CALLS-INTERNAL] CommitItem checkIfCommitItemExists(Strin... | /* static context
[FOCAL] public VerigreenNeeded VerigreenNeededLogic.isVerigreenNeeded(String parentBranchName, String branchNameToVerify, String commitId, String committer)
[PATH1] if(ans)=T -> if(item != null)=F -> if(passCommit != null)=T -> foreach(String commit : passCommit)=T -> if(!commit.equals("") && branchNa... | /* static context
[FOCAL] public VerigreenNeeded VerigreenNeededLogic.isVerigreenNeeded(String parentBranchName, String branchNameToVerify, String commitId, String committer)
[PATH1] if(ans)=T -> if(item != null)=F -> if(passCommit != null)=T -> foreach(String commit : passCommit)=T -> if(!commit.equals("") && branchNa... | true | ok | {"focal": {"class": "VerigreenNeededLogic", "name": "isVerigreenNeeded", "signature": "VerigreenNeeded isVerigreenNeeded(String parentBranchName, String branchNameToVerify, String commitId, String committer)", "start_line": 3, "modifiers": "public", "params": [{"name": "parentBranchName", "type": "String"}, {"name": "b... |
34685800_68 | class EclipseCdtFormatterStepImpl {
public String format(String raw) throws Exception {
//The 'kind' can be set to CodeFormatter.K_UNKNOWN, since it is anyway ignored by the internal formatter
TextEdit edit = codeFormatter.format(CodeFormatter.K_UNKNOWN, raw, 0, raw.length(), 0, SpotlessEclipseFramework.LINE_DELI... | String output = format(CPP_FORMATTED.replace("int main() {", "int main() "), config -> {});
assertTrue("Incomplete CPP not formatted on best effort basis.", output.contains("int main()" + LINE_DELIMITER));
}
} | [FOCAL] public String EclipseCdtFormatterStepImpl.format(String raw)
[CLASS] class EclipseCdtFormatterStepImpl
[METRICS] loc=11 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] codeFormatter.format/6, String.length/0, TextEdit.apply/1, IDocument.get/0
[NEW] IllegalArgumentException, Document
[EXCEP... | /* static context
[FOCAL] public String EclipseCdtFormatterStepImpl.format(String raw)
[THROWS-WHEN] IllegalArgumentException when edit == null
[PATH1] if(edit == null)=T -> throw new IllegalArgumentException("Invalid C/C++ syntax for formatting.")
[PATH2] if(edit == null)=F -> return doc.get()
[INPUTS] branches=raw | ... | /* static context
[FOCAL] public String EclipseCdtFormatterStepImpl.format(String raw)
[THROWS-WHEN] IllegalArgumentException when edit == null
[PATH1] if(edit == null)=T -> throw new IllegalArgumentException("Invalid C/C++ syntax for formatting.")
[PATH2] if(edit == null)=F -> return doc.get()
[INPUTS] branches=raw | ... | true | ok | {"focal": {"class": "EclipseCdtFormatterStepImpl", "name": "format", "signature": "String format(String raw) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "raw", "type": "String"}], "return_type": "String"}, "class_info": {"name": "EclipseCdtFormatterStepImpl", "kind": "class", "modifie... |
34793185_127 | class TerminationTreeItemContent implements IsElement {
public void setExistingValue(Object value,
TerminationConfigOption terminationConfigOption) {
TerminationManager operation = terminationManagerMap.get(terminationConfigOption);
if (operation != null) {
... | terminationTreeItemContent.setExistingValue("0",
TerminationConfigOption.BEST_SCORE_LIMIT);
verify(view).setBestScoreLimit("0");
}
} | [FOCAL] public void TerminationTreeItemContent.setExistingValue(Object value, TerminationConfigOption terminationConfigOption)
[CLASS] class TerminationTreeItemContent implements IsElement
[METRICS] loc=7 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] terminationManagerMap.get/1, TerminationManag... | /* static context
[FOCAL] public void TerminationTreeItemContent.setExistingValue(Object value, TerminationConfigOption terminationConfigOption)
[PATH1] if(operation != null)=T
[PATH2] if(operation != null)=F
[INPUTS] branches=terminationConfigOption | result=-
[COLLABORATORS] field terminationManagerMap get/1
[CALLS-E... | /* static context
[FOCAL] public void TerminationTreeItemContent.setExistingValue(Object value, TerminationConfigOption terminationConfigOption)
[PATH1] if(operation != null)=T
[PATH2] if(operation != null)=F
[INPUTS] branches=terminationConfigOption | result=-
[COLLABORATORS] field terminationManagerMap get/1
[CALLS-E... | true | ok | {"focal": {"class": "TerminationTreeItemContent", "name": "setExistingValue", "signature": "void setExistingValue(Object value, TerminationConfigOption terminationConfigOption)", "start_line": 3, "modifiers": "public", "params": [{"name": "value", "type": "Object"}, {"name": "terminationConfigOption", "type": "Terminat... |
34809191_909 | class VaadinConnectController {
@PostMapping(path = "/{endpoint}/{method}", produces =
MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity<String> serveEndpoint(
@PathVariable("endpoint") String endpointName,
@PathVariable("method") String methodName,
@R... | String inputId = "2222";
String expectedResult = String.format("{\"id\":\"%s\"}", inputId);
BridgeMethodTestEndpoint.InheritedClass testEndpoint = new BridgeMethodTestEndpoint.InheritedClass();
String testMethodName = "testMethodFromInterface";
ResponseEntity<String> response = c... | [FOCAL] @PostMapping(path = "/{endpoint}/{method}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<String> VaadinConnectController.serveEndpoint(String endpointName, String methodName, ObjectNode body, HttpServletRequest request)
[CLASS] class VaadinConnectController
[METRICS] loc=54 cc=6 branc... | /* static context
[FOCAL] @PostMapping(path = "/{endpoint}/{method}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<String> VaadinConnectController.serveEndpoint(String endpointName, String methodName, ObjectNode body, HttpServletRequest request)
[THROWS-WHEN] IllegalStateException when !(vaad... | /* static context
[FOCAL] @PostMapping(path = "/{endpoint}/{method}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<String> VaadinConnectController.serveEndpoint(String endpointName, String methodName, ObjectNode body, HttpServletRequest request)
[THROWS-WHEN] IllegalStateException when !(vaad... | true | ok | {"focal": {"class": "VaadinConnectController", "name": "serveEndpoint", "signature": "ResponseEntity<String> serveEndpoint(String endpointName, String methodName, ObjectNode body, HttpServletRequest request)", "start_line": 3, "modifiers": "@PostMapping(path = \"/{endpoint}/{method}\", produces = MediaType.APPLICATION_... |
34813674_8 | class trityp {
public static int type(int Side1, int Side2, int Side3)
{
int tri_out;
// tri_out is output from the routine:
// Triang = 1 if triangle is scalene
// Triang = 2 if triangle is isosceles
// Triang = 3 if triangle is equilateral
// Triang... | Assert.assertEquals(trityp.type(1,1,0), 4);
}
} | [FOCAL] public static int trityp.type(int Side1, int Side2, int Side3)
[CLASS] class trityp
[METRICS] loc=50 cc=11 branches=10 loops=0 returns=3 throws=0 nesting=4
[PATH1] if(Side1 <= 0 || Side2 <= 0 || Side3 <= 0)=F -> if(Side1 == Side2)=T -> if(Side1 == Side3)=T -> if(Side2 == Side3)=T -> if(tri_out == 0)=F -> if(tri... | /* static context
[FOCAL] public static int trityp.type(int Side1, int Side2, int Side3)
[PATH1] if(Side1 <= 0 || Side2 <= 0 || Side3 <= 0)=F -> if(Side1 == Side2)=T -> if(Side1 == Side3)=T -> if(Side2 == Side3)=T -> if(tri_out == 0)=F -> if(tri_out > 3)=F -> if(tri_out == 1 && Side1+Side2 > Side3)=F -> if(tri_out == 2... | /* static context
[FOCAL] public static int trityp.type(int Side1, int Side2, int Side3)
[PATH1] if(Side1 <= 0 || Side2 <= 0 || Side3 <= 0)=F -> if(Side1 == Side2)=T -> if(Side1 == Side3)=T -> if(Side2 == Side3)=T -> if(tri_out == 0)=F -> if(tri_out > 3)=F -> if(tri_out == 1 && Side1+Side2 > Side3)=F -> if(tri_out == 2... | true | ok | {"focal": {"class": "trityp", "name": "type", "signature": "int type(int Side1, int Side2, int Side3)", "start_line": 3, "modifiers": "public static", "params": [{"name": "Side1", "type": "int"}, {"name": "Side2", "type": "int"}, {"name": "Side3", "type": "int"}], "return_type": "int"}, "class_info": {"name": "trityp",... |
34819120_17 | class IntrabandProxyUtil {
protected static void serializerWrite(
MethodNodeGenerator methodNodeGenerator, Type type) {
String owner = _SERIALIZER_TYPE.getInternalName();
if (type.getSort() <= Type.DOUBLE) {
String name = TextFormatter.format(
type.getClassName(), TextFormatter.G);
methodNodeGenera... | MethodNode methodNode = new MethodNode(
Opcodes.ACC_PUBLIC, "name", "()V", null, null);
MethodNodeGenerator methodNodeGenerator = new MethodNodeGenerator(
methodNode);
InsnList insnList = methodNode.instructions;
for (Type type : _types) {
IntrabandProxyUtil.serializerWrite(methodNodeGenerator, type... | [FOCAL] protected static void IntrabandProxyUtil.serializerWrite(MethodNodeGenerator methodNodeGenerator, Type type)
[CLASS] class IntrabandProxyUtil
[METRICS] loc=21 cc=3 branches=2 loops=0 returns=0 throws=0 nesting=2
[CALLS-EXTERNAL] _SERIALIZER_TYPE.getInternalName/0, Type.getSort/0, TextFormatter.format/2, Type.ge... | /* static context
[FOCAL] protected static void IntrabandProxyUtil.serializerWrite(MethodNodeGenerator methodNodeGenerator, Type type)
[PATH1] if(type.getSort() <= Type.DOUBLE)=F -> if(type.equals(_STRING_TYPE))=T
[PATH2] if(type.getSort() <= Type.DOUBLE)=T
[PATH3] if(type.getSort() <= Type.DOUBLE)=F -> if(type.equals(... | /* static context
[FOCAL] protected static void IntrabandProxyUtil.serializerWrite(MethodNodeGenerator methodNodeGenerator, Type type)
[PATH1] if(type.getSort() <= Type.DOUBLE)=F -> if(type.equals(_STRING_TYPE))=T
[PATH2] if(type.getSort() <= Type.DOUBLE)=T
[PATH3] if(type.getSort() <= Type.DOUBLE)=F -> if(type.equals(... | true | ok | {"focal": {"class": "IntrabandProxyUtil", "name": "serializerWrite", "signature": "void serializerWrite(MethodNodeGenerator methodNodeGenerator, Type type)", "start_line": 3, "modifiers": "protected static", "params": [{"name": "methodNodeGenerator", "type": "MethodNodeGenerator"}, {"name": "type", "type": "Type"}], "r... |
34824538_140 | class VisualRecognition extends BaseService {
public ServiceCall<ImageDetailsList> addImages(AddImagesOptions addImagesOptions) {
com.ibm.cloud.sdk.core.util.Validator.notNull(
addImagesOptions, "addImagesOptions cannot be null");
com.ibm.cloud.sdk.core.util.Validator.isTrue(
(addImagesOption... | server.enqueue(jsonResponse(imageDetailsList));
AddImagesOptions options =
new AddImagesOptions.Builder()
.addImagesFile(fileWithMetadata)
.addImageUrl(IMAGE_URL)
.collectionId(COLLECTION_ID)
.trainingData(TRAINING_DATA)
.build();
ImageDet... | [FOCAL] public ServiceCall<ImageDetailsList> VisualRecognition.addImages(AddImagesOptions addImagesOptions)
[CLASS] class VisualRecognition extends BaseService
[METRICS] loc=43 cc=7 branches=3 loops=3 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] com.ibm.cloud.sdk.core.util.Validator.notNull/2, com.ibm.cloud.sdk.core.u... | class VisualRecognition extends BaseService {
public ServiceCall<ImageDetailsList> addImages(AddImagesOptions addImagesOptions) {
com.ibm.cloud.sdk.core.util.Validator.notNull(
addImagesOptions, "addImagesOptions cannot be null");
com.ibm.cloud.sdk.core.util.Validator.isTrue(
(addImagesOption... | false | ok | {"focal": {"class": "VisualRecognition", "name": "addImages", "signature": "ServiceCall<ImageDetailsList> addImages(AddImagesOptions addImagesOptions)", "start_line": 3, "modifiers": "public", "params": [{"name": "addImagesOptions", "type": "AddImagesOptions"}], "return_type": "ServiceCall<ImageDetailsList>"}, "class_i... | |
34839383_1797 | class InternalCacheBuilder {
public InternalCache create()
throws TimeoutException, CacheWriterException, GatewayException, RegionExistsException {
synchronized (InternalCacheBuilder.class) {
InternalDistributedSystem internalDistributedSystem = findInternalDistributedSystem()
.orElseGet(th... | InternalDistributedSystem singletonSystem = singletonSystem();
InternalCache constructedCache = constructedCache();
InternalCacheConstructor cacheConstructor = constructorOf(constructedCache);
InternalCacheBuilder internalCacheBuilder = new InternalCacheBuilder(
new Properties(), new CacheConf... | [FOCAL] public InternalCache InternalCacheBuilder.create()
[CLASS] class InternalCacheBuilder
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] InternalCache create(InternalDistributedSystem internalDistributedSystem); Optional<InternalDistributedSystem> findInternalDistributedSystem... | /* static context
[FOCAL] public InternalCache InternalCacheBuilder.create()
[EXCEPTIONS] declares TimeoutException, CacheWriterException, GatewayException, RegionExistsException
[CALLS-INTERNAL] InternalCache create(InternalDistributedSystem internalDistributedSystem); Optional<InternalDistributedSystem> findInternalD... | /* static context
[FOCAL] public InternalCache InternalCacheBuilder.create()
[EXCEPTIONS] declares TimeoutException, CacheWriterException, GatewayException, RegionExistsException
[CALLS-INTERNAL] InternalCache create(InternalDistributedSystem internalDistributedSystem); Optional<InternalDistributedSystem> findInternalD... | true | ok | {"focal": {"class": "InternalCacheBuilder", "name": "create", "signature": "InternalCache create() throws TimeoutException, CacheWriterException, GatewayException, RegionExistsException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "InternalCache"}, "class_info": {"name": "InternalCacheBuilder"... |
34881325_6 | class Acacia {
public static void stopService(Object aService)
{
for (Class<?> myInterface : aService.getClass().getInterfaces())
{
Service serviceAnnotation = myInterface.getAnnotation(Service.class);
if (serviceAnnotation != null)
{
try
... | TestServiceOnWorkerThread serviceInterface = Acacia.createService(
Robolectric.application, TestServiceOnWorkerThread.class);
Acacia.stopService(serviceInterface);
assertTrue(shadowOf(androidService).isStoppedBySelf());
Class<? extends ServiceConnection> unboundConn = ... | [FOCAL] public static void Acacia.stopService(Object aService)
[CLASS] class Acacia
[METRICS] loc=25 cc=4 branches=1 loops=1 returns=1 throws=1 nesting=3
[CALLS-EXTERNAL] aService.getClass().getInterfaces/0, Object.getClass/0, Class<?>.getAnnotation/1, ServiceControl.class.getDeclaredMethod/1, Method.invoke/1, Log.e/3,... | /* static context
[FOCAL] public static void Acacia.stopService(Object aService)
[THROWS-WHEN] AcaciaException when foreach(Class<?> myInterface : aService.getClass().getInterfaces())=T && !(serviceAnnotation != null)
[THROWS-WHEN] AcaciaException when foreach(Class<?> myInterface : aService.getClass().getInterfaces())... | /* static context
[FOCAL] public static void Acacia.stopService(Object aService)
[THROWS-WHEN] AcaciaException when foreach(Class<?> myInterface : aService.getClass().getInterfaces())=T && !(serviceAnnotation != null)
[THROWS-WHEN] AcaciaException when foreach(Class<?> myInterface : aService.getClass().getInterfaces())... | true | ok | {"focal": {"class": "Acacia", "name": "stopService", "signature": "void stopService(Object aService)", "start_line": 3, "modifiers": "public static", "params": [{"name": "aService", "type": "Object"}], "return_type": "void"}, "class_info": {"name": "Acacia", "kind": "class", "modifiers": "", "superclass": null, "interf... |
34915443_3 | class JSources extends JNode {
List<JPackage> getHierarchyPackages(List<JavaPackage> packages) {
Map<String, JPackage> pkgMap = new HashMap<String, JPackage>();
for (JavaPackage pkg : packages) {
addPackage(pkgMap, new JPackage(pkg));
}
// merge packages without classes
boolean repeat;
do {
repeat =... | List<JavaPackage> packages = Arrays.asList(
newPkg("a.p1"),
newPkg("a.b.c.p2"),
newPkg("a.b.c.p3"),
newPkg("d.e"),
newPkg("d.f.a")
);
List<JPackage> out = sources.getHierarchyPackages(packages);
assertEquals(out.size(), 2);
assertEquals(out.get(0).getName(), "a");
assertEquals(out.get(0... | [FOCAL] List<JPackage> JSources.getHierarchyPackages(List<JavaPackage> packages)
[CLASS] class JSources extends JNode
[METRICS] loc=48 cc=10 branches=3 loops=6 returns=1 throws=0 nesting=3
[CALLS-INTERNAL] void addPackage(Map<String, JPackage> pkgs, JPackage pkg)
[CALLS-EXTERNAL] Map<String, JPackage>.values/0, pkg.get... | /* static context
[FOCAL] List<JPackage> JSources.getHierarchyPackages(List<JavaPackage> packages)
[PATH1] foreach(JavaPackage pkg : packages)=T -> exit loop -> foreach(JPackage pkg : pkgMap.values())#1=T -> if(pkg.getInnerPackages().size() == 1 && pkg.getClasses().isEmpty())=T -> do_while(repeat)=F -> for(it.hasNext()... | /* static context
[FOCAL] List<JPackage> JSources.getHierarchyPackages(List<JavaPackage> packages)
[PATH1] foreach(JavaPackage pkg : packages)=T -> exit loop -> foreach(JPackage pkg : pkgMap.values())#1=T -> if(pkg.getInnerPackages().size() == 1 && pkg.getClasses().isEmpty())=T -> do_while(repeat)=F -> for(it.hasNext()... | true | ok | {"focal": {"class": "JSources", "name": "getHierarchyPackages", "signature": "List<JPackage> getHierarchyPackages(List<JavaPackage> packages)", "start_line": 3, "modifiers": "", "params": [{"name": "packages", "type": "List<JavaPackage>"}], "return_type": "List<JPackage>"}, "class_info": {"name": "JSources", "kind": "c... |
34915498_11 | class HostnameCollapser extends AbstractPathCollapser implements StringCollapser {
@Override
public <T> Map<String, Collection<T>> collapse(Map<String, Collection<T>> input) {
Map<PathName, Collection<T>> inputMap = new HashMap<PathName, Collection<T>>(input.size());
for (Map.Entry<Str... | final HostnameCollapser collapser = new HostnameCollapser(2);
List<String> output = new ArrayList<String>(collapser.collapse(nullMap(Arrays.asList(
"http://a.example.com:8080",
"'none'"
))).keySet());
Collections.sort(output);
... | [FOCAL] @Override public Map<String, Collection<T>> HostnameCollapser.collapse(Map<String, Collection<T>> input)
[CLASS] class HostnameCollapser extends AbstractPathCollapser implements StringCollapser
[METRICS] loc=33 cc=7 branches=4 loops=2 returns=1 throws=0 nesting=3
[CALLS-INTERNAL] PathName toPathName(String s); ... | /* static context
[FOCAL] @Override public Map<String, Collection<T>> HostnameCollapser.collapse(Map<String, Collection<T>> input)
[PATH1] foreach(Map.Entry<String, Collection<T>> hostname : input.entrySet())=T -> if(hostname.getKey().equals("'none'") && input.size() > 1)=T -> exit loop -> foreach(Map.Entry<PathName, C... | /* static context
[FOCAL] @Override public Map<String, Collection<T>> HostnameCollapser.collapse(Map<String, Collection<T>> input)
[PATH1] foreach(Map.Entry<String, Collection<T>> hostname : input.entrySet())=T -> if(hostname.getKey().equals("'none'") && input.size() > 1)=T -> exit loop -> foreach(Map.Entry<PathName, C... | true | ok | {"focal": {"class": "HostnameCollapser", "name": "collapse", "signature": "Map<String, Collection<T>> collapse(Map<String, Collection<T>> input)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "input", "type": "Map<String, Collection<T>>"}], "return_type": "Map<String, Collection<T>>"}, "class_i... |
34951729_3 | class DurationCalculator {
public long calculateNewDuration(ViscosityInterpolator viscosity, long timesAnimationViewed, long currentDuration) {
if (currentDuration == 0) {
Log.e("duration was zero");
return 0;
}
if (timesAnimationViewed == 0) {
Log.v("fir... | int timesTransitionViewed = 1;
long currentDuration = 50L;
calc.calculateNewDuration(mockViscosity, timesTransitionViewed, currentDuration);
verify(mockViscosity).calculateDuration(currentDuration, timesTransitionViewed);
}
} | [FOCAL] public long DurationCalculator.calculateNewDuration(ViscosityInterpolator viscosity, long timesAnimationViewed, long currentDuration)
[CLASS] class DurationCalculator
[METRICS] loc=11 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] Log.e/1, Log.v/1, ViscosityInterpolator.calculateDuration/... | /* static context
[FOCAL] public long DurationCalculator.calculateNewDuration(ViscosityInterpolator viscosity, long timesAnimationViewed, long currentDuration)
[PATH1] if(currentDuration == 0)=F -> if(timesAnimationViewed == 0)=T -> return currentDuration
[PATH2] if(currentDuration == 0)=T -> return 0
[PATH3] if(curren... | /* static context
[FOCAL] public long DurationCalculator.calculateNewDuration(ViscosityInterpolator viscosity, long timesAnimationViewed, long currentDuration)
[PATH1] if(currentDuration == 0)=F -> if(timesAnimationViewed == 0)=T -> return currentDuration
[PATH2] if(currentDuration == 0)=T -> return 0
[PATH3] if(curren... | true | ok | {"focal": {"class": "DurationCalculator", "name": "calculateNewDuration", "signature": "long calculateNewDuration(ViscosityInterpolator viscosity, long timesAnimationViewed, long currentDuration)", "start_line": 3, "modifiers": "public", "params": [{"name": "viscosity", "type": "ViscosityInterpolator"}, {"name": "times... |
34964793_1 | class FlexibleFactory {
@SuppressWarnings("ConstantConditions")
public static <T> T create(@NonNull Class<T> itemClass, @Nullable Object... constructorParams) {
if (itemClass == null) {
throw new IllegalArgumentException("Unknown model class " + itemClass);
}
try {
... | HeaderModel header = new HeaderModel("H1");
HeaderHolder headerHolder = FlexibleFactory.create(HeaderHolder.class, header);
ItemModel item = new ItemModel("I1", "H2");
ItemHolder itemHolder = FlexibleFactory.create(ItemHolder.class, item, headerHolder);
assertNotNull(itemHolder... | [FOCAL] @SuppressWarnings("ConstantConditions") public static T FlexibleFactory.create(Class<T> itemClass, Object... constructorParams)
[CLASS] class FlexibleFactory
[METRICS] loc=21 cc=6 branches=2 loops=1 returns=2 throws=3 nesting=3
[CALLS-EXTERNAL] itemClass.getConstructor().newInstance/0, Class<T>.getConstructor/0... | /* static context
[FOCAL] @SuppressWarnings("ConstantConditions") public static T FlexibleFactory.create(Class<T> itemClass, Object... constructorParams)
[THROWS-WHEN] IllegalArgumentException when itemClass == null
[THROWS-WHEN] RuntimeException when !(itemClass == null) && try-body throws
[PATH1] if(itemClass == null... | /* static context
[FOCAL] @SuppressWarnings("ConstantConditions") public static T FlexibleFactory.create(Class<T> itemClass, Object... constructorParams)
[THROWS-WHEN] IllegalArgumentException when itemClass == null
[THROWS-WHEN] RuntimeException when !(itemClass == null) && try-body throws
[PATH1] if(itemClass == null... | true | ok | {"focal": {"class": "FlexibleFactory", "name": "create", "signature": "T create(Class<T> itemClass, Object... constructorParams)", "start_line": 3, "modifiers": "@SuppressWarnings(\"ConstantConditions\") public static", "params": [{"name": "itemClass", "type": "Class<T>"}, {"name": "constructorParams", "type": "Object.... |
34966186_14 | class MinioClient {
public static Builder builder() {
return new Builder();
}
private MinioClient(
HttpUrl baseUrl,
String region,
boolean isAwsHost,
boolean isAcceleratedHost,
boolean isDualStackHost,
boolean useVirtualStyle,
String accessKey,
String secretK... | MinioClient.builder().endpoint("https://s3.amazonaws.com.cn").build();
Assert.fail("exception should be thrown");
}
} | [FOCAL] public static Builder MinioClient.builder()
[CLASS] class MinioClient
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] Builder
[CLASS-MEMBERS] MinioClient(HttpUrl baseUrl, String region, boolean isAwsHost, boolean isAcceleratedHost, boolean isDualStackHost, boolean useVirtualStyle, Str... | class MinioClient {
public static Builder builder() {
return new Builder();
}
private MinioClient(
HttpUrl baseUrl,
String region,
boolean isAwsHost,
boolean isAcceleratedHost,
boolean isDualStackHost,
boolean useVirtualStyle,
String accessKey,
String secretK... | false | ok | {"focal": {"class": "MinioClient", "name": "builder", "signature": "Builder builder()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "Builder"}, "class_info": {"name": "MinioClient", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "CONTENT_TYP... | |
34971364_6 | class Log4JModel {
public ImmutableList<Logger> getLoggers() {
if (loggers == null) {
final Map<String, String> loggerEntries = filterKeys(log4jProperties,
startsWith("log4j.logger."));
loggers = FluentIterable.from(loggerEntries.entrySet())
... | Properties props = new Properties();
props.setProperty("log4j.logger.foo.bar.baz", "debug");
props.setProperty("log4j.additivity.foo.bar.baz", "true");
Log4JModel model = new Log4JModel(props);
List<Logger> loggers = model.getLoggers();
assertThat(loggers.size(), is(1)... | [FOCAL] public ImmutableList<Logger> Log4JModel.getLoggers()
[CLASS] class Log4JModel
[METRICS] loc=11 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] ImmutableList<Appender> getAppenders()
[CALLS-EXTERNAL] filterKeys/2 (inherited), startsWith/1 (inherited), FluentIterable.from(loggerEntries.entry... | /* static context
[FOCAL] public ImmutableList<Logger> Log4JModel.getLoggers()
[PATH1] if(loggers == null)=T -> return loggers
[PATH2] if(loggers == null)=F -> return loggers
[CALLS-INTERNAL] ImmutableList<Appender> getAppenders()
[CALLS-EXTERNAL] filterKeys/2 (inherited), startsWith/1 (inherited), FluentIterable.from(... | /* static context
[FOCAL] public ImmutableList<Logger> Log4JModel.getLoggers()
[PATH1] if(loggers == null)=T -> return loggers
[PATH2] if(loggers == null)=F -> return loggers
[CALLS-INTERNAL] ImmutableList<Appender> getAppenders()
[CALLS-EXTERNAL] filterKeys/2 (inherited), startsWith/1 (inherited), FluentIterable.from(... | true | ok | {"focal": {"class": "Log4JModel", "name": "getLoggers", "signature": "ImmutableList<Logger> getLoggers()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "ImmutableList<Logger>"}, "class_info": {"name": "Log4JModel", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields... |
34997568_22 | class ComposeMatchers {
public static <T, U> Matcher<T> hasFeatureValue(Function<T, U> featureFunction, U featureValue)
{
return hasFeature(featureFunction, equalTo(featureValue));
}
private ComposeMatchers();
@SafeVarargs public static ConjunctionMatcher<T> compose(Matcher<? super T>... matchers);
@SafeVar... | Matcher<String> actual = hasFeatureValue("x", String::length, 1);
assertThat(actual.matches("y"), is(true));
}
} | [FOCAL] public static Matcher<T> ComposeMatchers.hasFeatureValue(Function<T, U> featureFunction, U featureValue)
[CLASS] class ComposeMatchers
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Matcher<T> hasFeature(Function<T, U> featureFunction, Matcher<? super U> featureMatcher)
[C... | /* static context
[FOCAL] public static Matcher<T> ComposeMatchers.hasFeatureValue(Function<T, U> featureFunction, U featureValue)
[INPUTS] branches=- | result=featureFunction, featureValue
[CALLS-INTERNAL] Matcher<T> hasFeature(Function<T, U> featureFunction, Matcher<? super U> featureMatcher)
[CALLS-EXTERNAL] equalTo... | /* static context
[FOCAL] public static Matcher<T> ComposeMatchers.hasFeatureValue(Function<T, U> featureFunction, U featureValue)
[INPUTS] branches=- | result=featureFunction, featureValue
[CALLS-INTERNAL] Matcher<T> hasFeature(Function<T, U> featureFunction, Matcher<? super U> featureMatcher)
[CALLS-EXTERNAL] equalTo... | true | ok | {"focal": {"class": "ComposeMatchers", "name": "hasFeatureValue", "signature": "Matcher<T> hasFeatureValue(Function<T, U> featureFunction, U featureValue)", "start_line": 3, "modifiers": "public static", "params": [{"name": "featureFunction", "type": "Function<T, U>"}, {"name": "featureValue", "type": "U"}], "return_ty... |
35024150_72 | class GitHubBranchHashChangedEvent extends GitHubBranchEvent {
@Override
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
GHBranch remoteBranch = context.getRemoteBranch();
GitHubBranch localBranch = context.getLocalBranch();
TaskListener... | commonExpectations();
assertThat(
event.check(newGitHubBranchDecisionContext()
.withLocalBranch(null)
.withBranchTrigger(trigger)
.withLocalRepo(localRepo)
.withRemoteBranch(null)
... | [FOCAL] @Override public GitHubBranchCause GitHubBranchHashChangedEvent.check(GitHubBranchDecisionContext context)
[CLASS] class GitHubBranchHashChangedEvent extends GitHubBranchEvent
[METRICS] loc=21 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] GitHubBranchDecisionContext.getRemoteBranch/0, Gi... | /* static context
[FOCAL] @Override public GitHubBranchCause GitHubBranchHashChangedEvent.check(GitHubBranchDecisionContext context)
[PATH1] if(nonNull(localBranch) && nonNull(remoteBranch))=T -> if(!localBranchSHA1.equals(remoteBranchSHA1))=T -> return cause
[PATH2] if(nonNull(localBranch) && nonNull(remoteBranch))=F ... | /* static context
[FOCAL] @Override public GitHubBranchCause GitHubBranchHashChangedEvent.check(GitHubBranchDecisionContext context)
[PATH1] if(nonNull(localBranch) && nonNull(remoteBranch))=T -> if(!localBranchSHA1.equals(remoteBranchSHA1))=T -> return cause
[PATH2] if(nonNull(localBranch) && nonNull(remoteBranch))=F ... | true | ok | {"focal": {"class": "GitHubBranchHashChangedEvent", "name": "check", "signature": "GitHubBranchCause check(GitHubBranchDecisionContext context) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "context", "type": "GitHubBranchDecisionContext"}], "return_type": "GitHubBranchCause... |
35031753_0 | class XPathResourceBuilderMojo extends AbstractMojo {
protected String extractFileContent(final String filename)
throws IOException {
final StringBuilder sb = new StringBuilder();
String temp = "";
final BufferedReader bufferedReader = new BufferedReader(
new FileReader(filename));
try {
while (temp... | // assertEquals("line1 line 2", this.mojo.extractFileContent("someFoldersomeFile.txt"));
}
} | [FOCAL] protected String XPathResourceBuilderMojo.extractFileContent(String filename)
[CLASS] class XPathResourceBuilderMojo extends AbstractMojo
[METRICS] loc=18 cc=4 branches=1 loops=1 returns=1 throws=0 nesting=3
[CALLS-EXTERNAL] BufferedReader.readLine/0, StringBuilder.append/1, StringBuilder.toString/0, BufferedRe... | /* static context
[FOCAL] protected String XPathResourceBuilderMojo.extractFileContent(String filename)
[PATH1] while(temp != null)=T -> if(temp != null)=T -> exit loop -> return sb.toString()
[PATH2] try-body throws
[PATH3] while(temp != null)=F -> return sb.toString()
[PATH4] while(temp != null)=T -> if(temp != null)... | /* static context
[FOCAL] protected String XPathResourceBuilderMojo.extractFileContent(String filename)
[PATH1] while(temp != null)=T -> if(temp != null)=T -> exit loop -> return sb.toString()
[PATH2] try-body throws
[PATH3] while(temp != null)=F -> return sb.toString()
[PATH4] while(temp != null)=T -> if(temp != null)... | true | ok | {"focal": {"class": "XPathResourceBuilderMojo", "name": "extractFileContent", "signature": "String extractFileContent(String filename) throws IOException", "start_line": 3, "modifiers": "protected", "params": [{"name": "filename", "type": "String"}], "return_type": "String"}, "class_info": {"name": "XPathResourceBuilde... |
35107906_2 | class RedmineGovernorRecorder {
public void redmineReportEntries(@Observes After event) {
final Method testMethod = event.getTestMethod();
final TestClass testClass = event.getTestClass();
final String redmineServerURL = redmineGovernorConfigurationInstance.get().getServer();
fina... |
After after = new After(new FakeTestClass(), getMethod("dummyTest"));
redmineGovernorRecorder.redmineReportEntries(after);
verify(propertyReportEvent, times(2)).fire(propertyReportEventArgumentCaptor.capture());
List<PropertyReportEvent> propertyReportEvents = propertyReportEventArgum... | [FOCAL] public void RedmineGovernorRecorder.redmineReportEntries(After event)
[CLASS] class RedmineGovernorRecorder
[METRICS] loc=23 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] Redmine getRedmineValue(Method method, TestClass testClass); String constructRedmineIssueURL(String server, String is... | /* static context
[FOCAL] public void RedmineGovernorRecorder.redmineReportEntries(After event)
[PATH1] if(redmineValue != null)=T
[PATH2] if(redmineValue != null)=F
[INPUTS] branches=event | result=-
[COLLABORATORS] param event:After getTestMethod/0,getTestClass/0; field redmineGovernorConfigurationInstance:Instance<R... | /* static context
[FOCAL] public void RedmineGovernorRecorder.redmineReportEntries(After event)
[PATH1] if(redmineValue != null)=T
[PATH2] if(redmineValue != null)=F
[INPUTS] branches=event | result=-
[COLLABORATORS] param event:After getTestMethod/0,getTestClass/0; field redmineGovernorConfigurationInstance:Instance<R... | true | ok | {"focal": {"class": "RedmineGovernorRecorder", "name": "redmineReportEntries", "signature": "void redmineReportEntries(After event)", "start_line": 3, "modifiers": "public", "params": [{"name": "event", "type": "After"}], "return_type": "void"}, "class_info": {"name": "RedmineGovernorRecorder", "kind": "class", "modifi... |
35126129_18 | class SequenceUtil {
public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,
long incrementBy, long cacheSize) throws SQLException {
long nextValue = 0;
boolean increasingSeq = incrementBy > 0 ? true : false;
// advance currentValue while check... | assertFalse(SequenceUtil.checkIfLimitReached(5, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE));
}
} | [FOCAL] public static boolean SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue, long incrementBy, long cacheSize)
[CLASS] class SequenceUtil
[METRICS] loc=19 cc=3 branches=1 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] LongMath.checkedMultiply/2, LongMath.checkedAdd/2
[EXCEPTION... | /* static context
[FOCAL] public static boolean SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue, long incrementBy, long cacheSize)
[PATH1] try-body throws -> return true
[PATH2] if((increasingSeq && nextValue > maxValue) || (!increasingSeq && nextValue < minValue))=F -> return false
[PA... | /* static context
[FOCAL] public static boolean SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue, long incrementBy, long cacheSize)
[PATH1] try-body throws -> return true
[PATH2] if((increasingSeq && nextValue > maxValue) || (!increasingSeq && nextValue < minValue))=F -> return false
[PA... | true | ok | {"focal": {"class": "SequenceUtil", "name": "checkIfLimitReached", "signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue, long incrementBy, long cacheSize) throws SQLException", "start_line": 3, "modifiers": "public static", "params": [{"name": "currentValue", "type": "long"}, {"name... |
35132359_23 | class FhirSystemDaoDstu1 extends BaseFhirSystemDao<List<IResource>> {
@Transactional(propagation = Propagation.REQUIRED)
@Override
public List<IResource> transaction(List<IResource> theResources) {
ourLog.info("Beginning transaction with {} resources", theResources.size());
long start = System.currentTimeMillis... |
InputStream bundleRes = FhirSystemDaoDstu1Test.class.getResourceAsStream("/bundle-dstu1.xml");
Bundle bundle = ourFhirContext.newXmlParser().parseBundle(new InputStreamReader(bundleRes));
List<IResource> res = bundle.toListOfResources();
ourSystemDao.transaction(res);
Patient ... | [FOCAL] @Transactional(propagation = Propagation.REQUIRED) @Override public List<IResource> FhirSystemDaoDstu1.transaction(List<IResource> theResources)
[CLASS] class FhirSystemDaoDstu1 extends BaseFhirSystemDao<List<IResource>>
[METRICS] loc=211 cc=38 branches=31 loops=6 returns=1 throws=5 nesting=7
[CALLS-EXTERNAL] o... | class FhirSystemDaoDstu1 extends BaseFhirSystemDao<List<IResource>> {
@Transactional(propagation = Propagation.REQUIRED)
@Override
public List<IResource> transaction(List<IResource> theResources) {
ourLog.info("Beginning transaction with {} resources", theResources.size());
long start = System.currentTimeMillis... | false | ok | {"focal": {"class": "FhirSystemDaoDstu1", "name": "transaction", "signature": "List<IResource> transaction(List<IResource> theResources)", "start_line": 3, "modifiers": "@Transactional(propagation = Propagation.REQUIRED) @Override public", "params": [{"name": "theResources", "type": "List<IResource>"}], "return_type": ... | |
35148114_22 | class GNConverter {
public LexicalResource getLexicalResource() {
return lexicalResource;
}
public GNConverter(GermaNet germaNet, LexicalResource lexicalResource, MetaData alignmentMeta, String resourceVersion, String dtd_version);
public void toLMF();
public void toLMF(Lexicon wordNetLexicon);
private void... | LexicalResource lr = gnConverter.getLexicalResource();
for(Lexicon lexicon : lr.getLexicons()) {
for(LexicalEntry le : lexicon.getLexicalEntries()) {
for(Sense sense : le.getSenses()){
List<SemanticLabel> semanticLabels = sense.getSemanticLabels();
assertTrue("Sense does not ha... | [FOCAL] public LexicalResource GNConverter.getLexicalResource()
[CLASS] class GNConverter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] GNConverter(GermaNet germaNet, LexicalResource lexicalResource, MetaData alignmentMeta, String resourceVersion, String dtd_version); void toLMF()... | /* static context
[FOCAL] public LexicalResource GNConverter.getLexicalResource()
*/
| /* static context
[FOCAL] public LexicalResource GNConverter.getLexicalResource()
*/
class GNConverter {
public LexicalResource getLexicalResource() {
return lexicalResource;
}
public GNConverter(GermaNet germaNet, LexicalResource lexicalResource, MetaData alignmentMeta, String resourceVersion, String dtd_versi... | true | ok | {"focal": {"class": "GNConverter", "name": "getLexicalResource", "signature": "LexicalResource getLexicalResource()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "LexicalResource"}, "class_info": {"name": "GNConverter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "... |
35152638_32 | class ClassNameBuilder extends IdentifierBuilder {
public TypeSpec interfaceSpec(ResourceObject resource, OntGenerationConfig config) throws RepositoryException {
return TypeSpec.interfaceBuilder(className(resource, config)).build();
}
private ClassNameBuilder(ObjectConnection connection);
p... | TypeSpec typeSpec = ClassNameBuilder.forObjectRepository(anno4j.getObjectRepository())
.interfaceSpec(person, config);
assertEquals("MyPerson", typeSpec.name);
}
} | [FOCAL] public TypeSpec ClassNameBuilder.interfaceSpec(ResourceObject resource, OntGenerationConfig config)
[CLASS] class ClassNameBuilder extends IdentifierBuilder
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] ClassName className(ResourceObject resource, OntGenerationConfig conf... | /* static context
[FOCAL] public TypeSpec ClassNameBuilder.interfaceSpec(ResourceObject resource, OntGenerationConfig config)
[INPUTS] branches=- | result=config, resource
[EXCEPTIONS] declares RepositoryException
[CALLS-INTERNAL] ClassName className(ResourceObject resource, OntGenerationConfig config)
[CALLS-EXTERNAL]... | /* static context
[FOCAL] public TypeSpec ClassNameBuilder.interfaceSpec(ResourceObject resource, OntGenerationConfig config)
[INPUTS] branches=- | result=config, resource
[EXCEPTIONS] declares RepositoryException
[CALLS-INTERNAL] ClassName className(ResourceObject resource, OntGenerationConfig config)
[CALLS-EXTERNAL]... | true | ok | {"focal": {"class": "ClassNameBuilder", "name": "interfaceSpec", "signature": "TypeSpec interfaceSpec(ResourceObject resource, OntGenerationConfig config) throws RepositoryException", "start_line": 3, "modifiers": "public", "params": [{"name": "resource", "type": "ResourceObject"}, {"name": "config", "type": "OntGenera... |
35174991_12 | class FileUtils {
public static boolean isLocaleFile(String url) {
return url != null && url.startsWith(LOCALE_FILE_SCHEME);
}
private FileUtils();
public static boolean isAbsolute(String url);
@NonNull @Contract(pure = true) public static String getCsvFolderName();
private final St... | assertThat(FileUtils.isLocaleFile(localURL)).isTrue();
}
} | [FOCAL] public static boolean FileUtils.isLocaleFile(String url)
[CLASS] class FileUtils
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] String.startsWith/1
[INPUTS] branches=- | result=url
[DATAFLOW] url@param->L2
[CLASS-MEMBERS] FileUtils(); boolean isAbsolute(String url); String... | /* static context
[FOCAL] public static boolean FileUtils.isLocaleFile(String url)
[INPUTS] branches=- | result=url
[CALLS-EXTERNAL] String.startsWith/1
*/
| /* static context
[FOCAL] public static boolean FileUtils.isLocaleFile(String url)
[INPUTS] branches=- | result=url
[CALLS-EXTERNAL] String.startsWith/1
*/
class FileUtils {
public static boolean isLocaleFile(String url) {
return url != null && url.startsWith(LOCALE_FILE_SCHEME);
}
private FileUt... | true | ok | {"focal": {"class": "FileUtils", "name": "isLocaleFile", "signature": "boolean isLocaleFile(String url)", "start_line": 3, "modifiers": "public static", "params": [{"name": "url", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "FileUtils", "kind": "class", "modifiers": "", "superclass": null, "in... |
35185022_110 | class VCDiffFileBasedCoder {
public static void main(String[] argv) throws Exception {
// TODO: JCommander has an issue with boolean arity. Rewrite allow_vcd_target.
List<String> newArgv = new LinkedList<String>(Arrays.asList(argv));
ListIterator<String> i = newArgv.listIterator();
... | VCDiffFileBasedCoder.main(new String[] {
"encode",
"-interleaved",
"-checksum",
"-dictionary", dictionaryFile.getCanonicalPath(),
"-target", targetFile.getCanonicalPath(),
"-delta", deltaFile.getCanonicalPath()
... | [FOCAL] public static void VCDiffFileBasedCoder.main(String[] argv)
[CLASS] class VCDiffFileBasedCoder
[METRICS] loc=80 cc=13 branches=9 loops=1 returns=0 throws=0 nesting=5
[CALLS-EXTERNAL] Arrays.asList/1, List<String>.listIterator/0, ListIterator<String>.hasNext/0, ListIterator<String>.next/0, String.matches/1, List... | /* static context
[FOCAL] public static void VCDiffFileBasedCoder.main(String[] argv)
[PATH1] while(i.hasNext())=T -> if(arg.matches("--?allow_vcd_target") && i.hasNext())=T -> if(val.matches("(?i)true|yes|1"))=F -> if(val.matches("(?i)false|no|0"))=T -> exit loop -> try-body throws -> if("encode".equals(command_option... | /* static context
[FOCAL] public static void VCDiffFileBasedCoder.main(String[] argv)
[PATH1] while(i.hasNext())=T -> if(arg.matches("--?allow_vcd_target") && i.hasNext())=T -> if(val.matches("(?i)true|yes|1"))=F -> if(val.matches("(?i)false|no|0"))=T -> exit loop -> try-body throws -> if("encode".equals(command_option... | true | ok | {"focal": {"class": "VCDiffFileBasedCoder", "name": "main", "signature": "void main(String[] argv) throws Exception", "start_line": 3, "modifiers": "public static", "params": [{"name": "argv", "type": "String[]"}], "return_type": "void"}, "class_info": {"name": "VCDiffFileBasedCoder", "kind": "class", "modifiers": "", ... |
35185761_9 | class NoxItemCatalog extends Observable {
void load(int position, boolean useCircularTransformation) {
if (isDownloading(position)) {
return;
}
NoxItem noxItem = noxItems.get(position);
if ((noxItem.hasUrl() && !isBitmapReady(position))
|| noxItem.hasResourceId() && !isDrawableReady(pos... | List<NoxItem> noxItems = new LinkedList<NoxItem>();
noxItems.add(new NoxItem(ANY_URL));
noxItems.add(new NoxItem(ANY_URL_2));
NoxItemCatalog noxItemCatalog = givenOneNoxItemCatalog(noxItems);
noxItemCatalog.load(0, USE_CIRCULAR_TRANSFORMATION);
noxItemCatalog.load(1, USE_CIRCULAR_TRANSFORMATION... | [FOCAL] void NoxItemCatalog.load(int position, boolean useCircularTransformation)
[CLASS] class NoxItemCatalog extends Observable
[METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] boolean isBitmapReady(int position); boolean isDownloading(int position); boolean isDrawableReady(int p... | /* static context
[FOCAL] void NoxItemCatalog.load(int position, boolean useCircularTransformation)
[PATH1] if(isDownloading(position))=T -> return
[PATH2] if(isDownloading(position))=F -> if((noxItem.hasUrl() && !isBitmapReady(position)) || noxItem.hasResourceId() && !isDrawableReady(position))=T
[PATH3] if(isDownload... | /* static context
[FOCAL] void NoxItemCatalog.load(int position, boolean useCircularTransformation)
[PATH1] if(isDownloading(position))=T -> return
[PATH2] if(isDownloading(position))=F -> if((noxItem.hasUrl() && !isBitmapReady(position)) || noxItem.hasResourceId() && !isDrawableReady(position))=T
[PATH3] if(isDownload... | true | ok | {"focal": {"class": "NoxItemCatalog", "name": "load", "signature": "void load(int position, boolean useCircularTransformation)", "start_line": 3, "modifiers": "", "params": [{"name": "position", "type": "int"}, {"name": "useCircularTransformation", "type": "boolean"}], "return_type": "void"}, "class_info": {"name": "No... |
35204049_41 | class CuratorFactory {
@VisibleForTesting
void enhanceBuilderWithSecurityParameters(HAConfiguration.ZookeeperProperties zookeeperProperties,
CuratorFrameworkFactory.Builder builder) {
ACLProvider aclProvider = getAclProvider(zookeeperProperties);
... | when(zookeeperProperties.hasAcl()).thenReturn(true);
when(zookeeperProperties.getAcl()).thenReturn("sasl:myclient@EXAMPLE.COM");
when(zookeeperProperties.hasAuth()).thenReturn(false);
CuratorFactory curatorFactory = new CuratorFactory(configuration) {
@Override
pr... | [FOCAL] @VisibleForTesting void CuratorFactory.enhanceBuilderWithSecurityParameters(HAConfiguration.ZookeeperProperties zookeeperProperties, CuratorFrameworkFactory.Builder builder)
[CLASS] class CuratorFactory
[METRICS] loc=22 cc=4 branches=3 loops=0 returns=0 throws=0 nesting=2
[CALLS-INTERNAL] ACLProvider getAclProv... | /* static context
[FOCAL] @VisibleForTesting void CuratorFactory.enhanceBuilderWithSecurityParameters(HAConfiguration.ZookeeperProperties zookeeperProperties, CuratorFrameworkFactory.Builder builder)
[PATH1] if(zookeeperProperties.hasAuth())=T -> if(aclProvider != null)=T -> if(authInfo != null)=T
[PATH2] if(zookeeperP... | /* static context
[FOCAL] @VisibleForTesting void CuratorFactory.enhanceBuilderWithSecurityParameters(HAConfiguration.ZookeeperProperties zookeeperProperties, CuratorFrameworkFactory.Builder builder)
[PATH1] if(zookeeperProperties.hasAuth())=T -> if(aclProvider != null)=T -> if(authInfo != null)=T
[PATH2] if(zookeeperP... | true | ok | {"focal": {"class": "CuratorFactory", "name": "enhanceBuilderWithSecurityParameters", "signature": "void enhanceBuilderWithSecurityParameters(HAConfiguration.ZookeeperProperties zookeeperProperties, CuratorFrameworkFactory.Builder builder)", "start_line": 3, "modifiers": "@VisibleForTesting", "params": [{"name": "zooke... |
35204051_5 | class AnnouncementPresenter extends BasePresenter<AnnouncementMvpView> {
public void loadAllAnnouncement(int pageNumber) {
checkViewAttached();
compositeDisposable.add(mDataManager.getAllAnnouncement(
getAnnouncementQueryOptions(pageNumber))
.observeOn(AndroidSchedul... |
when(dataManager.getAllAnnouncement(option)).thenReturn(
Observable.<Announcements>error(new RuntimeException()));
announcementPresenter.loadAllAnnouncement(1);
verify(announcementMvpView, never()).showSnackBar(R.string.no_more_announcement_available);
verify(announce... | [FOCAL] public void AnnouncementPresenter.loadAllAnnouncement(int pageNumber)
[CLASS] class AnnouncementPresenter extends BasePresenter<AnnouncementMvpView>
[METRICS] loc=30 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] Map<String, String> getAnnouncementQueryOptions(int PageNumber)
[CALLS-EXTER... | /* static context
[FOCAL] public void AnnouncementPresenter.loadAllAnnouncement(int pageNumber)
[COLLABORATORS] field compositeDisposable add/1; field mDataManager getAllAnnouncement/1; field announcements:Announcements getAnnouncement/0
[CALLS-INTERNAL] Map<String, String> getAnnouncementQueryOptions(int PageNumber)
[... | /* static context
[FOCAL] public void AnnouncementPresenter.loadAllAnnouncement(int pageNumber)
[COLLABORATORS] field compositeDisposable add/1; field mDataManager getAllAnnouncement/1; field announcements:Announcements getAnnouncement/0
[CALLS-INTERNAL] Map<String, String> getAnnouncementQueryOptions(int PageNumber)
[... | true | ok | {"focal": {"class": "AnnouncementPresenter", "name": "loadAllAnnouncement", "signature": "void loadAllAnnouncement(int pageNumber)", "start_line": 3, "modifiers": "public", "params": [{"name": "pageNumber", "type": "int"}], "return_type": "void"}, "class_info": {"name": "AnnouncementPresenter", "kind": "class", "modifi... |
35211795_48 | class FixedRateTimerActionScheduler implements ActionScheduler {
@Override
public void schedule(final Action action) {
if (actionTimerTasks.containsKey(action)) {
Logger.v("Already contains action, aborting schedule");
return;
}
TimerTask taskToExecute = new Tim... | scheduler.schedule(anyAction);
timerTask.run();
verify(anyAction).perform();
}
} | [FOCAL] @Override public void FixedRateTimerActionScheduler.schedule(Action action)
[CLASS] class FixedRateTimerActionScheduler implements ActionScheduler
[METRICS] loc=16 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] Map<ActionScheduler.Action, TimerTask>.containsKey/1, Logger.v/1, Action.perfo... | /* static context
[FOCAL] @Override public void FixedRateTimerActionScheduler.schedule(Action action)
[PATH1] if(actionTimerTasks.containsKey(action))=T -> return
[PATH2] if(actionTimerTasks.containsKey(action))=F
[INPUTS] branches=action, actionTimerTasks | result=-
[COLLABORATORS] field actionTimerTasks:Map<ActionSch... | /* static context
[FOCAL] @Override public void FixedRateTimerActionScheduler.schedule(Action action)
[PATH1] if(actionTimerTasks.containsKey(action))=T -> return
[PATH2] if(actionTimerTasks.containsKey(action))=F
[INPUTS] branches=action, actionTimerTasks | result=-
[COLLABORATORS] field actionTimerTasks:Map<ActionSch... | true | ok | {"focal": {"class": "FixedRateTimerActionScheduler", "name": "schedule", "signature": "void schedule(Action action)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "action", "type": "Action"}], "return_type": "void"}, "class_info": {"name": "FixedRateTimerActionScheduler", "kind": "class", "modi... |
35228936_18 | class TweetQuery {
public static String queryOR(final String... conditions) {
return Arrays.stream(conditions)
.filter(s -> null != s && !s.isEmpty())
.collect(Collectors.collectingAndThen(
Collectors.toList(),
l -> l.isEmpty()... | assertEquals("@Devoxx", TweetQuery.queryOR("@Devoxx"));
}
} | [FOCAL] public static String TweetQuery.queryOR(String... conditions)
[CLASS] class TweetQuery
[METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Arrays.stream(conditions) .filter(s -> null != s && !s.is....collect/1, Arrays.stream(conditions).filter/1, Arrays.stream/1, s.isEmpty/0, ... | /* static context
[FOCAL] public static String TweetQuery.queryOR(String... conditions)
[INPUTS] branches=- | result=conditions
[COLLABORATORS] field s isEmpty/0; field l isEmpty/0,size/0,get/1,stream/0
[CALLS-EXTERNAL] Arrays.stream(conditions) .filter(s -> null != s && !s.is....collect/1, Arrays.stream(conditions).fi... | /* static context
[FOCAL] public static String TweetQuery.queryOR(String... conditions)
[INPUTS] branches=- | result=conditions
[COLLABORATORS] field s isEmpty/0; field l isEmpty/0,size/0,get/1,stream/0
[CALLS-EXTERNAL] Arrays.stream(conditions) .filter(s -> null != s && !s.is....collect/1, Arrays.stream(conditions).fi... | true | ok | {"focal": {"class": "TweetQuery", "name": "queryOR", "signature": "String queryOR(String... conditions)", "start_line": 3, "modifiers": "public static", "params": [{"name": "conditions", "type": "String..."}], "return_type": "String"}, "class_info": {"name": "TweetQuery", "kind": "class", "modifiers": "", "superclass":... |
35240600_15 | class AttributeMethodExtractor {
public static Map<String, Method> setters(Class<? extends AnnotatedFileAttributeView> type) {
return find(type, Extractor.SETTER);
}
private AttributeMethodExtractor();
public static Map<String, Method> getters(Class<? extends AnnotatedFileAttributes> type);
... | Map<String, Method> attrs = AttributeMethodExtractor.setters(
AnnotatedDosFileAttributeView.class);
assertHasAttribute(attrs, "lastModifiedTime");
assertHasAttribute(attrs, "lastAccessTime");
assertHasAttribute(attrs, "creationTime");
}
} | [FOCAL] public static Map<String, Method> AttributeMethodExtractor.setters(Class<? extends AnnotatedFileAttributeView> type)
[CLASS] class AttributeMethodExtractor
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Map<String, Method> find(Class<?> type, Extractor extractor)
[INPUTS] ... | /* static context
[FOCAL] public static Map<String, Method> AttributeMethodExtractor.setters(Class<? extends AnnotatedFileAttributeView> type)
[INPUTS] branches=- | result=type
[CALLS-INTERNAL] Map<String, Method> find(Class<?> type, Extractor extractor)
*/
| /* static context
[FOCAL] public static Map<String, Method> AttributeMethodExtractor.setters(Class<? extends AnnotatedFileAttributeView> type)
[INPUTS] branches=- | result=type
[CALLS-INTERNAL] Map<String, Method> find(Class<?> type, Extractor extractor)
*/
class AttributeMethodExtractor {
public static Map<String... | true | ok | {"focal": {"class": "AttributeMethodExtractor", "name": "setters", "signature": "Map<String, Method> setters(Class<? extends AnnotatedFileAttributeView> type)", "start_line": 3, "modifiers": "public static", "params": [{"name": "type", "type": "Class<? extends AnnotatedFileAttributeView>"}], "return_type": "Map<String,... |
35242391_26 | class SpotifyOAuthFragment extends BaseOAuthFragment {
@Override
public String getLoginUrl() {
return SpotifyHelper.AUTHORIZE_URL;
}
@Override public String getScope();
@Override public String getTokenUrl();
@Override public String getClientId();
@Override public String getClientSe... | assertEquals("https://accounts.spotify.com/authorize", fragment.getLoginUrl());
}
} | [FOCAL] @Override public String SpotifyOAuthFragment.getLoginUrl()
[CLASS] class SpotifyOAuthFragment extends BaseOAuthFragment
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] String getScope(); String getTokenUrl(); String getClientId(); String getClientSecret(); String getRedirect... | /* static context
[FOCAL] @Override public String SpotifyOAuthFragment.getLoginUrl()
*/
| /* static context
[FOCAL] @Override public String SpotifyOAuthFragment.getLoginUrl()
*/
class SpotifyOAuthFragment extends BaseOAuthFragment {
@Override
public String getLoginUrl() {
return SpotifyHelper.AUTHORIZE_URL;
}
@Override public String getScope();
@Override public String getTokenU... | true | ok | {"focal": {"class": "SpotifyOAuthFragment", "name": "getLoginUrl", "signature": "String getLoginUrl()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "SpotifyOAuthFragment", "kind": "class", "modifiers": "", "superclass": "BaseOAuthFragment", "interface... |
35256352_0 | class NationalPlayer {
public BigInteger getId() {
return id;
}
public String getFirstName();
public String getLastName();
public Country getCountry();
public int getCareerGoals();
public int getWorldRanking();
public NationalPlayer withCountry(Country country);
public NationalPlayer withCareerG... | BigInteger indiaPlayerId = null;
BigInteger usaPlayerId = null;
BigInteger italyPlayerId = null;
// Save all three players
savePlayer(indiaPlayer);
savePlayer(usaPlayer);
savePlayer(italyPlayer);
indiaPlayerId = indiaPlayer.getId();
System.out.println("Indian Player Id:" + ... | [FOCAL] public BigInteger NationalPlayer.getId()
[CLASS] class NationalPlayer
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] String getFirstName(); String getLastName(); Country getCountry(); int getCareerGoals(); int getWorldRanking(); NationalPlayer withCountry(Country country); ... | /* static context
[FOCAL] public BigInteger NationalPlayer.getId()
*/
| /* static context
[FOCAL] public BigInteger NationalPlayer.getId()
*/
class NationalPlayer {
public BigInteger getId() {
return id;
}
public String getFirstName();
public String getLastName();
public Country getCountry();
public int getCareerGoals();
public int getWorldRanking();
public NationalPl... | true | ok | {"focal": {"class": "NationalPlayer", "name": "getId", "signature": "BigInteger getId()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "BigInteger"}, "class_info": {"name": "NationalPlayer", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "indiaPlaye... |
35263104_171 | class ProjectEntity {
public boolean pledgeGoalAchieved() {
return this.status == ProjectStatus.FULLY_PLEDGED;
}
public ProjectEntity(UserEntity creator, Project project, FinancingRoundEntity financingRound);
@Deprecated /** * @deprecated DO NOT use this one, due to this causes problems in AT... | assertThat(projectEntity.pledgeGoalAchieved(), is(false));
}
} | [FOCAL] public boolean ProjectEntity.pledgeGoalAchieved()
[CLASS] class ProjectEntity
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[FIELDS] read=status
[CLASS-MEMBERS] ProjectEntity(UserEntity creator, Project project, FinancingRoundEntity financingRound); PledgeEntity pledge(Pledge pledge, User... | /* static context
[FOCAL] public boolean ProjectEntity.pledgeGoalAchieved()
[FIELDS] read=status
*/
| /* static context
[FOCAL] public boolean ProjectEntity.pledgeGoalAchieved()
[FIELDS] read=status
*/
class ProjectEntity {
public boolean pledgeGoalAchieved() {
return this.status == ProjectStatus.FULLY_PLEDGED;
}
public ProjectEntity(UserEntity creator, Project project, FinancingRoundEntity finan... | true | ok | {"focal": {"class": "ProjectEntity", "name": "pledgeGoalAchieved", "signature": "boolean pledgeGoalAchieved()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "ProjectEntity", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"... |
35282952_14 | class ErrorEditText extends TextInputEditText {
public void setFieldHint(int hint) {
setFieldHint(getContext().getString(hint));
}
public ErrorEditText(Context context);
public ErrorEditText(Context context, AttributeSet attrs);
public ErrorEditText(Context context, AttributeSet attrs, ... | mView = (CardEditText) Robolectric.setupActivity(TestActivity.class)
.findViewById(R.id.bt_card_form_card_number);
mView.setFieldHint(R.string.bt_form_hint_cvv);
assertEquals("CVV", ((TextInputLayout) mView.getParent().getParent()).getHint());
assertEquals("CVV", mView.... | [FOCAL] public void ErrorEditText.setFieldHint(int hint)
[CLASS] class ErrorEditText extends TextInputEditText
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void setFieldHint(String hint)
[CALLS-EXTERNAL] getContext().getString/1, getContext/0 (inherited)
[DATAFLOW] hint@param->L... | /* static context
[FOCAL] public void ErrorEditText.setFieldHint(int hint)
[CALLS-INTERNAL] void setFieldHint(String hint)
[CALLS-EXTERNAL] getContext().getString/1, getContext/0 (inherited)
*/
| /* static context
[FOCAL] public void ErrorEditText.setFieldHint(int hint)
[CALLS-INTERNAL] void setFieldHint(String hint)
[CALLS-EXTERNAL] getContext().getString/1, getContext/0 (inherited)
*/
class ErrorEditText extends TextInputEditText {
public void setFieldHint(int hint) {
setFieldHint(getContext().ge... | true | ok | {"focal": {"class": "ErrorEditText", "name": "setFieldHint", "signature": "void setFieldHint(int hint)", "start_line": 3, "modifiers": "public", "params": [{"name": "hint", "type": "int"}], "return_type": "void"}, "class_info": {"name": "ErrorEditText", "kind": "class", "modifiers": "", "superclass": "TextInputEditText... |
35297180_1412 | class GroupCreationWorkflow implements IsWidget {
public void clear() {
view.clearNotifications();
createEntity.clear();
groupUsersAssignment.clear();
group = null;
}
@Inject public GroupCreationWorkflow(final ClientUserSystemManager userSystemManager,
... | tested.group = group;
tested.clear();
assertNull(tested.group);
verify(createEntity,
times(1)).clear();
verify(groupUsersAssignment,
times(1)).clear();
verify(view,
times(1)).clearNotifications();
verify(view,
... | [FOCAL] public void GroupCreationWorkflow.clear()
[CLASS] class GroupCreationWorkflow implements IsWidget
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] EntityWorkflowView.clearNotifications/0, CreateEntity.clear/0, GroupUsersAssignment.clear/0
[FIELDS] read=createEntity:CreateEnt... | /* static context
[FOCAL] public void GroupCreationWorkflow.clear()
[COLLABORATORS] field view:EntityWorkflowView clearNotifications/0; field createEntity:CreateEntity clear/0; field groupUsersAssignment:GroupUsersAssignment clear/0
[STATE] group
[FIELDS] read=createEntity:CreateEntity, groupUsersAssignment:GroupUsersA... | /* static context
[FOCAL] public void GroupCreationWorkflow.clear()
[COLLABORATORS] field view:EntityWorkflowView clearNotifications/0; field createEntity:CreateEntity clear/0; field groupUsersAssignment:GroupUsersAssignment clear/0
[STATE] group
[FIELDS] read=createEntity:CreateEntity, groupUsersAssignment:GroupUsersA... | true | ok | {"focal": {"class": "GroupCreationWorkflow", "name": "clear", "signature": "void clear()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "GroupCreationWorkflow", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "IsWidget", "fields": [{"name": "au... |
35303409_0 | class NotesStore extends Store {
public ObservableList<String> getNotes() {
return FXCollections.unmodifiableObservableList(notes);
}
public NotesStore();
private void processAddNoteAction(AddNoteAction action);
private NotesStore store;
}
class NotesStoreTest {
private NotesStore stor... |
// given
assertThat(store.getNotes()).isEmpty();
// when
Dispatcher.getInstance().dispatch(new AddNoteAction("something"));
// then
assertThat(store.getNotes()).contains("something");
}
} | [FOCAL] public ObservableList<String> NotesStore.getNotes()
[CLASS] class NotesStore extends Store
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] FXCollections.unmodifiableObservableList/1
[CLASS-MEMBERS] NotesStore(); void processAddNoteAction(AddNoteAction action)
[TEST] NotesSt... | /* static context
[FOCAL] public ObservableList<String> NotesStore.getNotes()
[CALLS-EXTERNAL] FXCollections.unmodifiableObservableList/1
*/
| /* static context
[FOCAL] public ObservableList<String> NotesStore.getNotes()
[CALLS-EXTERNAL] FXCollections.unmodifiableObservableList/1
*/
class NotesStore extends Store {
public ObservableList<String> getNotes() {
return FXCollections.unmodifiableObservableList(notes);
}
public NotesStore();
... | true | ok | {"focal": {"class": "NotesStore", "name": "getNotes", "signature": "ObservableList<String> getNotes()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "ObservableList<String>"}, "class_info": {"name": "NotesStore", "kind": "class", "modifiers": "", "superclass": "Store", "interfaces": null, "field... |
35358657_14 | class SystemFileSystem extends AbstractFileSystem {
@Override
public void deleteRecursively(File file) throws IOException {
deleteRecursively(file.toPath());
}
@Inject public SystemFileSystem();
@Override public File getTemporaryDirectory(String prefix);
@Override public File getTemporaryDirectory(S... | File file = touchAndCreate(tempDir, "file");
File copy = new File(tempDir, "bar");
Files.write("Contents!", file, UTF_8);
fs.copyFile(file, copy);
fs.deleteRecursively(tempDir);
assertThat(tempDir.exists()).isFalse();
assertThat(file.exists()).isFalse();
assertThat(copy.exists()).isFalse... | [FOCAL] @Override public void SystemFileSystem.deleteRecursively(File file)
[CLASS] class SystemFileSystem extends AbstractFileSystem
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void deleteRecursively(Path path)
[CALLS-EXTERNAL] File.toPath/0
[EXCEPTIONS] declares IOException
[... | /* static context
[FOCAL] @Override public void SystemFileSystem.deleteRecursively(File file)
[COLLABORATORS] param file:File toPath/0
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] void deleteRecursively(Path path)
[CALLS-EXTERNAL] File.toPath/0
*/
| /* static context
[FOCAL] @Override public void SystemFileSystem.deleteRecursively(File file)
[COLLABORATORS] param file:File toPath/0
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] void deleteRecursively(Path path)
[CALLS-EXTERNAL] File.toPath/0
*/
class SystemFileSystem extends AbstractFileSystem {
@Override
... | true | ok | {"focal": {"class": "SystemFileSystem", "name": "deleteRecursively", "signature": "void deleteRecursively(File file) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "file", "type": "File"}], "return_type": "void"}, "class_info": {"name": "SystemFileSystem", "kind": "class", "m... |
35370551_26 | class IterableUtil {
public static <T> Iterable<T> createReverseIterable(List<T> list) {
// When the list is empty we can use the "forward" iterable (i.e. the
// list itself) also as the reverseIterable as it will do nothing.
if (list.size() == 0) {
return list;
}
return new ReverseIterable<T>(list);
}... | List<String> list = new ArrayList<String>();
list.add("A");
list.add("B");
list.add("C");
Iterable<String> iterable = IterableUtil.createReverseIterable(list);
Iterator<String> iter = iterable.iterator();
assertTrue(iter.hasNext());
assertEquals("C", iter.next());
assertTrue(iter.hasNext());
assert... | [FOCAL] public static Iterable<T> IterableUtil.createReverseIterable(List<T> list)
[CLASS] class IterableUtil
[METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] List<T>.size/0
[NEW] ReverseIterable<T>
[PATH1] if(list.size() == 0)=T -> return list
[PATH2] if(list.size() == 0)=F -> retu... | /* static context
[FOCAL] public static Iterable<T> IterableUtil.createReverseIterable(List<T> list)
[PATH1] if(list.size() == 0)=T -> return list
[PATH2] if(list.size() == 0)=F -> return new ReverseIterable<T>(list)
[INPUTS] branches=list | result=list
[COLLABORATORS] param list:List<T> size/0
[NEW] ReverseIterable<T>... | /* static context
[FOCAL] public static Iterable<T> IterableUtil.createReverseIterable(List<T> list)
[PATH1] if(list.size() == 0)=T -> return list
[PATH2] if(list.size() == 0)=F -> return new ReverseIterable<T>(list)
[INPUTS] branches=list | result=list
[COLLABORATORS] param list:List<T> size/0
[NEW] ReverseIterable<T>... | true | ok | {"focal": {"class": "IterableUtil", "name": "createReverseIterable", "signature": "Iterable<T> createReverseIterable(List<T> list)", "start_line": 3, "modifiers": "public static", "params": [{"name": "list", "type": "List<T>"}], "return_type": "Iterable<T>"}, "class_info": {"name": "IterableUtil", "kind": "class", "mod... |
35402802_2 | class HasBinary {
private HasBinary() {private HasBinary() {}
private HasBinary() {private HasBinary();
private HasBinary() {public static boolean hasBinary(Object data);
private HasBinary() {private static boolean _hasBinary(Object obj);
}
class HasBinaryTest {
@Test
public void anArrayContainsByteArray... | JSONArray arr = new JSONArray("[1, null, 2]");
arr.put(1, "asdfasdf".getBytes(Charset.forName("UTF-8")));
assertTrue(HasBinary.hasBinary(arr));
}
} | [FOCAL] private HasBinary.HasBinary()
[CLASS] class HasBinary
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] HasBinary(); boolean hasBinary(Object data); boolean _hasBinary(Object obj)
[TEST] HasBinaryTest: @Test public void anArrayContainsByteArray() throws JSONException | /* static context
[FOCAL] private HasBinary.HasBinary()
*/
| /* static context
[FOCAL] private HasBinary.HasBinary()
*/
class HasBinary {
private HasBinary() {private HasBinary() {}
private HasBinary() {private HasBinary();
private HasBinary() {public static boolean hasBinary(Object data);
private HasBinary() {private static boolean _hasBinary(Object obj);
}
class HasBinar... | true | ok | {"focal": {"class": "HasBinary", "name": "HasBinary", "signature": "HasBinary()", "start_line": 3, "modifiers": "private", "params": [], "return_type": null}, "class_info": {"name": "HasBinary", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "HasBinary", "ki... |
35448780_79 | class Formatter {
public void formatSource(CharSource input, CharSink output)
throws FormatterException, IOException {
// TODO(cushon): proper support for streaming input/output. Input may
// not be feasible (parsing) but output should be easier.
output.write(formatSource(input.read()));
}
pub... | assertThat(
new Formatter()
.formatSource(
"class T {\n"
+ " // MOE: one long incredibly"
+ " unbroken sentence moving from topic to topic so that no-one had a"
+ " chance to interrupt;\n"
... | [FOCAL] public void Formatter.formatSource(CharSource input, CharSink output)
[CLASS] class Formatter
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] String formatSource(String input)
[CALLS-EXTERNAL] CharSink.write/1, CharSource.read/0
[EXCEPTIONS] declares FormatterException, IOE... | /* static context
[FOCAL] public void Formatter.formatSource(CharSource input, CharSink output)
[COLLABORATORS] param output:CharSink write/1; param input:CharSource read/0
[EXCEPTIONS] declares FormatterException, IOException
[CALLS-INTERNAL] String formatSource(String input)
[CALLS-EXTERNAL] CharSink.write/1, CharSou... | /* static context
[FOCAL] public void Formatter.formatSource(CharSource input, CharSink output)
[COLLABORATORS] param output:CharSink write/1; param input:CharSource read/0
[EXCEPTIONS] declares FormatterException, IOException
[CALLS-INTERNAL] String formatSource(String input)
[CALLS-EXTERNAL] CharSink.write/1, CharSou... | true | ok | {"focal": {"class": "Formatter", "name": "formatSource", "signature": "void formatSource(CharSource input, CharSink output) throws FormatterException, IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "input", "type": "CharSource"}, {"name": "output", "type": "CharSink"}], "return_type": "void"}... |
35467512_14 | class MLUtils {
public static String getDate() {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
Date date = new Date();
return dateFormat.format(date);
}
public static SamplePoints getSample(String path, String dataType, int sampleSize, boolean containsHeader)... | String date = MLUtils.getDate();
Assert.assertEquals(date.contains("-"), true);
Assert.assertEquals(date.contains("_"), true);
Assert.assertEquals(!date.contains(":"), true);
}
} | [FOCAL] public static String MLUtils.getDate()
[CLASS] class MLUtils
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] DateFormat.format/1
[NEW] SimpleDateFormat, Date
[DATAFLOW] date@L3->L4; dateFormat@L2->L4
[CLASS-MEMBERS] SamplePoints getSample(String path, String dataType, int s... | /* static context
[FOCAL] public static String MLUtils.getDate()
[NEW] SimpleDateFormat, Date
[CALLS-EXTERNAL] DateFormat.format/1
*/
| /* static context
[FOCAL] public static String MLUtils.getDate()
[NEW] SimpleDateFormat, Date
[CALLS-EXTERNAL] DateFormat.format/1
*/
class MLUtils {
public static String getDate() {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
Date date = new Date();
return dateForm... | true | ok | {"focal": {"class": "MLUtils", "name": "getDate", "signature": "String getDate()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "String"}, "class_info": {"name": "MLUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "getSam... |
35482585_91 | class SesameValueConverter {
Value toSesameValue(Assertion assertion, cz.cvut.kbss.ontodriver.model.Value<?> val) throws SesameDriverException {
switch (assertion.getType()) {
case DATA_PROPERTY:
return SesameUtils.createDataPropertyLiteral(val.getValue(), language(assertion), v... | final String value = "hodnota v cestine";
final Assertion dpAssertion = Assertion.createDataPropertyAssertion(PROPERTY, false);
final Value res = converter.toSesameValue(dpAssertion, value(value));
assertTrue(res instanceof Literal);
final Literal literal = (Literal) res;
... | [FOCAL] Value SesameValueConverter.toSesameValue(Assertion assertion, cz.cvut.kbss.ontodriver.model.Value<?> val)
[CLASS] class SesameValueConverter
[METRICS] loc=15 cc=6 branches=1 loops=0 returns=3 throws=1 nesting=1
[CALLS-INTERNAL] IRI getValueAsSesameUri(cz.cvut.kbss.ontodriver.model.Value<?> val); String language... | /* static context
[FOCAL] Value SesameValueConverter.toSesameValue(Assertion assertion, cz.cvut.kbss.ontodriver.model.Value<?> val)
[THROWS-WHEN] IllegalArgumentException when switch(assertion.getType())=default
[PATH1] switch(assertion.getType())=case DATA_PROPERTY -> return SesameUtils.createDataPropertyLiteral(val.g... | /* static context
[FOCAL] Value SesameValueConverter.toSesameValue(Assertion assertion, cz.cvut.kbss.ontodriver.model.Value<?> val)
[THROWS-WHEN] IllegalArgumentException when switch(assertion.getType())=default
[PATH1] switch(assertion.getType())=case DATA_PROPERTY -> return SesameUtils.createDataPropertyLiteral(val.g... | true | ok | {"focal": {"class": "SesameValueConverter", "name": "toSesameValue", "signature": "Value toSesameValue(Assertion assertion, cz.cvut.kbss.ontodriver.model.Value<?> val) throws SesameDriverException", "start_line": 3, "modifiers": "", "params": [{"name": "assertion", "type": "Assertion"}, {"name": "val", "type": "cz.cvut... |
35511757_73 | class Finder implements Closeable {
public List<NGramModel> find(String aGram)
{
return find(aGram.split(" "));
}
public Finder(File aIndexFolder, File nGramFolder);
private boolean checkForIndex(File aIndexFolder);
public BigInteger freq(String aUnigram);
public BigInteger getUn... | File index = testContext.getTestOutputFolder();
// Create index
LuceneIndexer indexer = new LuceneIndexer(source, index, 2);
indexer.index();
try (Finder f = new Finder(index, jWeb1T)) {
// Search and check if data is correct
List<NGramModel> result = f.... | [FOCAL] public List<NGramModel> Finder.find(String aGram)
[CLASS] class Finder implements Closeable
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] List<NGramModel> find(String[] aToken)
[CALLS-EXTERNAL] String.split/1
[INPUTS] branches=- | result=aGram
[DATAFLOW] aGram@param->L3
[... | /* static context
[FOCAL] public List<NGramModel> Finder.find(String aGram)
[INPUTS] branches=- | result=aGram
[CALLS-INTERNAL] List<NGramModel> find(String[] aToken)
[CALLS-EXTERNAL] String.split/1
*/
| /* static context
[FOCAL] public List<NGramModel> Finder.find(String aGram)
[INPUTS] branches=- | result=aGram
[CALLS-INTERNAL] List<NGramModel> find(String[] aToken)
[CALLS-EXTERNAL] String.split/1
*/
class Finder implements Closeable {
public List<NGramModel> find(String aGram)
{
return find(aGram.sp... | true | ok | {"focal": {"class": "Finder", "name": "find", "signature": "List<NGramModel> find(String aGram)", "start_line": 3, "modifiers": "public", "params": [{"name": "aGram", "type": "String"}], "return_type": "List<NGramModel>"}, "class_info": {"name": "Finder", "kind": "class", "modifiers": "", "superclass": null, "interface... |
35532096_199 | class FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> {
public String toJson() {
return CatalogGsonHelper.toJson(this, FunctionDesc.class);
}
public FunctionDesc();
public FunctionDesc(String signature, Class<? extends Function> clazz,
Functi... | FunctionDesc desc = new FunctionDesc("sum", TestSum.class, FunctionType.GENERAL,
CatalogUtil.newSimpleDataType(Type.INT4),
CatalogUtil.newSimpleDataTypeArray(Type.INT4, Type.INT8));
String json = desc.toJson();
FunctionDesc fromJson = CatalogGsonHelper.fromJson(json, FunctionDesc.class);
ass... | [FOCAL] public String FunctionDesc.toJson()
[CLASS] class FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc>
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] CatalogGsonHelper.toJson/2
[CLASS-MEMBERS] FunctionDesc(); FunctionDesc(... | /* static context
[FOCAL] public String FunctionDesc.toJson()
[CALLS-EXTERNAL] CatalogGsonHelper.toJson/2
*/
| /* static context
[FOCAL] public String FunctionDesc.toJson()
[CALLS-EXTERNAL] CatalogGsonHelper.toJson/2
*/
class FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> {
public String toJson() {
return CatalogGsonHelper.toJson(this, FunctionDesc.class);
}
p... | true | ok | {"focal": {"class": "FunctionDesc", "name": "toJson", "signature": "String toJson()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "FunctionDesc", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "ProtoObject<FunctionDescProto>, Cloneable, Gso... |
35550196_35 | class CasMerge {
public CasMergeOperationResult mergeSpanAnnotation(SourceDocument aDocument, String aUsername,
AnnotationLayer aAnnotationLayer, CAS aTargetCas, AnnotationFS aSourceFs,
boolean aAllowStacking)
throws AnnotationException
{
if (existsSameAt(aTargetCas, aSo... | CAS jcas = createJCas().getCas();
Type type = jcas.getTypeSystem().getType(POS.class.getTypeName());
AnnotationFS clickedFs = createPOSAnno(jcas, "NN", 0, 0);
CAS mergeCas = createJCas().getCas();
AnnotationFS existingFs = mergeCas.createAnnotation(type, 0, 0);
Feature p... | [FOCAL] public CasMergeOperationResult CasMerge.mergeSpanAnnotation(SourceDocument aDocument, String aUsername, AnnotationLayer aAnnotationLayer, CAS aTargetCas, AnnotationFS aSourceFs, boolean aAllowStacking)
[CLASS] class CasMerge
[METRICS] loc=47 cc=5 branches=3 loops=0 returns=2 throws=2 nesting=2
[CALLS-INTERNAL] ... | /* static context
[FOCAL] public CasMergeOperationResult CasMerge.mergeSpanAnnotation(SourceDocument aDocument, String aUsername, AnnotationLayer aAnnotationLayer, CAS aTargetCas, AnnotationFS aSourceFs, boolean aAllowStacking)
[THROWS-WHEN] AlreadyMergedException when existsSameAt(aTargetCas, aSourceFs)
[THROWS-WHEN] ... | /* static context
[FOCAL] public CasMergeOperationResult CasMerge.mergeSpanAnnotation(SourceDocument aDocument, String aUsername, AnnotationLayer aAnnotationLayer, CAS aTargetCas, AnnotationFS aSourceFs, boolean aAllowStacking)
[THROWS-WHEN] AlreadyMergedException when existsSameAt(aTargetCas, aSourceFs)
[THROWS-WHEN] ... | true | ok | {"focal": {"class": "CasMerge", "name": "mergeSpanAnnotation", "signature": "CasMergeOperationResult mergeSpanAnnotation(SourceDocument aDocument, String aUsername, AnnotationLayer aAnnotationLayer, CAS aTargetCas, AnnotationFS aSourceFs, boolean aAllowStacking) throws AnnotationException", "start_line": 3, "modifiers"... |
35592079_0 | class CargaIndicadorController {
@Asynchronous
@TransactionAttribute(TransactionAttributeType.NEVER)
public void carregaIndicadores(DadosCargaIndicador carga) {
String nomeGrupoIndicador = carga.getGrupoIndicador();
String nomeIndicador = carga.getIndicador();
String focoIndicador = carga.getFocoIndicador();
... |
Estado e = new Estado(ESTADO);
estadoService.salvar(e);
Municipio m1 = new Municipio("", MUNICIPIO1, e);
Municipio m2 = new Municipio("", MUNICIPIO2, e);
Municipio m3 = new Municipio("", MUNICIPIO3, e);
municipioService.salvar(m1);
municipioService.salvar(m2);
municipioService.salvar(m3);
Area are... | [FOCAL] @Asynchronous @TransactionAttribute(TransactionAttributeType.NEVER) public void CargaIndicadorController.carregaIndicadores(DadosCargaIndicador carga)
[CLASS] class CargaIndicadorController
[METRICS] loc=32 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] String carregaLinha(GrupoIndicador ... | class CargaIndicadorController {
@Asynchronous
@TransactionAttribute(TransactionAttributeType.NEVER)
public void carregaIndicadores(DadosCargaIndicador carga) {
String nomeGrupoIndicador = carga.getGrupoIndicador();
String nomeIndicador = carga.getIndicador();
String focoIndicador = carga.getFocoIndicador();
... | false | ok | {"focal": {"class": "CargaIndicadorController", "name": "carregaIndicadores", "signature": "void carregaIndicadores(DadosCargaIndicador carga)", "start_line": 3, "modifiers": "@Asynchronous @TransactionAttribute(TransactionAttributeType.NEVER) public", "params": [{"name": "carga", "type": "DadosCargaIndicador"}], "retu... | |
35592576_45 | class ESHttpJsonUnmarshaller implements ESHttpUnmarshaller {
@Override
public final Object unmarshal(final DeserializerRegistry registry, final SerializedDataType dataType,
final EnhancedMimeType mimeType, final Object data) {
if (data == null) {
return null;
}
... |
// PREPARE
final SerializedDataType dataType = new SerializedDataType(MyEvent.TYPE.asBaseType());
final EnhancedMimeType mimeType = new EnhancedMimeType(
"application/xml; version=1; encoding=utf-8; transfer-encoding=base64");
final DeserializerRegistry registry = create... | [FOCAL] @Override public final Object ESHttpJsonUnmarshaller.unmarshal(DeserializerRegistry registry, SerializedDataType dataType, EnhancedMimeType mimeType, Object data)
[CLASS] class ESHttpJsonUnmarshaller implements ESHttpUnmarshaller
[METRICS] loc=25 cc=4 branches=3 loops=0 returns=3 throws=1 nesting=1
[CALLS-EXTER... | /* static context
[FOCAL] @Override public final Object ESHttpJsonUnmarshaller.unmarshal(DeserializerRegistry registry, SerializedDataType dataType, EnhancedMimeType mimeType, Object data)
[THROWS-WHEN] IllegalArgumentException when !(data == null) && !(data instanceof JsonObject)
[PATH1] if(data == null)=F -> if(!(dat... | /* static context
[FOCAL] @Override public final Object ESHttpJsonUnmarshaller.unmarshal(DeserializerRegistry registry, SerializedDataType dataType, EnhancedMimeType mimeType, Object data)
[THROWS-WHEN] IllegalArgumentException when !(data == null) && !(data instanceof JsonObject)
[PATH1] if(data == null)=F -> if(!(dat... | true | ok | {"focal": {"class": "ESHttpJsonUnmarshaller", "name": "unmarshal", "signature": "Object unmarshal(DeserializerRegistry registry, SerializedDataType dataType, EnhancedMimeType mimeType, Object data)", "start_line": 3, "modifiers": "@Override public final", "params": [{"name": "registry", "type": "DeserializerRegistry"},... |
35604995_0 | class RxPresso implements IdlingResource {
public <T> With<T> given(Observable<T> observable) {
RxMock mock = Observable.from(mocks).filter(provides(observable)).toBlocking().first();
final With<T> with = new With<>(mock, observable);
pendingResources.add(with);
with.registerIdleTra... | Observable<Integer> foo = mockedRepo.foo(3);
rxPresso.given(foo)
.withEventsFrom(SingleEvent.onNext(42))
.expect(any(Integer.class));
Integer result = foo.toBlocking().first();
assertThat(result).isEqualTo(42);
}
} | [FOCAL] public With<T> RxPresso.given(Observable<T> observable)
[CLASS] class RxPresso implements IdlingResource
[METRICS] loc=17 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] Func1<? super RxMock, Boolean> provides(Observable<T> observable)
[CALLS-EXTERNAL] Observable.from(mocks).filter(provide... | /* static context
[FOCAL] public With<T> RxPresso.given(Observable<T> observable)
[INPUTS] branches=- | result=observable
[COLLABORATORS] field pendingResources add/1,remove/1,isEmpty/0; field resourceCallback:IdlingResource.ResourceCallback onTransitionToIdle/0
[CALLS-INTERNAL] Func1<? super RxMock, Boolean> provides(... | /* static context
[FOCAL] public With<T> RxPresso.given(Observable<T> observable)
[INPUTS] branches=- | result=observable
[COLLABORATORS] field pendingResources add/1,remove/1,isEmpty/0; field resourceCallback:IdlingResource.ResourceCallback onTransitionToIdle/0
[CALLS-INTERNAL] Func1<? super RxMock, Boolean> provides(... | true | ok | {"focal": {"class": "RxPresso", "name": "given", "signature": "With<T> given(Observable<T> observable)", "start_line": 3, "modifiers": "public", "params": [{"name": "observable", "type": "Observable<T>"}], "return_type": "With<T>"}, "class_info": {"name": "RxPresso", "kind": "class", "modifiers": "", "superclass": null... |
35617147_0 | class UimaAsExecutionEngine implements TaskExecutionEngine {
@Override
public String run(Task aConfiguration)
throws ExecutionException, LifeCycleException
{
if (!(aConfiguration instanceof UimaTask)) {
throw new ExecutionException("This engine can only execute ["
+ UimaTask.class.getName() + "]");
}
... | File repo = new File("target/repository");
FileUtils.deleteQuietly(repo);
((FileSystemStorageService) storageService).setStorageRoot(repo);
assertNotNull(executionService);
assertNotNull(contextFactory);
AnalysisEngineDescription desc = createEngineDescription(DummyAE.class);
DefaultUimaTask cfg = new ... | [FOCAL] @Override public String UimaAsExecutionEngine.run(Task aConfiguration)
[CLASS] class UimaAsExecutionEngine implements TaskExecutionEngine
[METRICS] loc=60 cc=4 branches=1 loops=0 returns=1 throws=3 nesting=1
[CALLS-INTERNAL] void destroy(); void initializeClient(); void initializeService(); void process()
[CALL... | /* static context
[FOCAL] @Override public String UimaAsExecutionEngine.run(Task aConfiguration)
[THROWS-WHEN] ExecutionException when !(aConfiguration instanceof UimaTask)
[THROWS-WHEN] e when !(!(aConfiguration instanceof UimaTask)) && try-body throws
[THROWS-WHEN] ExecutionException when !(!(aConfiguration instanceo... | /* static context
[FOCAL] @Override public String UimaAsExecutionEngine.run(Task aConfiguration)
[THROWS-WHEN] ExecutionException when !(aConfiguration instanceof UimaTask)
[THROWS-WHEN] e when !(!(aConfiguration instanceof UimaTask)) && try-body throws
[THROWS-WHEN] ExecutionException when !(!(aConfiguration instanceo... | true | ok | {"focal": {"class": "UimaAsExecutionEngine", "name": "run", "signature": "String run(Task aConfiguration) throws ExecutionException, LifeCycleException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "aConfiguration", "type": "Task"}], "return_type": "String"}, "class_info": {"name": "UimaAsExec... |
35632860_1 | class HeaderChunk {
void readHeader(InputStream is) throws IOException {
int headerRead = 0;
while (headerRead < HEADER_SIZE) {
final int bytesRead = is.read(header, headerRead, HEADER_SIZE - headerRead);
if (bytesRead < 0) {
throw new EOFException("Failed to read header.");
}
... | try {
headerChunk.readHeader(new ByteArrayInputStream(new byte[1]));
fail("Incomplete header");
} catch (IOException e) {
// everything is OK
}
}
} | [FOCAL] void HeaderChunk.readHeader(InputStream is)
[CLASS] class HeaderChunk
[METRICS] loc=17 cc=5 branches=3 loops=1 returns=0 throws=3 nesting=2
[CALLS-INTERNAL] String toString(); boolean hasFlags(int flags); int getPacketSize()
[CALLS-EXTERNAL] InputStream.read/3, LOGGER.trace/3
[NEW] EOFException, IOException
[EX... | /* static context
[FOCAL] void HeaderChunk.readHeader(InputStream is)
[THROWS-WHEN] EOFException when headerRead < HEADER_SIZE && bytesRead < 0
[THROWS-WHEN] IOException when headerRead < HEADER_SIZE && !(bytesRead < 0) && header[0] != MAGIC_BYTE
[THROWS-WHEN] IOException when headerRead < HEADER_SIZE && !(bytesRead < ... | /* static context
[FOCAL] void HeaderChunk.readHeader(InputStream is)
[THROWS-WHEN] EOFException when headerRead < HEADER_SIZE && bytesRead < 0
[THROWS-WHEN] IOException when headerRead < HEADER_SIZE && !(bytesRead < 0) && header[0] != MAGIC_BYTE
[THROWS-WHEN] IOException when headerRead < HEADER_SIZE && !(bytesRead < ... | true | ok | {"focal": {"class": "HeaderChunk", "name": "readHeader", "signature": "void readHeader(InputStream is) throws IOException", "start_line": 3, "modifiers": "", "params": [{"name": "is", "type": "InputStream"}], "return_type": "void"}, "class_info": {"name": "HeaderChunk", "kind": "class", "modifiers": "", "superclass": n... |
35640235_1 | class GitHubInteractor {
public Observable<SearchResult> searchUsers(final String query) {
return Observable.concat(cachedResults(query), networkResults(query)).first();
}
public GitHubInteractor(Retrofit retrofit, LruCache<String, SearchResult> cache);
private Observable<SearchResult> cachedResults(Str... | SearchItem item = new SearchItem();
item.setLogin("octocat");
item.setAvatarUrl("https://avatars.githubusercontent.com/u/583231?v\u003d3");
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://api.github.com")
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.ad... | [FOCAL] public Observable<SearchResult> GitHubInteractor.searchUsers(String query)
[CLASS] class GitHubInteractor
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Observable<SearchResult> cachedResults(String query); Observable<SearchResult> networkResults(String query)
[CALLS-EXTER... | /* static context
[FOCAL] public Observable<SearchResult> GitHubInteractor.searchUsers(String query)
[INPUTS] branches=- | result=query
[CALLS-INTERNAL] Observable<SearchResult> cachedResults(String query); Observable<SearchResult> networkResults(String query)
[CALLS-EXTERNAL] Observable.concat(cachedResults(query), ne... | /* static context
[FOCAL] public Observable<SearchResult> GitHubInteractor.searchUsers(String query)
[INPUTS] branches=- | result=query
[CALLS-INTERNAL] Observable<SearchResult> cachedResults(String query); Observable<SearchResult> networkResults(String query)
[CALLS-EXTERNAL] Observable.concat(cachedResults(query), ne... | true | ok | {"focal": {"class": "GitHubInteractor", "name": "searchUsers", "signature": "Observable<SearchResult> searchUsers(String query)", "start_line": 3, "modifiers": "public", "params": [{"name": "query", "type": "String"}], "return_type": "Observable<SearchResult>"}, "class_info": {"name": "GitHubInteractor", "kind": "class... |
35662043_58 | class OutputRateCalculator {
public void start() {
maxRateProvider.start();
}
public OutputRateCalculator(ConfigFactory configFactory, MaxRateProvider maxRateProvider);
public OutputRateCalculationResult recalculateRate(SendCounters counters,
... | //given
OutputRateCalculationScenario scenario = new OutputRateCalculationScenario(calculator);
// when
scenario.start(10).fastForwardWithSuccesses(10);
// then
scenario.verifyFinalResult(MAX_RATE, OutputRateCalculator.Mode.NORMAL);
}
} | [FOCAL] public void OutputRateCalculator.start()
[CLASS] class OutputRateCalculator
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] maxRateProvider.start/0
[COLLABORATORS] field maxRateProvider start/0
[CLASS-MEMBERS] OutputRateCalculator(ConfigFactory configFactory, MaxRateProvide... | /* static context
[FOCAL] public void OutputRateCalculator.start()
[COLLABORATORS] field maxRateProvider start/0
[CALLS-EXTERNAL] maxRateProvider.start/0
*/
| /* static context
[FOCAL] public void OutputRateCalculator.start()
[COLLABORATORS] field maxRateProvider start/0
[CALLS-EXTERNAL] maxRateProvider.start/0
*/
class OutputRateCalculator {
public void start() {
maxRateProvider.start();
}
public OutputRateCalculator(ConfigFactory configFactory, MaxRa... | true | ok | {"focal": {"class": "OutputRateCalculator", "name": "start", "signature": "void start()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "OutputRateCalculator", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "HEARTBEAT_... |
35675774_45 | class StringLibrary {
public static String unique(String string) {
return string.intern();
}
public static String quoted(String string);
public static List<String> split(String chainedStrings, Character character);
public static List<String> split(String chainedStrings, String splittingReg... | String a = "abcdjjq";
String b = a + "";
String c = a + "";
assertTrue(a.equals(b));
assertTrue(b.equals(c));
assertTrue(a.equals(c));
assertFalse(a == b);
assertFalse(b == c);
assertFalse(a == c);
assertTrue(a == unique(a));
assertTrue(a == unique(b));
assertTrue(a == unique(c));
}
} | [FOCAL] public static String StringLibrary.unique(String string)
[CLASS] class StringLibrary
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] String.intern/0
[INPUTS] branches=- | result=string
[DATAFLOW] string@param->L2
[CLASS-MEMBERS] String quoted(String string); List<String> sp... | /* static context
[FOCAL] public static String StringLibrary.unique(String string)
[INPUTS] branches=- | result=string
[CALLS-EXTERNAL] String.intern/0
*/
| /* static context
[FOCAL] public static String StringLibrary.unique(String string)
[INPUTS] branches=- | result=string
[CALLS-EXTERNAL] String.intern/0
*/
class StringLibrary {
public static String unique(String string) {
return string.intern();
}
public static String quoted(String string);
pu... | true | ok | {"focal": {"class": "StringLibrary", "name": "unique", "signature": "String unique(String string)", "start_line": 3, "modifiers": "public static", "params": [{"name": "string", "type": "String"}], "return_type": "String"}, "class_info": {"name": "StringLibrary", "kind": "class", "modifiers": "", "superclass": null, "in... |
35680131_188 | class FieldsTypeUtils {
static PredicateLeaf.Type toType(Fields fields) {
Type type = fields.getType(0);
if (type.equals(Double.class)) {
return PredicateLeaf.Type.FLOAT;
} else if (type.equals(Long.class)) {
return PredicateLeaf.Type.LONG;
} else if (type.equals(Integer.class)) {
... | Fields fields = new Fields("A", Integer.class);
PredicateLeaf.Type fieldsType = toType(fields);
assertThat(fieldsType, is (PredicateLeaf.Type.LONG));
}
} | [FOCAL] static PredicateLeaf.Type FieldsTypeUtils.toType(Fields fields)
[CLASS] class FieldsTypeUtils
[METRICS] loc=25 cc=11 branches=10 loops=0 returns=10 throws=1 nesting=10
[CALLS-EXTERNAL] Fields.getType/1, Type.equals/1
[NEW] IllegalStateException
[EXCEPTIONS] throws IllegalStateException
[THROWS-WHEN] IllegalStat... | /* static context
[FOCAL] static PredicateLeaf.Type FieldsTypeUtils.toType(Fields fields)
[THROWS-WHEN] IllegalStateException when !type.equals(Double.class) && !type.equals(Long.class) && !type.equals(Integer.class) && !type.equals(Date.class) && !type.equals(String.class) && !type.equals(HiveChar.class) && !type.equa... | /* static context
[FOCAL] static PredicateLeaf.Type FieldsTypeUtils.toType(Fields fields)
[THROWS-WHEN] IllegalStateException when !type.equals(Double.class) && !type.equals(Long.class) && !type.equals(Integer.class) && !type.equals(Date.class) && !type.equals(String.class) && !type.equals(HiveChar.class) && !type.equa... | true | ok | {"focal": {"class": "FieldsTypeUtils", "name": "toType", "signature": "PredicateLeaf.Type toType(Fields fields)", "start_line": 3, "modifiers": "static", "params": [{"name": "fields", "type": "Fields"}], "return_type": "PredicateLeaf.Type"}, "class_info": {"name": "FieldsTypeUtils", "kind": "class", "modifiers": "", "s... |
35686068_24 | class IdentifiableToIdConverter implements Converter {
public boolean canConvert(final Class type) {
return type.isAssignableFrom(this.type);
}
public IdentifiableToIdConverter(
final Class<Identifiable<?>> type, final Mapper mapper, final ReflectionProvider reflectionProvider,
... | converter = new IdentifiableToIdConverter(User.class);
assertTrue(converter.canConvert(User.class));
}
} | [FOCAL] public boolean IdentifiableToIdConverter.canConvert(Class type)
[CLASS] class IdentifiableToIdConverter implements Converter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Class.isAssignableFrom/1
[FIELDS] read=type
[INPUTS] branches=- | result=type
[COLLABORATORS] param t... | /* static context
[FOCAL] public boolean IdentifiableToIdConverter.canConvert(Class type)
[INPUTS] branches=- | result=type
[COLLABORATORS] param type:Class isAssignableFrom/1
[FIELDS] read=type
[CALLS-EXTERNAL] Class.isAssignableFrom/1
*/
| /* static context
[FOCAL] public boolean IdentifiableToIdConverter.canConvert(Class type)
[INPUTS] branches=- | result=type
[COLLABORATORS] param type:Class isAssignableFrom/1
[FIELDS] read=type
[CALLS-EXTERNAL] Class.isAssignableFrom/1
*/
class IdentifiableToIdConverter implements Converter {
public boolean canC... | true | ok | {"focal": {"class": "IdentifiableToIdConverter", "name": "canConvert", "signature": "boolean canConvert(Class type)", "start_line": 3, "modifiers": "public", "params": [{"name": "type", "type": "Class"}], "return_type": "boolean"}, "class_info": {"name": "IdentifiableToIdConverter", "kind": "class", "modifiers": "", "s... |
35702140_29 | class WebSocketNativeBalancingHandler extends WebSocketHandlerAdapter {
public void setNextHandler(WebSocketHandler handler) {
this.nextHandler = handler;
handler.setListener(new WebSocketHandlerListener() {
@Override
public void connectionOpened(WebSocketChannel c... |
Mockery context = new Mockery();
final WebSocketHandler nextHandler = context.mock(WebSocketHandler.class);
final WebSocketHandlerListener listener = context.mock(WebSocketHandlerListener.class);
final WrappedByteBuffer message = new WrappedByteBuffer("test message".getBytes());
... | [FOCAL] public void WebSocketNativeBalancingHandler.setNextHandler(WebSocketHandler handler)
[CLASS] class WebSocketNativeBalancingHandler extends WebSocketHandlerAdapter
[METRICS] loc=99 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=3
[CALLS-INTERNAL] void handleBinaryMessageReceived(WebSocketChannel channel, Wra... | /* static context
[FOCAL] public void WebSocketNativeBalancingHandler.setNextHandler(WebSocketHandler handler)
[COLLABORATORS] param handler:WebSocketHandler setListener/1; field listener connectionOpened/2,connectionFailed/2,authenticationRequested/3,connectionClosed/4,connectionClosed/2,commandMessageReceived/2; fiel... | /* static context
[FOCAL] public void WebSocketNativeBalancingHandler.setNextHandler(WebSocketHandler handler)
[COLLABORATORS] param handler:WebSocketHandler setListener/1; field listener connectionOpened/2,connectionFailed/2,authenticationRequested/3,connectionClosed/4,connectionClosed/2,commandMessageReceived/2; fiel... | true | ok | {"focal": {"class": "WebSocketNativeBalancingHandler", "name": "setNextHandler", "signature": "void setNextHandler(WebSocketHandler handler)", "start_line": 3, "modifiers": "public", "params": [{"name": "handler", "type": "WebSocketHandler"}], "return_type": "void"}, "class_info": {"name": "WebSocketNativeBalancingHand... |
35720847_0 | class Utils {
public static String printTimeDelay(final long timeInMilliseconds) {
final Duration duration = new Duration(timeInMilliseconds);
final Period period = duration.toPeriod().normalizedStandard(PeriodType.time());
return TIME_FORMATTER.print(period);
}
private Utils();
public static bo... | assertEquals("34:17:36.789",Utils.printTimeDelay(123456789L));
}
} | [FOCAL] public static String Utils.printTimeDelay(long timeInMilliseconds)
[CLASS] class Utils
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] duration.toPeriod().normalizedStandard/1, Duration.toPeriod/0, PeriodType.time/0, TIME_FORMATTER.print/1
[NEW] Duration
[INPUTS] branches=-... | /* static context
[FOCAL] public static String Utils.printTimeDelay(long timeInMilliseconds)
[INPUTS] branches=- | result=timeInMilliseconds
[NEW] Duration
[CALLS-EXTERNAL] duration.toPeriod().normalizedStandard/1, Duration.toPeriod/0, PeriodType.time/0, TIME_FORMATTER.print/1
*/
| /* static context
[FOCAL] public static String Utils.printTimeDelay(long timeInMilliseconds)
[INPUTS] branches=- | result=timeInMilliseconds
[NEW] Duration
[CALLS-EXTERNAL] duration.toPeriod().normalizedStandard/1, Duration.toPeriod/0, PeriodType.time/0, TIME_FORMATTER.print/1
*/
class Utils {
public static String p... | true | ok | {"focal": {"class": "Utils", "name": "printTimeDelay", "signature": "String printTimeDelay(long timeInMilliseconds)", "start_line": 3, "modifiers": "public static", "params": [{"name": "timeInMilliseconds", "type": "long"}], "return_type": "String"}, "class_info": {"name": "Utils", "kind": "class", "modifiers": "", "su... |
35725078_25 | class ArgCheck {
static public long requireStrictlyPostive(long l) throws IllegalArgumentException {
return requireStrictlyPostive(l, "long value must be strictly positive");
}
private ArgCheck();
static public T requireNonNull(T obj);
static public T requireNonNull(T obj, String errMsg)... | ArgCheck.requireStrictlyPostive(1);
try {
ArgCheck.requireStrictlyPostive(0);
Assert.fail("Should have thrown an NPE");
} catch (IllegalArgumentException e) {
}
try {
ArgCheck.requireStrictlyPostive(-1);
Assert.fail("Should have thr... | [FOCAL] static public long ArgCheck.requireStrictlyPostive(long l)
[CLASS] class ArgCheck
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] long requireStrictlyPostive(long l, String msg)
[EXCEPTIONS] declares IllegalArgumentException
[INPUTS] branches=- | result=l
[DATAFLOW] l@param... | /* static context
[FOCAL] static public long ArgCheck.requireStrictlyPostive(long l)
[INPUTS] branches=- | result=l
[EXCEPTIONS] declares IllegalArgumentException
[CALLS-INTERNAL] long requireStrictlyPostive(long l, String msg)
*/
| /* static context
[FOCAL] static public long ArgCheck.requireStrictlyPostive(long l)
[INPUTS] branches=- | result=l
[EXCEPTIONS] declares IllegalArgumentException
[CALLS-INTERNAL] long requireStrictlyPostive(long l, String msg)
*/
class ArgCheck {
static public long requireStrictlyPostive(long l) throws IllegalArg... | true | ok | {"focal": {"class": "ArgCheck", "name": "requireStrictlyPostive", "signature": "long requireStrictlyPostive(long l) throws IllegalArgumentException", "start_line": 3, "modifiers": "static public", "params": [{"name": "l", "type": "long"}], "return_type": "long"}, "class_info": {"name": "ArgCheck", "kind": "class", "mod... |
35728528_2 | class ExpressionEvaluator {
public final Atom evaluate(final String expression) {
return evaluate(Expression.parse(expression));
}
public ExpressionEvaluator();
public final Atom evaluate(final Expression expression);
public final Atom evaluate(final Expression expression, final EvaluationContext context);
... | assertEquals(new BigDecimal(18), evaluator.evaluate("8 + 10").getValue());
assertEquals(new BigDecimal(-2), evaluator.evaluate("8 - 10").getValue());
assertNotEquals(new BigDecimal(21), evaluator.evaluate("7 * 2 + 1").getValue());
}
} | [FOCAL] public final Atom ExpressionEvaluator.evaluate(String expression)
[CLASS] class ExpressionEvaluator
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Atom evaluate(Expression expression)
[CALLS-EXTERNAL] Expression.parse/1
[INPUTS] branches=- | result=expression
[DATAFLOW] ex... | /* static context
[FOCAL] public final Atom ExpressionEvaluator.evaluate(String expression)
[INPUTS] branches=- | result=expression
[CALLS-INTERNAL] Atom evaluate(Expression expression)
[CALLS-EXTERNAL] Expression.parse/1
*/
| /* static context
[FOCAL] public final Atom ExpressionEvaluator.evaluate(String expression)
[INPUTS] branches=- | result=expression
[CALLS-INTERNAL] Atom evaluate(Expression expression)
[CALLS-EXTERNAL] Expression.parse/1
*/
class ExpressionEvaluator {
public final Atom evaluate(final String expression) {
return ev... | true | ok | {"focal": {"class": "ExpressionEvaluator", "name": "evaluate", "signature": "Atom evaluate(String expression)", "start_line": 3, "modifiers": "public final", "params": [{"name": "expression", "type": "String"}], "return_type": "Atom"}, "class_info": {"name": "ExpressionEvaluator", "kind": "class", "modifiers": "", "sup... |
35757620_109 | class ReceiptPrinter {
public String printReceipt(Receipt receipt) {
StringBuilder result = new StringBuilder();
for (ReceiptItem item : receipt.getItems()) {
String receiptItem = presentReceiptItem(item);
result.append(receiptItem);
}
for (Discount discount ... | receipt.addProduct(toothbrush, 1, 0.99, 0.99);
Approvals.verify(new ReceiptPrinter(40).printReceipt(receipt));
}
} | [FOCAL] public String ReceiptPrinter.printReceipt(Receipt receipt)
[CLASS] class ReceiptPrinter
[METRICS] loc=15 cc=3 branches=0 loops=2 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] String presentDiscount(Discount discount); String presentReceiptItem(ReceiptItem item); String presentTotal(Receipt receipt)
[CALLS-EXTER... | /* static context
[FOCAL] public String ReceiptPrinter.printReceipt(Receipt receipt)
[PATH1] foreach(ReceiptItem item : receipt.getItems())=T -> exit loop -> foreach(Discount discount : receipt.getDiscounts())=F -> return result.toString()
[PATH2] foreach(ReceiptItem item : receipt.getItems())=F -> foreach(Discount dis... | /* static context
[FOCAL] public String ReceiptPrinter.printReceipt(Receipt receipt)
[PATH1] foreach(ReceiptItem item : receipt.getItems())=T -> exit loop -> foreach(Discount discount : receipt.getDiscounts())=F -> return result.toString()
[PATH2] foreach(ReceiptItem item : receipt.getItems())=F -> foreach(Discount dis... | true | ok | {"focal": {"class": "ReceiptPrinter", "name": "printReceipt", "signature": "String printReceipt(Receipt receipt)", "start_line": 3, "modifiers": "public", "params": [{"name": "receipt", "type": "Receipt"}], "return_type": "String"}, "class_info": {"name": "ReceiptPrinter", "kind": "class", "modifiers": "", "superclass"... |
35772318_4 | class DiscountManagerBean implements DiscountManager {
@Override
public double findDiscount(Member member) {
double discount = 0.0;
MembershipLevel ml = membershipLevelManager.findByMemberId(member.getId());
if (ml != null) {
switch (ml.getType()) {
case SILVER:
discount = 0.05;
break;
cas... | membershipLevel.setType(MembershipLevelType.BRONZE);
double discount = bean.findDiscount(member);
assertEquals(0.0, discount, 0.0);
}
} | [FOCAL] @Override public double DiscountManagerBean.findDiscount(Member member)
[CLASS] class DiscountManagerBean implements DiscountManager
[METRICS] loc=19 cc=5 branches=2 loops=0 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] membershipLevelManager.findByMemberId/1, Member.getId/0, MembershipLevel.getType/0
[PATH1] i... | /* static context
[FOCAL] @Override public double DiscountManagerBean.findDiscount(Member member)
[PATH1] if(ml != null)=T -> switch(ml.getType())=case SILVER -> return discount
[PATH2] if(ml != null)=F -> return discount
[PATH3] if(ml != null)=T -> switch(ml.getType())=case GOLD -> return discount
[PATH4] if(ml != nul... | /* static context
[FOCAL] @Override public double DiscountManagerBean.findDiscount(Member member)
[PATH1] if(ml != null)=T -> switch(ml.getType())=case SILVER -> return discount
[PATH2] if(ml != null)=F -> return discount
[PATH3] if(ml != null)=T -> switch(ml.getType())=case GOLD -> return discount
[PATH4] if(ml != nul... | true | ok | {"focal": {"class": "DiscountManagerBean", "name": "findDiscount", "signature": "double findDiscount(Member member)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "member", "type": "Member"}], "return_type": "double"}, "class_info": {"name": "DiscountManagerBean", "kind": "class", "modifiers": ... |
35775200_12 | class WeekUtils {
static String[] getWeekdayNames(Locale locale, int day, boolean useThreeLetterAbbreviation){
DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);
String[] dayNames = dateFormatSymbols.getShortWeekdays();
if (dayNames == null) {
throw new Illegal... | String[] expectedWeekDays = {"Fri", "Sat", "Sun", "Mon", "Tue", "Wed", "Thu"};
String[] actualWeekDays = WeekUtils.getWeekdayNames(Locale.ENGLISH, Calendar.FRIDAY, true);
assertArrayEquals(expectedWeekDays, actualWeekDays);
}
} | [FOCAL] static String[] WeekUtils.getWeekdayNames(Locale locale, int day, boolean useThreeLetterAbbreviation)
[CLASS] class WeekUtils
[METRICS] loc=26 cc=6 branches=3 loops=2 returns=1 throws=2 nesting=2
[CALLS-EXTERNAL] DateFormatSymbols.getShortWeekdays/0, Arrays.toString/1, weekDayNames[i].substring/2
[NEW] DateForm... | /* static context
[FOCAL] static String[] WeekUtils.getWeekdayNames(Locale locale, int day, boolean useThreeLetterAbbreviation)
[THROWS-WHEN] IllegalStateException when dayNames == null
[THROWS-WHEN] IllegalStateException when !(dayNames == null) && dayNames.length != 8
[PATH1] if(dayNames == null)=F -> if(dayNames.len... | /* static context
[FOCAL] static String[] WeekUtils.getWeekdayNames(Locale locale, int day, boolean useThreeLetterAbbreviation)
[THROWS-WHEN] IllegalStateException when dayNames == null
[THROWS-WHEN] IllegalStateException when !(dayNames == null) && dayNames.length != 8
[PATH1] if(dayNames == null)=F -> if(dayNames.len... | true | ok | {"focal": {"class": "WeekUtils", "name": "getWeekdayNames", "signature": "String[] getWeekdayNames(Locale locale, int day, boolean useThreeLetterAbbreviation)", "start_line": 3, "modifiers": "static", "params": [{"name": "locale", "type": "Locale"}, {"name": "day", "type": "int"}, {"name": "useThreeLetterAbbreviation",... |
35814909_26 | class AsyncBuilder {
@NonNull
@VisibleForTesting
@UiThread
ExecutorService getFileExecutorService(@NonNull final ImmutableValue<IThreadType> threadTypeImmutableValue) {
Log.v(TAG, "getFileExecutorService()");
if (fileExecutorService == null) {
Log.d(TAG, "Creating default f... | asyncBuilder
.setFileExecutorService(executorService)
.build();
assertEquals(executorService, asyncBuilder.getFileExecutorService(new ImmutableValue<>()));
}
} | [FOCAL] @NonNull @VisibleForTesting @UiThread ExecutorService AsyncBuilder.getFileExecutorService(ImmutableValue<IThreadType> threadTypeImmutableValue)
[CLASS] class AsyncBuilder
[METRICS] loc=17 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] AsyncBuilder setFileExecutorService(ExecutorService fi... | /* static context
[FOCAL] @NonNull @VisibleForTesting @UiThread ExecutorService AsyncBuilder.getFileExecutorService(ImmutableValue<IThreadType> threadTypeImmutableValue)
[PATH1] if(fileExecutorService == null)=T -> return fileExecutorService
[PATH2] if(fileExecutorService == null)=F -> return fileExecutorService
[COLLA... | /* static context
[FOCAL] @NonNull @VisibleForTesting @UiThread ExecutorService AsyncBuilder.getFileExecutorService(ImmutableValue<IThreadType> threadTypeImmutableValue)
[PATH1] if(fileExecutorService == null)=T -> return fileExecutorService
[PATH2] if(fileExecutorService == null)=F -> return fileExecutorService
[COLLA... | true | ok | {"focal": {"class": "AsyncBuilder", "name": "getFileExecutorService", "signature": "ExecutorService getFileExecutorService(ImmutableValue<IThreadType> threadTypeImmutableValue)", "start_line": 3, "modifiers": "@NonNull @VisibleForTesting @UiThread", "params": [{"name": "threadTypeImmutableValue", "type": "ImmutableValu... |
35841129_7 | class BigdataSailFactory {
@Deprecated // We are getting rid of this, right?
public static String testServiceEndpointUrl(final String serviceEndpoint)
{
return normalizeEndpoint(serviceEndpoint);
}
public static BigdataSailRemoteRepository connect(final String host,
final int port);
public static Big... |
String serviceEndpoint = Config.DEFAULT_ENDPOINT + "/namespace/NAMESPACE";
String normalizedServiceURL =
BigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);
assertEquals(remoteRepositoryNamespaceUrl, normalizedServiceURL);
}
} | [FOCAL] @Deprecated // We are getting rid of this, right? public static String BigdataSailFactory.testServiceEndpointUrl(String serviceEndpoint)
[CLASS] class BigdataSailFactory
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] normalizeEndpoint/1 (inherited)
[INPUTS] branches=- | re... | /* static context
[FOCAL] @Deprecated // We are getting rid of this, right? public static String BigdataSailFactory.testServiceEndpointUrl(String serviceEndpoint)
[INPUTS] branches=- | result=serviceEndpoint
[CALLS-EXTERNAL] normalizeEndpoint/1 (inherited)
*/
| /* static context
[FOCAL] @Deprecated // We are getting rid of this, right? public static String BigdataSailFactory.testServiceEndpointUrl(String serviceEndpoint)
[INPUTS] branches=- | result=serviceEndpoint
[CALLS-EXTERNAL] normalizeEndpoint/1 (inherited)
*/
class BigdataSailFactory {
@Deprecated // We are getting r... | true | ok | {"focal": {"class": "BigdataSailFactory", "name": "testServiceEndpointUrl", "signature": "String testServiceEndpointUrl(String serviceEndpoint)", "start_line": 3, "modifiers": "@Deprecated // We are getting rid of this, right? public static", "params": [{"name": "serviceEndpoint", "type": "String"}], "return_type": "St... |
35880827_3 | class DiskBasedCache implements Cache {
@Override
public synchronized void put(String key, Entry entry) {
pruneIfNeeded(entry.data.length);
File file = getFileForKey(key);
try {
FileOutputStream fos = new FileOutputStream(file);
CacheHeader e = new CacheHeader(ke... | Cache.Entry e = new Cache.Entry();
e.data = new byte[8];
e.serverDate = 1234567L;
e.lastModified = 13572468L;
e.ttl = 9876543L;
e.softTtl = 8765432L;
e.etag = "etag";
e.responseHeaders = new HashMap<String, String>();
e.responseHeaders.put("fruit",... | [FOCAL] @Override public synchronized void DiskBasedCache.put(String key, Entry entry)
[CLASS] class DiskBasedCache implements Cache
[METRICS] loc=24 cc=4 branches=2 loops=0 returns=1 throws=1 nesting=2
[CALLS-INTERNAL] File getFileForKey(String key); void pruneIfNeeded(int neededSpace); void putEntry(String key, Cache... | /* static context
[FOCAL] @Override public synchronized void DiskBasedCache.put(String key, Entry entry)
[PATH1] if(!success)=T -> throw new IOException() -> if(!deleted)=T
[PATH2] try-body throws -> if(!deleted)=F
[PATH3] if(!success)=F -> return
[INPUTS] branches=entry, key | result=-
[EXCEPTIONS] throws IOException;... | /* static context
[FOCAL] @Override public synchronized void DiskBasedCache.put(String key, Entry entry)
[PATH1] if(!success)=T -> throw new IOException() -> if(!deleted)=T
[PATH2] try-body throws -> if(!deleted)=F
[PATH3] if(!success)=F -> return
[INPUTS] branches=entry, key | result=-
[EXCEPTIONS] throws IOException;... | true | ok | {"focal": {"class": "DiskBasedCache", "name": "put", "signature": "void put(String key, Entry entry)", "start_line": 3, "modifiers": "@Override public synchronized", "params": [{"name": "key", "type": "String"}, {"name": "entry", "type": "Entry"}], "return_type": "void"}, "class_info": {"name": "DiskBasedCache", "kind"... |
35882684_4 | class HeaderSpanSizeLookup extends GridLayoutManager.SpanSizeLookup {
@Override public int getSpanSize(int position) {
boolean isHeaderOrFooter =
adapter.isHeaderPosition(position) || adapter.isFooterPosition(position);
return isHeaderOrFooter ? layoutManager.getSpanCount() : 1;
}
public Header... | HeaderSpanSizeLookup headerSpanSizeLookup = new HeaderSpanSizeLookupBuilder().withAdapter(
new HeaderRecyclerViewAdapterBuilder().withHeader(givenAHeader())
.withItems(givenSomeItems())
.build())
.withGridLayoutManager(new GridLayoutManagerBuilder().withSpanCount(THREE_ROWS).... | [FOCAL] @Override public int HeaderSpanSizeLookup.getSpanSize(int position)
[CLASS] class HeaderSpanSizeLookup extends GridLayoutManager.SpanSizeLookup
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] adapter.isHeaderPosition/1, adapter.isFooterPosition/1, layoutManager.getSpanCount... | /* static context
[FOCAL] @Override public int HeaderSpanSizeLookup.getSpanSize(int position)
[INPUTS] branches=- | result=position
[COLLABORATORS] field adapter isHeaderPosition/1,isFooterPosition/1; field layoutManager getSpanCount/0
[CALLS-EXTERNAL] adapter.isHeaderPosition/1, adapter.isFooterPosition/1, layoutManag... | /* static context
[FOCAL] @Override public int HeaderSpanSizeLookup.getSpanSize(int position)
[INPUTS] branches=- | result=position
[COLLABORATORS] field adapter isHeaderPosition/1,isFooterPosition/1; field layoutManager getSpanCount/0
[CALLS-EXTERNAL] adapter.isHeaderPosition/1, adapter.isFooterPosition/1, layoutManag... | true | ok | {"focal": {"class": "HeaderSpanSizeLookup", "name": "getSpanSize", "signature": "int getSpanSize(int position)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "position", "type": "int"}], "return_type": "int"}, "class_info": {"name": "HeaderSpanSizeLookup", "kind": "class", "modifiers": "", "sup... |
35888585_0 | class GoogleProvider implements Provider<GooglePluginSettings> {
@Override
public boolean authorize(GooglePluginSettings pluginSettings, User user) {
String username = user.getUsername();
if (isNotBlank(pluginSettings.getAllowedDomains())) {
String allowedDomains = pluginSettings.g... | GooglePluginSettings googlePluginSettings = new GooglePluginSettings();
googlePluginSettings.setAllowedDomains("foo.com, bar.com");
assertFalse(new GoogleProvider().authorize(googlePluginSettings, new User("", null, null)));
assertFalse(new GoogleProvider().authorize(googlePluginSetting... | [FOCAL] @Override public boolean GoogleProvider.authorize(GooglePluginSettings pluginSettings, User user)
[CLASS] class GoogleProvider implements Provider<GooglePluginSettings>
[METRICS] loc=23 cc=6 branches=3 loops=1 returns=5 throws=0 nesting=3
[CALLS-EXTERNAL] User.getUsername/0, isNotBlank/1 (inherited), GooglePlug... | /* static context
[FOCAL] @Override public boolean GoogleProvider.authorize(GooglePluginSettings pluginSettings, User user)
[PATH1] if(isNotBlank(pluginSettings.getAllowedDomains()))=T -> foreach(String domain : domains)=T -> if(username.endsWith("@" + domain.trim()))=F -> exit loop -> return false
[PATH2] if(isNotBlan... | /* static context
[FOCAL] @Override public boolean GoogleProvider.authorize(GooglePluginSettings pluginSettings, User user)
[PATH1] if(isNotBlank(pluginSettings.getAllowedDomains()))=T -> foreach(String domain : domains)=T -> if(username.endsWith("@" + domain.trim()))=F -> exit loop -> return false
[PATH2] if(isNotBlan... | true | ok | {"focal": {"class": "GoogleProvider", "name": "authorize", "signature": "boolean authorize(GooglePluginSettings pluginSettings, User user)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "pluginSettings", "type": "GooglePluginSettings"}, {"name": "user", "type": "User"}], "return_type": "boolean... |
35890978_8 | class ObjectGraphMeasurer {
public static Footprint measure(Object rootObject) {
return measure(rootObject, Predicates.alwaysTrue());
}
private ObjectGraphMeasurer();
public static Footprint measure(Object rootObject, Predicate<Object> objectAcceptor);
static final Object oneEnumField;
static final... | ObjectGraphMeasurer.Footprint footprint = ObjectGraphMeasurer.measure(weakRef);
assertEquals(new ObjectGraphMeasurer.Footprint(2, 1, 0, NO_PRIMITIVES), footprint);
}
} | [FOCAL] public static Footprint ObjectGraphMeasurer.measure(Object rootObject)
[CLASS] class ObjectGraphMeasurer
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Footprint measure(Object rootObject, Predicate<Object> objectAcceptor)
[CALLS-EXTERNAL] Predicates.alwaysTrue/0
[INPUTS] ... | /* static context
[FOCAL] public static Footprint ObjectGraphMeasurer.measure(Object rootObject)
[INPUTS] branches=- | result=rootObject
[CALLS-INTERNAL] Footprint measure(Object rootObject, Predicate<Object> objectAcceptor)
[CALLS-EXTERNAL] Predicates.alwaysTrue/0
*/
| /* static context
[FOCAL] public static Footprint ObjectGraphMeasurer.measure(Object rootObject)
[INPUTS] branches=- | result=rootObject
[CALLS-INTERNAL] Footprint measure(Object rootObject, Predicate<Object> objectAcceptor)
[CALLS-EXTERNAL] Predicates.alwaysTrue/0
*/
class ObjectGraphMeasurer {
public static Footpr... | true | ok | {"focal": {"class": "ObjectGraphMeasurer", "name": "measure", "signature": "Footprint measure(Object rootObject)", "start_line": 3, "modifiers": "public static", "params": [{"name": "rootObject", "type": "Object"}], "return_type": "Footprint"}, "class_info": {"name": "ObjectGraphMeasurer", "kind": "class", "modifiers":... |
35917780_17 | class MeteredConfigurationSource implements ConfigurationSource {
@Override
public void init() {
Timer.Context context = initTimer.time();
try {
delegate.init();
} finally {
context.stop();
}
}
public MeteredConfigurationSource(MetricRegistry metricRegistry, String metricPrefix, ... | doThrow(new IllegalStateException("")).when(delegate).init();
assertThatThrownBy(() -> delegate.init()).isExactlyInstanceOf(IllegalStateException.class);
}
} | [FOCAL] @Override public void MeteredConfigurationSource.init()
[CLASS] class MeteredConfigurationSource implements ConfigurationSource
[METRICS] loc=10 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] initTimer.time/0, ConfigurationSource.init/0, Timer.Context.stop/0
[FIELDS] read=delegate:Configu... | /* static context
[FOCAL] @Override public void MeteredConfigurationSource.init()
[PATH1] try-body throws
[COLLABORATORS] field initTimer time/0; field delegate:ConfigurationSource init/0
[FIELDS] read=delegate:ConfigurationSource
[CALLS-EXTERNAL] initTimer.time/0, ConfigurationSource.init/0, Timer.Context.stop/0
*/
| /* static context
[FOCAL] @Override public void MeteredConfigurationSource.init()
[PATH1] try-body throws
[COLLABORATORS] field initTimer time/0; field delegate:ConfigurationSource init/0
[FIELDS] read=delegate:ConfigurationSource
[CALLS-EXTERNAL] initTimer.time/0, ConfigurationSource.init/0, Timer.Context.stop/0
*/
cl... | true | ok | {"focal": {"class": "MeteredConfigurationSource", "name": "init", "signature": "void init()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "MeteredConfigurationSource", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "ConfigurationSou... |
35952836_21 | class Compiler {
public CompilerExecutor newExecutor() {
return new CompilerExecutor(this);
}
public Compiler(FormatterTable formatterTable, PredicateTable predicateTable);
public FormatterTable formatterTable();
public PredicateTable predicateTable();
public CompiledTemplate compile(String template... | CodeLimiter limiter = new NoopCodeLimiter();
Context ctx = COMPILER.newExecutor()
.template("#{@}#")
.json("123")
.codeLimiter(limiter)
.execute();
// Instructions: root text var text
assertEquals(limiter.instructionCount(), 4);
assertEquals(ctx.buffer().toString(), "... | [FOCAL] public CompilerExecutor Compiler.newExecutor()
[CLASS] class Compiler
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] CompilerExecutor
[CLASS-MEMBERS] Compiler(FormatterTable formatterTable, PredicateTable predicateTable); FormatterTable formatterTable(); PredicateTable predicateTable... | /* static context
[FOCAL] public CompilerExecutor Compiler.newExecutor()
[NEW] CompilerExecutor
*/
| /* static context
[FOCAL] public CompilerExecutor Compiler.newExecutor()
[NEW] CompilerExecutor
*/
class Compiler {
public CompilerExecutor newExecutor() {
return new CompilerExecutor(this);
}
public Compiler(FormatterTable formatterTable, PredicateTable predicateTable);
public FormatterTable formatterT... | true | ok | {"focal": {"class": "Compiler", "name": "newExecutor", "signature": "CompilerExecutor newExecutor()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "CompilerExecutor"}, "class_info": {"name": "Compiler", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name":... |
35973998_8 | class ExpandableRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
@UiThread
public void notifyParentRangeChanged(int parentPositionStart, int itemCount) {
int flatParentPositionStart = getFlatParentPosition(parentPositionStart);
int flatParentPosition = flatParentPosition... | Parent<Object> firstChangedParent = generateParent(false, 3);
Parent<Object> secondChangedParent = generateParent(false, 3);
assertEquals(25, mExpandableRecyclerAdapter.getItemCount());
verifyParentItemsMatch(mBaseParents.get(4), true, 10);
verifyParentItemsMatch(mBaseParents.ge... | [FOCAL] @UiThread public void ExpandableRecyclerAdapter.notifyParentRangeChanged(int parentPositionStart, int itemCount)
[CLASS] class ExpandableRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
[METRICS] loc=17 cc=2 branches=0 loops=1 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] int changeParentWr... | /* static context
[FOCAL] @UiThread public void ExpandableRecyclerAdapter.notifyParentRangeChanged(int parentPositionStart, int itemCount)
[PATH1] for(j < itemCount)=T -> exit loop
[PATH2] for(j < itemCount)=F
[INPUTS] branches=itemCount | result=-
[COLLABORATORS] field mParentList get/1
*/
| /* static context
[FOCAL] @UiThread public void ExpandableRecyclerAdapter.notifyParentRangeChanged(int parentPositionStart, int itemCount)
[PATH1] for(j < itemCount)=T -> exit loop
[PATH2] for(j < itemCount)=F
[INPUTS] branches=itemCount | result=-
[COLLABORATORS] field mParentList get/1
*/
class ExpandableRecyclerAdap... | true | ok | {"focal": {"class": "ExpandableRecyclerAdapter", "name": "notifyParentRangeChanged", "signature": "void notifyParentRangeChanged(int parentPositionStart, int itemCount)", "start_line": 3, "modifiers": "@UiThread public", "params": [{"name": "parentPositionStart", "type": "int"}, {"name": "itemCount", "type": "int"}], "... |
36014107_0 | class ProjectBaseDir implements Serializable {
public static String getProjectBaseDir() {
String uri;
try {
RepoAgent ra = Engine.getRepoAgent();
uri = ra.getAbsoluteURIFromProjectRelativeURI("");
} catch (NoClassDefFoundError e) {
if (projectBaseDir == null) {
System.err.println("The project base ... | /*
ProjectBaseDir test = new ProjectBaseDir();
String baseDir = test.getProjectBaseDir();
assertNotNull(baseDir);
File projectBaseDir = new File(baseDir);
assertTrue(projectBaseDir.exists());
assertTrue(projectBaseDir.isDirectory());
*/
}
} | [FOCAL] public static String ProjectBaseDir.getProjectBaseDir()
[CLASS] class ProjectBaseDir implements Serializable
[METRICS] loc=14 cc=3 branches=1 loops=0 returns=2 throws=0 nesting=2
[CALLS-EXTERNAL] Engine.getRepoAgent/0, RepoAgent.getAbsoluteURIFromProjectRelativeURI/1, System.err.println/1
[EXCEPTIONS] catches N... | /* static context
[FOCAL] public static String ProjectBaseDir.getProjectBaseDir()
[PATH1] try-body throws -> if(projectBaseDir == null)=T -> return projectBaseDir
[PATH2] return uri
[PATH3] try-body throws -> if(projectBaseDir == null)=F -> return projectBaseDir
[EXCEPTIONS] catches NoClassDefFoundError e
[CALLS-EXTERN... | /* static context
[FOCAL] public static String ProjectBaseDir.getProjectBaseDir()
[PATH1] try-body throws -> if(projectBaseDir == null)=T -> return projectBaseDir
[PATH2] return uri
[PATH3] try-body throws -> if(projectBaseDir == null)=F -> return projectBaseDir
[EXCEPTIONS] catches NoClassDefFoundError e
[CALLS-EXTERN... | true | ok | {"focal": {"class": "ProjectBaseDir", "name": "getProjectBaseDir", "signature": "String getProjectBaseDir()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "String"}, "class_info": {"name": "ProjectBaseDir", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Serializable"... |
36020033_54 | class AnnotationsGenerateFn extends AppFunction {
public void run (Parameters p, PrintStream output) throws Exception {
String annotationTypeString = null;
String[] annotationTypes = null;
String index = null;
//- Support print to file
if (p.isString ("outputFile")) {
boolean append = p.g... |
ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream ();
PrintStream printStream = new PrintStream (byteArrayStream);
File nuthinDocFile = FileUtility.createTemporary ();
nuthinDocFile.deleteOnExit();
String nuthinDocFilePath = nuthinDocFile.getAbsolutePath ();
StreamUtil.copyStri... | [FOCAL] public void AnnotationsGenerateFn.run(Parameters p, PrintStream output)
[CLASS] class AnnotationsGenerateFn extends AppFunction
[METRICS] loc=274 cc=31 branches=22 loops=7 returns=4 throws=1 nesting=7
[CALLS-INTERNAL] String getHelpString(); void extractEntities(String fileName, String docIdStr, String docText,... | class AnnotationsGenerateFn extends AppFunction {
public void run (Parameters p, PrintStream output) throws Exception {
String annotationTypeString = null;
String[] annotationTypes = null;
String index = null;
//- Support print to file
if (p.isString ("outputFile")) {
boolean append = p.g... | false | ok | {"focal": {"class": "AnnotationsGenerateFn", "name": "run", "signature": "void run(Parameters p, PrintStream output) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "p", "type": "Parameters"}, {"name": "output", "type": "PrintStream"}], "return_type": "void"}, "class_info": {"name": "Anno... | |
36039997_0 | class RedisSession extends StandardSession {
@Override
public void removeAttribute(String name) {
super.removeAttribute(name);
if (!saveOnChange()) {
this.dirty = true;
if (log.isTraceEnabled()) {
log.trace("Marking session as dirty. Attr [" + name + "] w... | RedisSession rs = session();
rs.removeAttribute("foo");
Assert.assertTrue(rs.isDirty());
rs.clearDirty();
rs.removeAttribute("foo");
Assert.assertTrue(rs.isDirty());
rs.removeAttribute("foo");
Assert.assertTrue(rs.isDirty());
}
} | [FOCAL] @Override public void RedisSession.removeAttribute(String name)
[CLASS] class RedisSession extends StandardSession
[METRICS] loc=12 cc=3 branches=2 loops=0 returns=0 throws=0 nesting=2
[CALLS-INTERNAL] boolean saveOnChange()
[CALLS-EXTERNAL] StandardSession.removeAttribute/1, log.isTraceEnabled/0, log.trace/1, ... | /* static context
[FOCAL] @Override public void RedisSession.removeAttribute(String name)
[PATH1] if(!saveOnChange())=T -> if(log.isTraceEnabled())=T
[PATH2] if(!saveOnChange())=F
[PATH3] if(!saveOnChange())=T -> if(log.isTraceEnabled())=F
[STATE] dirty via isDirty()
[CALLS-INTERNAL] boolean saveOnChange()
[FIELDS] wri... | /* static context
[FOCAL] @Override public void RedisSession.removeAttribute(String name)
[PATH1] if(!saveOnChange())=T -> if(log.isTraceEnabled())=T
[PATH2] if(!saveOnChange())=F
[PATH3] if(!saveOnChange())=T -> if(log.isTraceEnabled())=F
[STATE] dirty via isDirty()
[CALLS-INTERNAL] boolean saveOnChange()
[FIELDS] wri... | true | ok | {"focal": {"class": "RedisSession", "name": "removeAttribute", "signature": "void removeAttribute(String name)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "name", "type": "String"}], "return_type": "void"}, "class_info": {"name": "RedisSession", "kind": "class", "modifiers": "", "superclass"... |
36044977_7 | class UnBloomFilter {
public boolean containsOrAdd(@NotNull X element) {
HashCode code = HASH_FUNC.hashBytes(asBytes.apply(element));
Object prev = array.getAndSet(code.asInt() & sizeMask, element);
total++;
if ((prev == null || !element.equals(prev))) {
hit++;
... | UnBloomFilter<String> filter = new UnBloomFilter<>(32,
(String x) -> x.getBytes());
String twentyNineId = "abc";
String thirtyId = "def";
String thirtyThreeId = "ghi";
assertFalse("nothing should be contained at all", filter.containsOrAdd(twentyNineId));
... | [FOCAL] public boolean UnBloomFilter.containsOrAdd(X element)
[CLASS] class UnBloomFilter
[METRICS] loc=14 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] HASH_FUNC.hashBytes/1, asBytes.apply/1, array.getAndSet/2, HashCode.asInt/0, X.equals/1
[PATH1] if((prev == null || !element.equals(prev)))=T -... | /* static context
[FOCAL] public boolean UnBloomFilter.containsOrAdd(X element)
[PATH1] if((prev == null || !element.equals(prev)))=T -> return false
[PATH2] if((prev == null || !element.equals(prev)))=F -> return true
[INPUTS] branches=element | result=-
[COLLABORATORS] field asBytes apply/1; field array getAndSet/2; ... | /* static context
[FOCAL] public boolean UnBloomFilter.containsOrAdd(X element)
[PATH1] if((prev == null || !element.equals(prev)))=T -> return false
[PATH2] if((prev == null || !element.equals(prev)))=F -> return true
[INPUTS] branches=element | result=-
[COLLABORATORS] field asBytes apply/1; field array getAndSet/2; ... | true | ok | {"focal": {"class": "UnBloomFilter", "name": "containsOrAdd", "signature": "boolean containsOrAdd(X element)", "start_line": 3, "modifiers": "public", "params": [{"name": "element", "type": "X"}], "return_type": "boolean"}, "class_info": {"name": "UnBloomFilter", "kind": "class", "modifiers": "", "superclass": null, "i... |
36057427_3 | class ApiDeserializer {
public <T extends BasicMessage> BasicMessageWithExtraData<T> deserialize(String nameAndJson) {
String[] nameAndJsonArray = fromHawkularFormat(nameAndJson);
String name = nameAndJsonArray[0];
String json = nameAndJsonArray[1];
// The name is the actual name o... | // tests that this can extract the JSON even if more data follows in the stream
ApiDeserializer ad = new ApiDeserializer();
String nameAndJson = EchoRequest.class.getName() + "={\"echoMessage\":\"msg\"}";
String extra = "This is some extra data";
String nameAndJsonPlusExtra = na... | [FOCAL] public BasicMessageWithExtraData<T> ApiDeserializer.deserialize(String nameAndJson)
[CLASS] class ApiDeserializer
[METRICS] loc=18 cc=3 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] String[] fromHawkularFormat(String msg)
[CALLS-EXTERNAL] String.indexOf/1, String.format/3, Class.forName/1, Ab... | /* static context
[FOCAL] public BasicMessageWithExtraData<T> ApiDeserializer.deserialize(String nameAndJson)
[THROWS-WHEN] RuntimeException when name.indexOf(".") == -1 && try-body throws
[THROWS-WHEN] RuntimeException when !(name.indexOf(".") == -1) && try-body throws
[PATH1] if(name.indexOf(".") == -1)=T -> try-body... | /* static context
[FOCAL] public BasicMessageWithExtraData<T> ApiDeserializer.deserialize(String nameAndJson)
[THROWS-WHEN] RuntimeException when name.indexOf(".") == -1 && try-body throws
[THROWS-WHEN] RuntimeException when !(name.indexOf(".") == -1) && try-body throws
[PATH1] if(name.indexOf(".") == -1)=T -> try-body... | true | ok | {"focal": {"class": "ApiDeserializer", "name": "deserialize", "signature": "BasicMessageWithExtraData<T> deserialize(String nameAndJson)", "start_line": 3, "modifiers": "public", "params": [{"name": "nameAndJson", "type": "String"}], "return_type": "BasicMessageWithExtraData<T>"}, "class_info": {"name": "ApiDeserialize... |
36073969_3 | class OozieScheduling {
public static void writeCoordinator(Schedule schedule,
SchedulableJobManager manager,
OutputStream output) throws IOException {
XmlStreamWriter streamWriter = WriterFactory.newXmlWriter(output);
PrettyPrintX... | ByteArrayOutputStream output = new ByteArrayOutputStream();
SchedulableJobManager manager = JobManagers.createSchedulable(testSchedule,
new AppContext(new Configuration()));
OozieScheduling.writeCoordinator(testSchedule, manager, output);
Document coord = XMLUtil.toDom(output);
XPath xpa... | [FOCAL] public static void OozieScheduling.writeCoordinator(Schedule schedule, SchedulableJobManager manager, OutputStream output)
[CLASS] class OozieScheduling
[METRICS] loc=53 cc=3 branches=0 loops=2 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] String toIdentifier(String name); String workflowPath(Schedule schedule)... | /* static context
[FOCAL] public static void OozieScheduling.writeCoordinator(Schedule schedule, SchedulableJobManager manager, OutputStream output)
[PATH1] foreach(String inputName : manager.getJobParameters().getInputNames())=T -> exit loop -> foreach(String outputName : manager.getJobParameters().getOutputNames())=F... | /* static context
[FOCAL] public static void OozieScheduling.writeCoordinator(Schedule schedule, SchedulableJobManager manager, OutputStream output)
[PATH1] foreach(String inputName : manager.getJobParameters().getInputNames())=T -> exit loop -> foreach(String outputName : manager.getJobParameters().getOutputNames())=F... | true | ok | {"focal": {"class": "OozieScheduling", "name": "writeCoordinator", "signature": "void writeCoordinator(Schedule schedule, SchedulableJobManager manager, OutputStream output) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "schedule", "type": "Schedule"}, {"name": "manager", "type... |
36094718_1 | class BrandingMojo extends AbstractNbmMojo {
static String[] getLocale(String name) {
String suffix = "";
int dot = name.indexOf( ".");
if (dot > -1) { //remove file extension
suffix = name.substring( dot );
name = name.substring( 0, dot);
}
String lo... | assertEquals("en_us", BrandingMojo.getLocale( "aaa_en_us.properties")[1]);
assertEquals("en_us_ca", BrandingMojo.getLocale( "aaa_en_us_ca.properties")[1]);
assertEquals("en_us_ca", BrandingMojo.getLocale( "aa_en_us_ca.properties")[1]);
assertEquals("en_us_ca", BrandingMojo.getLocale( "bb... | [FOCAL] static String[] BrandingMojo.getLocale(String name)
[CLASS] class BrandingMojo extends AbstractNbmMojo
[METRICS] loc=26 cc=5 branches=3 loops=1 returns=1 throws=0 nesting=3
[CALLS-EXTERNAL] String.indexOf/1, String.substring/1, String.substring/2, String.lastIndexOf/1, String.length/0
[PATH1] if(dot > -1)=T -> ... | /* static context
[FOCAL] static String[] BrandingMojo.getLocale(String name)
[PATH1] if(dot > -1)=T -> while(count <= 3)=T -> if(underscore > -1)=T -> if(loc1.length() != 2)=F -> exit loop -> return new String[] {name, locale, suffix}
[PATH2] if(dot > -1)=F -> while(count <= 3)=F -> return new String[] {name, locale, ... | /* static context
[FOCAL] static String[] BrandingMojo.getLocale(String name)
[PATH1] if(dot > -1)=T -> while(count <= 3)=T -> if(underscore > -1)=T -> if(loc1.length() != 2)=F -> exit loop -> return new String[] {name, locale, suffix}
[PATH2] if(dot > -1)=F -> while(count <= 3)=F -> return new String[] {name, locale, ... | true | ok | {"focal": {"class": "BrandingMojo", "name": "getLocale", "signature": "String[] getLocale(String name)", "start_line": 3, "modifiers": "static", "params": [{"name": "name", "type": "String"}], "return_type": "String[]"}, "class_info": {"name": "BrandingMojo", "kind": "class", "modifiers": "", "superclass": "AbstractNbm... |
36096924_12 | class SSLUtils {
public static boolean isSSL(String urlString) {
Preconditions.checkArgument(StringUtils.isNotEmpty(urlString));
return urlString.startsWith("https://");
}
public static SSLContext getSSLContext(ClientConfig config);
@VisibleForTesting static TrustManager getTrustManager(ClientConfig c... | assertTrue(SSLUtils.isSSL("https://localhost:7187"));
assertFalse(SSLUtils.isSSL("http://localhost:7187"));
}
} | [FOCAL] public static boolean SSLUtils.isSSL(String urlString)
[CLASS] class SSLUtils
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Preconditions.checkArgument/1, StringUtils.isNotEmpty/1, String.startsWith/1
[INPUTS] branches=- | result=urlString
[DATAFLOW] urlString@param->L2,L... | /* static context
[FOCAL] public static boolean SSLUtils.isSSL(String urlString)
[INPUTS] branches=- | result=urlString
[CALLS-EXTERNAL] Preconditions.checkArgument/1, StringUtils.isNotEmpty/1, String.startsWith/1
*/
| /* static context
[FOCAL] public static boolean SSLUtils.isSSL(String urlString)
[INPUTS] branches=- | result=urlString
[CALLS-EXTERNAL] Preconditions.checkArgument/1, StringUtils.isNotEmpty/1, String.startsWith/1
*/
class SSLUtils {
public static boolean isSSL(String urlString) {
Preconditions.checkArgument(Str... | true | ok | {"focal": {"class": "SSLUtils", "name": "isSSL", "signature": "boolean isSSL(String urlString)", "start_line": 3, "modifiers": "public static", "params": [{"name": "urlString", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "SSLUtils", "kind": "class", "modifiers": "", "superclass": null, "interf... |
36107965_0 | class EsapiDigester implements Digester {
@Override
public boolean check(String clearText, String cryptedText)
{
return cryptedText.equals(digest(clearText));
}
public EsapiDigester(boolean useClasspath, String esapiResourceDir);
@Override public String digest(String clearText);
}
... | EsapiDigester digester = new EsapiDigester(true, "esapi");
String clearText = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
System.out.println("clearText="+clearText);
System.out.println("clearText.length="+clearText.length());
... | [FOCAL] @Override public boolean EsapiDigester.check(String clearText, String cryptedText)
[CLASS] class EsapiDigester implements Digester
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String digest(String clearText)
[CALLS-EXTERNAL] String.equals/1
[INPUTS] branches=- | result=c... | /* static context
[FOCAL] @Override public boolean EsapiDigester.check(String clearText, String cryptedText)
[INPUTS] branches=- | result=clearText, cryptedText
[CALLS-INTERNAL] String digest(String clearText)
[CALLS-EXTERNAL] String.equals/1
*/
| /* static context
[FOCAL] @Override public boolean EsapiDigester.check(String clearText, String cryptedText)
[INPUTS] branches=- | result=clearText, cryptedText
[CALLS-INTERNAL] String digest(String clearText)
[CALLS-EXTERNAL] String.equals/1
*/
class EsapiDigester implements Digester {
@Override
public boolea... | true | ok | {"focal": {"class": "EsapiDigester", "name": "check", "signature": "boolean check(String clearText, String cryptedText)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "clearText", "type": "String"}, {"name": "cryptedText", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "E... |
36161058_0 | class Toast {
private static android.widget.Toast createOrUpdateToastFromToastBean(android.widget.Toast toast, @NonNull ToastBean bean) {
int duration;
if (bean.mDuration == android.widget.Toast.LENGTH_SHORT) {
duration = android.widget.Toast.LENGTH_SHORT;
} else {
d... | mockStatic(Toast.class);
PowerMockito.doReturn(null).when(Toast.class, "createOrUpdateToastFromToastBean", any(android.widget.Toast.class), any(Toast.ToastBean.class));
Method m = PowerMockito.method(Toast.class,"createOrUpdateToastFromToastBean",android.widget.Toast.class,Toast.ToastBean.class... | [FOCAL] private static android.widget.Toast Toast.createOrUpdateToastFromToastBean(android.widget.Toast toast, ToastBean bean)
[CLASS] class Toast
[METRICS] loc=34 cc=8 branches=7 loops=0 returns=1 throws=0 nesting=4
[CALLS-EXTERNAL] TextUtils.isEmpty/1, android.widget.Toast.makeText/3, android.widget.Toast.getView/0, ... | /* static context
[FOCAL] private static android.widget.Toast Toast.createOrUpdateToastFromToastBean(android.widget.Toast toast, ToastBean bean)
[PATH1] if(bean.mDuration == android.widget.Toast.LENGTH_SHORT)=T -> if(toast == null)=F -> if(!TextUtils.isEmpty(bean.text))#2=F -> if(bean.resId != -1)#2=F -> if(bean.mView ... | /* static context
[FOCAL] private static android.widget.Toast Toast.createOrUpdateToastFromToastBean(android.widget.Toast toast, ToastBean bean)
[PATH1] if(bean.mDuration == android.widget.Toast.LENGTH_SHORT)=T -> if(toast == null)=F -> if(!TextUtils.isEmpty(bean.text))#2=F -> if(bean.resId != -1)#2=F -> if(bean.mView ... | true | ok | {"focal": {"class": "Toast", "name": "createOrUpdateToastFromToastBean", "signature": "android.widget.Toast createOrUpdateToastFromToastBean(android.widget.Toast toast, ToastBean bean)", "start_line": 3, "modifiers": "private static", "params": [{"name": "toast", "type": "android.widget.Toast"}, {"name": "bean", "type"... |
36174393_1 | class Mvc {
public static MvcGraph graph() {
if (graph == null) {
graph = new MvcGraph();
try {
graph.getRootComponent().register(new Object() {
@Provides
@EventBusC
public EventBus eventBusC() {
... | Mvc.graph().inject(this);
when(uiThreadRunnerMock.isOnUiThread()).thenReturn(false);
eventBusV.post("");
verify(uiThreadRunnerMock, times(2)).isOnUiThread();
verify(uiThreadRunnerMock, times(1)).post(any(Runnable.class));
}
} | [FOCAL] public static MvcGraph Mvc.graph()
[CLASS] class Mvc
[METRICS] loc=60 cc=4 branches=1 loops=0 returns=1 throws=2 nesting=3
[CALLS-EXTERNAL] graph.getRootComponent().register/1, graph.getRootComponent/0, graph.uiThreadRunner.isOnUiThread/0, postEvent/1 (inherited), graph.uiThreadRunner.post/1, super.post/1, Exec... | /* static context
[FOCAL] public static MvcGraph Mvc.graph()
[THROWS-WHEN] MvcGraphException when graph == null && try-body throws
[PATH1] if(graph == null)=T -> try-body throws -> throw new MvcGraphException("Failed to register base Mvc dependencies", e)
[PATH2] if(graph == null)=F -> return graph
[COLLABORATORS] fiel... | /* static context
[FOCAL] public static MvcGraph Mvc.graph()
[THROWS-WHEN] MvcGraphException when graph == null && try-body throws
[PATH1] if(graph == null)=T -> try-body throws -> throw new MvcGraphException("Failed to register base Mvc dependencies", e)
[PATH2] if(graph == null)=F -> return graph
[COLLABORATORS] fiel... | true | ok | {"focal": {"class": "Mvc", "name": "graph", "signature": "MvcGraph graph()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "MvcGraph"}, "class_info": {"name": "Mvc", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "originalUiThreadRunner", "typ... |
36211133_1357 | class Gamma {
public static double logGamma(double x) {
double ret;
if (Double.isNaN(x) || (x <= 0.0)) {
ret = Double.NaN;
} else if (x < 0.5) {
return logGamma1p(x) - FastMath.log(x);
} else if (x <= 2.5) {
return logGamma1p((x - 0.5) - 0.5);
... | Assert.assertTrue(Double.isNaN(Gamma.logGamma(0.0)));
}
} | [FOCAL] public static double Gamma.logGamma(double x)
[CLASS] class Gamma
[METRICS] loc=25 cc=6 branches=4 loops=1 returns=4 throws=0 nesting=5
[CALLS-INTERNAL] double lanczos(double x); double logGamma1p(double x)
[CALLS-EXTERNAL] Double.isNaN/1, FastMath.log/1, FastMath.floor/1
[PATH1] if(Double.isNaN(x) || (x <= 0.0... | /* static context
[FOCAL] public static double Gamma.logGamma(double x)
[PATH1] if(Double.isNaN(x) || (x <= 0.0))=F -> if(x < 0.5)=F -> if(x <= 2.5)=F -> if(x <= 8.0)=T -> for(i <= n)=T -> exit loop -> return logGamma1p(x - (n + 1)) + FastMath.log(prod)
[PATH2] if(Double.isNaN(x) || (x <= 0.0))=T -> return ret
[PATH3] ... | /* static context
[FOCAL] public static double Gamma.logGamma(double x)
[PATH1] if(Double.isNaN(x) || (x <= 0.0))=F -> if(x < 0.5)=F -> if(x <= 2.5)=F -> if(x <= 8.0)=T -> for(i <= n)=T -> exit loop -> return logGamma1p(x - (n + 1)) + FastMath.log(prod)
[PATH2] if(Double.isNaN(x) || (x <= 0.0))=T -> return ret
[PATH3] ... | true | ok | {"focal": {"class": "Gamma", "name": "logGamma", "signature": "double logGamma(double x)", "start_line": 3, "modifiers": "public static", "params": [{"name": "x", "type": "double"}], "return_type": "double"}, "class_info": {"name": "Gamma", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fiel... |
36250547_9 | class TrailStatisticsImpl implements TrailStatistics {
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final TrailStatisticsImpl other = (TrailStatisticsImpl) obj;
return Objects.equals(th... | final TrailStatistics stats1 = getStats();
assertFalse(stats1.equals(null));
}
} | [FOCAL] @Override public boolean TrailStatisticsImpl.equals(Object obj)
[CLASS] class TrailStatisticsImpl implements TrailStatistics
[METRICS] loc=16 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] getClass/0 (inherited), Object.getClass/0, Objects.equals/2, TrailStatisticsImpl.getTimeDifferenceSu... | /* static context
[FOCAL] @Override public boolean TrailStatisticsImpl.equals(Object obj)
[PATH1] if(obj == null)=F -> if(getClass() != obj.getClass())=T -> return false
[PATH2] if(obj == null)=F -> if(getClass() != obj.getClass())=F -> return Objects.equals(this.time, other.getTimeDifferenceSummary()) && Obje...
[PATH... | /* static context
[FOCAL] @Override public boolean TrailStatisticsImpl.equals(Object obj)
[PATH1] if(obj == null)=F -> if(getClass() != obj.getClass())=T -> return false
[PATH2] if(obj == null)=F -> if(getClass() != obj.getClass())=F -> return Objects.equals(this.time, other.getTimeDifferenceSummary()) && Obje...
[PATH... | true | ok | {"focal": {"class": "TrailStatisticsImpl", "name": "equals", "signature": "boolean equals(Object obj)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "obj", "type": "Object"}], "return_type": "boolean"}, "class_info": {"name": "TrailStatisticsImpl", "kind": "class", "modifiers": "", "superclass"... |
36268631_0 | class ReceiverController {
@RequestMapping("/{payloadType}/count")
public ReceiveCount findReceiveCount(@PathVariable("payloadType") PayloadType payloadType) {
return receiveCountService.findReceiveCount(payloadType);
}
@RequestMapping(method = RequestMethod.POST, value = "/receive") public vo... | // Relies on pre-existing mock data injected via Liquibase in the "test" profile
ResultActions actions = mockMvc.perform(
get("/" + PayloadType.TEST1 + "/count"));
MvcResult result = actions.andExpect(
status().isOk())
.andReturn();
String... | [FOCAL] @RequestMapping("/{payloadType}/count") public ReceiveCount ReceiverController.findReceiveCount(PayloadType payloadType)
[CLASS] class ReceiverController
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] receiveCountService.findReceiveCount/1
[INPUTS] branches=- | result=payl... | /* static context
[FOCAL] @RequestMapping("/{payloadType}/count") public ReceiveCount ReceiverController.findReceiveCount(PayloadType payloadType)
[INPUTS] branches=- | result=payloadType
[COLLABORATORS] field receiveCountService findReceiveCount/1
[CALLS-EXTERNAL] receiveCountService.findReceiveCount/1
*/
| /* static context
[FOCAL] @RequestMapping("/{payloadType}/count") public ReceiveCount ReceiverController.findReceiveCount(PayloadType payloadType)
[INPUTS] branches=- | result=payloadType
[COLLABORATORS] field receiveCountService findReceiveCount/1
[CALLS-EXTERNAL] receiveCountService.findReceiveCount/1
*/
class Receiv... | true | ok | {"focal": {"class": "ReceiverController", "name": "findReceiveCount", "signature": "ReceiveCount findReceiveCount(PayloadType payloadType)", "start_line": 3, "modifiers": "@RequestMapping(\"/{payloadType}/count\") public", "params": [{"name": "payloadType", "type": "PayloadType"}], "return_type": "ReceiveCount"}, "clas... |
36283221_43 | class DefaultPrefixFunctionFactory implements PrefixFunctionFactory {
@Override
public PrefixFunction getInstance(String pattern) {
final int[] prefixes = new int[pattern.length()];
prefixes[0] = 0;
int length = 0;
for (int i = 1; i < pattern.length(); i++) {
final c... | final PrefixFunction function = getFactory().getInstance(pattern);
assertThat(function, is(notNullValue()));
for (int i = 0; i < prefixes.length; i++) {
int prefix = prefixes[i];
assertThat(function.prefix(i), is(prefix));
}
}
} | [FOCAL] @Override public PrefixFunction DefaultPrefixFunctionFactory.getInstance(String pattern)
[CLASS] class DefaultPrefixFunctionFactory implements PrefixFunctionFactory
[METRICS] loc=17 cc=4 branches=1 loops=2 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] String.length/0, String.charAt/1
[NEW] ArrayPrefixFunction
[... | /* static context
[FOCAL] @Override public PrefixFunction DefaultPrefixFunctionFactory.getInstance(String pattern)
[PATH1] for(i < pattern.length())=T -> while(length > 0 && character != pattern.charAt(length))=F -> if(character == pattern.charAt(length))=T -> exit loop -> return new ArrayPrefixFunction(prefixes)
[PATH... | /* static context
[FOCAL] @Override public PrefixFunction DefaultPrefixFunctionFactory.getInstance(String pattern)
[PATH1] for(i < pattern.length())=T -> while(length > 0 && character != pattern.charAt(length))=F -> if(character == pattern.charAt(length))=T -> exit loop -> return new ArrayPrefixFunction(prefixes)
[PATH... | true | ok | {"focal": {"class": "DefaultPrefixFunctionFactory", "name": "getInstance", "signature": "PrefixFunction getInstance(String pattern)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "pattern", "type": "String"}], "return_type": "PrefixFunction"}, "class_info": {"name": "DefaultPrefixFunctionFactor... |
36284770_2 | class IdentifierBrowserBean implements IdentifierBrowser {
@Override
public Long getObjectId(String identifier) {
DigitalObject object = digitalObjectDao.getDigitalObject(identifier);
if (object != null) {
return object.getId();
}
return null;
}
@Override pu... | Long tested = identifierBrowser.getObjectId("oai:darceo.psnc.pl:0");
Assert.assertNull(tested);
}
} | [FOCAL] @Override public Long IdentifierBrowserBean.getObjectId(String identifier)
[CLASS] class IdentifierBrowserBean implements IdentifierBrowser
[METRICS] loc=8 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] digitalObjectDao.getDigitalObject/1, DigitalObject.getId/0
[PATH1] if(object != null)=... | /* static context
[FOCAL] @Override public Long IdentifierBrowserBean.getObjectId(String identifier)
[PATH1] if(object != null)=T -> return object.getId()
[PATH2] if(object != null)=F -> return null
[INPUTS] branches=identifier | result=identifier
[COLLABORATORS] field digitalObjectDao getDigitalObject/1
[CALLS-EXTERNA... | /* static context
[FOCAL] @Override public Long IdentifierBrowserBean.getObjectId(String identifier)
[PATH1] if(object != null)=T -> return object.getId()
[PATH2] if(object != null)=F -> return null
[INPUTS] branches=identifier | result=identifier
[COLLABORATORS] field digitalObjectDao getDigitalObject/1
[CALLS-EXTERNA... | true | ok | {"focal": {"class": "IdentifierBrowserBean", "name": "getObjectId", "signature": "Long getObjectId(String identifier)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "identifier", "type": "String"}], "return_type": "Long"}, "class_info": {"name": "IdentifierBrowserBean", "kind": "class", "modifi... |
36288389_95 | class EducationTypeParametersExtractor extends AbstractParametersExtractor<EducationType> {
@Override
public Map<String, Object> getParameters(final EducationType entity, final Map<String, Object> parameters) {
addParameter(entity.getName(), "name", parameters);
addParameter(entity.getAbbrName(), "abbrName", pa... | // Given
unit.setActive(false);
unit.setSecurity(false);
EducationType entity = new EducationType();
Map<String, Object> expected = new HashMap<String, Object>();
// When
Map<String, Object> actual = unit.getParameters(entity);
// Then
assertEquals(expected, actual);
}
} | [FOCAL] @Override public Map<String, Object> EducationTypeParametersExtractor.getParameters(EducationType entity, Map<String, Object> parameters)
[CLASS] class EducationTypeParametersExtractor extends AbstractParametersExtractor<EducationType>
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-... | /* static context
[FOCAL] @Override public Map<String, Object> EducationTypeParametersExtractor.getParameters(EducationType entity, Map<String, Object> parameters)
[INPUTS] branches=- | result=parameters
[COLLABORATORS] param entity:EducationType getName/0,getAbbrName/0
[CALLS-EXTERNAL] addParameter/3 (inherited), Educ... | /* static context
[FOCAL] @Override public Map<String, Object> EducationTypeParametersExtractor.getParameters(EducationType entity, Map<String, Object> parameters)
[INPUTS] branches=- | result=parameters
[COLLABORATORS] param entity:EducationType getName/0,getAbbrName/0
[CALLS-EXTERNAL] addParameter/3 (inherited), Educ... | true | ok | {"focal": {"class": "EducationTypeParametersExtractor", "name": "getParameters", "signature": "Map<String, Object> getParameters(EducationType entity, Map<String, Object> parameters)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "entity", "type": "EducationType"}, {"name": "parameters", "type"... |
36297446_3 | class AstrixContextImpl implements Astrix, AstrixApplicationContext {
@Override
public <T> T getBean(Class<T> beanType) {
return getBean(beanType, null);
}
public AstrixContextImpl(Modules modules, AstrixApplicationDescriptor applicationDescriptor);
void register(ApiProviderClass apiProvider);
void regist... | TestAstrixConfigurer astrixConfigurer = new TestAstrixConfigurer();
astrixConfigurer.registerApiProvider(HelloBeanLibrary.class);
AstrixContextImpl AstrixContext = (AstrixContextImpl) astrixConfigurer.configure();
HelloBeanImpl beanA = AstrixContext.getBean(HelloBeanImpl.class);
HelloBeanImpl beanB = AstrixC... | [FOCAL] @Override public T AstrixContextImpl.getBean(Class<T> beanType)
[CLASS] class AstrixContextImpl implements Astrix, AstrixApplicationContext
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] T getBean(Class<T> beanType, String qualifier)
[INPUTS] branches=- | result=beanType
[... | /* static context
[FOCAL] @Override public T AstrixContextImpl.getBean(Class<T> beanType)
[INPUTS] branches=- | result=beanType
[CALLS-INTERNAL] T getBean(Class<T> beanType, String qualifier)
*/
| /* static context
[FOCAL] @Override public T AstrixContextImpl.getBean(Class<T> beanType)
[INPUTS] branches=- | result=beanType
[CALLS-INTERNAL] T getBean(Class<T> beanType, String qualifier)
*/
class AstrixContextImpl implements Astrix, AstrixApplicationContext {
@Override
public <T> T getBean(Class<T> beanType) {
... | true | ok | {"focal": {"class": "AstrixContextImpl", "name": "getBean", "signature": "T getBean(Class<T> beanType)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "beanType", "type": "Class<T>"}], "return_type": "T"}, "class_info": {"name": "AstrixContextImpl", "kind": "class", "modifiers": "", "superclass"... |
36303657_32 | class JdbcInventory extends JdbcHelper implements Inventory {
@Override
public List<InventoryVector> getMissing(List<InventoryVector> offer, long... streams) {
for (long stream : streams) {
offer.removeAll(getCache(stream).keySet());
}
return offer;
}
public JdbcIn... | InventoryVector newIV = getObjectMessage(1, 200, getGetPubkey()).getInventoryVector();
List<InventoryVector> offer = new LinkedList<>();
offer.add(newIV);
offer.add(inventoryVector1);
List<InventoryVector> missing = inventory.getMissing(offer, 1, 2);
assertEquals(1, missi... | [FOCAL] @Override public List<InventoryVector> JdbcInventory.getMissing(List<InventoryVector> offer, long... streams)
[CLASS] class JdbcInventory extends JdbcHelper implements Inventory
[METRICS] loc=7 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] Map<InventoryVector, Long> getCache(long stream)... | /* static context
[FOCAL] @Override public List<InventoryVector> JdbcInventory.getMissing(List<InventoryVector> offer, long... streams)
[PATH1] foreach(long stream : streams)=T -> exit loop -> return offer
[PATH2] foreach(long stream : streams)=F -> return offer
[INPUTS] branches=streams | result=offer
[COLLABORATORS] ... | /* static context
[FOCAL] @Override public List<InventoryVector> JdbcInventory.getMissing(List<InventoryVector> offer, long... streams)
[PATH1] foreach(long stream : streams)=T -> exit loop -> return offer
[PATH2] foreach(long stream : streams)=F -> return offer
[INPUTS] branches=streams | result=offer
[COLLABORATORS] ... | true | ok | {"focal": {"class": "JdbcInventory", "name": "getMissing", "signature": "List<InventoryVector> getMissing(List<InventoryVector> offer, long... streams)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "offer", "type": "List<InventoryVector>"}, {"name": "streams", "type": "long..."}], "return_type... |
36345024_7 | class BoundGoro extends BufferedGoroDelegate {
public abstract void bind()public abstract void bind();
public abstract void bind()public abstract void unbind();
private BoundGoro.BoundGoroImpl goro;
private BoundGoro.OnUnexpectedDisconnection disconnection;
}
class BoundGoroTest extends BufferedGoroDelegate {
... | goro = (BoundGoro.BoundGoroImpl) spy(Goro.bindAndAutoReconnectWith(context));
goro.bind();
assertBinding();
reset(goro);
goro.onServiceDisconnected(new ComponentName("test", "test"));
assertBinding();
}
} | [FOCAL] public abstract void BoundGoro.bind()
[CLASS] class BoundGoro extends BufferedGoroDelegate
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] void unbind()
[TEST] BoundGoroTest: @Test public void autoReconnection()
[TEST-FIELDS] BoundGoro.BoundGoroImpl goro, BoundGoro.OnUnexpec... | /* static context
[FOCAL] public abstract void BoundGoro.bind()
*/
| /* static context
[FOCAL] public abstract void BoundGoro.bind()
*/
class BoundGoro extends BufferedGoroDelegate {
public abstract void bind()public abstract void bind();
public abstract void bind()public abstract void unbind();
private BoundGoro.BoundGoroImpl goro;
private BoundGoro.OnUnexpectedDisconnection dis... | true | partial | {"focal": {"class": "BoundGoro", "name": "bind", "signature": "void bind()", "start_line": 3, "modifiers": "public abstract", "params": [], "return_type": "void"}, "class_info": {"name": "BoundGoro", "kind": "class", "modifiers": "", "superclass": "BufferedGoroDelegate", "interfaces": null, "fields": [{"name": "goro", ... |
36370530_3 | class DefaultPropertyFilter implements EncryptablePropertyFilter {
@Override
public boolean shouldInclude(PropertySource<?> source, String name) {
if (isIncludeAll()) {
return true;
}
if (isMatch(source.getName(), excludeSourceNames) || isMatch(name, excludePropertyNames)) ... | DefaultPropertyFilter filter = new DefaultPropertyFilter(null, null, null, Collections.singletonList("some"));
MapPropertySource source = new MapPropertySource("applicationConfig", Collections.emptyMap());
assertTrue(filter.shouldInclude(source, "some.property"));
}
} | [FOCAL] @Override public boolean DefaultPropertyFilter.shouldInclude(PropertySource<?> source, String name)
[CLASS] class DefaultPropertyFilter implements EncryptablePropertyFilter
[METRICS] loc=13 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-INTERNAL] boolean isIncludeAll(); boolean isIncludeUnset(); bo... | /* static context
[FOCAL] @Override public boolean DefaultPropertyFilter.shouldInclude(PropertySource<?> source, String name)
[PATH1] if(isIncludeAll())=F -> if(isMatch(source.getName(), excludeSourceNames) || isMatch(name, excludePropertyNames))=T -> return false
[PATH2] if(isIncludeAll())=T -> return true
[PATH3] if(... | /* static context
[FOCAL] @Override public boolean DefaultPropertyFilter.shouldInclude(PropertySource<?> source, String name)
[PATH1] if(isIncludeAll())=F -> if(isMatch(source.getName(), excludeSourceNames) || isMatch(name, excludePropertyNames))=T -> return false
[PATH2] if(isIncludeAll())=T -> return true
[PATH3] if(... | true | ok | {"focal": {"class": "DefaultPropertyFilter", "name": "shouldInclude", "signature": "boolean shouldInclude(PropertySource<?> source, String name)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "source", "type": "PropertySource<?>"}, {"name": "name", "type": "String"}], "return_type": "boolean"},... |
36371585_4 | class FacebookAuthProvider extends AuthProvider {
Collection<String> getPermissions() {
return permissions;
}
public FacebookAuthProvider(String connectionName, AuthenticationAPIClient auth0);
FacebookAuthProvider(String connectionName, AuthenticationAPIClient auth0, FacebookApi facebook);
... | assertThat(provider.getPermissions(), is(hasSize(1)));
assertThat(provider.getPermissions(), hasItem("public_profile"));
}
} | [FOCAL] Collection<String> FacebookAuthProvider.getPermissions()
[CLASS] class FacebookAuthProvider extends AuthProvider
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] FacebookAuthProvider(String connectionName, AuthenticationAPIClient auth0); FacebookAuthProvider(String connection... | /* static context
[FOCAL] Collection<String> FacebookAuthProvider.getPermissions()
*/
| /* static context
[FOCAL] Collection<String> FacebookAuthProvider.getPermissions()
*/
class FacebookAuthProvider extends AuthProvider {
Collection<String> getPermissions() {
return permissions;
}
public FacebookAuthProvider(String connectionName, AuthenticationAPIClient auth0);
FacebookAuth... | true | ok | {"focal": {"class": "FacebookAuthProvider", "name": "getPermissions", "signature": "Collection<String> getPermissions()", "start_line": 3, "modifiers": "", "params": [], "return_type": "Collection<String>"}, "class_info": {"name": "FacebookAuthProvider", "kind": "class", "modifiers": "", "superclass": "AuthProvider", "... |
36378766_2 | class GoogleAuthProvider extends AuthProvider {
String getConnection() {
return connectionName;
}
public GoogleAuthProvider(@NonNull String serverClientId, @NonNull AuthenticationAPIClient client);
public GoogleAuthProvider(@NonNull String connectionName, @NonNull String serverClientId, @Non... | MatcherAssert.assertThat(provider.getConnection(), is(notNullValue()));
}
} | [FOCAL] String GoogleAuthProvider.getConnection()
[CLASS] class GoogleAuthProvider extends AuthProvider
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] GoogleAuthProvider(String serverClientId, AuthenticationAPIClient client); GoogleAuthProvider(String connectionName, String serverC... | /* static context
[FOCAL] String GoogleAuthProvider.getConnection()
*/
| /* static context
[FOCAL] String GoogleAuthProvider.getConnection()
*/
class GoogleAuthProvider extends AuthProvider {
String getConnection() {
return connectionName;
}
public GoogleAuthProvider(@NonNull String serverClientId, @NonNull AuthenticationAPIClient client);
public GoogleAuthProvid... | true | ok | {"focal": {"class": "GoogleAuthProvider", "name": "getConnection", "signature": "String getConnection()", "start_line": 3, "modifiers": "", "params": [], "return_type": "String"}, "class_info": {"name": "GoogleAuthProvider", "kind": "class", "modifiers": "", "superclass": "AuthProvider", "interfaces": null, "fields": [... |
36404681_0 | class Neo4jFactoryImpl implements Neo4jFactory {
protected GraphDatabaseFactory createGraphDatabaseFactory(Map<String, String> config) {
if (config != null && config.containsKey("ha.server_id")) return new HighlyAvailableGraphDatabaseFactory();
return new GraphDatabaseFactory();
}
@Overrid... | GraphDatabaseFactory factory = new Neo4jFactoryImpl().createGraphDatabaseFactory(Collections.singletonMap("ha.server_id", "1"));
assertEquals(true, factory instanceof HighlyAvailableGraphDatabaseFactory);
}
} | [FOCAL] protected GraphDatabaseFactory Neo4jFactoryImpl.createGraphDatabaseFactory(Map<String, String> config)
[CLASS] class Neo4jFactoryImpl implements Neo4jFactory
[METRICS] loc=4 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] Map<String, String>.containsKey/1
[NEW] HighlyAvailableGraphDatabase... | /* static context
[FOCAL] protected GraphDatabaseFactory Neo4jFactoryImpl.createGraphDatabaseFactory(Map<String, String> config)
[PATH1] if(config != null && config.containsKey("ha.server_id"))=T -> return new HighlyAvailableGraphDatabaseFactory()
[PATH2] if(config != null && config.containsKey("ha.server_id"))=F -> re... | /* static context
[FOCAL] protected GraphDatabaseFactory Neo4jFactoryImpl.createGraphDatabaseFactory(Map<String, String> config)
[PATH1] if(config != null && config.containsKey("ha.server_id"))=T -> return new HighlyAvailableGraphDatabaseFactory()
[PATH2] if(config != null && config.containsKey("ha.server_id"))=F -> re... | true | ok | {"focal": {"class": "Neo4jFactoryImpl", "name": "createGraphDatabaseFactory", "signature": "GraphDatabaseFactory createGraphDatabaseFactory(Map<String, String> config)", "start_line": 3, "modifiers": "protected", "params": [{"name": "config", "type": "Map<String, String>"}], "return_type": "GraphDatabaseFactory"}, "cla... |
36419249_0 | class AsyncContext {
@SuppressWarnings("unchecked")
protected void releaseData(final D data) {
if (async instanceof Releaser) {
((Releaser<D>) async).release(data);
}
}
public AsyncContext(final Context context, final Async<D> async);
}
class AsyncContextTest {
@Test
public void releaseS... | class TestAsync implements Async<String>, Releaser<String> {
@Override
public void subscribe(AsyncObserver<String> observer) { }
@Override
public void cancel() { }
@Override
public Async<String> replicate() {
return this;
}
@Override
public void rele... | [FOCAL] @SuppressWarnings("unchecked") protected void AsyncContext.releaseData(D data)
[CLASS] class AsyncContext
[METRICS] loc=6 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] ((Releaser<D>) async).release/1
[PATH1] if(async instanceof Releaser)=T
[PATH2] if(async instanceof Releaser)=F
[DATAFLO... | /* static context
[FOCAL] @SuppressWarnings("unchecked") protected void AsyncContext.releaseData(D data)
[PATH1] if(async instanceof Releaser)=T
[PATH2] if(async instanceof Releaser)=F
[CALLS-EXTERNAL] ((Releaser<D>) async).release/1
*/
| /* static context
[FOCAL] @SuppressWarnings("unchecked") protected void AsyncContext.releaseData(D data)
[PATH1] if(async instanceof Releaser)=T
[PATH2] if(async instanceof Releaser)=F
[CALLS-EXTERNAL] ((Releaser<D>) async).release/1
*/
class AsyncContext {
@SuppressWarnings("unchecked")
protected void releaseData... | true | ok | {"focal": {"class": "AsyncContext", "name": "releaseData", "signature": "void releaseData(D data)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") protected", "params": [{"name": "data", "type": "D"}], "return_type": "void"}, "class_info": {"name": "AsyncContext", "kind": "class", "modifiers": "", "sup... |
36429443_19 | class AccessTokenUtils {
public static Optional<String> getAccessTokenFromSecurityContext() {
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
if (authentication instanceof OAuth2Authentication) {
... | final Authentication userAuthentication = mock(Authentication.class);
when(userAuthentication.getDetails()).thenReturn(singletonMap(ACCESS_TOKEN, "1234567890"));
SecurityContextHolder.getContext().setAuthentication(new OAuth2Authentication(mock(OAuth2Request.class),
userAuthenti... | [FOCAL] public static Optional<String> AccessTokenUtils.getAccessTokenFromSecurityContext()
[CLASS] class AccessTokenUtils
[METRICS] loc=22 cc=4 branches=2 loops=0 returns=4 throws=0 nesting=3
[CALLS-EXTERNAL] SecurityContextHolder.getContext/0, SecurityContext.getAuthentication/0, ((OAuth2Authentication) authenticatio... | /* static context
[FOCAL] public static Optional<String> AccessTokenUtils.getAccessTokenFromSecurityContext()
[PATH1] if(authentication instanceof OAuth2Authentication)=T -> if(userDetails != null)=T -> try-body throws -> return Optional.absent()
[PATH2] if(authentication instanceof OAuth2Authentication)=F -> return Op... | /* static context
[FOCAL] public static Optional<String> AccessTokenUtils.getAccessTokenFromSecurityContext()
[PATH1] if(authentication instanceof OAuth2Authentication)=T -> if(userDetails != null)=T -> try-body throws -> return Optional.absent()
[PATH2] if(authentication instanceof OAuth2Authentication)=F -> return Op... | true | ok | {"focal": {"class": "AccessTokenUtils", "name": "getAccessTokenFromSecurityContext", "signature": "Optional<String> getAccessTokenFromSecurityContext()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "Optional<String>"}, "class_info": {"name": "AccessTokenUtils", "kind": "class", "modifier... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.