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 |
|---|---|---|---|---|---|---|---|---|
87911627_4 | class MappingsConceptLineProcessor extends ConceptLineProcessor {
public Concept fill(Concept concept, CsvLine line) throws IllegalArgumentException {
if (!CollectionUtils.isEmpty(concept.getConceptMappings())) {
concept.getConceptMappings().clear();
}
String mappingsStr = line.get(HEADER_MAPPINGS_SAMEAS)... |
// Setup
String[] headerLine = { "Same as mappings" };
String[] line = { null };
// Replay
MappingsConceptLineProcessor p = new MappingsConceptLineProcessor(cs, new ConceptMapListParser(cs));
Concept c = p.fill(new Concept(), new CsvLine(headerLine, line));
// Verif
Assert.assertTrue(Collection... | [FOCAL] public Concept MappingsConceptLineProcessor.fill(Concept concept, CsvLine line)
[CLASS] class MappingsConceptLineProcessor extends ConceptLineProcessor
[METRICS] loc=14 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] CollectionUtils.isEmpty/1, Concept.getConceptMappings/0, concept.getConce... | /* static context
[FOCAL] public Concept MappingsConceptLineProcessor.fill(Concept concept, CsvLine line)
[PATH1] if(!CollectionUtils.isEmpty(concept.getConceptMappings()))=T -> if(!StringUtils.isEmpty(mappingsStr))=T -> foreach(ConceptMap mapping : listParser.parseList(mappingsStr))=T -> exit loop -> return concept
[P... | /* static context
[FOCAL] public Concept MappingsConceptLineProcessor.fill(Concept concept, CsvLine line)
[PATH1] if(!CollectionUtils.isEmpty(concept.getConceptMappings()))=T -> if(!StringUtils.isEmpty(mappingsStr))=T -> foreach(ConceptMap mapping : listParser.parseList(mappingsStr))=T -> exit loop -> return concept
[P... | true | ok | {"focal": {"class": "MappingsConceptLineProcessor", "name": "fill", "signature": "Concept fill(Concept concept, CsvLine line) throws IllegalArgumentException", "start_line": 3, "modifiers": "public", "params": [{"name": "concept", "type": "Concept"}, {"name": "line", "type": "CsvLine"}], "return_type": "Concept"}, "cla... |
87966671_7 | class CrashViewModel {
public int getIdentifier() {
return crash.getId();
}
public CrashViewModel();
public CrashViewModel(Crash crash);
public String getPlace();
public String getExactLocationOfCrash();
public String getReasonOfCrash();
public String getStackTrace();
public String getCrashIn... | Crash crash = mock(Crash.class);
when(crash.getId()).thenReturn(1);
when(crash.getAppInfo()).thenReturn(mock(AppInfo.class));
CrashViewModel viewModel = new CrashViewModel(crash);
assertThat(viewModel.getIdentifier(), is(1));
}
} | [FOCAL] public int CrashViewModel.getIdentifier()
[CLASS] class CrashViewModel
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] crash.getId/0
[COLLABORATORS] field crash getId/0
[CLASS-MEMBERS] CrashViewModel(); CrashViewModel(Crash crash); String getPlace(); String getExactLocation... | /* static context
[FOCAL] public int CrashViewModel.getIdentifier()
[COLLABORATORS] field crash getId/0
[CALLS-EXTERNAL] crash.getId/0
*/
| /* static context
[FOCAL] public int CrashViewModel.getIdentifier()
[COLLABORATORS] field crash getId/0
[CALLS-EXTERNAL] crash.getId/0
*/
class CrashViewModel {
public int getIdentifier() {
return crash.getId();
}
public CrashViewModel();
public CrashViewModel(Crash crash);
public String getPlace();
... | true | ok | {"focal": {"class": "CrashViewModel", "name": "getIdentifier", "signature": "int getIdentifier()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "CrashViewModel", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"n... |
87969126_3 | class CodeLocationNameGenerator {
public String createScanCodeLocationName(final String sourcePath, final String scanTargetPath, final String projectName, final String projectVersionName, final String prefix, final String suffix) {
final String pathPiece = cleanScanTargetPath(scanTargetPath, sourcePath);
... | final String expected = "hub-common-rest/target/hub-common-rest/2.5.1-SNAPSHOT scan";
final DetectFileFinder detectFileFinder = mock(DetectFileFinder.class);
when(detectFileFinder.extractFinalPieceFromPath("/Users/ekerwin/Documents/source/integration/hub-common-rest")).thenReturn("hub-common-re... | [FOCAL] public String CodeLocationNameGenerator.createScanCodeLocationName(String sourcePath, String scanTargetPath, String projectName, String projectVersionName, String prefix, String suffix)
[CLASS] class CodeLocationNameGenerator
[METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] ... | /* static context
[FOCAL] public String CodeLocationNameGenerator.createScanCodeLocationName(String sourcePath, String scanTargetPath, String projectName, String projectVersionName, String prefix, String suffix)
[INPUTS] branches=- | result=prefix, projectName, projectVersionName, scanTargetPath, sourcePath, suffix
[CA... | /* static context
[FOCAL] public String CodeLocationNameGenerator.createScanCodeLocationName(String sourcePath, String scanTargetPath, String projectName, String projectVersionName, String prefix, String suffix)
[INPUTS] branches=- | result=prefix, projectName, projectVersionName, scanTargetPath, sourcePath, suffix
[CA... | true | ok | {"focal": {"class": "CodeLocationNameGenerator", "name": "createScanCodeLocationName", "signature": "String createScanCodeLocationName(String sourcePath, String scanTargetPath, String projectName, String projectVersionName, String prefix, String suffix)", "start_line": 3, "modifiers": "public", "params": [{"name": "sou... |
88063304_14 | class TarArguments {
abstract boolean extract()@Option(value = "x", mnemonic = 'x')
abstract boolean extract();
abstract boolean extract()@Option(value = "c", mnemonic = 'c') abstract boolean create();
abstract boolean extract()@Option(value = "v", mnemonic = 'v') abstract boolean verbose();
abstract boolea... | f.assertThat("-x", "-f", "foo.tar").succeeds(
"extract", true,
"create", false,
"verbose", false,
"compress", false,
"file", "foo.tar");
f.assertThat("-v", "-x", "-f", "foo.tar").succeeds(
"extract", true,
"create", false,
"verbose", true,
... | [FOCAL] abstract boolean TarArguments.extract()
[CLASS] class TarArguments
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] boolean create(); boolean verbose(); boolean compress(); boolean extract()
[TEST] TarArgumentsTest: @Test void testExtract()
[TEST-FIELDS] ParserTestFixture<Tar... | /* static context
[FOCAL] abstract boolean TarArguments.extract()
*/
| /* static context
[FOCAL] abstract boolean TarArguments.extract()
*/
class TarArguments {
abstract boolean extract()@Option(value = "x", mnemonic = 'x')
abstract boolean extract();
abstract boolean extract()@Option(value = "c", mnemonic = 'c') abstract boolean create();
abstract boolean extract()@Option(value... | true | partial | {"focal": {"class": "TarArguments", "name": "extract", "signature": "boolean extract()", "start_line": 4, "modifiers": "abstract", "params": [], "return_type": "boolean"}, "class_info": {"name": "TarArguments", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "f", "type": "P... |
88127865_3 | class GuavaCompatibilityUtil {
static boolean isGuavaCompatibilityFound() {
return INSTANCE.isGuavaCompatibilityFound;
}
private GuavaCompatibilityUtil();
}
class GuavaCompatibilityUtilTest {
@Test
public void isGuavaCompatibilityFound() {
| assertTrue(GuavaCompatibilityUtil.isGuavaCompatibilityFound());
}
} | [FOCAL] static boolean GuavaCompatibilityUtil.isGuavaCompatibilityFound()
[CLASS] class GuavaCompatibilityUtil
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] GuavaCompatibilityUtil()
[TEST] GuavaCompatibilityUtilTest: @Test public void isGuavaCompatibilityFound() | /* static context
[FOCAL] static boolean GuavaCompatibilityUtil.isGuavaCompatibilityFound()
*/
| /* static context
[FOCAL] static boolean GuavaCompatibilityUtil.isGuavaCompatibilityFound()
*/
class GuavaCompatibilityUtil {
static boolean isGuavaCompatibilityFound() {
return INSTANCE.isGuavaCompatibilityFound;
}
private GuavaCompatibilityUtil();
}
class GuavaCompatibilityUtilTest {
@Test
public ... | true | ok | {"focal": {"class": "GuavaCompatibilityUtil", "name": "isGuavaCompatibilityFound", "signature": "boolean isGuavaCompatibilityFound()", "start_line": 3, "modifiers": "static", "params": [], "return_type": "boolean"}, "class_info": {"name": "GuavaCompatibilityUtil", "kind": "class", "modifiers": "", "superclass": null, "... |
88139536_4 | class RxTask {
@CheckReturnValue
@NonNull
public static <R> Maybe<R> maybe(@NonNull final Callable<Task<R>> callable) {
return Single.fromCallable(callable).flatMapMaybe(
new Function<Task<R>, MaybeSource<? extends R>>() {
@Override
public MaybeSource<? exten... | final String hello = "Hello, world!";
when(mockHelloTask.getResult())
.thenReturn(hello);
when(mockHelloTask.isSuccessful())
.thenReturn(true);
when(mockHelloTask.addOnCompleteListener(onComplete.capture()))
.thenReturn(mockHelloTask);
... | [FOCAL] @CheckReturnValue @NonNull public static Maybe<R> RxTask.maybe(Callable<Task<R>> callable)
[CLASS] class RxTask
[METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Maybe<R> maybe(Task<R> task)
[CALLS-EXTERNAL] Single.fromCallable(callable).flatMapMaybe/1, Single.fromCallable/1... | /* static context
[FOCAL] @CheckReturnValue @NonNull public static Maybe<R> RxTask.maybe(Callable<Task<R>> callable)
[INPUTS] branches=- | result=callable
[CALLS-INTERNAL] Maybe<R> maybe(Task<R> task)
[NEW] Function<Task<R>, MaybeSource<? extends R>>
[CALLS-EXTERNAL] Single.fromCallable(callable).flatMapMaybe/1, Single... | /* static context
[FOCAL] @CheckReturnValue @NonNull public static Maybe<R> RxTask.maybe(Callable<Task<R>> callable)
[INPUTS] branches=- | result=callable
[CALLS-INTERNAL] Maybe<R> maybe(Task<R> task)
[NEW] Function<Task<R>, MaybeSource<? extends R>>
[CALLS-EXTERNAL] Single.fromCallable(callable).flatMapMaybe/1, Single... | true | ok | {"focal": {"class": "RxTask", "name": "maybe", "signature": "Maybe<R> maybe(Callable<Task<R>> callable)", "start_line": 3, "modifiers": "@CheckReturnValue @NonNull public static", "params": [{"name": "callable", "type": "Callable<Task<R>>"}], "return_type": "Maybe<R>"}, "class_info": {"name": "RxTask", "kind": "class",... |
88152958_48 | class Stackifier {
public void writeStructuredControlFlow(final StackifierStructuredControlFlowWriter writer) {
flow.writeStructuredControlFlow(writer);
}
public Stackifier(final ControlFlowGraph controlFlowGraph);
public void printDebug(final PrintWriter printWriter);
}
class StackifierTe... | final Program p = new Program(DebugInformation.empty(), null);
final ControlFlowGraph g = new ControlFlowGraph(p);
final RegionNode startNode = g.createAt(BytecodeOpcodeAddress.START_AT_ZERO, RegionNode.BlockType.NORMAL);
startNode.getExpressions().add(new GotoExpression(p, new BytecodeO... | [FOCAL] public void Stackifier.writeStructuredControlFlow(StackifierStructuredControlFlowWriter writer)
[CLASS] class Stackifier
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] flow.writeStructuredControlFlow/1
[COLLABORATORS] field flow writeStructuredControlFlow/1
[DATAFLOW] writ... | /* static context
[FOCAL] public void Stackifier.writeStructuredControlFlow(StackifierStructuredControlFlowWriter writer)
[COLLABORATORS] field flow writeStructuredControlFlow/1
[CALLS-EXTERNAL] flow.writeStructuredControlFlow/1
*/
| /* static context
[FOCAL] public void Stackifier.writeStructuredControlFlow(StackifierStructuredControlFlowWriter writer)
[COLLABORATORS] field flow writeStructuredControlFlow/1
[CALLS-EXTERNAL] flow.writeStructuredControlFlow/1
*/
class Stackifier {
public void writeStructuredControlFlow(final StackifierStructure... | true | ok | {"focal": {"class": "Stackifier", "name": "writeStructuredControlFlow", "signature": "void writeStructuredControlFlow(StackifierStructuredControlFlowWriter writer)", "start_line": 3, "modifiers": "public", "params": [{"name": "writer", "type": "StackifierStructuredControlFlowWriter"}], "return_type": "void"}, "class_in... |
88178114_50 | class IndexFactoryBean extends AbstractFactoryBeanSupport<Index> implements InitializingBean {
@Override
public Class<?> getObjectType() {
Index index = getIndex();
return index != null ? index.getClass() : Index.class;
}
@Override public void afterPropertiesSet();
private void applyIndexConfigurers(String... | assertThat(newIndexFactoryBean().getObjectType()).isEqualTo(Index.class);
}
} | [FOCAL] @Override public Class<?> IndexFactoryBean.getObjectType()
[CLASS] class IndexFactoryBean extends AbstractFactoryBeanSupport<Index> implements InitializingBean
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Index getIndex()
[CALLS-EXTERNAL] Index.getClass/0
[DATAFLOW] inde... | /* static context
[FOCAL] @Override public Class<?> IndexFactoryBean.getObjectType()
[CALLS-INTERNAL] Index getIndex()
[CALLS-EXTERNAL] Index.getClass/0
*/
| /* static context
[FOCAL] @Override public Class<?> IndexFactoryBean.getObjectType()
[CALLS-INTERNAL] Index getIndex()
[CALLS-EXTERNAL] Index.getClass/0
*/
class IndexFactoryBean extends AbstractFactoryBeanSupport<Index> implements InitializingBean {
@Override
public Class<?> getObjectType() {
Index index = getIn... | true | ok | {"focal": {"class": "IndexFactoryBean", "name": "getObjectType", "signature": "Class<?> getObjectType()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Class<?>"}, "class_info": {"name": "IndexFactoryBean", "kind": "class", "modifiers": "", "superclass": "AbstractFactoryBeanSupport<Ind... |
88231534_1 | class NoopSpanNameProvider implements MongoSpanNameProvider {
@Override
public String generateName(CommandStartedEvent event) {
return event != null && event.getCommandName() != null ?
event.getCommandName() : NO_OPERATION;
}
private final MongoSpanNameProvider provider;
private final CommandSta... | assertEquals("unknown", provider.generateName(null));
}
} | [FOCAL] @Override public String NoopSpanNameProvider.generateName(CommandStartedEvent event)
[CLASS] class NoopSpanNameProvider implements MongoSpanNameProvider
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] CommandStartedEvent.getCommandName/0
[INPUTS] branches=- | result=event
[... | /* static context
[FOCAL] @Override public String NoopSpanNameProvider.generateName(CommandStartedEvent event)
[INPUTS] branches=- | result=event
[COLLABORATORS] param event:CommandStartedEvent getCommandName/0
[CALLS-EXTERNAL] CommandStartedEvent.getCommandName/0
*/
| /* static context
[FOCAL] @Override public String NoopSpanNameProvider.generateName(CommandStartedEvent event)
[INPUTS] branches=- | result=event
[COLLABORATORS] param event:CommandStartedEvent getCommandName/0
[CALLS-EXTERNAL] CommandStartedEvent.getCommandName/0
*/
class NoopSpanNameProvider implements MongoSpanNameP... | true | ok | {"focal": {"class": "NoopSpanNameProvider", "name": "generateName", "signature": "String generateName(CommandStartedEvent event)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "event", "type": "CommandStartedEvent"}], "return_type": "String"}, "class_info": {"name": "NoopSpanNameProvider", "kin... |
88242107_2 | class AnnotationScanner {
public List<AccessibleObject> getJpaAnnotatedMembers(Class<?> c, Class<? extends Annotation> annotation) {
final List<AccessibleObject> jpaAnnotated = new ArrayList<AccessibleObject>();
for (Class<?> cl = c; cl != Object.class && cl != null; cl = cl.getSuperclass()) {
... | AnnotationScanner scanner = new AnnotationScanner();
List<AccessibleObject> members = scanner.getJpaAnnotatedMembers(TestInterface.class, PersistenceUnit.class);
Assert.assertEquals(0, members.size());
}
} | [FOCAL] public List<AccessibleObject> AnnotationScanner.getJpaAnnotatedMembers(Class<?> c, Class<? extends Annotation> annotation)
[CLASS] class AnnotationScanner
[METRICS] loc=7 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] void parseClass(Class<? extends Annotation> annotation, List<Accessible... | /* static context
[FOCAL] public List<AccessibleObject> AnnotationScanner.getJpaAnnotatedMembers(Class<?> c, Class<? extends Annotation> annotation)
[PATH1] for(cl != Object.class && cl != null)=T -> exit loop -> return jpaAnnotated
[PATH2] for(cl != Object.class && cl != null)=F -> return jpaAnnotated
[INPUTS] branche... | /* static context
[FOCAL] public List<AccessibleObject> AnnotationScanner.getJpaAnnotatedMembers(Class<?> c, Class<? extends Annotation> annotation)
[PATH1] for(cl != Object.class && cl != null)=T -> exit loop -> return jpaAnnotated
[PATH2] for(cl != Object.class && cl != null)=F -> return jpaAnnotated
[INPUTS] branche... | true | ok | {"focal": {"class": "AnnotationScanner", "name": "getJpaAnnotatedMembers", "signature": "List<AccessibleObject> getJpaAnnotatedMembers(Class<?> c, Class<? extends Annotation> annotation)", "start_line": 3, "modifiers": "public", "params": [{"name": "c", "type": "Class<?>"}, {"name": "annotation", "type": "Class<? exten... |
88284952_110 | class SerializedObserver implements Observer<T>, Disposable {
@Override
public void onNext(@NonNull T t) {
if (done) {
return;
}
if (t == null) {
s.dispose();
onError(new NullPointerException("onNext called with null. Null values are generally not all... | final AtomicReference<Observer<Integer>> serial = new AtomicReference<Observer<Integer>>();
TestObserver<Integer> to = new TestObserver<Integer>() {
@Override
public void onNext(Integer t) {
if (t != null && t == 0) {
serial.get().onNext(null);... | [FOCAL] @Override public void SerializedObserver.onNext(T t)
[CLASS] class SerializedObserver implements Observer<T>, Disposable
[METRICS] loc=30 cc=6 branches=5 loops=0 returns=4 throws=0 nesting=3
[CALLS-INTERNAL] void emitLoop(); void onError(Throwable t)
[CALLS-EXTERNAL] s.dispose/0, AppendOnlyLinkedArrayList<Objec... | /* static context
[FOCAL] @Override public void SerializedObserver.onNext(T t)
[PATH1] if(done)#1=F -> if(t == null)=F -> if(done)#2=F -> if(emitting)=T -> if(q == null)=T -> return
[PATH2] if(done)#1=T -> return
[PATH3] if(done)#1=F -> if(t == null)=T -> return
[PATH4] if(done)#1=F -> if(t == null)=F -> if(done)#2=T -... | /* static context
[FOCAL] @Override public void SerializedObserver.onNext(T t)
[PATH1] if(done)#1=F -> if(t == null)=F -> if(done)#2=F -> if(emitting)=T -> if(q == null)=T -> return
[PATH2] if(done)#1=T -> return
[PATH3] if(done)#1=F -> if(t == null)=T -> return
[PATH4] if(done)#1=F -> if(t == null)=F -> if(done)#2=T -... | true | ok | {"focal": {"class": "SerializedObserver", "name": "onNext", "signature": "void onNext(T t)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "t", "type": "T"}], "return_type": "void"}, "class_info": {"name": "SerializedObserver", "kind": "class", "modifiers": "", "superclass": null, "interfaces": ... |
88286191_4 | class PixabayImage {
public int getWebformatHeight() {
return webformatHeight;
}
public PixabayImage(int previewHeight, int likes, int favorites, String tags,
int webformatHeight, long views, int webformatWidth, int previewWidth,
int comments, long ... | assertEquals(pixabayImage.getWebformatHeight(), 90);
}
} | [FOCAL] public int PixabayImage.getWebformatHeight()
[CLASS] class PixabayImage
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments,... | /* static context
[FOCAL] public int PixabayImage.getWebformatHeight()
*/
| /* static context
[FOCAL] public int PixabayImage.getWebformatHeight()
*/
class PixabayImage {
public int getWebformatHeight() {
return webformatHeight;
}
public PixabayImage(int previewHeight, int likes, int favorites, String tags,
int webformatHeight, long views, int web... | true | ok | {"focal": {"class": "PixabayImage", "name": "getWebformatHeight", "signature": "int getWebformatHeight()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "PixabayImage", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "pi... |
88374068_4 | class ClientSpanNameProvider {
public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME(
final String prefix) {
return (request) -> replaceIfNull(prefix, "")
+ replaceIfNull(request.getRequestLine().getMethod(), "unknown")
+ " " + replaceIfNull(standardizeUri(request.... | Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider
.PREFIXED_REQUEST_METHOD_TARGET_NAME("ELASTICSEARCH - ");
assertEquals("ELASTICSEARCH - GET /twitter/tweet/", spanNameProvider.apply(getRequest));
assertEquals("ELASTICSEARCH - GET /twitter/tweet/?", spanNameProvider.apply(getR... | [FOCAL] public static Function<HttpRequest, String> ClientSpanNameProvider.PREFIXED_REQUEST_METHOD_TARGET_NAME(String prefix)
[CLASS] class ClientSpanNameProvider
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String replaceIfNull(String input, String replacement); String standard... | /* static context
[FOCAL] public static Function<HttpRequest, String> ClientSpanNameProvider.PREFIXED_REQUEST_METHOD_TARGET_NAME(String prefix)
[INPUTS] branches=- | result=prefix
[COLLABORATORS] field request getRequestLine/0
[CALLS-INTERNAL] String replaceIfNull(String input, String replacement); String standardizeUr... | /* static context
[FOCAL] public static Function<HttpRequest, String> ClientSpanNameProvider.PREFIXED_REQUEST_METHOD_TARGET_NAME(String prefix)
[INPUTS] branches=- | result=prefix
[COLLABORATORS] field request getRequestLine/0
[CALLS-INTERNAL] String replaceIfNull(String input, String replacement); String standardizeUr... | true | ok | {"focal": {"class": "ClientSpanNameProvider", "name": "PREFIXED_REQUEST_METHOD_TARGET_NAME", "signature": "Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME(String prefix)", "start_line": 3, "modifiers": "public static", "params": [{"name": "prefix", "type": "String"}], "return_type": "Function<HttpRequ... |
88406700_2 | class RxReceiverLocal {
@NonNull
public static Observable<Intent> receives(@NonNull final Context context, @NonNull final IntentFilter intentFilter) {
return Observable.create(new ObservableOnSubscribe<Intent>() {
@Override public void subscribe(final ObservableEmitter<Intent> emitter) {
... | IntentFilter intentFilter = new IntentFilter("test");
Context context = RuntimeEnvironment.application.getApplicationContext();
TestObserver<Intent> tester = RxReceiverLocal.receives(context, intentFilter)
.test();
Intent foobar = new Intent("test").putExtra("foo", "bar"... | [FOCAL] @NonNull public static Observable<Intent> RxReceiverLocal.receives(Context context, IntentFilter intentFilter)
[CLASS] class RxReceiverLocal
[METRICS] loc=31 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] Observable.create/1, emitter.onNext/1, LocalBroadcastManager.getInstance(context).re... | /* static context
[FOCAL] @NonNull public static Observable<Intent> RxReceiverLocal.receives(Context context, IntentFilter intentFilter)
[INPUTS] branches=- | result=context, intentFilter
[COLLABORATORS] field emitter onNext/1,setCancellable/1
[NEW] ObservableOnSubscribe<Intent>, BroadcastReceiver, Cancellable, Runnabl... | /* static context
[FOCAL] @NonNull public static Observable<Intent> RxReceiverLocal.receives(Context context, IntentFilter intentFilter)
[INPUTS] branches=- | result=context, intentFilter
[COLLABORATORS] field emitter onNext/1,setCancellable/1
[NEW] ObservableOnSubscribe<Intent>, BroadcastReceiver, Cancellable, Runnabl... | true | ok | {"focal": {"class": "RxReceiverLocal", "name": "receives", "signature": "Observable<Intent> receives(Context context, IntentFilter intentFilter)", "start_line": 3, "modifiers": "@NonNull public static", "params": [{"name": "context", "type": "Context"}, {"name": "intentFilter", "type": "IntentFilter"}], "return_type": ... |
88435530_1 | class FlaxStore {
static<M extends FlaxModel> M getModel(Class modelClass) {
return getModel(modelClass, 0);
}
private FlaxStore();
static M getModel(Class modelClass, Integer modelKey);
static void putModel(M model, Integer modelKey);
private static Map<Class, Map<Integer, FlaxModel... | Foo fooOne = FlaxStore.getModel(Foo.class, 0);
Foo fooTwo = FlaxStore.getModel(Foo.class, 0);
assertEquals("fooOne and fooTwo should be the same but they are different.", fooOne, fooTwo);
}
} | [FOCAL] static M FlaxStore.getModel(Class modelClass)
[CLASS] class FlaxStore
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] M getModel(Class modelClass, Integer modelKey)
[INPUTS] branches=- | result=modelClass
[DATAFLOW] modelClass@param->L2
[CLASS-MEMBERS] FlaxStore(); M getMod... | /* static context
[FOCAL] static M FlaxStore.getModel(Class modelClass)
[INPUTS] branches=- | result=modelClass
[CALLS-INTERNAL] M getModel(Class modelClass, Integer modelKey)
*/
| /* static context
[FOCAL] static M FlaxStore.getModel(Class modelClass)
[INPUTS] branches=- | result=modelClass
[CALLS-INTERNAL] M getModel(Class modelClass, Integer modelKey)
*/
class FlaxStore {
static<M extends FlaxModel> M getModel(Class modelClass) {
return getModel(modelClass, 0);
}
private ... | true | ok | {"focal": {"class": "FlaxStore", "name": "getModel", "signature": "M getModel(Class modelClass)", "start_line": 3, "modifiers": "static", "params": [{"name": "modelClass", "type": "Class"}], "return_type": "M"}, "class_info": {"name": "FlaxStore", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null... |
88485241_3 | class PCA9685 implements Closeable {
public void setAllPwm(int on, int off) throws IOException {
if (i2cDevice != null) {
try {
i2cDevice.writeRegByte(ALL_LED_ON_L, (byte) (on & 0xFF));
i2cDevice.writeRegByte(ALL_LED_ON_H, (byte) (on >> 8));
i2cDevice.writeRegByte(ALL_LED_OFF_L, (by... | when(peripheralManagerServiceMock.getI2cBusList()).thenReturn(i2cDevices);
when(peripheralManagerServiceMock.openI2cDevice("I2C1",0x40)).thenReturn(i2cDeviceMock);
when(i2cDeviceMock.readRegByte(MODE1)).thenReturn((byte)0x0);
PCA9685 device = new PCA9685((byte)0x40, peripheralManagerServiceMock);
... | [FOCAL] public void PCA9685.setAllPwm(int on, int off)
[CLASS] class PCA9685 implements Closeable
[METRICS] loc=13 cc=3 branches=1 loops=0 returns=0 throws=1 nesting=2
[CALLS-EXTERNAL] i2cDevice.writeRegByte/2, IOException.printStackTrace/0
[FIELDS] read=ALL_LED_OFF_H:int, ALL_LED_OFF_L:int, ALL_LED_ON_H:int, ALL_LED_O... | /* static context
[FOCAL] public void PCA9685.setAllPwm(int on, int off)
[THROWS-WHEN] e when i2cDevice != null && try-body throws
[PATH1] if(i2cDevice != null)=T -> try-body throws -> throw e
[PATH2] if(i2cDevice != null)=F
[COLLABORATORS] field i2cDevice writeRegByte/2
[EXCEPTIONS] declares IOException; throws throw ... | /* static context
[FOCAL] public void PCA9685.setAllPwm(int on, int off)
[THROWS-WHEN] e when i2cDevice != null && try-body throws
[PATH1] if(i2cDevice != null)=T -> try-body throws -> throw e
[PATH2] if(i2cDevice != null)=F
[COLLABORATORS] field i2cDevice writeRegByte/2
[EXCEPTIONS] declares IOException; throws throw ... | true | ok | {"focal": {"class": "PCA9685", "name": "setAllPwm", "signature": "void setAllPwm(int on, int off) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "on", "type": "int"}, {"name": "off", "type": "int"}], "return_type": "void"}, "class_info": {"name": "PCA9685", "kind": "class", "modifiers"... |
88544701_185 | class ReconnectingFactSubscriptionWrapper implements Subscription {
@Override
public Subscription awaitComplete() throws SubscriptionCancelledException {
for (;;) {
assertSubscriptionStateNotClosed();
Subscription cur = currentSubscription.get();
if (cur != null) {... |
observerAC.getValue().onComplete();
assertTimeout(Duration.ofMillis(1000), () -> {
// needs to return immediately
uut.awaitComplete();
});
}
} | [FOCAL] @Override public Subscription ReconnectingFactSubscriptionWrapper.awaitComplete()
[CLASS] class ReconnectingFactSubscriptionWrapper implements Subscription
[METRICS] loc=19 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=3
[CALLS-INTERNAL] void assertSubscriptionStateNotClosed(); void sleep()
[CALLS-EXTERNAL... | /* static context
[FOCAL] @Override public Subscription ReconnectingFactSubscriptionWrapper.awaitComplete()
[PATH1] for(true)=T -> if(cur != null)=T -> return this
[COLLABORATORS] field currentSubscription get/0
[EXCEPTIONS] declares SubscriptionCancelledException; catches SubscriptionCancelledException ignore
[CALLS-I... | /* static context
[FOCAL] @Override public Subscription ReconnectingFactSubscriptionWrapper.awaitComplete()
[PATH1] for(true)=T -> if(cur != null)=T -> return this
[COLLABORATORS] field currentSubscription get/0
[EXCEPTIONS] declares SubscriptionCancelledException; catches SubscriptionCancelledException ignore
[CALLS-I... | true | ok | {"focal": {"class": "ReconnectingFactSubscriptionWrapper", "name": "awaitComplete", "signature": "Subscription awaitComplete() throws SubscriptionCancelledException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Subscription"}, "class_info": {"name": "ReconnectingFactSubscriptionWrapp... |
88621169_2 | class EventProcessor {
@EventHandler // Mark this method as an Axon Event Handler
public void on(ProductAddedEvent productAddedEvent) {
repo.save(new Product(productAddedEvent.getId(), productAddedEvent.getName()));
LOG.info("A product was added! Id={} Name={}", productAddedEvent.getId(), produ... | // Arrange
List<Product> products = new ArrayList<>();
when(repo.save(any(Product.class)))
.thenAnswer(i -> {
Product prod = i.getArgumentAt(0, Product.class);
products.add(prod);
return prod;
});
... | [FOCAL] @EventHandler // Mark this method as an Axon Event Handler public void EventProcessor.on(ProductAddedEvent productAddedEvent)
[CLASS] class EventProcessor
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] ProductRepository.save/1, ProductAddedEvent.getId/0, ProductAddedEvent.... | /* static context
[FOCAL] @EventHandler // Mark this method as an Axon Event Handler public void EventProcessor.on(ProductAddedEvent productAddedEvent)
[COLLABORATORS] field repo:ProductRepository save/1; param productAddedEvent:ProductAddedEvent getId/0,getName/0
[FIELDS] read=repo:ProductRepository
[NEW] Product
[CAL... | /* static context
[FOCAL] @EventHandler // Mark this method as an Axon Event Handler public void EventProcessor.on(ProductAddedEvent productAddedEvent)
[COLLABORATORS] field repo:ProductRepository save/1; param productAddedEvent:ProductAddedEvent getId/0,getName/0
[FIELDS] read=repo:ProductRepository
[NEW] Product
[CAL... | true | ok | {"focal": {"class": "EventProcessor", "name": "on", "signature": "void on(ProductAddedEvent productAddedEvent)", "start_line": 3, "modifiers": "@EventHandler // Mark this method as an Axon Event Handler public", "params": [{"name": "productAddedEvent", "type": "ProductAddedEvent"}], "return_type": "void"}, "class_info"... |
88711981_23 | class MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage> {
@Override
public InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace)
{
Object bodyObject = MessageConverter_from_1_0.convertBodyToObject(serverMessage);
final A... | Message_1_0 sourceMessage = createTestMessage(MESSAGE_MESSAGE_ANNOTATION, null);
final InternalMessage convertedMessage = _converter.convert(sourceMessage, mock(NamedAddressSpace.class));
assertEquals("Unexpected mime type", null, convertedMessage.getMessageHeader().getMimeType());
ass... | [FOCAL] @Override public InternalMessage MessageConverter_v1_0_to_Internal.convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace)
[CLASS] class MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage>
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CA... | /* static context
[FOCAL] @Override public InternalMessage MessageConverter_v1_0_to_Internal.convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace)
[INPUTS] branches=- | result=addressSpace, serverMessage
[CALLS-INTERNAL] AMQMessageHeader convertHeader(Message_1_0 serverMessage, NamedAddressSpace addressSpa... | /* static context
[FOCAL] @Override public InternalMessage MessageConverter_v1_0_to_Internal.convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace)
[INPUTS] branches=- | result=addressSpace, serverMessage
[CALLS-INTERNAL] AMQMessageHeader convertHeader(Message_1_0 serverMessage, NamedAddressSpace addressSpa... | true | ok | {"focal": {"class": "MessageConverter_v1_0_to_Internal", "name": "convert", "signature": "InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "serverMessage", "type": "Message_1_0"}, {"name": "addressSpace", "type": "... |
88787780_15 | class ArrayMath {
public static String toHexString(byte[] bytes) {
return toHexString(bytes, 0, bytes.length);
}
private ArrayMath();
public static double[] add(double[] in, double[] out, int mul);
public static int[] multiply(int[] in, int[] out, int mul);
public static double[] mul... | assertEquals("", toHexString(bytes()));
assertEquals("C5", toHexString(bytes(0xC5)));
assertEquals("FEDCBA9876543210", toHexString(bytes(
0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10)));
}
} | [FOCAL] public static String ArrayMath.toHexString(byte[] bytes)
[CLASS] class ArrayMath
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String toHexString(byte[] bytes, int offset, int length)
[INPUTS] branches=- | result=bytes
[DATAFLOW] bytes@param->L2
[CLASS-MEMBERS] ArrayMath(... | /* static context
[FOCAL] public static String ArrayMath.toHexString(byte[] bytes)
[INPUTS] branches=- | result=bytes
[CALLS-INTERNAL] String toHexString(byte[] bytes, int offset, int length)
*/
| /* static context
[FOCAL] public static String ArrayMath.toHexString(byte[] bytes)
[INPUTS] branches=- | result=bytes
[CALLS-INTERNAL] String toHexString(byte[] bytes, int offset, int length)
*/
class ArrayMath {
public static String toHexString(byte[] bytes) {
return toHexString(bytes, 0, bytes.length);
... | true | ok | {"focal": {"class": "ArrayMath", "name": "toHexString", "signature": "String toHexString(byte[] bytes)", "start_line": 3, "modifiers": "public static", "params": [{"name": "bytes", "type": "byte[]"}], "return_type": "String"}, "class_info": {"name": "ArrayMath", "kind": "class", "modifiers": "", "superclass": null, "in... |
88794099_0 | class TensorflowProcessorProperties {
@NotNull
public Resource getModelLocation() {
return modelLocation;
}
@NotNull public String getOutputName();
public void setOutputName(String outputName);
public void setModelLocation(Resource modelLocation);
public int getOutputIndex();
public void setOutputIndex(int ... | EnvironmentTestUtils.addEnvironment(context, "tensorflow.modelLocation:/remote");
context.register(Conf.class);
context.refresh();
TensorflowProcessorProperties properties = context.getBean(TensorflowProcessorProperties.class);
assertThat(properties.getModelLocation(), equalTo(context.getResource("/remote")))... | [FOCAL] @NotNull public Resource TensorflowProcessorProperties.getModelLocation()
[CLASS] class TensorflowProcessorProperties
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] String getOutputName(); void setOutputName(String outputName); void setModelLocation(Resource modelLocation);... | /* static context
[FOCAL] @NotNull public Resource TensorflowProcessorProperties.getModelLocation()
*/
| /* static context
[FOCAL] @NotNull public Resource TensorflowProcessorProperties.getModelLocation()
*/
class TensorflowProcessorProperties {
@NotNull
public Resource getModelLocation() {
return modelLocation;
}
@NotNull public String getOutputName();
public void setOutputName(String outputName);
public void s... | true | ok | {"focal": {"class": "TensorflowProcessorProperties", "name": "getModelLocation", "signature": "Resource getModelLocation()", "start_line": 3, "modifiers": "@NotNull public", "params": [], "return_type": "Resource"}, "class_info": {"name": "TensorflowProcessorProperties", "kind": "class", "modifiers": "", "superclass": ... |
88820221_9 | class AbstractSizeBoundedQueue {
abstract void offer(MessagePromise<?> promise)abstract void offer(MessagePromise<?> promise);
abstract void offer(MessagePromise<?> promise) AbstractSizeBoundedQueue(int maxSize, MessageKey key);
abstract void offer(MessagePromise<?> promise)abstract int drainTo(Consumer consumer);
... | AbstractSizeBoundedQueue queue = newQueue(OverflowStrategy.dropTail);
CountDownLatch countDown = new CountDownLatch(1);
for (int i = 0; i < queue.maxSize; i++) {
MessagePromise<Integer> next = newPromise(i);
queue.offer(next);
if (i == queue.maxSize - 1) {
next.addListener(future ... | [FOCAL] abstract void AbstractSizeBoundedQueue.offer(MessagePromise<?> promise)
[CLASS] class AbstractSizeBoundedQueue
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] AbstractSizeBoundedQueue(int maxSize, MessageKey key); int drainTo(Consumer consumer); int clear(); int size(); bool... | /* static context
[FOCAL] abstract void AbstractSizeBoundedQueue.offer(MessagePromise<?> promise)
*/
| /* static context
[FOCAL] abstract void AbstractSizeBoundedQueue.offer(MessagePromise<?> promise)
*/
class AbstractSizeBoundedQueue {
abstract void offer(MessagePromise<?> promise)abstract void offer(MessagePromise<?> promise);
abstract void offer(MessagePromise<?> promise) AbstractSizeBoundedQueue(int maxSize, Mess... | true | partial | {"focal": {"class": "AbstractSizeBoundedQueue", "name": "offer", "signature": "void offer(MessagePromise<?> promise)", "start_line": 3, "modifiers": "abstract", "params": [{"name": "promise", "type": "MessagePromise<?>"}], "return_type": "void"}, "class_info": {"name": "AbstractSizeBoundedQueue", "kind": "class", "modi... |
88831074_192 | class UnixUser {
public String getDir() {
return dir;
}
UnixUser(String userName, Passwd pwd);
public UnixUser(String userName);
protected UnixUser(String userName, String gecos, String dir, String shell, int uid, int gid, Set<String> groups);
public String getUserName();
publ... | Assert.assertNotNull(user.getDir());
}
} | [FOCAL] public String UnixUser.getDir()
[CLASS] class UnixUser
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] UnixUser(String userName, Passwd pwd); UnixUser(String userName); UnixUser(String userName, String gecos, String dir, String shell, int uid, int gid, Set<String> groups); S... | /* static context
[FOCAL] public String UnixUser.getDir()
*/
| /* static context
[FOCAL] public String UnixUser.getDir()
*/
class UnixUser {
public String getDir() {
return dir;
}
UnixUser(String userName, Passwd pwd);
public UnixUser(String userName);
protected UnixUser(String userName, String gecos, String dir, String shell, int uid, int gid, Se... | true | ok | {"focal": {"class": "UnixUser", "name": "getDir", "signature": "String getDir()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "UnixUser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "user", "type": "UnixUser", "... |
88860621_0 | class JavaDomUtils {
public static String calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt) {
if (fqjt.getTypeArguments().size() > 0) {
return calculateParameterizedTypeName(compilationUnit, fqjt);
}
if(compilationUnit == null
... | Interface interfaze = new Interface(new FullyQualifiedJavaType("com.foo.UserMapper"));
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("java.util.Map<java.math.BigDecimal, java.util.List<com.beeant.dto.User>>");
assertEquals("java.util.Map<java.math.BigDecimal, java.util.List<c... | [FOCAL] public static String JavaDomUtils.calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt)
[CLASS] class JavaDomUtils
[METRICS] loc=15 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-INTERNAL] String calculateParameterizedTypeName(CompilationUnit compilationUnit, FullyQualifie... | /* static context
[FOCAL] public static String JavaDomUtils.calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt)
[PATH1] if(fqjt.getTypeArguments().size() > 0)=F -> if((compilationUnit == null || typeDoesNotRequireImport(fqjt) || typeIsInSamePackage(compilationUnit, fqjt) || typeIsAlr...)=T -... | /* static context
[FOCAL] public static String JavaDomUtils.calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt)
[PATH1] if(fqjt.getTypeArguments().size() > 0)=F -> if((compilationUnit == null || typeDoesNotRequireImport(fqjt) || typeIsInSamePackage(compilationUnit, fqjt) || typeIsAlr...)=T -... | true | ok | {"focal": {"class": "JavaDomUtils", "name": "calculateTypeName", "signature": "String calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt)", "start_line": 3, "modifiers": "public static", "params": [{"name": "compilationUnit", "type": "CompilationUnit"}, {"name": "fqjt", "type": "FullyQualifi... |
88873634_2 | class PageIndicatorView extends LinearLayout implements PageIndicators.PageObserver, PageIndicators.PageCountObserver {
@Override
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
public Drawable getDividerDrawable() {
Drawable divider = super.getDividerDrawable();
if (divider instanceof S... | pageIndicatorView.setDividerDrawable(new SpaceDrawable(5));
assertThat(pageIndicatorView.getDividerDrawable(), nullValue());
}
} | [FOCAL] @Override @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) public Drawable PageIndicatorView.getDividerDrawable()
[CLASS] class PageIndicatorView extends LinearLayout implements PageIndicators.PageObserver, PageIndicators.PageCountObserver
[METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[... | /* static context
[FOCAL] @Override @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) public Drawable PageIndicatorView.getDividerDrawable()
[PATH1] if(divider instanceof SpaceDrawable)=T -> return null
[PATH2] if(divider instanceof SpaceDrawable)=F -> return divider
[CALLS-EXTERNAL] LinearLayout.getDividerDrawable/0
... | /* static context
[FOCAL] @Override @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) public Drawable PageIndicatorView.getDividerDrawable()
[PATH1] if(divider instanceof SpaceDrawable)=T -> return null
[PATH2] if(divider instanceof SpaceDrawable)=F -> return divider
[CALLS-EXTERNAL] LinearLayout.getDividerDrawable/0
... | true | ok | {"focal": {"class": "PageIndicatorView", "name": "getDividerDrawable", "signature": "Drawable getDividerDrawable()", "start_line": 3, "modifiers": "@Override @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) public", "params": [], "return_type": "Drawable"}, "class_info": {"name": "PageIndicatorView", "kind": "class",... |
88944428_6 | class TracerResolver {
public static Tracer resolveTracer() {
return resolveTracer(null);
}
@Deprecated protected abstract Tracer resolve();
public static Tracer resolveTracer(ClassLoader classloader);
@Deprecated public static void reload();
private static boolean isDisabled();
priva... | writeServiceFile(TracerResolver.class, Mocks.NullTracerResolver.class);
assertThat(TracerResolver.resolveTracer(), is(nullValue()));
}
} | [FOCAL] public static Tracer TracerResolver.resolveTracer()
[CLASS] class TracerResolver
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Tracer resolveTracer(ClassLoader classloader)
[CLASS-MEMBERS] Tracer resolve(); Tracer resolveTracer(ClassLoader classloader); void reload(); boo... | /* static context
[FOCAL] public static Tracer TracerResolver.resolveTracer()
[CALLS-INTERNAL] Tracer resolveTracer(ClassLoader classloader)
*/
| /* static context
[FOCAL] public static Tracer TracerResolver.resolveTracer()
[CALLS-INTERNAL] Tracer resolveTracer(ClassLoader classloader)
*/
class TracerResolver {
public static Tracer resolveTracer() {
return resolveTracer(null);
}
@Deprecated protected abstract Tracer resolve();
public stati... | true | ok | {"focal": {"class": "TracerResolver", "name": "resolveTracer", "signature": "Tracer resolveTracer()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "Tracer"}, "class_info": {"name": "TracerResolver", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"nam... |
88962042_13 | class Transformers {
static ClassesTransformer<JavaClass> classes() {
return new AbstractClassesTransformer<JavaClass>("classes") {
@Override
public Iterable<JavaClass> doTransform(JavaClasses collection) {
return collection;
}
};
}
stati... | JavaClasses input = importClasses(Object.class, String.class);
DescribedIterable<JavaClass> output = Transformers.classes().transform(input);
assertThat(output).containsOnlyElementsOf(input);
}
} | [FOCAL] static ClassesTransformer<JavaClass> Transformers.classes()
[CLASS] class Transformers
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] AbstractClassesTransformer<JavaClass>
[CLASS-MEMBERS] ClassesTransformer<JavaMember> members(); ClassesTransformer<JavaField> fields(); ClassesTransfo... | /* static context
[FOCAL] static ClassesTransformer<JavaClass> Transformers.classes()
[NEW] AbstractClassesTransformer<JavaClass>
*/
| /* static context
[FOCAL] static ClassesTransformer<JavaClass> Transformers.classes()
[NEW] AbstractClassesTransformer<JavaClass>
*/
class Transformers {
static ClassesTransformer<JavaClass> classes() {
return new AbstractClassesTransformer<JavaClass>("classes") {
@Override
public I... | true | ok | {"focal": {"class": "Transformers", "name": "classes", "signature": "ClassesTransformer<JavaClass> classes()", "start_line": 3, "modifiers": "static", "params": [], "return_type": "ClassesTransformer<JavaClass>"}, "class_info": {"name": "Transformers", "kind": "class", "modifiers": "", "superclass": null, "interfaces":... |
88978812_18 | class ColorManager {
public Color nextColor(Color color) {
return successor.get(color);
}
@Inject public ColorManager(@Named("nrColors") int nrColors, ColorFactory factory);
private Color[] createColors();
private void createOrdering();
public Color firstColor();
public boolean t... | ColorManager manager = new ColorManager(NR_COLORS, Color::new);
Assert.assertNull(manager.nextColor(Color.none));
}
} | [FOCAL] public Color ColorManager.nextColor(Color color)
[CLASS] class ColorManager
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] successor.get/1
[INPUTS] branches=- | result=color
[COLLABORATORS] field successor get/1
[DATAFLOW] color@param->L2
[CLASS-MEMBERS] ColorManager(int n... | /* static context
[FOCAL] public Color ColorManager.nextColor(Color color)
[INPUTS] branches=- | result=color
[COLLABORATORS] field successor get/1
[CALLS-EXTERNAL] successor.get/1
*/
| /* static context
[FOCAL] public Color ColorManager.nextColor(Color color)
[INPUTS] branches=- | result=color
[COLLABORATORS] field successor get/1
[CALLS-EXTERNAL] successor.get/1
*/
class ColorManager {
public Color nextColor(Color color) {
return successor.get(color);
}
@Inject public ColorMan... | true | ok | {"focal": {"class": "ColorManager", "name": "nextColor", "signature": "Color nextColor(Color color)", "start_line": 3, "modifiers": "public", "params": [{"name": "color", "type": "Color"}], "return_type": "Color"}, "class_info": {"name": "ColorManager", "kind": "class", "modifiers": "", "superclass": null, "interfaces"... |
88985813_8 | class SnapshotPostProcessor {
long getConsistentApplicationModelVersion() {
long applicationModelVersion = 0;
if (m_beforePostProcessingVersion > 0) {
applicationModelVersion = m_beforePostProcessingVersion;
}
// since we already validate version after postprocessing no ... | SnapshotPostProcessor snapshotPostProcessor = new SnapshotPostProcessor((snapshot, storeName) -> snapshot);
assertThat(snapshotPostProcessor.getConsistentApplicationModelVersion()).isEqualTo(0L);
}
} | [FOCAL] long SnapshotPostProcessor.getConsistentApplicationModelVersion()
[CLASS] class SnapshotPostProcessor
[METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1
[PATH1] if(m_beforePostProcessingVersion > 0)=T -> if(m_afterPostProcessingVersion > 0)=T -> return applicationModelVersion
[PATH2] if(m_bef... | /* static context
[FOCAL] long SnapshotPostProcessor.getConsistentApplicationModelVersion()
[PATH1] if(m_beforePostProcessingVersion > 0)=T -> if(m_afterPostProcessingVersion > 0)=T -> return applicationModelVersion
[PATH2] if(m_beforePostProcessingVersion > 0)=F -> if(m_afterPostProcessingVersion > 0)=F -> return appl... | /* static context
[FOCAL] long SnapshotPostProcessor.getConsistentApplicationModelVersion()
[PATH1] if(m_beforePostProcessingVersion > 0)=T -> if(m_afterPostProcessingVersion > 0)=T -> return applicationModelVersion
[PATH2] if(m_beforePostProcessingVersion > 0)=F -> if(m_afterPostProcessingVersion > 0)=F -> return appl... | true | ok | {"focal": {"class": "SnapshotPostProcessor", "name": "getConsistentApplicationModelVersion", "signature": "long getConsistentApplicationModelVersion()", "start_line": 3, "modifiers": "", "params": [], "return_type": "long"}, "class_info": {"name": "SnapshotPostProcessor", "kind": "class", "modifiers": "", "superclass":... |
89108465_0 | class StringWritableCsv {
public static StringBuffer writeTo(StringBuffer sb, StringWritable... values) throws IllegalArgumentException {
checkNotNull(sb, "sb");
if(null == values || values.length == 0) {
return sb;
}
writeStringWritableToStringBuffer(values[0], sb);
... | assertTrue(StringWritableCsv.writeTo(new StringBuffer()).length() == 0);
assertTrue(StringWritableCsv.writeTo(new StringBuffer(), new CharAttributeValue[]{}).length() == 0);
}
} | [FOCAL] public static StringBuffer StringWritableCsv.writeTo(StringBuffer sb, StringWritable... values)
[CLASS] class StringWritableCsv
[METRICS] loc=16 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=1
[CALLS-INTERNAL] void writeStringWritableToStringBuffer(StringWritable value, StringBuffer sb)
[CALLS-EXTERNAL] ch... | /* static context
[FOCAL] public static StringBuffer StringWritableCsv.writeTo(StringBuffer sb, StringWritable... values)
[PATH1] if(null == values || values.length == 0)=F -> while(i < values.length)=T -> exit loop -> return sb
[PATH2] if(null == values || values.length == 0)=T -> return sb
[PATH3] if(null == values |... | /* static context
[FOCAL] public static StringBuffer StringWritableCsv.writeTo(StringBuffer sb, StringWritable... values)
[PATH1] if(null == values || values.length == 0)=F -> while(i < values.length)=T -> exit loop -> return sb
[PATH2] if(null == values || values.length == 0)=T -> return sb
[PATH3] if(null == values |... | true | ok | {"focal": {"class": "StringWritableCsv", "name": "writeTo", "signature": "StringBuffer writeTo(StringBuffer sb, StringWritable... values) throws IllegalArgumentException", "start_line": 3, "modifiers": "public static", "params": [{"name": "sb", "type": "StringBuffer"}, {"name": "values", "type": "StringWritable..."}], ... |
89138130_116 | class FilterParser extends StringParser {
public static SnowFilter parse(String text) throws StringParseException {
FilterParser parser = new FilterParser(text);
SnowFilter retval = new SnowFilter();
// This keeps track of whether the currently built clause is to be placed in the filter with an AND. If ... | String text = "install_status != 7 ^ install_status != 8 ^ ci.sys_class_name = u_notebook_pc ^OR ci.sys_class_name = u_tablet_pc ^OR ci.sys_class_name = u_thin_client_pc ^OR ci.sys_class_name = cmdb_ci_desktop_pc ^OR ci.sys_class_name = u_computer_pc ^OR ci.sys_class_name = u_cmdb_virtual_pc ^ ci.u_compensation_cod... | [FOCAL] public static SnowFilter FilterParser.parse(String text)
[CLASS] class FilterParser extends StringParser
[METRICS] loc=224 cc=45 branches=37 loops=1 returns=1 throws=5 nesting=20
[CALLS-INTERNAL] String readValue(FilterParser parser)
[CALLS-EXTERNAL] FilterParser.eof/0, FilterParser.skipWhitespace/0, FilterPars... | class FilterParser extends StringParser {
public static SnowFilter parse(String text) throws StringParseException {
FilterParser parser = new FilterParser(text);
SnowFilter retval = new SnowFilter();
// This keeps track of whether the currently built clause is to be placed in the filter with an AND. If ... | false | ok | {"focal": {"class": "FilterParser", "name": "parse", "signature": "SnowFilter parse(String text) throws StringParseException", "start_line": 3, "modifiers": "public static", "params": [{"name": "text", "type": "String"}], "return_type": "SnowFilter"}, "class_info": {"name": "FilterParser", "kind": "class", "modifiers":... | |
89139973_10 | class CookieTray implements CookieStore {
@Override
public synchronized void add(URI associatedUri, HttpCookie cookie) {
URI uri = new OriginUri(cookie, associatedUri).uri();
Set<HttpCookie> targetCookies = cookiesCache.get(uri);
if (targetCookies == null) {
targetCookies =... | URI uri = URI.create("http://google.com");
CookieStore store = new CookieTray(preferences);
HttpCookie httpCookie = new HttpCookie("name", "value");
store.add(uri, httpCookie);
String cookieVal = new SerializableCookie(httpCookie).asString();
verify(editor).putString(uri.... | [FOCAL] @Override public synchronized void CookieTray.add(URI associatedUri, HttpCookie cookie)
[CLASS] class CookieTray implements CookieStore
[METRICS] loc=14 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] void persistCookie(URI uri, HttpCookie cookie)
[CALLS-EXTERNAL] new OriginUri(cookie, ass... | /* static context
[FOCAL] @Override public synchronized void CookieTray.add(URI associatedUri, HttpCookie cookie)
[PATH1] if(targetCookies == null)=T
[PATH2] if(targetCookies == null)=F
[INPUTS] branches=associatedUri, cookie | result=-
[COLLABORATORS] field cookiesCache get/1,put/2
[CALLS-INTERNAL] void persistCookie(... | /* static context
[FOCAL] @Override public synchronized void CookieTray.add(URI associatedUri, HttpCookie cookie)
[PATH1] if(targetCookies == null)=T
[PATH2] if(targetCookies == null)=F
[INPUTS] branches=associatedUri, cookie | result=-
[COLLABORATORS] field cookiesCache get/1,put/2
[CALLS-INTERNAL] void persistCookie(... | true | ok | {"focal": {"class": "CookieTray", "name": "add", "signature": "void add(URI associatedUri, HttpCookie cookie)", "start_line": 3, "modifiers": "@Override public synchronized", "params": [{"name": "associatedUri", "type": "URI"}, {"name": "cookie", "type": "HttpCookie"}], "return_type": "void"}, "class_info": {"name": "C... |
89188081_1 | class LocaleChangerDelegate {
void initialize() {
Locale persistedLocale = persistor.load();
if (persistedLocale != null)
try {
currentLocale = resolver.resolve(persistedLocale);
} catch (UnsupportedLocaleException e) {
persistedLocale = null... | // Given
doReturn(null).when(localePersistor).load();
// When
sut.initialize();
// Then
verify(localeResolver).resolveDefault();
}
} | [FOCAL] void LocaleChangerDelegate.initialize()
[CLASS] class LocaleChangerDelegate
[METRICS] loc=20 cc=4 branches=2 loops=0 returns=0 throws=0 nesting=2
[CALLS-EXTERNAL] persistor.load/0, resolver.resolve/1, resolver.resolveDefault/0, DefaultResolvedLocalePair.getResolvedLocale/0, persistor.save/1, DefaultResolvedLoca... | /* static context
[FOCAL] void LocaleChangerDelegate.initialize()
[PATH1] if(persistedLocale != null)=T -> try-body throws -> if(persistedLocale == null)=T
[PATH2] if(persistedLocale != null)=F -> if(persistedLocale == null)=F
[COLLABORATORS] field persistor load/0,save/1; field resolver resolve/1,resolveDefault/0; fie... | /* static context
[FOCAL] void LocaleChangerDelegate.initialize()
[PATH1] if(persistedLocale != null)=T -> try-body throws -> if(persistedLocale == null)=T
[PATH2] if(persistedLocale != null)=F -> if(persistedLocale == null)=F
[COLLABORATORS] field persistor load/0,save/1; field resolver resolve/1,resolveDefault/0; fie... | true | ok | {"focal": {"class": "LocaleChangerDelegate", "name": "initialize", "signature": "void initialize()", "start_line": 3, "modifiers": "", "params": [], "return_type": "void"}, "class_info": {"name": "LocaleChangerDelegate", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "ANY_... |
89198062_28 | class JNDIStateFactoryImpl implements StateFactory {
public Object getStateToBind(Object orig, Name name, Context ctx,
Hashtable<?,?> env) throws NamingException
{
if (orig instanceof org.omg.CORBA.Object) {
return orig;
}
if (!(orig instanceof Remote)) {
... | assertThat(impl.getStateToBind(new Object(), null, null, env), nullValue());
}
} | [FOCAL] public Object JNDIStateFactoryImpl.getStateToBind(Object orig, Name name, Context ctx, Hashtable<?,?> env)
[CLASS] class JNDIStateFactoryImpl implements StateFactory
[METRICS] loc=49 cc=8 branches=5 loops=0 returns=6 throws=0 nesting=3
[CALLS-INTERNAL] ORB getORB(Context ctx)
[CALLS-EXTERNAL] PortableRemoteObje... | /* static context
[FOCAL] public Object JNDIStateFactoryImpl.getStateToBind(Object orig, Name name, Context ctx, Hashtable<?,?> env)
[PATH1] if(orig instanceof org.omg.CORBA.Object)=F -> if(!(orig instanceof Remote))=F -> if(orb == null)=F -> if(StubAdapter.isStub( stub ))=T -> try-body throws -> if(!(exc instanceof ja... | /* static context
[FOCAL] public Object JNDIStateFactoryImpl.getStateToBind(Object orig, Name name, Context ctx, Hashtable<?,?> env)
[PATH1] if(orig instanceof org.omg.CORBA.Object)=F -> if(!(orig instanceof Remote))=F -> if(orb == null)=F -> if(StubAdapter.isStub( stub ))=T -> try-body throws -> if(!(exc instanceof ja... | true | ok | {"focal": {"class": "JNDIStateFactoryImpl", "name": "getStateToBind", "signature": "Object getStateToBind(Object orig, Name name, Context ctx, Hashtable<?,?> env) throws NamingException", "start_line": 3, "modifiers": "public", "params": [{"name": "orig", "type": "Object"}, {"name": "name", "type": "Name"}, {"name": "c... |
89208595_2 | class IdentityGenerator {
public static long generate() {
return generate(DEFAULT_SHARD_ID);
}
private IdentityGenerator();
public static Instant extractInstant(long id);
public static byte extractShardId(long id);
public static long generate(byte shardId);
static long doGenerate(byte shardId, lon... | ExecutorService executorService = Executors.newFixedThreadPool(100);
final int NUM_IDS = 1_000_000;
final ConcurrentMap<Long, AtomicInteger> collisionMap = new ConcurrentHashMap<Long, AtomicInteger>(NUM_IDS);
for (int i = 0; i < NUM_IDS; i++) {
executorService.submit(new Runnable() {
@Ov... | [FOCAL] public static long IdentityGenerator.generate()
[CLASS] class IdentityGenerator
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] long generate(byte shardId)
[CLASS-MEMBERS] IdentityGenerator(); Instant extractInstant(long id); byte extractShardId(long id); long generate(byte... | /* static context
[FOCAL] public static long IdentityGenerator.generate()
[CALLS-INTERNAL] long generate(byte shardId)
*/
| /* static context
[FOCAL] public static long IdentityGenerator.generate()
[CALLS-INTERNAL] long generate(byte shardId)
*/
class IdentityGenerator {
public static long generate() {
return generate(DEFAULT_SHARD_ID);
}
private IdentityGenerator();
public static Instant extractInstant(long id);
public st... | true | ok | {"focal": {"class": "IdentityGenerator", "name": "generate", "signature": "long generate()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "long"}, "class_info": {"name": "IdentityGenerator", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "LOG... |
89212553_9 | class Director implements Iterable<Stage> {
@NonNull
public Stage direct(@NonNull ViewGroup container) {
return direct(container, container.getId());
}
Director();
@NonNull public static Director hire(@NonNull Activity activity, @Nullable Bundle savedInstanceState);
public boolean contains(int id);... | ViewGroup container1 = new TestContainer(RuntimeEnvironment.application);
ViewGroup container2 = new TestContainer(RuntimeEnvironment.application);
@IdRes int containerId1 = 1;
@IdRes int containerId2 = 2;
container1.setId(containerId1);
container2.setId(containerId2);
Stage stage1 = direct... | [FOCAL] @NonNull public Stage Director.direct(ViewGroup container)
[CLASS] class Director implements Iterable<Stage>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Stage direct(ViewGroup container, int id)
[CALLS-EXTERNAL] ViewGroup.getId/0
[INPUTS] branches=- | result=container
[... | /* static context
[FOCAL] @NonNull public Stage Director.direct(ViewGroup container)
[INPUTS] branches=- | result=container
[COLLABORATORS] param container:ViewGroup getId/0
[CALLS-INTERNAL] Stage direct(ViewGroup container, int id)
[CALLS-EXTERNAL] ViewGroup.getId/0
*/
| /* static context
[FOCAL] @NonNull public Stage Director.direct(ViewGroup container)
[INPUTS] branches=- | result=container
[COLLABORATORS] param container:ViewGroup getId/0
[CALLS-INTERNAL] Stage direct(ViewGroup container, int id)
[CALLS-EXTERNAL] ViewGroup.getId/0
*/
class Director implements Iterable<Stage> {
@N... | true | ok | {"focal": {"class": "Director", "name": "direct", "signature": "Stage direct(ViewGroup container)", "start_line": 3, "modifiers": "@NonNull public", "params": [{"name": "container", "type": "ViewGroup"}], "return_type": "Stage"}, "class_info": {"name": "Director", "kind": "class", "modifiers": "", "superclass": null, "... |
89217740_4 | class ClusterPlacement {
static List<Cluster> filterClusters(
List<Cluster> clusters,
List<ClusterPlacement> allPlacements) {
Set<String> clusterPlacements = allPlacements.stream()
.map(ClusterPlacement::token)
.collect(toSet());
return clusters.stream()
.filter(cluster -... |
final List<ClusterPlacement> clusterPlacements =
Arrays.asList(new ClusterPlacementBuilder().clusterNumber(0).clusterGeneration(1).build(),
new ClusterPlacementBuilder().clusterNumber(1).clusterGeneration(1).build(),
new ClusterPlacementBuilder().clusterNumber(2).clusterGeneration(0... | [FOCAL] static List<Cluster> ClusterPlacement.filterClusters(List<Cluster> clusters, List<ClusterPlacement> allPlacements)
[CLASS] class ClusterPlacement
[METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] ClusterPlacement placement(Cluster cluster)
[CALLS-EXTERNAL] allPlacements.stre... | /* static context
[FOCAL] static List<Cluster> ClusterPlacement.filterClusters(List<Cluster> clusters, List<ClusterPlacement> allPlacements)
[INPUTS] branches=- | result=allPlacements, clusters
[COLLABORATORS] param allPlacements:List<ClusterPlacement> stream/0; param clusters:List<Cluster> stream/0
[CALLS-INTERNAL] Cl... | /* static context
[FOCAL] static List<Cluster> ClusterPlacement.filterClusters(List<Cluster> clusters, List<ClusterPlacement> allPlacements)
[INPUTS] branches=- | result=allPlacements, clusters
[COLLABORATORS] param allPlacements:List<ClusterPlacement> stream/0; param clusters:List<Cluster> stream/0
[CALLS-INTERNAL] Cl... | true | ok | {"focal": {"class": "ClusterPlacement", "name": "filterClusters", "signature": "List<Cluster> filterClusters(List<Cluster> clusters, List<ClusterPlacement> allPlacements)", "start_line": 3, "modifiers": "static", "params": [{"name": "clusters", "type": "List<Cluster>"}, {"name": "allPlacements", "type": "List<ClusterPl... |
89221572_36 | class StreamUtils {
public static <T> T lz4Stream(
InputStream is, final int expectedSize, final BytesConsumer<T> consumer) throws IOException {
is = ensureMarkSupported(is);
if (isCompressed(is)) {
return readStream(is, expectedSize, consumer);
} else {
final FastByteArrayOutputStream ... | final byte[] bytes =
StreamUtils.lz4Stream(
new ByteArrayInputStream(testRecordingZippedBytes),
DEFAULT_EXPECTED_SIZE,
CONSUME_TO_BYTES);
assertArrayEquals(testRecordingZippedBytes, bytes);
}
} | [FOCAL] public static T StreamUtils.lz4Stream(InputStream is, int expectedSize, BytesConsumer<T> consumer)
[CLASS] class StreamUtils
[METRICS] loc=18 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=2
[CALLS-INTERNAL] InputStream ensureMarkSupported(InputStream is); T readStream(InputStream is, int expectedSize, Byte... | /* static context
[FOCAL] public static T StreamUtils.lz4Stream(InputStream is, int expectedSize, BytesConsumer<T> consumer)
[PATH1] if(isCompressed(is))=T -> return readStream(is, expectedSize, consumer)
[PATH2] if(isCompressed(is))=F -> return baos.consume(consumer)
[INPUTS] branches=is | result=consumer, expectedSiz... | /* static context
[FOCAL] public static T StreamUtils.lz4Stream(InputStream is, int expectedSize, BytesConsumer<T> consumer)
[PATH1] if(isCompressed(is))=T -> return readStream(is, expectedSize, consumer)
[PATH2] if(isCompressed(is))=F -> return baos.consume(consumer)
[INPUTS] branches=is | result=consumer, expectedSiz... | true | ok | {"focal": {"class": "StreamUtils", "name": "lz4Stream", "signature": "T lz4Stream(InputStream is, int expectedSize, BytesConsumer<T> consumer) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "is", "type": "InputStream"}, {"name": "expectedSize", "type": "int"}, {"name": "consumer... |
89231271_0 | class UriTemplateParser {
public static void parse(String template, Handler handler) {
assert template != null;
assert handler != null;
int pos = 0;
final int length = template.length();
State state = State.OutsideParam;
StringBuilder builder = new StringBuilder();
while (pos < length) {
char c = tem... | UriTemplateParser.parse("{a}/bc", handler);
verify(handler).handleParam("a");
verify(handler).handleText("/bc");
verifyNoMoreInteractions(handler);
}
} | [FOCAL] public static void UriTemplateParser.parse(String template, Handler handler)
[CLASS] class UriTemplateParser
[METRICS] loc=49 cc=11 branches=7 loops=1 returns=0 throws=0 nesting=4
[CALLS-EXTERNAL] String.length/0, String.charAt/1, StringBuilder.length/0, Handler.handleParam/1, StringBuilder.toString/0, StringBu... | /* static context
[FOCAL] public static void UriTemplateParser.parse(String template, Handler handler)
[PATH1] while(pos < length)=T -> switch(state)#1=case InsideParam -> if(c == '}')=T -> if(builder.length() > 0)#1=T -> exit loop -> if(builder.length() > 0)#3=T -> switch(state)#2=case InsideParam
[PATH2] while(pos < ... | /* static context
[FOCAL] public static void UriTemplateParser.parse(String template, Handler handler)
[PATH1] while(pos < length)=T -> switch(state)#1=case InsideParam -> if(c == '}')=T -> if(builder.length() > 0)#1=T -> exit loop -> if(builder.length() > 0)#3=T -> switch(state)#2=case InsideParam
[PATH2] while(pos < ... | true | ok | {"focal": {"class": "UriTemplateParser", "name": "parse", "signature": "void parse(String template, Handler handler)", "start_line": 3, "modifiers": "public static", "params": [{"name": "template", "type": "String"}, {"name": "handler", "type": "Handler"}], "return_type": "void"}, "class_info": {"name": "UriTemplatePar... |
89233128_4 | class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
public VariableElement[] getEnumConstants(TypeElement clazz) {
List<? extends Element> elements = env.getElementUtils().getAllMembers(clazz);
Collection<VariableElement> constants = new ArrayList<V... |
new Expectations() {
{
//The primitiveType is irrelevant for getEnumConstants() operations
env.getTypeUtils().getPrimitiveType(TypeKind.BYTE); result = (PrimitiveType) null;
//enumElements needs to return ENUM_CONSTANT for getEnumConstants() to work p... | [FOCAL] public VariableElement[] ApNavigator.getEnumConstants(TypeElement clazz)
[CLASS] class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement>
[METRICS] loc=10 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] env.getElementUtils().getAllMembers/1, env.g... | /* static context
[FOCAL] public VariableElement[] ApNavigator.getEnumConstants(TypeElement clazz)
[PATH1] foreach(Element element : elements)=T -> if(element.getKind().equals(ElementKind.ENUM_CONSTANT))=T -> exit loop -> return constants.toArray(new VariableElement[constants.size()])
[PATH2] foreach(Element element : ... | /* static context
[FOCAL] public VariableElement[] ApNavigator.getEnumConstants(TypeElement clazz)
[PATH1] foreach(Element element : elements)=T -> if(element.getKind().equals(ElementKind.ENUM_CONSTANT))=T -> exit loop -> return constants.toArray(new VariableElement[constants.size()])
[PATH2] foreach(Element element : ... | true | ok | {"focal": {"class": "ApNavigator", "name": "getEnumConstants", "signature": "VariableElement[] getEnumConstants(TypeElement clazz)", "start_line": 3, "modifiers": "public", "params": [{"name": "clazz", "type": "TypeElement"}], "return_type": "VariableElement[]"}, "class_info": {"name": "ApNavigator", "kind": "class", "... |
89239936_2 | class HttpRequestLog {
public static RequestLog getRequestLog(String name) {
String lookup = serverToComponent.get(name);
if (lookup != null) {
name = lookup;
}
String loggerName = "http.requests." + name;
String appenderName = name + "requestlog";
Log logger = LogFactory.getLog(logger... | HttpRequestLogAppender requestLogAppender = new HttpRequestLogAppender();
requestLogAppender.setName("testrequestlog");
Logger.getLogger("http.requests.test").addAppender(requestLogAppender);
RequestLog requestLog = HttpRequestLog.getRequestLog("test");
Logger.getLogger("http.requests.test").removeA... | [FOCAL] public static RequestLog HttpRequestLog.getRequestLog(String name)
[CLASS] class HttpRequestLog
[METRICS] loc=47 cc=6 branches=4 loops=0 returns=4 throws=1 nesting=2
[CALLS-EXTERNAL] serverToComponent.get/1, LogFactory.getLog/1, Log4JLogger.getLogger/0, Logger.getAppender/1, LOG.warn/1, LOG.info/1, NCSARequestL... | /* static context
[FOCAL] public static RequestLog HttpRequestLog.getRequestLog(String name)
[THROWS-WHEN] e when lookup != null && logger instanceof Log4JLogger && try-body throws
[THROWS-WHEN] e when !(lookup != null) && logger instanceof Log4JLogger && try-body throws
[PATH1] if(lookup != null)=T -> if(logger instan... | /* static context
[FOCAL] public static RequestLog HttpRequestLog.getRequestLog(String name)
[THROWS-WHEN] e when lookup != null && logger instanceof Log4JLogger && try-body throws
[THROWS-WHEN] e when !(lookup != null) && logger instanceof Log4JLogger && try-body throws
[PATH1] if(lookup != null)=T -> if(logger instan... | true | ok | {"focal": {"class": "HttpRequestLog", "name": "getRequestLog", "signature": "RequestLog getRequestLog(String name)", "start_line": 3, "modifiers": "public static", "params": [{"name": "name", "type": "String"}], "return_type": "RequestLog"}, "class_info": {"name": "HttpRequestLog", "kind": "class", "modifiers": "", "su... |
89252015_0 | class WsImportMojo extends AbstractJaxwsMojo {
static String getActiveHttpProxy(Settings s) {
String retVal = null;
for (Proxy p : s.getProxies()) {
if (p.isActive() && "http".equals(p.getProtocol())) {
StringBuilder sb = new StringBuilder();
String user ... | SettingsXpp3Reader r = new SettingsXpp3Reader();
Settings s = r.read(WsImportMojoTest.class.getResourceAsStream("proxy1.xml"));
String proxyString = WsImportMojo.getActiveHttpProxy(s);
Assert.assertEquals(proxyString, "proxyActive:8099");
s = r.read(WsImportMojoTest.clas... | [FOCAL] static String WsImportMojo.getActiveHttpProxy(Settings s)
[CLASS] class WsImportMojo extends AbstractJaxwsMojo
[METRICS] loc=24 cc=5 branches=3 loops=1 returns=1 throws=0 nesting=4
[CALLS-EXTERNAL] Settings.getProxies/0, Proxy.isActive/0, "http".equals/1, Proxy.getProtocol/0, Proxy.getUsername/0, Proxy.getPassw... | /* static context
[FOCAL] static String WsImportMojo.getActiveHttpProxy(Settings s)
[PATH1] foreach(Proxy p : s.getProxies())=T -> if(p.isActive() && "http".equals(p.getProtocol()))=T -> if(user != null)=T -> if(pwd != null)=T -> return retVal
[PATH2] foreach(Proxy p : s.getProxies())=T -> if(p.isActive() && "http".equ... | /* static context
[FOCAL] static String WsImportMojo.getActiveHttpProxy(Settings s)
[PATH1] foreach(Proxy p : s.getProxies())=T -> if(p.isActive() && "http".equals(p.getProtocol()))=T -> if(user != null)=T -> if(pwd != null)=T -> return retVal
[PATH2] foreach(Proxy p : s.getProxies())=T -> if(p.isActive() && "http".equ... | true | ok | {"focal": {"class": "WsImportMojo", "name": "getActiveHttpProxy", "signature": "String getActiveHttpProxy(Settings s)", "start_line": 3, "modifiers": "static", "params": [{"name": "s", "type": "Settings"}], "return_type": "String"}, "class_info": {"name": "WsImportMojo", "kind": "class", "modifiers": "", "superclass": ... |
89259438_0 | class TracingHttpClientBuilder extends HttpClientBuilder {
public TracingHttpClientBuilder disableInjection() {
this.injectDisabled = true;
return this;
}
public TracingHttpClientBuilder();
public TracingHttpClientBuilder(
RedirectStrategy redirectStrategy,
boolean re... | {
HttpClient client = ((TracingHttpClientBuilder)clientBuilder).disableInjection().build();
client.execute(new HttpGet(serverUrl(RedirectHandler.MAPPING)));
}
List<MockSpan> mockSpans = mockTracer.finishedSpans();
Assert.assertEquals(3, mockSpans.size());
... | [FOCAL] public TracingHttpClientBuilder TracingHttpClientBuilder.disableInjection()
[CLASS] class TracingHttpClientBuilder extends HttpClientBuilder
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[FIELDS] write=injectDisabled
[STATE] injectDisabled
[CLASS-MEMBERS] TracingHttpClientBuilder(); Traci... | /* static context
[FOCAL] public TracingHttpClientBuilder TracingHttpClientBuilder.disableInjection()
[STATE] injectDisabled
[FIELDS] write=injectDisabled
*/
| /* static context
[FOCAL] public TracingHttpClientBuilder TracingHttpClientBuilder.disableInjection()
[STATE] injectDisabled
[FIELDS] write=injectDisabled
*/
class TracingHttpClientBuilder extends HttpClientBuilder {
public TracingHttpClientBuilder disableInjection() {
this.injectDisabled = true;
r... | true | ok | {"focal": {"class": "TracingHttpClientBuilder", "name": "disableInjection", "signature": "TracingHttpClientBuilder disableInjection()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "TracingHttpClientBuilder"}, "class_info": {"name": "TracingHttpClientBuilder", "kind": "class", "modifiers": "", "... |
89302682_1 | class WXBizMsgCrypt {
public String encrypt(String randomStr, String text) throws AesException {
ByteGroup byteCollector = new ByteGroup();
byte[] randomStrBytes = randomStr.getBytes(CHARSET);
byte[] textBytes = text.getBytes(CHARSET);
byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length);
byte... | try {
WXBizMsgCrypt pc = new WXBizMsgCrypt(token, encodingAesKey, appId);
assertEquals(afterAesEncrypt2, pc.encrypt(randomStr, replyMsg2));
} catch (AesException e) {
e.printStackTrace();
fail("no异常");
}
}
} | [FOCAL] public String WXBizMsgCrypt.encrypt(String randomStr, String text)
[CLASS] class WXBizMsgCrypt
[METRICS] loc=39 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] byte[] getNetworkBytesOrder(int sourceNumber)
[CALLS-EXTERNAL] String.getBytes/1, ByteGroup.addBytes/1, PKCS7Encoder.encode/1, Byt... | /* static context
[FOCAL] public String WXBizMsgCrypt.encrypt(String randomStr, String text)
[THROWS-WHEN] AesException when try-body throws
[PATH1] try-body throws -> throw new AesException(AesException.EncryptAESError)
[PATH2] return base64Encrypted
[COLLABORATORS] field appId:String getBytes/1; field base64 encodeTo... | /* static context
[FOCAL] public String WXBizMsgCrypt.encrypt(String randomStr, String text)
[THROWS-WHEN] AesException when try-body throws
[PATH1] try-body throws -> throw new AesException(AesException.EncryptAESError)
[PATH2] return base64Encrypted
[COLLABORATORS] field appId:String getBytes/1; field base64 encodeTo... | true | ok | {"focal": {"class": "WXBizMsgCrypt", "name": "encrypt", "signature": "String encrypt(String randomStr, String text) throws AesException", "start_line": 3, "modifiers": "public", "params": [{"name": "randomStr", "type": "String"}, {"name": "text", "type": "String"}], "return_type": "String"}, "class_info": {"name": "WXB... |
89335647_1 | class MainActivityPresenter implements MainActivityContract.Presenter {
@VisibleForTesting
void checkAndroidVersionCompatibility() {
if (!supportedByArtist()) {
mView.showIncompatibleAndroidVersionDialog();
}
}
MainActivityPresenter(MainActivityContract.View view,
... | setFinalStatic(Build.VERSION.class.getField("SDK_INT"), Build.VERSION_CODES.N);
mPresenter.checkAndroidVersionCompatibility();
verify(mView, never()).showIncompatibleAndroidVersionDialog();
}
} | [FOCAL] @VisibleForTesting void MainActivityPresenter.checkAndroidVersionCompatibility()
[CLASS] class MainActivityPresenter implements MainActivityContract.Presenter
[METRICS] loc=6 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] boolean supportedByArtist()
[CALLS-EXTERNAL] MainActivityContract.V... | /* static context
[FOCAL] @VisibleForTesting void MainActivityPresenter.checkAndroidVersionCompatibility()
[PATH1] if(!supportedByArtist())=T
[PATH2] if(!supportedByArtist())=F
[COLLABORATORS] field mView:MainActivityContract.View showIncompatibleAndroidVersionDialog/0
[CALLS-INTERNAL] boolean supportedByArtist()
[FIEL... | /* static context
[FOCAL] @VisibleForTesting void MainActivityPresenter.checkAndroidVersionCompatibility()
[PATH1] if(!supportedByArtist())=T
[PATH2] if(!supportedByArtist())=F
[COLLABORATORS] field mView:MainActivityContract.View showIncompatibleAndroidVersionDialog/0
[CALLS-INTERNAL] boolean supportedByArtist()
[FIEL... | true | ok | {"focal": {"class": "MainActivityPresenter", "name": "checkAndroidVersionCompatibility", "signature": "void checkAndroidVersionCompatibility()", "start_line": 3, "modifiers": "@VisibleForTesting", "params": [], "return_type": "void"}, "class_info": {"name": "MainActivityPresenter", "kind": "class", "modifiers": "", "su... |
89412712_8 | class PropUtil {
public static boolean getBooleanProperty(Properties props,
String name, boolean def) {
return getBoolean(getProp(props, name), def);
}
private PropUtil();
public static int getIntProperty(Properties props, String name, int def);
@Deprecated public static int getIntSessionPr... | Properties props = new Properties();
props.put("test", true);
assertTrue(PropUtil.getBooleanProperty(props, "test", false));
}
} | [FOCAL] public static boolean PropUtil.getBooleanProperty(Properties props, String name, boolean def)
[CLASS] class PropUtil
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Object getProp(Properties props, String name); boolean getBoolean(Object value, boolean def)
[INPUTS] branche... | /* static context
[FOCAL] public static boolean PropUtil.getBooleanProperty(Properties props, String name, boolean def)
[INPUTS] branches=- | result=def, name, props
[CALLS-INTERNAL] Object getProp(Properties props, String name); boolean getBoolean(Object value, boolean def)
*/
| /* static context
[FOCAL] public static boolean PropUtil.getBooleanProperty(Properties props, String name, boolean def)
[INPUTS] branches=- | result=def, name, props
[CALLS-INTERNAL] Object getProp(Properties props, String name); boolean getBoolean(Object value, boolean def)
*/
class PropUtil {
public static boole... | true | ok | {"focal": {"class": "PropUtil", "name": "getBooleanProperty", "signature": "boolean getBooleanProperty(Properties props, String name, boolean def)", "start_line": 3, "modifiers": "public static", "params": [{"name": "props", "type": "Properties"}, {"name": "name", "type": "String"}, {"name": "def", "type": "boolean"}],... |
89435838_9 | class FileTransfer implements WritableMessage {
@Override
public int remaining() {
return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len);
}
public FileTransfer(final File f);
public FileTransfer(final File f, final long pos, final long len);
public long writeTo(final Wr... | TCPNIOTransport t = TCPNIOTransportBuilder.newInstance().build();
FilterChainBuilder builder = FilterChainBuilder.stateless();
final File f = generateTempFile(1024 * 1024);
builder.add(new TransportFilter());
builder.add(new BaseFilter() {
@Override
public... | [FOCAL] @Override public int FileTransfer.remaining()
[CLASS] class FileTransfer implements WritableMessage
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] FileTransfer(File f); FileTransfer(File f, long pos, long len); long writeTo(WritableByteChannel c); boolean hasRemaining(); bo... | /* static context
[FOCAL] @Override public int FileTransfer.remaining()
*/
| /* static context
[FOCAL] @Override public int FileTransfer.remaining()
*/
class FileTransfer implements WritableMessage {
@Override
public int remaining() {
return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len);
}
public FileTransfer(final File f);
public FileTransfer(final... | true | ok | {"focal": {"class": "FileTransfer", "name": "remaining", "signature": "int remaining()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "int"}, "class_info": {"name": "FileTransfer", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "WritableMessage", "fields": [{"name"... |
89485344_21 | class BankingDateInformation {
public double getAmountDelta() {
double amountDelta = 0.0;
for (Transaction transaction : this.transactionSupplier.getAll()) {
amountDelta += transaction.booking().getAmount();
}
return amountDelta;
}
public BankingDateInformation... | // SETUP
double amount = 123.456;
double amount1 = 500.00;
double amount2 = -100.00;
Booking booking1 = new Booking(new Date(), amount1);
Transaction transaction1 = new Transaction("some name","some id",booking1);
Booking booking2 = new Booking(new Date(), amoun... | [FOCAL] public double BankingDateInformation.getAmountDelta()
[CLASS] class BankingDateInformation
[METRICS] loc=7 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] this.transactionSupplier.getAll/0, transaction.booking().getAmount/0, Transaction.booking/0
[FIELDS] read=transactionSupplier
[PATH1] f... | /* static context
[FOCAL] public double BankingDateInformation.getAmountDelta()
[PATH1] foreach(Transaction transaction : this.transactionSupplier.getAll())=T -> exit loop -> return amountDelta
[PATH2] foreach(Transaction transaction : this.transactionSupplier.getAll())=F -> return amountDelta
[COLLABORATORS] field tra... | /* static context
[FOCAL] public double BankingDateInformation.getAmountDelta()
[PATH1] foreach(Transaction transaction : this.transactionSupplier.getAll())=T -> exit loop -> return amountDelta
[PATH2] foreach(Transaction transaction : this.transactionSupplier.getAll())=F -> return amountDelta
[COLLABORATORS] field tra... | true | ok | {"focal": {"class": "BankingDateInformation", "name": "getAmountDelta", "signature": "double getAmountDelta()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "double"}, "class_info": {"name": "BankingDateInformation", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fiel... |
89507222_6 | class AuthMigrator {
public Task<Void> migrate(boolean cleanupDigitsSession) {
final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser();
final String sessionJson = mStorageHelpers.getDigitsSessionJson();
final Context context = mApp.getApplicationContext();
final RedeemableDi... | when(mockFirebaseAuth.getCurrentUser()).thenReturn(mockFirebaseUser);
AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers,
mockFirebaseAuth);
assertTrue(authMigrator.migrate(false).isSuccessful());
verify(mockStorageHelpers, times(0)).clearDi... | [FOCAL] public Task<Void> AuthMigrator.migrate(boolean cleanupDigitsSession)
[CLASS] class AuthMigrator
[METRICS] loc=44 cc=4 branches=2 loops=0 returns=4 throws=0 nesting=1
[CALLS-INTERNAL] Task<Void> cleanupAndCreateEmptyResult(boolean cleanupDigitsSession)
[CALLS-EXTERNAL] mFirebaseAuth.getCurrentUser/0, mStorageHel... | /* static context
[FOCAL] public Task<Void> AuthMigrator.migrate(boolean cleanupDigitsSession)
[PATH1] if(currentUser != null)=F -> if(sessionJson == null)=F -> try-body throws -> return cleanupAndCreateEmptyResult(cleanupDigitsSession)
[PATH2] if(currentUser != null)=T -> return cleanupAndCreateEmptyResult(cleanupDigi... | /* static context
[FOCAL] public Task<Void> AuthMigrator.migrate(boolean cleanupDigitsSession)
[PATH1] if(currentUser != null)=F -> if(sessionJson == null)=F -> try-body throws -> return cleanupAndCreateEmptyResult(cleanupDigitsSession)
[PATH2] if(currentUser != null)=T -> return cleanupAndCreateEmptyResult(cleanupDigi... | true | ok | {"focal": {"class": "AuthMigrator", "name": "migrate", "signature": "Task<Void> migrate(boolean cleanupDigitsSession)", "start_line": 3, "modifiers": "public", "params": [{"name": "cleanupDigitsSession", "type": "boolean"}], "return_type": "Task<Void>"}, "class_info": {"name": "AuthMigrator", "kind": "class", "modifier... |
89576260_7 | class JobCallbackUtil {
public static boolean isThereJobCallbackProperty(Props props,
JobCallbackStatusEnum status) {
if (props == null || status == null) {
throw new NullPointerException("One of the argument is null");
}
String jobCallBackUrl = firstJobcallbackPropertyMap.get(status);
... | Props props = new Props();
props.put("abc", "def");
Assert.assertFalse(JobCallbackUtil.isThereJobCallbackProperty(props,
JobCallbackStatusEnum.STARTED));
Assert.assertFalse(JobCallbackUtil.isThereJobCallbackProperty(props,
JobCallbackStatusEnum.COMPLETED));
Assert.assertFalse(JobC... | [FOCAL] public static boolean JobCallbackUtil.isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status)
[CLASS] class JobCallbackUtil
[METRICS] loc=10 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] firstJobcallbackPropertyMap.get/1, Props.containsKey/1
[NEW] NullPointerException
[EXCE... | /* static context
[FOCAL] public static boolean JobCallbackUtil.isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status)
[THROWS-WHEN] NullPointerException when props == null || status == null
[PATH1] if(props == null || status == null)=T -> throw new NullPointerException("One of the argument is null")
[PA... | /* static context
[FOCAL] public static boolean JobCallbackUtil.isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status)
[THROWS-WHEN] NullPointerException when props == null || status == null
[PATH1] if(props == null || status == null)=T -> throw new NullPointerException("One of the argument is null")
[PA... | true | ok | {"focal": {"class": "JobCallbackUtil", "name": "isThereJobCallbackProperty", "signature": "boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status)", "start_line": 3, "modifiers": "public static", "params": [{"name": "props", "type": "Props"}, {"name": "status", "type": "JobCallbackStatusEnum"}], "... |
89607184_16 | class ManageManagerController {
@GetMapping("/manage/managers")
@RowCustom(distinct = true, dramatizer = JQueryDataTableDramatizer.class)
public RowDefinition list(String name, String department, String realName) {
return new RowDefinition<Manager>() {
@Override
public Class... | // /manage/managers
addUser();
mockMvc.perform(
get("/manage/managers")
)
.andExpect(status().isOk())
.andDo(print());
assertThat(true)
.isTrue();
}
} | [FOCAL] @GetMapping("/manage/managers") @RowCustom(distinct = true, dramatizer = JQueryDataTableDramatizer.class) public RowDefinition ManageManagerController.list(String name, String department, String realName)
[CLASS] class ManageManagerController
[METRICS] loc=104 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=... | /* static context
[FOCAL] @GetMapping("/manage/managers") @RowCustom(distinct = true, dramatizer = JQueryDataTableDramatizer.class) public RowDefinition ManageManagerController.list(String name, String department, String realName)
[INPUTS] branches=- | result=department, name, realName
[COLLABORATORS] field managerRoot... | /* static context
[FOCAL] @GetMapping("/manage/managers") @RowCustom(distinct = true, dramatizer = JQueryDataTableDramatizer.class) public RowDefinition ManageManagerController.list(String name, String department, String realName)
[INPUTS] branches=- | result=department, name, realName
[COLLABORATORS] field managerRoot... | true | ok | {"focal": {"class": "ManageManagerController", "name": "list", "signature": "RowDefinition list(String name, String department, String realName)", "start_line": 3, "modifiers": "@GetMapping(\"/manage/managers\") @RowCustom(distinct = true, dramatizer = JQueryDataTableDramatizer.class) public", "params": [{"name": "name... |
89617755_61 | class TypeConvertingSqlAccessor implements SqlAccessor {
@Override
public long getLong( int rowOffset ) throws InvalidAccessException {
final long result;
switch ( getType().getMinorType() ) {
// 1. Regular type:
case BIGINT:
result = innerAccessor.getLong( rowOffset );
break;
... | final SqlAccessor uut1 =
new TypeConvertingSqlAccessor( new IntegerStubAccessor( 2147483647 ) );
assertThat( uut1.getLong( 0 ), equalTo( 2147483647L ) );
final SqlAccessor uut2 =
new TypeConvertingSqlAccessor( new IntegerStubAccessor( -2147483648 ) );
assertThat( uut2.getLong( 0 ), equal... | [FOCAL] @Override public long TypeConvertingSqlAccessor.getLong(int rowOffset)
[CLASS] class TypeConvertingSqlAccessor implements SqlAccessor
[METRICS] loc=35 cc=7 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] MajorType getType(); long getLongValueOrThrow(double value, String typeLabel)
[CALLS-EXTERN... | /* static context
[FOCAL] @Override public long TypeConvertingSqlAccessor.getLong(int rowOffset)
[PATH1] switch(getType().getMinorType())=case BIGINT -> return result
[PATH2] switch(getType().getMinorType())=case TINYINT -> return result
[PATH3] switch(getType().getMinorType())=case SMALLINT -> return result
[PATH4] sw... | /* static context
[FOCAL] @Override public long TypeConvertingSqlAccessor.getLong(int rowOffset)
[PATH1] switch(getType().getMinorType())=case BIGINT -> return result
[PATH2] switch(getType().getMinorType())=case TINYINT -> return result
[PATH3] switch(getType().getMinorType())=case SMALLINT -> return result
[PATH4] sw... | true | ok | {"focal": {"class": "TypeConvertingSqlAccessor", "name": "getLong", "signature": "long getLong(int rowOffset) throws InvalidAccessException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "rowOffset", "type": "int"}], "return_type": "long"}, "class_info": {"name": "TypeConvertingSqlAccessor", "k... |
89644636_7 | class ModelExtractor {
public byte[] getModel(String modelUri) {
return getModel(new DefaultResourceLoader().getResource(modelUri));
}
public ModelExtractor();
public ModelExtractor(String frozenGraphFileExtension);
public byte[] getModel(Resource modelResource);
private byte[] findInArchiveStream(String ... | byte[] model = new ModelExtractor()
.getModel("https://download.tensorflow.org/models/deeplabv3_mnv2_pascal_train_aug_2018_01_29.tar.gz");
assertThat(model.length, is(8773281));
}
} | [FOCAL] public byte[] ModelExtractor.getModel(String modelUri)
[CLASS] class ModelExtractor
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] byte[] getModel(Resource modelResource)
[CALLS-EXTERNAL] new DefaultResourceLoader().getResource/1
[NEW] DefaultResourceLoader
[INPUTS] branch... | /* static context
[FOCAL] public byte[] ModelExtractor.getModel(String modelUri)
[INPUTS] branches=- | result=modelUri
[CALLS-INTERNAL] byte[] getModel(Resource modelResource)
[NEW] DefaultResourceLoader
[CALLS-EXTERNAL] new DefaultResourceLoader().getResource/1
*/
| /* static context
[FOCAL] public byte[] ModelExtractor.getModel(String modelUri)
[INPUTS] branches=- | result=modelUri
[CALLS-INTERNAL] byte[] getModel(Resource modelResource)
[NEW] DefaultResourceLoader
[CALLS-EXTERNAL] new DefaultResourceLoader().getResource/1
*/
class ModelExtractor {
public byte[] getModel(String... | true | ok | {"focal": {"class": "ModelExtractor", "name": "getModel", "signature": "byte[] getModel(String modelUri)", "start_line": 3, "modifiers": "public", "params": [{"name": "modelUri", "type": "String"}], "return_type": "byte[]"}, "class_info": {"name": "ModelExtractor", "kind": "class", "modifiers": "", "superclass": null, ... |
89676913_0 | class PropertyUtils {
public static <T> T get(String key, Function<String, T> parser, T defaultValue) {
return get(System.getProperties(), key, parser, defaultValue);
}
private PropertyUtils();
public static T get(Properties props, String key, Function<String, T> parser, T defaultValue);
public static... | assertEquals("bar", PropertyUtils.get("_foo", String::valueOf, "bar"));
}
} | [FOCAL] public static T PropertyUtils.get(String key, Function<String, T> parser, T defaultValue)
[CLASS] class PropertyUtils
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] T get(Properties props, String key, Function<String, T> parser, T defaultValue)
[CALLS-EXTERNAL] System.getP... | /* static context
[FOCAL] public static T PropertyUtils.get(String key, Function<String, T> parser, T defaultValue)
[INPUTS] branches=- | result=defaultValue, key, parser
[CALLS-INTERNAL] T get(Properties props, String key, Function<String, T> parser, T defaultValue)
[CALLS-EXTERNAL] System.getProperties/0
*/
| /* static context
[FOCAL] public static T PropertyUtils.get(String key, Function<String, T> parser, T defaultValue)
[INPUTS] branches=- | result=defaultValue, key, parser
[CALLS-INTERNAL] T get(Properties props, String key, Function<String, T> parser, T defaultValue)
[CALLS-EXTERNAL] System.getProperties/0
*/
class Pro... | true | ok | {"focal": {"class": "PropertyUtils", "name": "get", "signature": "T get(String key, Function<String, T> parser, T defaultValue)", "start_line": 3, "modifiers": "public static", "params": [{"name": "key", "type": "String"}, {"name": "parser", "type": "Function<String, T>"}, {"name": "defaultValue", "type": "T"}], "retur... |
89684482_0 | class DefaultCallAdapterFactory extends CallAdapter.Factory {
@Override
public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) {
if (getRawType(returnType) != CompletableFuture.class) {
return null;
}
... | DefaultCallAdapterFactory factory = new DefaultCallAdapterFactory(false, LOGGER);
Type returnType = new ParameterizedType() {
@Override
public Type[] getActualTypeArguments() {
return new Type[]{String.class};
}
@Override
publi... | [FOCAL] @Override public CallAdapter<?, ?> DefaultCallAdapterFactory.get(Type returnType, Annotation[] annotations, Retrofit retrofit)
[CLASS] class DefaultCallAdapterFactory extends CallAdapter.Factory
[METRICS] loc=12 cc=3 branches=2 loops=0 returns=2 throws=1 nesting=1
[CALLS-EXTERNAL] getRawType/1 (inherited), getP... | /* static context
[FOCAL] @Override public CallAdapter<?, ?> DefaultCallAdapterFactory.get(Type returnType, Annotation[] annotations, Retrofit retrofit)
[THROWS-WHEN] IllegalStateException when !(getRawType(returnType) != CompletableFuture.class) && !(returnType instanceof ParameterizedType)
[PATH1] if(getRawType(retur... | /* static context
[FOCAL] @Override public CallAdapter<?, ?> DefaultCallAdapterFactory.get(Type returnType, Annotation[] annotations, Retrofit retrofit)
[THROWS-WHEN] IllegalStateException when !(getRawType(returnType) != CompletableFuture.class) && !(returnType instanceof ParameterizedType)
[PATH1] if(getRawType(retur... | true | ok | {"focal": {"class": "DefaultCallAdapterFactory", "name": "get", "signature": "CallAdapter<?, ?> get(Type returnType, Annotation[] annotations, Retrofit retrofit)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "returnType", "type": "Type"}, {"name": "annotations", "type": "Annotation[]"}, {"name... |
89791542_4 | class ViewPagerAnimator implements ViewPager.OnPageChangeListener {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
if (position == 0 && positionOffsetPixels == 0 && !isAnimating()) {
onPageSelected(0);
}
if (isAnimating()... | numberAnimator.onPageScrolled(1, 0f, 0);
numberAnimator.onPageScrolled(1, 0.1f, 10);
numberAnimator.onPageScrolled(0, 0.9f, 90);
assertThat(numberProperty.get()).isEqualTo(0.9f);
}
} | [FOCAL] @Override public void ViewPagerAnimator.onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
[CLASS] class ViewPagerAnimator implements ViewPager.OnPageChangeListener
[METRICS] loc=18 cc=5 branches=4 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] boolean isAnimating(); void beginA... | /* static context
[FOCAL] @Override public void ViewPagerAnimator.onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
[PATH1] if(position == 0 && positionOffsetPixels == 0 && !isAnimating())=T -> if(isAnimating() && lastPosition != position || positionOffsetPixels == 0)=T -> if(positionOffsetPi... | /* static context
[FOCAL] @Override public void ViewPagerAnimator.onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
[PATH1] if(position == 0 && positionOffsetPixels == 0 && !isAnimating())=T -> if(isAnimating() && lastPosition != position || positionOffsetPixels == 0)=T -> if(positionOffsetPi... | true | ok | {"focal": {"class": "ViewPagerAnimator", "name": "onPageScrolled", "signature": "void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "position", "type": "int"}, {"name": "positionOffset", "type": "float"}, {"name": "po... |
89856316_30 | class EventMapper {
public Event map(VEvent event, TimeZone defaultTimeZone) {
Event result = new Event();
nullSave(() -> {
final DateTime start = new DateTime(event.getDateStart().getValue().getTime(), DateTimeZone.forTimeZone(defaultTimeZone));
result.setStart(start, event.getDateStart().getVa... | //given
final VEvent event = new VEvent();
event.setDateStart(DateTime.parse("2009-12-15T22:15:00").withZone(DateTimeZone.UTC).toDate(), true);
event.setDateEnd(DateTime.parse("2010-08-13T20:15:00").withZone(DateTimeZone.UTC).toDate(), true);
event.setSummary("<summary>");
event.setDescription("... | [FOCAL] public Event EventMapper.map(VEvent event, TimeZone defaultTimeZone)
[CLASS] class EventMapper
[METRICS] loc=18 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] void nullSave(Runnable runnable)
[CALLS-EXTERNAL] event.getDateStart().getValue().getTime/0, event.getDateStart().getValue/0, VEve... | /* static context
[FOCAL] public Event EventMapper.map(VEvent event, TimeZone defaultTimeZone)
[COLLABORATORS] param event:VEvent getDateStart/0,getDateEnd/0,getSummary/0,getDescription/0
[CALLS-INTERNAL] void nullSave(Runnable runnable)
[NEW] Event, DateTime
[CALLS-EXTERNAL] event.getDateStart().getValue().getTime/0, ... | /* static context
[FOCAL] public Event EventMapper.map(VEvent event, TimeZone defaultTimeZone)
[COLLABORATORS] param event:VEvent getDateStart/0,getDateEnd/0,getSummary/0,getDescription/0
[CALLS-INTERNAL] void nullSave(Runnable runnable)
[NEW] Event, DateTime
[CALLS-EXTERNAL] event.getDateStart().getValue().getTime/0, ... | true | ok | {"focal": {"class": "EventMapper", "name": "map", "signature": "Event map(VEvent event, TimeZone defaultTimeZone)", "start_line": 3, "modifiers": "public", "params": [{"name": "event", "type": "VEvent"}, {"name": "defaultTimeZone", "type": "TimeZone"}], "return_type": "Event"}, "class_info": {"name": "EventMapper", "ki... |
89961630_1 | class MetricGetter {
@SafeVarargs
public static final TagValue[][] getTagCombinations(Class<? extends TagValue>... tagValueClazzes) {
int combinations = 1;
for (Class<? extends TagValue> clazz : tagValueClazzes) {
combinations *= clazz.getEnumConstants().length;
}
... | TagValue[][] expected = {{TimeoutTimedOut.TRUE}, {TimeoutTimedOut.FALSE}};
assertEquals(MetricGetter.getTagCombinations(TimeoutTimedOut.class), expected);
}
} | [FOCAL] @SafeVarargs public static final TagValue[][] MetricGetter.getTagCombinations(Class<? extends TagValue>... tagValueClazzes)
[CLASS] class MetricGetter
[METRICS] loc=15 cc=3 branches=0 loops=2 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] List<List<TagValue>> getTagCombinations(List<Class<? extends TagValue>> ta... | /* static context
[FOCAL] @SafeVarargs public static final TagValue[][] MetricGetter.getTagCombinations(Class<? extends TagValue>... tagValueClazzes)
[PATH1] foreach(Class<? extends TagValue> clazz : tagValueClazzes)=T -> exit loop -> for(i < tagLists.size())=F -> return result
[PATH2] foreach(Class<? extends TagValue>... | /* static context
[FOCAL] @SafeVarargs public static final TagValue[][] MetricGetter.getTagCombinations(Class<? extends TagValue>... tagValueClazzes)
[PATH1] foreach(Class<? extends TagValue> clazz : tagValueClazzes)=T -> exit loop -> for(i < tagLists.size())=F -> return result
[PATH2] foreach(Class<? extends TagValue>... | true | ok | {"focal": {"class": "MetricGetter", "name": "getTagCombinations", "signature": "TagValue[][] getTagCombinations(Class<? extends TagValue>... tagValueClazzes)", "start_line": 3, "modifiers": "@SafeVarargs public static final", "params": [{"name": "tagValueClazzes", "type": "Class<? extends TagValue>..."}], "return_type"... |
90011594_29 | class SchedulerIteration {
public void run(SchedulerMode mode) {
mActionsToRemove.clear();
startNewActions();
runActions(mode);
startDefaultSubsystemActions(mode);
readyForNextRun();
}
SchedulerIteration(ActionControl actionControl, RequirementsControl requireme... | ActionContext actionContext = ActionsMock.contextMocker()
.runFinished(false)
.build();
mActionControlMock.runningAction(actionContext);
mSchedulerIteration.run(SchedulerModeMock.mockNotDisabledMode());
verify(actionContext, times(1)).run();
}
} | [FOCAL] public void SchedulerIteration.run(SchedulerMode mode)
[CLASS] class SchedulerIteration
[METRICS] loc=9 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void readyForNextRun(); void runActions(SchedulerMode mode); void startDefaultSubsystemActions(SchedulerMode mode); void startNewActions()... | /* static context
[FOCAL] public void SchedulerIteration.run(SchedulerMode mode)
[COLLABORATORS] field mActionsToRemove clear/0
[CALLS-INTERNAL] void readyForNextRun(); void runActions(SchedulerMode mode); void startDefaultSubsystemActions(SchedulerMode mode); void startNewActions()
[CALLS-EXTERNAL] mActionsToRemove.cl... | /* static context
[FOCAL] public void SchedulerIteration.run(SchedulerMode mode)
[COLLABORATORS] field mActionsToRemove clear/0
[CALLS-INTERNAL] void readyForNextRun(); void runActions(SchedulerMode mode); void startDefaultSubsystemActions(SchedulerMode mode); void startNewActions()
[CALLS-EXTERNAL] mActionsToRemove.cl... | true | ok | {"focal": {"class": "SchedulerIteration", "name": "run", "signature": "void run(SchedulerMode mode)", "start_line": 3, "modifiers": "public", "params": [{"name": "mode", "type": "SchedulerMode"}], "return_type": "void"}, "class_info": {"name": "SchedulerIteration", "kind": "class", "modifiers": "", "superclass": null, ... |
90020587_0 | class GenerateTradeData {
public List<Trade> createRandomData(int number) throws Exception {
// TODO Auto-generated method stub
return null;
}
public Trade createTradeData(int number, List<Party> partyList,
List<Instrument> instrumentList);
private Party getRandomParty(List<Party> partyList);
private Ins... | GenerateRandomInstruments ranIns = new GenerateRandomInstruments();
assert (ranIns.createRandomData(50).size() == 50);
}
} | [FOCAL] public List<Trade> GenerateTradeData.createRandomData(int number)
[CLASS] class GenerateTradeData
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[EXCEPTIONS] declares Exception
[INPUTS] branches=- | result=- | unused=number
[CLASS-MEMBERS] Trade createTradeData(int number, List<Party> part... | /* static context
[FOCAL] public List<Trade> GenerateTradeData.createRandomData(int number)
[INPUTS] branches=- | result=- | unused=number
[EXCEPTIONS] declares Exception
*/
| /* static context
[FOCAL] public List<Trade> GenerateTradeData.createRandomData(int number)
[INPUTS] branches=- | result=- | unused=number
[EXCEPTIONS] declares Exception
*/
class GenerateTradeData {
public List<Trade> createRandomData(int number) throws Exception {
// TODO Auto-generated method stub
return null;... | true | ok | {"focal": {"class": "GenerateTradeData", "name": "createRandomData", "signature": "List<Trade> createRandomData(int number) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "number", "type": "int"}], "return_type": "List<Trade>"}, "class_info": {"name": "GenerateTradeData", "kind": "class"... |
90026142_0 | class SegmentedLog {
public void truncateSuffix(long newEndIndex) {
if (newEndIndex >= getLastLogIndex()) {
return;
}
LOG.info("Truncating log from old end index {} to new end index {}",
getLastLogIndex(), newEndIndex);
while (!startLogIndexSegmentMap.isE... | String raftDataDir = "./data";
SegmentedLog segmentedLog = new SegmentedLog(raftDataDir, 32);
Assert.assertTrue(segmentedLog.getFirstLogIndex() == 1);
List<RaftProto.LogEntry> entries = new ArrayList<>();
for (int i = 1; i < 10; i++) {
RaftProto.LogEntry entry = Raft... | [FOCAL] public void SegmentedLog.truncateSuffix(long newEndIndex)
[CLASS] class SegmentedLog
[METRICS] loc=43 cc=7 branches=4 loops=1 returns=1 throws=0 nesting=5
[CALLS-INTERNAL] long getLastLogIndex()
[CALLS-EXTERNAL] LOG.info/3, startLogIndexSegmentMap.isEmpty/0, startLogIndexSegmentMap.lastEntry().getValue/0, start... | /* static context
[FOCAL] public void SegmentedLog.truncateSuffix(long newEndIndex)
[PATH1] if(newEndIndex >= getLastLogIndex())=F -> while(!startLogIndexSegmentMap.isEmpty())=T -> if(newEndIndex == segment.getEndIndex())=F -> if(newEndIndex < segment.getStartIndex())=F -> if(newEndIndex < segment.getEndIndex())=T -> e... | /* static context
[FOCAL] public void SegmentedLog.truncateSuffix(long newEndIndex)
[PATH1] if(newEndIndex >= getLastLogIndex())=F -> while(!startLogIndexSegmentMap.isEmpty())=T -> if(newEndIndex == segment.getEndIndex())=F -> if(newEndIndex < segment.getStartIndex())=F -> if(newEndIndex < segment.getEndIndex())=T -> e... | true | ok | {"focal": {"class": "SegmentedLog", "name": "truncateSuffix", "signature": "void truncateSuffix(long newEndIndex)", "start_line": 3, "modifiers": "public", "params": [{"name": "newEndIndex", "type": "long"}], "return_type": "void"}, "class_info": {"name": "SegmentedLog", "kind": "class", "modifiers": "", "superclass": ... |
90036492_1 | class MergedItem {
static MergedItem newRow(int type, long id) {
return new MergedItem(type, id, false);
}
private MergedItem(int type, long id, boolean injected);
static MergedItem newInjectedRow(int type);
@Override public boolean equals(Object o);
}
class MergedItemTest {
@Test... | MergedItem mergedItem = MergedItem.newRow(1, 2L);
assertThat(mergedItem.injected, is(false));
assertThat(mergedItem.type, is(1));
assertThat(mergedItem.id, is(2L));
}
} | [FOCAL] static MergedItem MergedItem.newRow(int type, long id)
[CLASS] class MergedItem
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] MergedItem
[INPUTS] branches=- | result=id, type
[DATAFLOW] id@param->L2; type@param->L2
[CLASS-MEMBERS] MergedItem(int type, long id, boolean injected); Mer... | /* static context
[FOCAL] static MergedItem MergedItem.newRow(int type, long id)
[INPUTS] branches=- | result=id, type
[NEW] MergedItem
*/
| /* static context
[FOCAL] static MergedItem MergedItem.newRow(int type, long id)
[INPUTS] branches=- | result=id, type
[NEW] MergedItem
*/
class MergedItem {
static MergedItem newRow(int type, long id) {
return new MergedItem(type, id, false);
}
private MergedItem(int type, long id, boolean injec... | true | ok | {"focal": {"class": "MergedItem", "name": "newRow", "signature": "MergedItem newRow(int type, long id)", "start_line": 3, "modifiers": "static", "params": [{"name": "type", "type": "int"}, {"name": "id", "type": "long"}], "return_type": "MergedItem"}, "class_info": {"name": "MergedItem", "kind": "class", "modifiers": "... |
90043355_117 | class HilbertTransformFilter {
public void apply(int n, float[] x, float[] y) {
Conv.conv(_filter.length,-(_filter.length-1)/2,_filter,n,0,x,n,0,y);
}
public HilbertTransformFilter();
public HilbertTransformFilter(int nmax, float emax,
float fmin, float fmax);
public ... | int[] nmax_test = {NMAX_DEFAULT,100000,100000,100000,100000};
float[] emax_test = {EMAX_DEFAULT,0.010f,0.010f,0.001f,0.001f};
float[] fmin_test = {FMIN_DEFAULT,0.050f,0.025f,0.100f,0.010f};
float[] fmax_test = {FMAX_DEFAULT,0.475f,0.450f,0.400f,0.490f};
int ntest = emax_test.length;
// Lo... | [FOCAL] public void HilbertTransformFilter.apply(int n, float[] x, float[] y)
[CLASS] class HilbertTransformFilter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] Conv.conv/9
[DATAFLOW] n@param->L2; x@param->L2; y@param->L2
[CLASS-MEMBERS] HilbertTransformFilter(); HilbertTransform... | /* static context
[FOCAL] public void HilbertTransformFilter.apply(int n, float[] x, float[] y)
[CALLS-EXTERNAL] Conv.conv/9
*/
| /* static context
[FOCAL] public void HilbertTransformFilter.apply(int n, float[] x, float[] y)
[CALLS-EXTERNAL] Conv.conv/9
*/
class HilbertTransformFilter {
public void apply(int n, float[] x, float[] y) {
Conv.conv(_filter.length,-(_filter.length-1)/2,_filter,n,0,x,n,0,y);
}
public HilbertTransformFilte... | true | ok | {"focal": {"class": "HilbertTransformFilter", "name": "apply", "signature": "void apply(int n, float[] x, float[] y)", "start_line": 3, "modifiers": "public", "params": [{"name": "n", "type": "int"}, {"name": "x", "type": "float[]"}, {"name": "y", "type": "float[]"}], "return_type": "void"}, "class_info": {"name": "Hil... |
90045866_1 | class GeneralUtilities extends SpagoBIUtilities {
public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) {
Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet);
if (res != null) {
return res;
}
logger.warn("No params default values fo... | IDataSet dummy = new MockDataSet();
dummy.setParameters(DataSetParametersListTest.XML);
Map<String, ?> dvs = GeneralUtilities.getParamsDefaultValuesUseAlsoDB(dummy);
Assert.assertEquals(2, dvs.size());
Assert.assertEquals(DataSetParametersListTest.FIRST_DEFAULT_VALUE, dvs.get(DataSetParametersListTest.FIRST_P... | [FOCAL] public static Map<String, ParamDefaultValue> GeneralUtilities.getParamsDefaultValuesUseAlsoDB(IDataSet dataSet)
[CLASS] class GeneralUtilities extends SpagoBIUtilities
[METRICS] loc=29 cc=5 branches=3 loops=0 returns=4 throws=0 nesting=2
[CALLS-EXTERNAL] DataSetUtilities.getParamsDefaultValues/1, logger.warn/1,... | /* static context
[FOCAL] public static Map<String, ParamDefaultValue> GeneralUtilities.getParamsDefaultValuesUseAlsoDB(IDataSet dataSet)
[PATH1] if(res != null)=F -> if(label == null)=F -> if(ds == null)=T -> return null
[PATH2] if(res != null)=T -> return res
[PATH3] if(res != null)=F -> try-body throws -> return res... | /* static context
[FOCAL] public static Map<String, ParamDefaultValue> GeneralUtilities.getParamsDefaultValuesUseAlsoDB(IDataSet dataSet)
[PATH1] if(res != null)=F -> if(label == null)=F -> if(ds == null)=T -> return null
[PATH2] if(res != null)=T -> return res
[PATH3] if(res != null)=F -> try-body throws -> return res... | true | ok | {"focal": {"class": "GeneralUtilities", "name": "getParamsDefaultValuesUseAlsoDB", "signature": "Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet)", "start_line": 3, "modifiers": "public static", "params": [{"name": "dataSet", "type": "IDataSet"}], "return_type": "Map<String, ParamDefault... |
90096766_23 | class UserJWTController {
@PostMapping("/authenticate")
@Timed
public ResponseEntity authorize(@Valid @RequestBody LoginVM loginVM, HttpServletResponse response) {
UsernamePasswordAuthenticationToken authenticationToken =
new UsernamePasswordAuthenticationToken(loginVM.getUsername(), l... |
// Normal authentication
LoginVM vm = new LoginVM();
vm.setUsername("admin");
vm.setPassword("admin");
vm.setRememberMe(true);
Mockito.doReturn("fakeToken").when(tokenProvider)
.createToken(Mockito.any(Authentication.class), Mockito.anyBoolean());
m... | [FOCAL] @PostMapping("/authenticate") @Timed public ResponseEntity UserJWTController.authorize(LoginVM loginVM, HttpServletResponse response)
[CLASS] class UserJWTController
[METRICS] loc=20 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] LoginVM.getUsername/0, LoginVM.getPassword/0, Authenticatio... | /* static context
[FOCAL] @PostMapping("/authenticate") @Timed public ResponseEntity UserJWTController.authorize(LoginVM loginVM, HttpServletResponse response)
[PATH1] try-body throws -> return new ResponseEntity<>(Collections.singletonMap("AuthenticationExcept...
[PATH2] return ResponseEntity.ok(new JWTToken(jwt))
[IN... | /* static context
[FOCAL] @PostMapping("/authenticate") @Timed public ResponseEntity UserJWTController.authorize(LoginVM loginVM, HttpServletResponse response)
[PATH1] try-body throws -> return new ResponseEntity<>(Collections.singletonMap("AuthenticationExcept...
[PATH2] return ResponseEntity.ok(new JWTToken(jwt))
[IN... | true | ok | {"focal": {"class": "UserJWTController", "name": "authorize", "signature": "ResponseEntity authorize(LoginVM loginVM, HttpServletResponse response)", "start_line": 3, "modifiers": "@PostMapping(\"/authenticate\") @Timed public", "params": [{"name": "loginVM", "type": "LoginVM"}, {"name": "response", "type": "HttpServle... |
90135592_5 | class EventBatcher {
public void pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent) {
long eventSize;
try {
eventSize = objectMapper.writeValueAsBytes(nakadiEvent).length;
} catch (Exception e) {
log.error("Could not serialize event {} of type {}, skipping i... | EventLog eventLogEntry1 = eventLogEntry(1, "type1");
EventLog eventLogEntry2 = eventLogEntry(2, "type1");
EventLog eventLogEntry3 = eventLogEntry(3, "type1");
NakadiEvent nakadiEvent1 = nakadiEvent("1");
NakadiEvent nakadiEvent2 = nakadiEvent("2");
NakadiEvent nakadiEvent... | [FOCAL] public void EventBatcher.pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent)
[CLASS] class EventBatcher
[METRICS] loc=22 cc=3 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] boolean batchWouldBecomeTooBig(long aggregatedBatchSize, long eventSize); boolean hasAnotherEventType(List<BatchIt... | /* static context
[FOCAL] public void EventBatcher.pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent)
[PATH1] try-body throws -> return
[PATH2] if((!batch.isEmpty() && (hasAnotherEventType(batch, eventLogEntry) || batchWouldBecomeTooBig(aggregatedBatchSize, eventS...)=T
[PATH3] if((!batch.isEmpty() && (hasAnoth... | /* static context
[FOCAL] public void EventBatcher.pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent)
[PATH1] try-body throws -> return
[PATH2] if((!batch.isEmpty() && (hasAnotherEventType(batch, eventLogEntry) || batchWouldBecomeTooBig(aggregatedBatchSize, eventS...)=T
[PATH3] if((!batch.isEmpty() && (hasAnoth... | true | ok | {"focal": {"class": "EventBatcher", "name": "pushEvent", "signature": "void pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent)", "start_line": 3, "modifiers": "public", "params": [{"name": "eventLogEntry", "type": "EventLog"}, {"name": "nakadiEvent", "type": "NakadiEvent"}], "return_type": "void"}, "class_info"... |
90198241_2 | class ASimulator implements ISimulatorUpdater {
protected ASimulator()
{
}
protected ASimulator();
public boolean loadConfig(String aConfigFile);
@Override public void update();
@Override public void setRobot(IRobotClassContainer aRobot);
public String getConfigFile();
}
class Test... | String file = extractFiles("testReadFile.yml");
ASimulator baseSimulator = new ASimulator();
Assertions.assertTrue(baseSimulator.loadConfig(file));
// Used to create some components
new MockRobot();
AccelerometerWrapperAccessor accelerometerAccessor = DataAccessorFacto... | [FOCAL] protected ASimulator.ASimulator()
[CLASS] class ASimulator implements ISimulatorUpdater
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] ASimulator(); boolean loadConfig(String aConfigFile); void update(); void setRobot(IRobotClassContainer aRobot); String getConfigFile()
[TE... | /* static context
[FOCAL] protected ASimulator.ASimulator()
*/
| /* static context
[FOCAL] protected ASimulator.ASimulator()
*/
class ASimulator implements ISimulatorUpdater {
protected ASimulator()
{
}
protected ASimulator();
public boolean loadConfig(String aConfigFile);
@Override public void update();
@Override public void setRobot(IRobotClassConta... | true | ok | {"focal": {"class": "ASimulator", "name": "ASimulator", "signature": "ASimulator()", "start_line": 3, "modifiers": "protected", "params": [], "return_type": null}, "class_info": {"name": "ASimulator", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "ISimulatorUpdater", "fields": [], "members": [{"na... |
90217436_135 | class MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService {
public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException {
try {
int sid = 0;
if (storageType.equals("ram")) {
sid = 0;
}
if (storageType.equals("ssd")) {
... | DataNodeStorageInfo info1 = new DataNodeStorageInfo("1", "ssd", 1, "1", 1, 1, 1, 1, 1);
DataNodeStorageInfo info2 = new DataNodeStorageInfo("2", "ssd", 2, "2", 2, 2, 2, 2, 2);
metaStore.insertDataNodeStorageInfo(info1);
metaStore.insertDataNodeStorageInfo(info2);
long free = metaStore.getStoreFree... | [FOCAL] public long MetaStore.getStoreFreeOfDifferentStorageType(String storageType)
[CLASS] class MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService
[METRICS] loc=29 cc=7 branches=4 loops=1 returns=1 throws=1 nesting=2
[CALLS-EXTERNAL] String.equals/1, dataNodeStorageInfoDao.getBySid/1, DataNod... | class MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService {
public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException {
try {
int sid = 0;
if (storageType.equals("ram")) {
sid = 0;
}
if (storageType.equals("ssd")) {
... | false | ok | {"focal": {"class": "MetaStore", "name": "getStoreFreeOfDifferentStorageType", "signature": "long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException", "start_line": 3, "modifiers": "public", "params": [{"name": "storageType", "type": "String"}], "return_type": "long"}, "class_info": {"name... | |
90226261_4 | class CustomerResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerPayload>> {
@Override
public PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException {
CustomerPayload customerPayload = null;
if (rs.next()) {
customerPayload = new CustomerPayload... | CustomerResultSetExtractor extractor = new CustomerResultSetExtractor();
ResultSet rs = mock(ResultSet.class);
given(rs.next()).willReturn(true).willReturn(false);
given(rs.getString("ID")).willReturn("customer1");
given(rs.getString("NAME")).willReturn("customer name");
CustomerPayload payload = new Custo... | [FOCAL] @Override public PayloadWrapper<CustomerPayload> CustomerResultSetExtractor.extractData(ResultSet rs)
[CLASS] class CustomerResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerPayload>>
[METRICS] loc=10 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] ResultSet.next/0, C... | /* static context
[FOCAL] @Override public PayloadWrapper<CustomerPayload> CustomerResultSetExtractor.extractData(ResultSet rs)
[PATH1] if(rs.next())=T -> return new PayloadWrapper<>(customerPayload)
[PATH2] if(rs.next())=F -> return new PayloadWrapper<>(customerPayload)
[INPUTS] branches=rs | result=-
[COLLABORATORS] ... | /* static context
[FOCAL] @Override public PayloadWrapper<CustomerPayload> CustomerResultSetExtractor.extractData(ResultSet rs)
[PATH1] if(rs.next())=T -> return new PayloadWrapper<>(customerPayload)
[PATH2] if(rs.next())=F -> return new PayloadWrapper<>(customerPayload)
[INPUTS] branches=rs | result=-
[COLLABORATORS] ... | true | ok | {"focal": {"class": "CustomerResultSetExtractor", "name": "extractData", "signature": "PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "rs", "type": "ResultSet"}], "return_type": "PayloadWrapper<Cu... |
90329901_92 | class ValueWidget extends DOMWidget {
public String getString(Object input) {
String ret = "";
if (input != null) {
if (input instanceof String) {
ret = (String) input;
} else if (input instanceof byte[]) {
ret = new String((byte[]) input);
} else {
ret = input.toStr... | //when
String value = valueWidget.getString("abc".getBytes());
//then
Assertions.assertThat(value).isEqualTo("abc");
}
} | [FOCAL] public String ValueWidget.getString(Object input)
[CLASS] class ValueWidget extends DOMWidget
[METRICS] loc=13 cc=4 branches=3 loops=0 returns=1 throws=0 nesting=3
[CALLS-EXTERNAL] Object.toString/0
[NEW] String
[PATH1] if(input != null)=T -> if(input instanceof String)=F -> if(input instanceof byte[])=T -> ret... | /* static context
[FOCAL] public String ValueWidget.getString(Object input)
[PATH1] if(input != null)=T -> if(input instanceof String)=F -> if(input instanceof byte[])=T -> return ret
[PATH2] if(input != null)=F -> return ret
[PATH3] if(input != null)=T -> if(input instanceof String)=T -> return ret
[PATH4] if(input !=... | /* static context
[FOCAL] public String ValueWidget.getString(Object input)
[PATH1] if(input != null)=T -> if(input instanceof String)=F -> if(input instanceof byte[])=T -> return ret
[PATH2] if(input != null)=F -> return ret
[PATH3] if(input != null)=T -> if(input instanceof String)=T -> return ret
[PATH4] if(input !=... | true | ok | {"focal": {"class": "ValueWidget", "name": "getString", "signature": "String getString(Object input)", "start_line": 3, "modifiers": "public", "params": [{"name": "input", "type": "Object"}], "return_type": "String"}, "class_info": {"name": "ValueWidget", "kind": "class", "modifiers": "", "superclass": "DOMWidget", "in... |
90406775_23 | class UnitFactorMap {
public String dump(Unit unit) {
StringBuilder buf = new StringBuilder();
buf.append(unit).append(":\n");
Map<Unit, UnitFactor> map = factors.get(unit);
for (Unit base : map.keySet()) {
UnitFactor factor = map.get(base);
buf.append(" ").append(factor).append(" ");
... | String factors = UnitFactors.LENGTH.dump(Unit.INCH);
assertTrue(factors.contains("Factor(2.54, CENTIMETER)"));
assertTrue(factors.contains("Factor(1 / 12, FOOT)"));
}
} | [FOCAL] public String UnitFactorMap.dump(Unit unit)
[CLASS] class UnitFactorMap
[METRICS] loc=11 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] buf.append(unit).append/1, StringBuilder.append/1, factors.get/1, Map<Unit, UnitFactor>.keySet/0, Map<Unit, UnitFactor>.get/1, buf.append(" ").append(fac... | /* static context
[FOCAL] public String UnitFactorMap.dump(Unit unit)
[PATH1] foreach(Unit base : map.keySet())=T -> exit loop -> return buf.toString()
[PATH2] foreach(Unit base : map.keySet())=F -> return buf.toString()
[INPUTS] branches=unit | result=-
[COLLABORATORS] field factors get/1
[NEW] StringBuilder
[CALLS-EX... | /* static context
[FOCAL] public String UnitFactorMap.dump(Unit unit)
[PATH1] foreach(Unit base : map.keySet())=T -> exit loop -> return buf.toString()
[PATH2] foreach(Unit base : map.keySet())=F -> return buf.toString()
[INPUTS] branches=unit | result=-
[COLLABORATORS] field factors get/1
[NEW] StringBuilder
[CALLS-EX... | true | ok | {"focal": {"class": "UnitFactorMap", "name": "dump", "signature": "String dump(Unit unit)", "start_line": 3, "modifiers": "public", "params": [{"name": "unit", "type": "Unit"}], "return_type": "String"}, "class_info": {"name": "UnitFactorMap", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "f... |
90442475_0 | class FileInfosPresenter implements FileInfosContract.Presenter {
@Override
public void loadFileInfos() {
mFileInfosRepository
.listFileInfos(mDirectory)
.observeOn(mSchedulerProvider.ui())
.subscribe(new Action1<List<FileInfo>>() {
@O... | setAvailableFileInfos(mMockFileInfosRepository);
mFileInfosPresenter.loadFileInfos();
Mockito.verify(mMockView, Mockito.times(1)).showFileInfos(Mockito.anyListOf(FileInfo.class));
}
} | [FOCAL] @Override public void FileInfosPresenter.loadFileInfos()
[CLASS] class FileInfosPresenter implements FileInfosContract.Presenter
[METRICS] loc=16 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] mFileInfosRepository .listFileInfos(mDirectory) .observeO....subscribe/1, mFileInfosRepository .... | /* static context
[FOCAL] @Override public void FileInfosPresenter.loadFileInfos()
[COLLABORATORS] field mFileInfosRepository listFileInfos/1; field mSchedulerProvider ui/0; field fileInfos isEmpty/0; field mView showNoFileInfos/0,showFileInfos/1
[NEW] Action1<List<FileInfo>>
[CALLS-EXTERNAL] mFileInfosRepository .list... | /* static context
[FOCAL] @Override public void FileInfosPresenter.loadFileInfos()
[COLLABORATORS] field mFileInfosRepository listFileInfos/1; field mSchedulerProvider ui/0; field fileInfos isEmpty/0; field mView showNoFileInfos/0,showFileInfos/1
[NEW] Action1<List<FileInfo>>
[CALLS-EXTERNAL] mFileInfosRepository .list... | true | ok | {"focal": {"class": "FileInfosPresenter", "name": "loadFileInfos", "signature": "void loadFileInfos()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "FileInfosPresenter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "FileInfosContr... |
90446318_3 | class MysqlUserDetailsService implements UserDetailsService {
@Override
public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
User user = userRepository.findByUsername(s);
log.info("user is found! -> " + user.getUsername());
if (user == null) {
... | doReturn(null).when(repository).findByUsername(anyString());
try {
userDetailsService.loadUserByUsername(anyString());
fail();
} catch (Exception e) {
}
}
} | [FOCAL] @Override public UserDetails MysqlUserDetailsService.loadUserByUsername(String s)
[CLASS] class MysqlUserDetailsService implements UserDetailsService
[METRICS] loc=11 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] userRepository.findByUsername/1, log.info/1, User.getUsername/0
[NEW] Usern... | /* static context
[FOCAL] @Override public UserDetails MysqlUserDetailsService.loadUserByUsername(String s)
[THROWS-WHEN] UsernameNotFoundException when user == null
[PATH1] if(user == null)=T -> throw new UsernameNotFoundException(s)
[PATH2] if(user == null)=F -> return user
[INPUTS] branches=s | result=s
[COLLABORATO... | /* static context
[FOCAL] @Override public UserDetails MysqlUserDetailsService.loadUserByUsername(String s)
[THROWS-WHEN] UsernameNotFoundException when user == null
[PATH1] if(user == null)=T -> throw new UsernameNotFoundException(s)
[PATH2] if(user == null)=F -> return user
[INPUTS] branches=s | result=s
[COLLABORATO... | true | ok | {"focal": {"class": "MysqlUserDetailsService", "name": "loadUserByUsername", "signature": "UserDetails loadUserByUsername(String s) throws UsernameNotFoundException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "s", "type": "String"}], "return_type": "UserDetails"}, "class_info": {"name": "Mys... |
90489106_2 | class RelevanceModel {
public static Dataset concat(Dataset d1, Dataset d2) {
double[][] X = concat(d1.getX(), d2.getX());
double[] y = concat(d1.getY(), d2.getY());
return new Dataset(X, y);
}
public static void main(String[] args);
public static double[] concat(double[] y1, d... | double[] y1 = { 1.0, 2.0, 3.0 };
double[] y2 = { 4.0, 5.0 };
double[] y = RelevanceModel.concat(y1, y2);
double[] expected = { 1.0, 2.0, 3.0, 4.0, 5.0 };
assertTrue(Arrays.equals(y, expected));
}
} | [FOCAL] public static Dataset RelevanceModel.concat(Dataset d1, Dataset d2)
[CLASS] class RelevanceModel
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] double[] concat(double[] y1, double[] y2)
[CALLS-EXTERNAL] Dataset.getX/0, Dataset.getY/0
[NEW] Dataset
[INPUTS] branches=- | res... | /* static context
[FOCAL] public static Dataset RelevanceModel.concat(Dataset d1, Dataset d2)
[INPUTS] branches=- | result=d1, d2
[COLLABORATORS] param d1:Dataset getX/0,getY/0; param d2:Dataset getX/0,getY/0
[CALLS-INTERNAL] double[] concat(double[] y1, double[] y2)
[NEW] Dataset
[CALLS-EXTERNAL] Dataset.getX/0, Datas... | /* static context
[FOCAL] public static Dataset RelevanceModel.concat(Dataset d1, Dataset d2)
[INPUTS] branches=- | result=d1, d2
[COLLABORATORS] param d1:Dataset getX/0,getY/0; param d2:Dataset getX/0,getY/0
[CALLS-INTERNAL] double[] concat(double[] y1, double[] y2)
[NEW] Dataset
[CALLS-EXTERNAL] Dataset.getX/0, Datas... | true | ok | {"focal": {"class": "RelevanceModel", "name": "concat", "signature": "Dataset concat(Dataset d1, Dataset d2)", "start_line": 3, "modifiers": "public static", "params": [{"name": "d1", "type": "Dataset"}, {"name": "d2", "type": "Dataset"}], "return_type": "Dataset"}, "class_info": {"name": "RelevanceModel", "kind": "cla... |
90646801_4 | class LatexTemplate {
public final String populateFrom(final LatexContext context) {
requireNonNull(context);
final VelocityEngine velocityEngine = initializeEngine();
final VelocityContext velocityContext = prepareContext(context);
return evaluateTemplate(velocityContext, velocityEngine);
}
public Late... | LatexTemplate template = new LatexTemplate("${keyToReplace}");
LatexContext context = new LatexContext();
context.add("keyToReplace", "value");
String result = template.populateFrom(context);
assertThat(result, is("value"));
}
} | [FOCAL] public final String LatexTemplate.populateFrom(LatexContext context)
[CLASS] class LatexTemplate
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String evaluateTemplate(VelocityContext velocityContext, VelocityEngine engine); VelocityContext prepareContext(LatexContext cont... | /* static context
[FOCAL] public final String LatexTemplate.populateFrom(LatexContext context)
[INPUTS] branches=- | result=context
[CALLS-INTERNAL] String evaluateTemplate(VelocityContext velocityContext, VelocityEngine engine); VelocityContext prepareContext(LatexContext context); VelocityEngine initializeEngine()
[C... | /* static context
[FOCAL] public final String LatexTemplate.populateFrom(LatexContext context)
[INPUTS] branches=- | result=context
[CALLS-INTERNAL] String evaluateTemplate(VelocityContext velocityContext, VelocityEngine engine); VelocityContext prepareContext(LatexContext context); VelocityEngine initializeEngine()
[C... | true | ok | {"focal": {"class": "LatexTemplate", "name": "populateFrom", "signature": "String populateFrom(LatexContext context)", "start_line": 3, "modifiers": "public final", "params": [{"name": "context", "type": "LatexContext"}], "return_type": "String"}, "class_info": {"name": "LatexTemplate", "kind": "class", "modifiers": ""... |
90675730_96 | class SuffixFormatter {
public String format(final Quantity.Format format, final int exponent) {
switch (format) {
case DECIMAL_SI:
return getDecimalSiSuffix(exponent);
case BINARY_SI:
return getBinarySiSuffix(exponent);
case DECIMAL_EXPONENT:
return exponent == 0 ? "" :... | final String formattedString = new SuffixFormatter().format(Quantity.Format.BINARY_SI, 0);
assertThat(formattedString, is(""));
}
} | [FOCAL] public String SuffixFormatter.format(Quantity.Format format, int exponent)
[CLASS] class SuffixFormatter
[METRICS] loc=12 cc=4 branches=1 loops=0 returns=3 throws=1 nesting=1
[CALLS-INTERNAL] String getBinarySiSuffix(int exponent); String getDecimalSiSuffix(int exponent)
[NEW] IllegalStateException
[EXCEPTIONS]... | /* static context
[FOCAL] public String SuffixFormatter.format(Quantity.Format format, int exponent)
[THROWS-WHEN] IllegalStateException when switch(format)=default
[PATH1] switch(format)=case DECIMAL_SI -> return getDecimalSiSuffix(exponent)
[PATH2] switch(format)=case BINARY_SI -> return getBinarySiSuffix(exponent)
[... | /* static context
[FOCAL] public String SuffixFormatter.format(Quantity.Format format, int exponent)
[THROWS-WHEN] IllegalStateException when switch(format)=default
[PATH1] switch(format)=case DECIMAL_SI -> return getDecimalSiSuffix(exponent)
[PATH2] switch(format)=case BINARY_SI -> return getBinarySiSuffix(exponent)
[... | true | ok | {"focal": {"class": "SuffixFormatter", "name": "format", "signature": "String format(Quantity.Format format, int exponent)", "start_line": 3, "modifiers": "public", "params": [{"name": "format", "type": "Quantity.Format"}, {"name": "exponent", "type": "int"}], "return_type": "String"}, "class_info": {"name": "SuffixFor... |
90725839_1 | class ConfigurationManager {
static void loadProperties(Properties properties) throws InitConfigurationException {
if (instance == null) {
instance = getConfigInstance();
}
ConfigurationUtils.loadProperties(properties, instance);
}
static void setEnableDefaultload(boole... | ConfigurationManager.loadPropertiesFromResources("test.properties");
assertEquals("9", ConfigurationManager.getConfigInstance().getProperty("com.ctrip.config.samples.needCount"));
assertEquals("9", ConfigurationManager.getConfigInstance().getString("com.ctrip.config.samples.needCount"));
... | [FOCAL] static void ConfigurationManager.loadProperties(Properties properties)
[CLASS] class ConfigurationManager
[METRICS] loc=6 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] Configuration getConfigInstance()
[CALLS-EXTERNAL] ConfigurationUtils.loadProperties/2
[EXCEPTIONS] declares InitConfigu... | /* static context
[FOCAL] static void ConfigurationManager.loadProperties(Properties properties)
[PATH1] if(instance == null)=T
[PATH2] if(instance == null)=F
[EXCEPTIONS] declares InitConfigurationException
[CALLS-INTERNAL] Configuration getConfigInstance()
[CALLS-EXTERNAL] ConfigurationUtils.loadProperties/2
*/
| /* static context
[FOCAL] static void ConfigurationManager.loadProperties(Properties properties)
[PATH1] if(instance == null)=T
[PATH2] if(instance == null)=F
[EXCEPTIONS] declares InitConfigurationException
[CALLS-INTERNAL] Configuration getConfigInstance()
[CALLS-EXTERNAL] ConfigurationUtils.loadProperties/2
*/
class... | true | ok | {"focal": {"class": "ConfigurationManager", "name": "loadProperties", "signature": "void loadProperties(Properties properties) throws InitConfigurationException", "start_line": 3, "modifiers": "static", "params": [{"name": "properties", "type": "Properties"}], "return_type": "void"}, "class_info": {"name": "Configurati... |
90792480_1 | class OffsetAnimator {
protected float computeValueByOffset(float positionOffset) {
positionOffset = computeByTimeShift(positionOffset);
positionOffset = computeByInterpolator(positionOffset);
return computeExactPosition(x1, x2, positionOffset);
}
protected OffsetAnimator(float x1... | OffsetAnimator offsetAnimator = new OffsetAnimator(0, 100);
float[] positionOffsets = PositionGenerator.generatePositionOffsets();
final float[] expectedValues = new float[100];
for (int i = 1; i < 100; i++) {
expectedValues[i] = i;
}
final float[] actualVal... | [FOCAL] protected float OffsetAnimator.computeValueByOffset(float positionOffset)
[CLASS] class OffsetAnimator
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] float computeByInterpolator(float positionOffset); float computeByTimeShift(float positionOffset); float computeExactPositi... | /* static context
[FOCAL] protected float OffsetAnimator.computeValueByOffset(float positionOffset)
[INPUTS] branches=- | result=positionOffset
[CALLS-INTERNAL] float computeByInterpolator(float positionOffset); float computeByTimeShift(float positionOffset); float computeExactPosition(float x1, float x2, float positio... | /* static context
[FOCAL] protected float OffsetAnimator.computeValueByOffset(float positionOffset)
[INPUTS] branches=- | result=positionOffset
[CALLS-INTERNAL] float computeByInterpolator(float positionOffset); float computeByTimeShift(float positionOffset); float computeExactPosition(float x1, float x2, float positio... | true | ok | {"focal": {"class": "OffsetAnimator", "name": "computeValueByOffset", "signature": "float computeValueByOffset(float positionOffset)", "start_line": 3, "modifiers": "protected", "params": [{"name": "positionOffset", "type": "float"}], "return_type": "float"}, "class_info": {"name": "OffsetAnimator", "kind": "class", "m... |
90798597_2 | class ImageViewerPresenter implements ImageViewerContract.Presenter {
@Override
public void deleteImage() {
mImagesRepository.deleteImage(mImage);
mView.displayImageDeleted();
}
public ImageViewerPresenter(@NonNull ImageViewerContract.View view, @NonNull ImagesRepository repository, @... | mPresenter.deleteImage();
verify(mRepository).deleteImage(anyString());
}
} | [FOCAL] @Override public void ImageViewerPresenter.deleteImage()
[CLASS] class ImageViewerPresenter implements ImageViewerContract.Presenter
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] mImagesRepository.deleteImage/1, ImageViewerContract.View.displayImageDeleted/0
[FIELDS] read... | /* static context
[FOCAL] @Override public void ImageViewerPresenter.deleteImage()
[COLLABORATORS] field mImagesRepository deleteImage/1; field mView:ImageViewerContract.View displayImageDeleted/0
[FIELDS] read=mView:ImageViewerContract.View
[CALLS-EXTERNAL] mImagesRepository.deleteImage/1, ImageViewerContract.View.dis... | /* static context
[FOCAL] @Override public void ImageViewerPresenter.deleteImage()
[COLLABORATORS] field mImagesRepository deleteImage/1; field mView:ImageViewerContract.View displayImageDeleted/0
[FIELDS] read=mView:ImageViewerContract.View
[CALLS-EXTERNAL] mImagesRepository.deleteImage/1, ImageViewerContract.View.dis... | true | ok | {"focal": {"class": "ImageViewerPresenter", "name": "deleteImage", "signature": "void deleteImage()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "ImageViewerPresenter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "ImageViewerCon... |
90798624_1 | class MainPresenter implements MainContract.Presenter {
@Override
public void loadPosts() {
mView.setLoadingPosts(true);
mData.getPosts(new DataSource.GetPostsCallback() {
@Override
public void onPostsLoaded(Post[] posts) {
mView.setLoadingPosts(false);
... | String errorText = "Error!";
mPresenter.loadPosts();
// Data should be loaded from data source and loading indicator should be displayed
verify(mData).getPosts(mGetPostsCallbackbackCaptor.capture());
verify(mView).setLoadingPosts(true);
// Trigger error
mGetPos... | [FOCAL] @Override public void MainPresenter.loadPosts()
[CLASS] class MainPresenter implements MainContract.Presenter
[METRICS] loc=36 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] MainContract.View.setLoadingPosts/1, DataSource.getPosts/1, MainContract.View.hideError/0, MainContract.View.showNo... | /* static context
[FOCAL] @Override public void MainPresenter.loadPosts()
[COLLABORATORS] field mView:MainContract.View setLoadingPosts/1,hideError/0,showNoPostsMessage/1,setPosts/1,showError/2; field mData:DataSource getPosts/1; field cause toString/0
[FIELDS] read=mData:DataSource, mView:MainContract.View
[NEW] DataS... | /* static context
[FOCAL] @Override public void MainPresenter.loadPosts()
[COLLABORATORS] field mView:MainContract.View setLoadingPosts/1,hideError/0,showNoPostsMessage/1,setPosts/1,showError/2; field mData:DataSource getPosts/1; field cause toString/0
[FIELDS] read=mData:DataSource, mView:MainContract.View
[NEW] DataS... | true | ok | {"focal": {"class": "MainPresenter", "name": "loadPosts", "signature": "void loadPosts()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "MainPresenter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "MainContract.Presenter", "fields... |
90847405_0 | class CardTemplate {
private String updateImagesPath(String template) {
return template.replaceAll(IMAGE_PATH_REGEX, IMAGE_PATH_REPLACEMENT);
}
CardTemplate(String frontTemplate, String rearTemplate, int ord);
public String getFrontTemplate();
public String getRearTemplate();
public... | String sampleText = "Che cos'è un latch SR?\n<hr id=answer>\n<div>Un circuito elettronico capace di memorizzare informazioni</div><img src=\"paste-9921374453761.jpg\" /> oppure <img src=\"paste-9921374453761.jpg\" />";
String expectedText = "Che cos'è un latch SR?\n<hr id=answer>\n<div>Un circuito elett... | [FOCAL] private String CardTemplate.updateImagesPath(String template)
[CLASS] class CardTemplate
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] String.replaceAll/2
[INPUTS] branches=- | result=template
[DATAFLOW] template@param->L2
[CLASS-MEMBERS] CardTemplate(String frontTemplate... | /* static context
[FOCAL] private String CardTemplate.updateImagesPath(String template)
[INPUTS] branches=- | result=template
[CALLS-EXTERNAL] String.replaceAll/2
*/
| /* static context
[FOCAL] private String CardTemplate.updateImagesPath(String template)
[INPUTS] branches=- | result=template
[CALLS-EXTERNAL] String.replaceAll/2
*/
class CardTemplate {
private String updateImagesPath(String template) {
return template.replaceAll(IMAGE_PATH_REGEX, IMAGE_PATH_REPLACEMENT);... | true | ok | {"focal": {"class": "CardTemplate", "name": "updateImagesPath", "signature": "String updateImagesPath(String template)", "start_line": 3, "modifiers": "private", "params": [{"name": "template", "type": "String"}], "return_type": "String"}, "class_info": {"name": "CardTemplate", "kind": "class", "modifiers": "", "superc... |
90860455_7 | class NodeBasedRewriteRule implements DialogRewriteRule {
public Node applyTo(Node root, Set<Node> finalNodes)
throws DialogRewriteException, RepositoryException {
// check if the 'replacement' node exists
if (!ruleNode.hasNode("replacement")) {
throw new DialogRewriteExcept... | Node ruleNode = context.resourceResolver().getResource(RULES_PATH + "/rewriteFinal").adaptTo(Node.class);
Node rootNode = context.resourceResolver().getResource(ROOTS_PATH + "/simple").adaptTo(Node.class);
NodeBasedRewriteRule rule = new NodeBasedRewriteRule(ruleNode);
Set<Node> finalNo... | [FOCAL] public Node NodeBasedRewriteRule.applyTo(Node root, Set<Node> finalNodes)
[CLASS] class NodeBasedRewriteRule implements DialogRewriteRule
[METRICS] loc=149 cc=24 branches=17 loops=6 returns=2 throws=1 nesting=4
[CALLS-INTERNAL] Property mapProperty(Node root, Property property); void addCommonAttrMappings(Node ... | class NodeBasedRewriteRule implements DialogRewriteRule {
public Node applyTo(Node root, Set<Node> finalNodes)
throws DialogRewriteException, RepositoryException {
// check if the 'replacement' node exists
if (!ruleNode.hasNode("replacement")) {
throw new DialogRewriteExcept... | false | ok | {"focal": {"class": "NodeBasedRewriteRule", "name": "applyTo", "signature": "Node applyTo(Node root, Set<Node> finalNodes) throws DialogRewriteException, RepositoryException", "start_line": 3, "modifiers": "public", "params": [{"name": "root", "type": "Node"}, {"name": "finalNodes", "type": "Set<Node>"}], "return_type"... | |
90881605_2 | class Pager implements Runnable {
public Pager(BiFunction<Long, Long, T> fetchFn, Long limit, Long pageSize) {
Function<RequestPager.Page, T> fn = (page) -> {
try {
return fetchFn.apply(page.getLimit(), page.getOffset());
}
catch (Exception e) {
... | var data = new ArrayList<Integer>();
for (var i = 0; i < 1000; i++) {
data.add(i);
}
var pager = new Pager<>((limit, offset) -> {
var start = offset;
Long end = limit + offset;
if (start > data.size()) {
start = (long) data... | [FOCAL] public Pager.Pager(BiFunction<Long, Long, T> fetchFn, Long limit, Long pageSize)
[CLASS] class Pager implements Runnable
[METRICS] loc=16 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-EXTERNAL] BiFunction<Long, Long, T>.apply/2, page.getLimit/0, page.getOffset/0, RequestPager<T>.build/2, Long.intV... | /* static context
[FOCAL] public Pager.Pager(BiFunction<Long, Long, T> fetchFn, Long limit, Long pageSize)
[COLLABORATORS] param fetchFn:BiFunction<Long, Long, T> apply/2; field page getLimit/0,getOffset/0
[NEW] RuntimeException, RequestPager<>
[CALLS-EXTERNAL] BiFunction<Long, Long, T>.apply/2, page.getLimit/0, page.g... | /* static context
[FOCAL] public Pager.Pager(BiFunction<Long, Long, T> fetchFn, Long limit, Long pageSize)
[COLLABORATORS] param fetchFn:BiFunction<Long, Long, T> apply/2; field page getLimit/0,getOffset/0
[NEW] RuntimeException, RequestPager<>
[CALLS-EXTERNAL] BiFunction<Long, Long, T>.apply/2, page.getLimit/0, page.g... | true | ok | {"focal": {"class": "Pager", "name": "Pager", "signature": "Pager(BiFunction<Long, Long, T> fetchFn, Long limit, Long pageSize)", "start_line": 3, "modifiers": "public", "params": [{"name": "fetchFn", "type": "BiFunction<Long, Long, T>"}, {"name": "limit", "type": "Long"}, {"name": "pageSize", "type": "Long"}], "return... |
90886387_3 | class GraywaterAdapter extends RecyclerView.Adapter<VH> {
public void clear() {
mItems.clear();
mBinderListCache.clear();
mViewHolderToItemPositionCache.clear();
mItemPositionToFirstViewHolderPositionCache.clear();
mViewHolderPreparedCache.clear();
mPreviousBoundViewHolderPosition = NO_PREVIOUS_BOUND_VIEW... | final TestAdapter adapter = new TestAdapter();
// ["https://www.tumblr.com", "https://www.tumblr.com", "https://www.tumblr.com", "one", "one",
// "http://dreamynomad.com", "http://dreamynomad.com", "http://dreamynomad.com", ...]
final Uri tumblrUri = Uri.parse("https://www.tumblr.com");
adapter.add(tumblrUr... | [FOCAL] public void GraywaterAdapter.clear()
[CLASS] class GraywaterAdapter extends RecyclerView.Adapter<VH>
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] mItems.clear/0, mBinderListCache.clear/0, mViewHolderToItemPositionCache.clear/0, mItemPositionToFirstViewHolderPositionCache... | /* static context
[FOCAL] public void GraywaterAdapter.clear()
[COLLABORATORS] field mItems clear/0; field mBinderListCache clear/0; field mViewHolderToItemPositionCache clear/0; field mItemPositionToFirstViewHolderPositionCache clear/0; field mViewHolderPreparedCache clear/0
[CALLS-EXTERNAL] mItems.clear/0, mBinderLis... | /* static context
[FOCAL] public void GraywaterAdapter.clear()
[COLLABORATORS] field mItems clear/0; field mBinderListCache clear/0; field mViewHolderToItemPositionCache clear/0; field mItemPositionToFirstViewHolderPositionCache clear/0; field mViewHolderPreparedCache clear/0
[CALLS-EXTERNAL] mItems.clear/0, mBinderLis... | true | ok | {"focal": {"class": "GraywaterAdapter", "name": "clear", "signature": "void clear()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "GraywaterAdapter", "kind": "class", "modifiers": "", "superclass": "RecyclerView.Adapter<VH>", "interfaces": null, "fields": [], "me... |
90936492_25 | class AbstractCommonFunctions extends io.github.wysohn.triggerreactor.core.manager.trigger.share.CommonFunctions implements SelfReference {
public int loreSize(ItemStack IS) {
ItemMeta IM = IS.getItemMeta();
if (IM == null)
return 0;
List<String> lores = IM.getLore();
if... | List<String> lores = new ArrayList<>();
lores.add("abab");
lores.add("cdcd");
lores.add("efef");
ItemStack IS = new ItemStack(Material.STONE);
Mockito.doAnswer(invocation -> lores).when(mockItemMeta).getLore();
Assert.assertEquals(3, fn.loreSize(IS));
}
} | [FOCAL] public int AbstractCommonFunctions.loreSize(ItemStack IS)
[CLASS] class AbstractCommonFunctions extends io.github.wysohn.triggerreactor.core.manager.trigger.share.CommonFunctions implements SelfReference
[METRICS] loc=9 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] ItemStack.getItemMeta/... | /* static context
[FOCAL] public int AbstractCommonFunctions.loreSize(ItemStack IS)
[PATH1] if(IM == null)=F -> if(lores == null)=T -> return 0
[PATH2] if(IM == null)=F -> if(lores == null)=F -> return lores.size()
[PATH3] if(IM == null)=T -> return 0
[INPUTS] branches=IS | result=IS
[COLLABORATORS] param IS:ItemStack ... | /* static context
[FOCAL] public int AbstractCommonFunctions.loreSize(ItemStack IS)
[PATH1] if(IM == null)=F -> if(lores == null)=T -> return 0
[PATH2] if(IM == null)=F -> if(lores == null)=F -> return lores.size()
[PATH3] if(IM == null)=T -> return 0
[INPUTS] branches=IS | result=IS
[COLLABORATORS] param IS:ItemStack ... | true | ok | {"focal": {"class": "AbstractCommonFunctions", "name": "loreSize", "signature": "int loreSize(ItemStack IS)", "start_line": 3, "modifiers": "public", "params": [{"name": "IS", "type": "ItemStack"}], "return_type": "int"}, "class_info": {"name": "AbstractCommonFunctions", "kind": "class", "modifiers": "", "superclass": ... |
90985502_0 | class ClassLoaderUtil {
public static String classnameFromFilename(final String filename) {
Objects.requireNonNull(filename);
return
StreamSupport.stream(
Paths.get(filename.replaceFirst("\\.class$", "")).spliterator(), false)
.map(Path::toString)
... | assertEquals(
"com.example.Foo",
ClassLoaderUtil.classnameFromFilename("com/example/Foo.class"));
}
} | [FOCAL] public static String ClassLoaderUtil.classnameFromFilename(String filename)
[CLASS] class ClassLoaderUtil
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Objects.requireNonNull/1, StreamSupport.stream( Paths.get(filename.replaceFirst("\\....collect/1, StreamSupport.stream( ... | /* static context
[FOCAL] public static String ClassLoaderUtil.classnameFromFilename(String filename)
[INPUTS] branches=- | result=filename
[CALLS-EXTERNAL] Objects.requireNonNull/1, StreamSupport.stream( Paths.get(filename.replaceFirst("\\....collect/1, StreamSupport.stream( Paths.get(filename.replaceFirst("\\....map/... | /* static context
[FOCAL] public static String ClassLoaderUtil.classnameFromFilename(String filename)
[INPUTS] branches=- | result=filename
[CALLS-EXTERNAL] Objects.requireNonNull/1, StreamSupport.stream( Paths.get(filename.replaceFirst("\\....collect/1, StreamSupport.stream( Paths.get(filename.replaceFirst("\\....map/... | true | ok | {"focal": {"class": "ClassLoaderUtil", "name": "classnameFromFilename", "signature": "String classnameFromFilename(String filename)", "start_line": 3, "modifiers": "public static", "params": [{"name": "filename", "type": "String"}], "return_type": "String"}, "class_info": {"name": "ClassLoaderUtil", "kind": "class", "m... |
91037889_4 | class LobbyPresenter extends BasePresenter<LobbyView> {
void onReportDataError(Throwable throwable) {
Timber.e(throwable, "report error");
view.displayReportError();
}
@Inject LobbyPresenter(LobbyReportUseCase lobbyReportUseCase, SchedulersFacade schedulersFacade);
String getLocalRe... | // WHEN
testSubject.onReportDataError(null);
// THEN
verify(view).displayReportError();
}
} | [FOCAL] void LobbyPresenter.onReportDataError(Throwable throwable)
[CLASS] class LobbyPresenter extends BasePresenter<LobbyView>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] Timber.e/2, LobbyView.displayReportError/0
[FIELDS] read=view:LobbyView
[COLLABORATORS] field view:LobbyV... | /* static context
[FOCAL] void LobbyPresenter.onReportDataError(Throwable throwable)
[COLLABORATORS] field view:LobbyView displayReportError/0
[FIELDS] read=view:LobbyView
[CALLS-EXTERNAL] Timber.e/2, LobbyView.displayReportError/0
*/
| /* static context
[FOCAL] void LobbyPresenter.onReportDataError(Throwable throwable)
[COLLABORATORS] field view:LobbyView displayReportError/0
[FIELDS] read=view:LobbyView
[CALLS-EXTERNAL] Timber.e/2, LobbyView.displayReportError/0
*/
class LobbyPresenter extends BasePresenter<LobbyView> {
void onReportDataError(T... | true | ok | {"focal": {"class": "LobbyPresenter", "name": "onReportDataError", "signature": "void onReportDataError(Throwable throwable)", "start_line": 3, "modifiers": "", "params": [{"name": "throwable", "type": "Throwable"}], "return_type": "void"}, "class_info": {"name": "LobbyPresenter", "kind": "class", "modifiers": "", "sup... |
91054623_7 | class UtilAll {
public static int getPid() {
RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
String name = runtime.getName(); // format: "pid@hostname"
try {
return Integer.parseInt(name.substring(0, name.indexOf('@')));
} catch (Exception e) {
... | int pid = UtilAll.getPid();
System.out.println("PID = " + pid);
assertTrue(pid > 0);
}
} | [FOCAL] public static int UtilAll.getPid()
[CLASS] class UtilAll
[METRICS] loc=9 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] ManagementFactory.getRuntimeMXBean/0, RuntimeMXBean.getName/0, Integer.parseInt/1, String.substring/2, String.indexOf/1
[EXCEPTIONS] catches Exception e
[PATH1] try-body... | /* static context
[FOCAL] public static int UtilAll.getPid()
[PATH1] try-body throws -> return -1
[PATH2] return Integer.parseInt(name.substring(0, name.indexOf('@')))
[EXCEPTIONS] catches Exception e
[CALLS-EXTERNAL] ManagementFactory.getRuntimeMXBean/0, RuntimeMXBean.getName/0, Integer.parseInt/1, String.substring/2,... | /* static context
[FOCAL] public static int UtilAll.getPid()
[PATH1] try-body throws -> return -1
[PATH2] return Integer.parseInt(name.substring(0, name.indexOf('@')))
[EXCEPTIONS] catches Exception e
[CALLS-EXTERNAL] ManagementFactory.getRuntimeMXBean/0, RuntimeMXBean.getName/0, Integer.parseInt/1, String.substring/2,... | true | ok | {"focal": {"class": "UtilAll", "name": "getPid", "signature": "int getPid()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "int"}, "class_info": {"name": "UtilAll", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "currentStackTr... |
91104663_9 | class JsonUtils {
@Nullable
public static List<String> parseOptStringList(@Nullable JSONArray jsonArray) {
if (jsonArray == null) {
return null;
}
final List<String> list = new ArrayList<>();
for (int i = 0; i < jsonArray.length(); i++) {
final String i... |
JSONArray jsonArray = new JSONArray();
String testString = "Test";
jsonArray.put(testString);
List<String> stringList = JsonUtils.parseOptStringList(jsonArray);
Assert.assertNotNull(stringList);
String first = stringList.get(0);
Assert.assertEquals(testString,... | [FOCAL] @Nullable public static List<String> JsonUtils.parseOptStringList(JSONArray jsonArray)
[CLASS] class JsonUtils
[METRICS] loc=17 cc=4 branches=2 loops=1 returns=2 throws=0 nesting=2
[CALLS-EXTERNAL] JSONArray.length/0, JSONArray.optString/2, List<String>.add/1, Collections.unmodifiableList/1
[NEW] ArrayList<>
[P... | /* static context
[FOCAL] @Nullable public static List<String> JsonUtils.parseOptStringList(JSONArray jsonArray)
[PATH1] if(jsonArray == null)=F -> for(i < jsonArray.length())=T -> if(item != null)=T -> exit loop -> return Collections.unmodifiableList(list)
[PATH2] if(jsonArray == null)=T -> return null
[PATH3] if(json... | /* static context
[FOCAL] @Nullable public static List<String> JsonUtils.parseOptStringList(JSONArray jsonArray)
[PATH1] if(jsonArray == null)=F -> for(i < jsonArray.length())=T -> if(item != null)=T -> exit loop -> return Collections.unmodifiableList(list)
[PATH2] if(jsonArray == null)=T -> return null
[PATH3] if(json... | true | ok | {"focal": {"class": "JsonUtils", "name": "parseOptStringList", "signature": "List<String> parseOptStringList(JSONArray jsonArray)", "start_line": 3, "modifiers": "@Nullable public static", "params": [{"name": "jsonArray", "type": "JSONArray"}], "return_type": "List<String>"}, "class_info": {"name": "JsonUtils", "kind":... |
91120647_47 | class JsonXMLArrayProvider extends AbstractJsonXMLProvider {
@Override
public void write(
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String, Object> httpHeaders,
Writer stream,
... | JsonXMLArrayProvider provider = new JsonXMLArrayProvider(null);
Annotation[] annotations = new Annotation[]{JsonXMLVirtualSampleRootElement.class.getAnnotation(JsonXML.class)};
Type type = getClass().getDeclaredField("sampleRootElementList").getGenericType();
List<SampleRootElement> list = new ArrayList<Samp... | [FOCAL] @Override public void JsonXMLArrayProvider.write(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, Writer stream, Object entry)
[CLASS] class JsonXMLArrayProvider extends AbstractJsonXMLProvider
[METRICS] loc=27 cc=5 branches=2 loops=0 re... | /* static context
[FOCAL] @Override public void JsonXMLArrayProvider.write(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, Writer stream, Object entry)
[THROWS-WHEN] WebApplicationException when entry == null && try-body throws
[THROWS-WHEN] We... | /* static context
[FOCAL] @Override public void JsonXMLArrayProvider.write(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, Writer stream, Object entry)
[THROWS-WHEN] WebApplicationException when entry == null && try-body throws
[THROWS-WHEN] We... | true | ok | {"focal": {"class": "JsonXMLArrayProvider", "name": "write", "signature": "void write(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, Writer stream, Object entry) throws IOException, WebApplicationException", "start_line": 3, "modifiers": "@Ove... |
91155672_2 | class WebhookAPI {
@GET
@Produces(MediaType.APPLICATION_JSON)
public static Response get() {
return Responses.ok(Webhooks.instance().hooks());
}
@GET @Path("/{id}") @Produces(MediaType.APPLICATION_JSON) public static Response get(@PathParam("id") long id);
@POST @Consumes(MediaType.APP... | Response res = target("").path("1").request()
.get();
assertEquals(404, res.getStatus());
}
} | [FOCAL] @GET @Produces(MediaType.APPLICATION_JSON) public static Response WebhookAPI.get()
[CLASS] class WebhookAPI
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Responses.ok/1, Webhooks.instance().hooks/0, Webhooks.instance/0
[CLASS-MEMBERS] Response get(long id); Response creat... | /* static context
[FOCAL] @GET @Produces(MediaType.APPLICATION_JSON) public static Response WebhookAPI.get()
[CALLS-EXTERNAL] Responses.ok/1, Webhooks.instance().hooks/0, Webhooks.instance/0
*/
| /* static context
[FOCAL] @GET @Produces(MediaType.APPLICATION_JSON) public static Response WebhookAPI.get()
[CALLS-EXTERNAL] Responses.ok/1, Webhooks.instance().hooks/0, Webhooks.instance/0
*/
class WebhookAPI {
@GET
@Produces(MediaType.APPLICATION_JSON)
public static Response get() {
return Respo... | true | ok | {"focal": {"class": "WebhookAPI", "name": "get", "signature": "Response get()", "start_line": 3, "modifiers": "@GET @Produces(MediaType.APPLICATION_JSON) public static", "params": [], "return_type": "Response"}, "class_info": {"name": "WebhookAPI", "kind": "class", "modifiers": "", "superclass": null, "interfaces": nul... |
91247102_8 | class WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
if (env.getActiveProfiles().length != 0) {
log.info("Web application configuration, using profiles: {}", (O... | env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT);
webConfigurer.onStartup(servletContext);
assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry);
assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)... | [FOCAL] @Override public void WebConfigurer.onStartup(ServletContext servletContext)
[CLASS] class WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer
[METRICS] loc=15 cc=4 branches=3 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] void initCachingHttpHeadersFilter(ServletContex... | /* static context
[FOCAL] @Override public void WebConfigurer.onStartup(ServletContext servletContext)
[PATH1] if(env.getActiveProfiles().length != 0)=T -> if(env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION))=T -> if(env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))=T
[PATH2] if(env.get... | /* static context
[FOCAL] @Override public void WebConfigurer.onStartup(ServletContext servletContext)
[PATH1] if(env.getActiveProfiles().length != 0)=T -> if(env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION))=T -> if(env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))=T
[PATH2] if(env.get... | true | ok | {"focal": {"class": "WebConfigurer", "name": "onStartup", "signature": "void onStartup(ServletContext servletContext) throws ServletException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "servletContext", "type": "ServletContext"}], "return_type": "void"}, "class_info": {"name": "WebConfigure... |
91324844_0 | class Post extends AuditableEntity {
@PrePersist
public void slugify(){
this.slug = new Slugify().slugify(this.title);
}
}
class PostTest {
@Test
public void testSlug() {
| System.out.println("getSlug");
Post instance = new Post();
instance.setTitle("test post 1");
instance.slugify();
assertEquals("test-post-1", instance.getSlug());
}
} | [FOCAL] @PrePersist public void Post.slugify()
[CLASS] class Post extends AuditableEntity
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] new Slugify().slugify/1
[NEW] Slugify
[FIELDS] read=title | write=slug
[STATE] slug
[TEST] PostTest: @Test public void testSlug() | /* static context
[FOCAL] @PrePersist public void Post.slugify()
[STATE] slug
[FIELDS] read=title | write=slug
[NEW] Slugify
[CALLS-EXTERNAL] new Slugify().slugify/1
*/
| /* static context
[FOCAL] @PrePersist public void Post.slugify()
[STATE] slug
[FIELDS] read=title | write=slug
[NEW] Slugify
[CALLS-EXTERNAL] new Slugify().slugify/1
*/
class Post extends AuditableEntity {
@PrePersist
public void slugify(){
this.slug = new Slugify().slugify(this.title);
}
}
class... | true | ok | {"focal": {"class": "Post", "name": "slugify", "signature": "void slugify()", "start_line": 3, "modifiers": "@PrePersist public", "params": [], "return_type": "void"}, "class_info": {"name": "Post", "kind": "class", "modifiers": "", "superclass": "AuditableEntity", "interfaces": null, "fields": [], "members": []}, "ast... |
91367377_1 | class GraphExporter {
public BufferedImage exportCurrentGraph(mxGraph graph, double scale, UIAbstractBlock selectedBlock, BlockState<? extends LatticeElement> state) {
BufferedImage graphImage;
int stateImageWidth = (int) (STATE_AREA_WIDTH * scale);
BufferedImage stateImage = null;
... | BufferedImage exportedImage = graphExporter.exportCurrentGraph(graph, 2.0, null, null);
BufferedImage referenceImage = ImageIO.read(getClass().getResourceAsStream("/export-medium.png"));
Assert.assertEquals("", TestUtils.bufferedImagesEqual(exportedImage, referenceImage, 10, 300, 10));
}
} | [FOCAL] public BufferedImage GraphExporter.exportCurrentGraph(mxGraph graph, double scale, UIAbstractBlock selectedBlock, BlockState<? extends LatticeElement> state)
[CLASS] class GraphExporter
[METRICS] loc=70 cc=5 branches=2 loops=2 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] UIAbstractBlock.getMxCell/0, graph.getC... | /* static context
[FOCAL] public BufferedImage GraphExporter.exportCurrentGraph(mxGraph graph, double scale, UIAbstractBlock selectedBlock, BlockState<? extends LatticeElement> state)
[PATH1] if(selectedBlock != null && state != null)=T -> foreach(String s : inStrings)=T -> exit loop -> foreach(String s : outStrings)=F... | /* static context
[FOCAL] public BufferedImage GraphExporter.exportCurrentGraph(mxGraph graph, double scale, UIAbstractBlock selectedBlock, BlockState<? extends LatticeElement> state)
[PATH1] if(selectedBlock != null && state != null)=T -> foreach(String s : inStrings)=T -> exit loop -> foreach(String s : outStrings)=F... | true | ok | {"focal": {"class": "GraphExporter", "name": "exportCurrentGraph", "signature": "BufferedImage exportCurrentGraph(mxGraph graph, double scale, UIAbstractBlock selectedBlock, BlockState<? extends LatticeElement> state)", "start_line": 3, "modifiers": "public", "params": [{"name": "graph", "type": "mxGraph"}, {"name": "s... |
91427887_1 | class Tracing extends org.apache.cassandra.tracing.Tracing {
Span spanFromPayload(Tracer tracer, @Nullable Map<String, ByteBuffer> payload) {
ByteBuffer b3 = payload != null ? payload.get("b3") : null;
if (b3 == null) return tracer.nextSpan();
TraceContextOrSamplingFlags extracted = B3SingleFormat.parseB... | assertThat(cassandraTracing.spanFromPayload(tracing.tracer(), Collections.emptyMap()))
.isNotNull();
}
} | [FOCAL] Span Tracing.spanFromPayload(Tracer tracer, Map<String, ByteBuffer> payload)
[CLASS] class Tracing extends org.apache.cassandra.tracing.Tracing
[METRICS] loc=7 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] Map<String, ByteBuffer>.get/1, Tracer.nextSpan/0, B3SingleFormat.parseB3SingleForm... | /* static context
[FOCAL] Span Tracing.spanFromPayload(Tracer tracer, Map<String, ByteBuffer> payload)
[PATH1] if(b3 == null)=F -> if(extracted == null)=T -> return tracer.nextSpan()
[PATH2] if(b3 == null)=F -> if(extracted == null)=F -> return tracer.nextSpan(extracted)
[PATH3] if(b3 == null)=T -> return tracer.nextSp... | /* static context
[FOCAL] Span Tracing.spanFromPayload(Tracer tracer, Map<String, ByteBuffer> payload)
[PATH1] if(b3 == null)=F -> if(extracted == null)=T -> return tracer.nextSpan()
[PATH2] if(b3 == null)=F -> if(extracted == null)=F -> return tracer.nextSpan(extracted)
[PATH3] if(b3 == null)=T -> return tracer.nextSp... | true | ok | {"focal": {"class": "Tracing", "name": "spanFromPayload", "signature": "Span spanFromPayload(Tracer tracer, Map<String, ByteBuffer> payload)", "start_line": 3, "modifiers": "", "params": [{"name": "tracer", "type": "Tracer"}, {"name": "payload", "type": "Map<String, ByteBuffer>"}], "return_type": "Span"}, "class_info":... |
91470090_46 | class Web3Impl implements Web3 {
@Override
public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) {
BlockResultDTO s = null;
try {
Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash));
if (block == null) {
... | /* Structure:
* Genesis
* | | |
* A B C
* | \ / ____/
* D E
* | /
* F
*
* A-D-F mainchain
* B and C uncles of E
* E uncle of F
* */
World world = new World();
Web3Impl... | [FOCAL] @Override public BlockResultDTO Web3Impl.eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx)
[CLASS] class Web3Impl implements Web3
[METRICS] loc=20 cc=4 branches=2 loops=0 returns=2 throws=0 nesting=2
[CALLS-INTERNAL] BlockResultDTO getUncleResultDTO(String uncleIdx, Block block)
[CALLS-EXTERNAL... | class Web3Impl implements Web3 {
@Override
public BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx) {
BlockResultDTO s = null;
try {
Block block = blockchain.getBlockByHash(stringHexToByteArray(blockHash));
if (block == null) {
... | false | ok | {"focal": {"class": "Web3Impl", "name": "eth_getUncleByBlockHashAndIndex", "signature": "BlockResultDTO eth_getUncleByBlockHashAndIndex(String blockHash, String uncleIdx)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "blockHash", "type": "String"}, {"name": "uncleIdx", "type": "String"}], "ret... | |
91478358_21 | class Topic {
public static Topic split(String path) {
if (path == null) {
return null;
}
path = path.replaceAll("(^/+|/$)+", "");
if (path.isEmpty()) {
return null;
}
return new Topic(Arrays.asList(path.split("\\/+")));
}
private ... | final Topic topic = Topic.split("");
Assert.assertNull(topic);
}
} | [FOCAL] public static Topic Topic.split(String path)
[CLASS] class Topic
[METRICS] loc=13 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] String.replaceAll/2, String.isEmpty/0, Arrays.asList/1, String.split/1
[NEW] Topic
[PATH1] if(path == null)=F -> if(path.isEmpty())=T -> return null
[PATH2] if(... | /* static context
[FOCAL] public static Topic Topic.split(String path)
[PATH1] if(path == null)=F -> if(path.isEmpty())=T -> return null
[PATH2] if(path == null)=F -> if(path.isEmpty())=F -> return new Topic(Arrays.asList(path.split("\\/+")))
[PATH3] if(path == null)=T -> return null
[INPUTS] branches=path | result=pat... | /* static context
[FOCAL] public static Topic Topic.split(String path)
[PATH1] if(path == null)=F -> if(path.isEmpty())=T -> return null
[PATH2] if(path == null)=F -> if(path.isEmpty())=F -> return new Topic(Arrays.asList(path.split("\\/+")))
[PATH3] if(path == null)=T -> return null
[INPUTS] branches=path | result=pat... | true | ok | {"focal": {"class": "Topic", "name": "split", "signature": "Topic split(String path)", "start_line": 3, "modifiers": "public static", "params": [{"name": "path", "type": "String"}], "return_type": "Topic"}, "class_info": {"name": "Topic", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields... |
91547699_1 | class SaveBmiService extends IntentService {
public static void start(Context context, BmiValue bmiValue) {
Intent intent = new Intent(context, SaveBmiService.class);
intent.putExtra(PARAM_KEY_BMI_VALUE, bmiValue);
context.startService(intent);
}
public SaveBmiService();
@Ove... | Context context = mock(Context.class);
SaveBmiService.start(context, mock(BmiValue.class));
verify(context, times(1)).startService((Intent) any());
}
} | [FOCAL] public static void SaveBmiService.start(Context context, BmiValue bmiValue)
[CLASS] class SaveBmiService extends IntentService
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] Intent.putExtra/2, Context.startService/1
[NEW] Intent
[COLLABORATORS] param context:Context startS... | /* static context
[FOCAL] public static void SaveBmiService.start(Context context, BmiValue bmiValue)
[COLLABORATORS] param context:Context startService/1
[NEW] Intent
[CALLS-EXTERNAL] Intent.putExtra/2, Context.startService/1
*/
| /* static context
[FOCAL] public static void SaveBmiService.start(Context context, BmiValue bmiValue)
[COLLABORATORS] param context:Context startService/1
[NEW] Intent
[CALLS-EXTERNAL] Intent.putExtra/2, Context.startService/1
*/
class SaveBmiService extends IntentService {
public static void start(Context context... | true | ok | {"focal": {"class": "SaveBmiService", "name": "start", "signature": "void start(Context context, BmiValue bmiValue)", "start_line": 3, "modifiers": "public static", "params": [{"name": "context", "type": "Context"}, {"name": "bmiValue", "type": "BmiValue"}], "return_type": "void"}, "class_info": {"name": "SaveBmiServic... |
91552889_11 | class FParser {
public static String evaljs(String script) {
try {
return JS.eval("JSON.stringify(" + script + ")").toString();
} catch (ScriptException ex) {
LOG.log(Level.SEVERE, ex.getMessage(), ex);
}
return "undefined";
}
public static List<Strin... | System.out.println("Evaljs");
String script = "floor(100 + random() * 900)";
String result = FParser.evaljs(script);
assertTrue(result.matches("[0-9]{3}"),
"Test random ");
script = "'test'+ floor(100 + random() * 900)+'vt@gmail.com'";
result = (String) JS... | [FOCAL] public static String FParser.evaljs(String script)
[CLASS] class FParser
[METRICS] loc=8 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] JS.eval("JSON.stringify(" + script + ")").toString/0, JS.eval/1, LOG.log/3, ScriptException.getMessage/0
[EXCEPTIONS] catches ScriptException ex
[PATH1] ... | /* static context
[FOCAL] public static String FParser.evaljs(String script)
[PATH1] try-body throws -> return "undefined"
[PATH2] return JS.eval("JSON.stringify(" + script + ")").toString()
[INPUTS] branches=- | result=script
[EXCEPTIONS] catches ScriptException ex
[CALLS-EXTERNAL] JS.eval("JSON.stringify(" + script +... | /* static context
[FOCAL] public static String FParser.evaljs(String script)
[PATH1] try-body throws -> return "undefined"
[PATH2] return JS.eval("JSON.stringify(" + script + ")").toString()
[INPUTS] branches=- | result=script
[EXCEPTIONS] catches ScriptException ex
[CALLS-EXTERNAL] JS.eval("JSON.stringify(" + script +... | true | ok | {"focal": {"class": "FParser", "name": "evaljs", "signature": "String evaljs(String script)", "start_line": 3, "modifiers": "public static", "params": [{"name": "script", "type": "String"}], "return_type": "String"}, "class_info": {"name": "FParser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": n... |
91571398_0 | class RedisAppender implements Appender {
public RedisThrottlerJmxBean getJmxBean() {
return throttler.getJmxBean();
}
private RedisAppender(Builder builder);
public Configuration getConfig();
@Override public String getName();
@Override public Layout<? extends Serializable> getLayou... |
LOGGER.debug("creating the logger");
Logger logger = LOGGER_CONTEXT_RESOURCE
.getLoggerContext()
.getLogger(RedisAppenderTest.class.getCanonicalName());
int expectedMessageCount = MIN_MESSAGE_COUNT + RANDOM.nextInt(MAX_MESSAGE_COUNT - MIN_MESSAGE_COUNT);
... | [FOCAL] public RedisThrottlerJmxBean RedisAppender.getJmxBean()
[CLASS] class RedisAppender implements Appender
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] throttler.getJmxBean/0
[COLLABORATORS] field throttler getJmxBean/0
[CLASS-MEMBERS] RedisAppender(Builder builder); Config... | /* static context
[FOCAL] public RedisThrottlerJmxBean RedisAppender.getJmxBean()
[COLLABORATORS] field throttler getJmxBean/0
[CALLS-EXTERNAL] throttler.getJmxBean/0
*/
| /* static context
[FOCAL] public RedisThrottlerJmxBean RedisAppender.getJmxBean()
[COLLABORATORS] field throttler getJmxBean/0
[CALLS-EXTERNAL] throttler.getJmxBean/0
*/
class RedisAppender implements Appender {
public RedisThrottlerJmxBean getJmxBean() {
return throttler.getJmxBean();
}
private ... | true | ok | {"focal": {"class": "RedisAppender", "name": "getJmxBean", "signature": "RedisThrottlerJmxBean getJmxBean()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "RedisThrottlerJmxBean"}, "class_info": {"name": "RedisAppender", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Append... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.