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 |
|---|---|---|---|---|---|---|---|---|
618103_0 | class DataRetrieverTask extends AsyncTask<String, String, Void> {
@Override
protected Void doInBackground(final String... args) {
errors = new ArrayList<>();
List<Bank> banks;
if (bankId != -1) {
banks = new ArrayList<>();
banks.add(getBankFromDb(bankId, parent))... | Bank bank = Mockito.mock(Bank.class);
Mockito.when(bank.isDisabled()).thenReturn(true);
TestableDataRetrieverTask testMe = new TestableDataRetrieverTask(bank);
testMe.doInBackground();
// Single disabled bank should be updated
Mockito.verify(bank, Mockito.atLeastOnce())... | [FOCAL] @Override protected Void DataRetrieverTask.doInBackground(String... args)
[CLASS] class DataRetrieverTask extends AsyncTask<String, String, Void>
[METRICS] loc=59 cc=11 branches=4 loops=2 returns=1 throws=0 nesting=3
[CALLS-INTERNAL] Bank getBankFromDb(long bankId, Context parent); List<Bank> getBanksFromDb(Con... | /* static context
[FOCAL] @Override protected Void DataRetrieverTask.doInBackground(String... args)
[PATH1] if(bankId != -1)=T -> foreach(Bank bank : banks)=T -> if(isListingAllBanks() && bank.isDisabled())=F -> try-body throws -> if(NetworkUtils.isInternetAvailable())=T -> if(isContentProviderEnabled())=T -> foreach(A... | /* static context
[FOCAL] @Override protected Void DataRetrieverTask.doInBackground(String... args)
[PATH1] if(bankId != -1)=T -> foreach(Bank bank : banks)=T -> if(isListingAllBanks() && bank.isDisabled())=F -> try-body throws -> if(NetworkUtils.isInternetAvailable())=T -> if(isContentProviderEnabled())=T -> foreach(A... | true | ok | {"focal": {"class": "DataRetrieverTask", "name": "doInBackground", "signature": "Void doInBackground(String... args)", "start_line": 3, "modifiers": "@Override protected", "params": [{"name": "args", "type": "String..."}], "return_type": "Void"}, "class_info": {"name": "DataRetrieverTask", "kind": "class", "modifiers":... |
618681_8 | class NonBreakPointsLoaderImpl implements NonBreakPointsLoader {
@Override
public List<String> loadNBSP(String lang) {
if (lang == null || lang.isEmpty()) {
throw new IllegalArgumentException("Lang must be filled to search for file!");
}
List<String> result = loadForKey(lang);
if (result == null) {
int... | List<String> lines = new NonBreakPointsLoaderImpl().loadNBSP("de");
assertEquals(1, lines.size());
assertEquals("deRuleščřžýá", lines.get(0)); // tests also UTF-8 chars
}
} | [FOCAL] @Override public List<String> NonBreakPointsLoaderImpl.loadNBSP(String lang)
[CLASS] class NonBreakPointsLoaderImpl implements NonBreakPointsLoader
[METRICS] loc=13 cc=4 branches=3 loops=0 returns=2 throws=1 nesting=2
[CALLS-INTERNAL] List<String> loadForKey(String lang)
[CALLS-EXTERNAL] String.isEmpty/0, Strin... | /* static context
[FOCAL] @Override public List<String> NonBreakPointsLoaderImpl.loadNBSP(String lang)
[THROWS-WHEN] IllegalArgumentException when lang == null || lang.isEmpty()
[PATH1] if(lang == null || lang.isEmpty())=F -> if(result == null)=T -> if(index < 0)=T -> return null
[PATH2] if(lang == null || lang.isEmpty... | /* static context
[FOCAL] @Override public List<String> NonBreakPointsLoaderImpl.loadNBSP(String lang)
[THROWS-WHEN] IllegalArgumentException when lang == null || lang.isEmpty()
[PATH1] if(lang == null || lang.isEmpty())=F -> if(result == null)=T -> if(index < 0)=T -> return null
[PATH2] if(lang == null || lang.isEmpty... | true | ok | {"focal": {"class": "NonBreakPointsLoaderImpl", "name": "loadNBSP", "signature": "List<String> loadNBSP(String lang)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "lang", "type": "String"}], "return_type": "List<String>"}, "class_info": {"name": "NonBreakPointsLoaderImpl", "kind": "class", "mo... |
620505_0 | class ZooKeeperService extends Service {
private List<String> getHosts(List<NodeMetadata> nodes) {
return Lists.transform(Lists.newArrayList(nodes),
new Function<NodeMetadata, String>() {
@Override
public String apply(NodeMetadata node) {
String publicIp = Iterables.get(node.getPublicAddresses(), ... | class ConnectionWatcher implements Watcher {
private ZooKeeper zk;
private CountDownLatch latch = new CountDownLatch(1);
public void connect(String hosts) throws IOException, InterruptedException {
zk = new ZooKeeper(hosts, 5000, this);
latch.await();
}
public ZooKeepe... | [FOCAL] private List<String> ZooKeeperService.getHosts(List<NodeMetadata> nodes)
[CLASS] class ZooKeeperService extends Service
[METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Lists.transform/2, Lists.newArrayList/1, Iterables.get(node.getPublicAddresses(), 0).getHostName/0, Itera... | /* static context
[FOCAL] private List<String> ZooKeeperService.getHosts(List<NodeMetadata> nodes)
[INPUTS] branches=- | result=nodes
[COLLABORATORS] field node getPublicAddresses/0
[NEW] Function<NodeMetadata, String>
[CALLS-EXTERNAL] Lists.transform/2, Lists.newArrayList/1, Iterables.get(node.getPublicAddresses(), 0)... | /* static context
[FOCAL] private List<String> ZooKeeperService.getHosts(List<NodeMetadata> nodes)
[INPUTS] branches=- | result=nodes
[COLLABORATORS] field node getPublicAddresses/0
[NEW] Function<NodeMetadata, String>
[CALLS-EXTERNAL] Lists.transform/2, Lists.newArrayList/1, Iterables.get(node.getPublicAddresses(), 0)... | true | ok | {"focal": {"class": "ZooKeeperService", "name": "getHosts", "signature": "List<String> getHosts(List<NodeMetadata> nodes)", "start_line": 3, "modifiers": "private", "params": [{"name": "nodes", "type": "List<NodeMetadata>"}], "return_type": "List<String>"}, "class_info": {"name": "ZooKeeperService", "kind": "class", "m... |
643234_13 | class SauceLabsContextView implements ContextView {
public void show(String scenario, String step) {
sendContextMessage(step);
}
public SauceLabsContextView(WebDriverProvider webDriverProvider);
private void sendContextMessage(String step);
public void close();
private StringBuilder... | shouldBarf = true;
slcv.show("boo!", "oops");
assertThat(script.toString(), Matchers.equalTo(""));
}
} | [FOCAL] public void SauceLabsContextView.show(String scenario, String step)
[CLASS] class SauceLabsContextView implements ContextView
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void sendContextMessage(String step)
[INPUTS] branches=- | result=- | unused=scenario
[DATAFLOW] ste... | /* static context
[FOCAL] public void SauceLabsContextView.show(String scenario, String step)
[INPUTS] branches=- | result=- | unused=scenario
[CALLS-INTERNAL] void sendContextMessage(String step)
*/
| /* static context
[FOCAL] public void SauceLabsContextView.show(String scenario, String step)
[INPUTS] branches=- | result=- | unused=scenario
[CALLS-INTERNAL] void sendContextMessage(String step)
*/
class SauceLabsContextView implements ContextView {
public void show(String scenario, String step) {
sendCo... | true | ok | {"focal": {"class": "SauceLabsContextView", "name": "show", "signature": "void show(String scenario, String step)", "start_line": 3, "modifiers": "public", "params": [{"name": "scenario", "type": "String"}, {"name": "step", "type": "String"}], "return_type": "void"}, "class_info": {"name": "SauceLabsContextView", "kind... |
651333_3 | class Parser {
public static Expression parse(String text) {
text = text.replaceAll("\\s*,\\s*", ",");
StringTokenizer st = new StringTokenizer(text, "$%,\'[])", true);
MethodExpression root = new MethodExpression("eval");
Stack<MethodExpression> stack = new Stack<MethodExpression>(... | Expression t = Parser.parse("'%artist%'%title%");
s.getTrackData().addArtist("artist here");
s.getTrackData().addTitle("title here");
assertEquals("%artist%title here", t.eval(s));
}
} | [FOCAL] public static Expression Parser.parse(String text)
[CLASS] class Parser
[METRICS] loc=60 cc=15 branches=11 loops=2 returns=2 throws=0 nesting=9
[CALLS-EXTERNAL] String.replaceAll/2, Stack<MethodExpression>.push/1, StringTokenizer.hasMoreTokens/0, StringTokenizer.nextToken/0, String.equals/1, Character.toUpperCa... | /* static context
[FOCAL] public static Expression Parser.parse(String text)
[PATH1] while(st.hasMoreTokens())#1=T -> if(token.equals("%"))=F -> if(token.equals("$"))=F -> if(token.equals(")") || token.equals("]"))=F -> if(token.equals(","))=F -> if(token.equals("\'"))=T -> while(st.hasMoreTokens())#2=T -> if(str.equal... | /* static context
[FOCAL] public static Expression Parser.parse(String text)
[PATH1] while(st.hasMoreTokens())#1=T -> if(token.equals("%"))=F -> if(token.equals("$"))=F -> if(token.equals(")") || token.equals("]"))=F -> if(token.equals(","))=F -> if(token.equals("\'"))=T -> while(st.hasMoreTokens())#2=T -> if(str.equal... | true | ok | {"focal": {"class": "Parser", "name": "parse", "signature": "Expression parse(String text)", "start_line": 3, "modifiers": "public static", "params": [{"name": "text", "type": "String"}], "return_type": "Expression"}, "class_info": {"name": "Parser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": n... |
657157_0 | class HebrewQueryParser extends QueryParser {
@Override
public org.apache.lucene.search.Query parse(String query) throws ParseException {
String q = "";
for (int i = 0; i < query.length(); i++) {
if (query.charAt(i) == '"' && i + 1 < query.length() && !Character.isWhitespace(query.c... |
QueryParser qp = new HebrewQueryParser("f", new StandardAnalyzer());
qp.parse("צה\"ל");
qp.parse("\"צהל\"");
qp.parse("כל הכבוד לצה\"ל");
qp.parse("\"כל הכבוד לצה\"ל\"");
qp.parse("\"כל הכבוד\" לצה\"ל");
qp.parse("מנכ\"לית");
try {
qp.parse(... | [FOCAL] @Override public org.apache.lucene.search.Query HebrewQueryParser.parse(String query)
[CLASS] class HebrewQueryParser extends QueryParser
[METRICS] loc=13 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=3
[CALLS-EXTERNAL] String.length/0, String.charAt/1, Character.isWhitespace/1, QueryParser.parse/1
[EXCEPT... | /* static context
[FOCAL] @Override public org.apache.lucene.search.Query HebrewQueryParser.parse(String query)
[PATH1] for(i < query.length())=T -> if(query.charAt(i) == '"' && i + 1 < query.length() && !Character.isWhitespace(query.charAt(i + 1)))=T -> if(i > 0 && !Character.isWhitespace(query.charAt(i - 1)))=T -> ex... | /* static context
[FOCAL] @Override public org.apache.lucene.search.Query HebrewQueryParser.parse(String query)
[PATH1] for(i < query.length())=T -> if(query.charAt(i) == '"' && i + 1 < query.length() && !Character.isWhitespace(query.charAt(i + 1)))=T -> if(i > 0 && !Character.isWhitespace(query.charAt(i - 1)))=T -> ex... | true | ok | {"focal": {"class": "HebrewQueryParser", "name": "parse", "signature": "org.apache.lucene.search.Query parse(String query) throws ParseException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "query", "type": "String"}], "return_type": "org.apache.lucene.search.Query"}, "class_info": {"name": "... |
662539_11 | class ProductStitcher {
public static void validateSourceProducts(String[] sourceFilePaths) throws IOException {
final int sourceProductLength = sourceFilePaths[0].length();
for (String sourceFilePath : sourceFilePaths) {
if (sourceFilePath.length() != sourceProductLength) {
... | // correct products
String[] inputProducts = new String[]{
"C://test//MER_FRS_CCL2W_20120309_074759_000001893112_00265_52434_0001.nc",
"C://test//MER_FRS_CCL2W_20120309_074740_000000563112_00265_52434_0001.nc",
"C://test//MER_FRS_CCL2W_20120309_075032_0000... | [FOCAL] public static void ProductStitcher.validateSourceProducts(String[] sourceFilePaths)
[CLASS] class ProductStitcher
[METRICS] loc=19 cc=6 branches=3 loops=2 returns=0 throws=3 nesting=2
[CALLS-EXTERNAL] sourceFilePaths[0].length/0, String.length/0, sourceFilePaths[0].indexOf/1, String.indexOf/1, sourceFilePath.su... | /* static context
[FOCAL] public static void ProductStitcher.validateSourceProducts(String[] sourceFilePaths)
[THROWS-WHEN] IOException when foreach(String sourceFilePath : sourceFilePaths)#1=T && sourceFilePath.length() != sourceProductLength
[THROWS-WHEN] IOException when foreach(String sourceFilePath : sourceFilePat... | /* static context
[FOCAL] public static void ProductStitcher.validateSourceProducts(String[] sourceFilePaths)
[THROWS-WHEN] IOException when foreach(String sourceFilePath : sourceFilePaths)#1=T && sourceFilePath.length() != sourceProductLength
[THROWS-WHEN] IOException when foreach(String sourceFilePath : sourceFilePat... | true | ok | {"focal": {"class": "ProductStitcher", "name": "validateSourceProducts", "signature": "void validateSourceProducts(String[] sourceFilePaths) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "sourceFilePaths", "type": "String[]"}], "return_type": "void"}, "class_info": {"name": "Pr... |
663418_71 | class StatusCodeTypeAdapter extends RestDataTypeAdapter {
@Override
public String toString(Object obj) {
if(obj==null)
return "null";
if(obj.toString().trim().equals(""))
return "blank";
return obj.toString();
}
@Override public boolean equals(Object r1, Object r2);
@Override public Object parse(Stri... | assertEquals("200", adapter.toString("200"));
assertEquals("blank", adapter.toString(" "));
assertEquals("null", adapter.toString(null));
}
} | [FOCAL] @Override public String StatusCodeTypeAdapter.toString(Object obj)
[CLASS] class StatusCodeTypeAdapter extends RestDataTypeAdapter
[METRICS] loc=8 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] obj.toString().trim().equals/1, obj.toString().trim/0, Object.toString/0
[PATH1] if(obj==null)=... | /* static context
[FOCAL] @Override public String StatusCodeTypeAdapter.toString(Object obj)
[PATH1] if(obj==null)=F -> if(obj.toString().trim().equals(""))=T -> return "blank"
[PATH2] if(obj==null)=T -> return "null"
[PATH3] if(obj==null)=F -> if(obj.toString().trim().equals(""))=F -> return obj.toString()
[INPUTS] br... | /* static context
[FOCAL] @Override public String StatusCodeTypeAdapter.toString(Object obj)
[PATH1] if(obj==null)=F -> if(obj.toString().trim().equals(""))=T -> return "blank"
[PATH2] if(obj==null)=T -> return "null"
[PATH3] if(obj==null)=F -> if(obj.toString().trim().equals(""))=F -> return obj.toString()
[INPUTS] br... | true | ok | {"focal": {"class": "StatusCodeTypeAdapter", "name": "toString", "signature": "String toString(Object obj)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "obj", "type": "Object"}], "return_type": "String"}, "class_info": {"name": "StatusCodeTypeAdapter", "kind": "class", "modifiers": "", "super... |
666662_0 | class CyclicCharBuffer {
public void append(char c) {
if (isFull()) {
removeFirst();
}
insertLast(c);
}
public CyclicCharBuffer(int capacity);
public int length();
public char charAt(int i);
private int index(int i);
private boolean isFull();
priva... | CyclicCharBuffer buffer = new CyclicCharBuffer(UNUSED_CAPACITY);
buffer.append('a');
buffer.append('b');
assertHasString("ab", buffer);
}
} | [FOCAL] public void CyclicCharBuffer.append(char c)
[CLASS] class CyclicCharBuffer
[METRICS] loc=6 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] boolean isFull(); void insertLast(char c); void removeFirst()
[PATH1] if(isFull())=T
[PATH2] if(isFull())=F
[DATAFLOW] c@param->L5
[CLASS-MEMBERS] Cycl... | /* static context
[FOCAL] public void CyclicCharBuffer.append(char c)
[PATH1] if(isFull())=T
[PATH2] if(isFull())=F
[CALLS-INTERNAL] boolean isFull(); void insertLast(char c); void removeFirst()
*/
| /* static context
[FOCAL] public void CyclicCharBuffer.append(char c)
[PATH1] if(isFull())=T
[PATH2] if(isFull())=F
[CALLS-INTERNAL] boolean isFull(); void insertLast(char c); void removeFirst()
*/
class CyclicCharBuffer {
public void append(char c) {
if (isFull()) {
removeFirst();
}
... | true | ok | {"focal": {"class": "CyclicCharBuffer", "name": "append", "signature": "void append(char c)", "start_line": 3, "modifiers": "public", "params": [{"name": "c", "type": "char"}], "return_type": "void"}, "class_info": {"name": "CyclicCharBuffer", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "f... |
667236_1 | class AbstractAndroidMojo extends AbstractMojo {
protected String extractPackageNameFromAndroidManifest(File androidManifestFile) throws MojoExecutionException {
final URL xmlURL;
try {
xmlURL = androidManifestFile.toURI().toURL();
} catch (MalformedURLException e) {
... | final URL url = this.getClass().getResource("AndroidManifest.xml");
final URI uri = url.toURI();
final File file = new File(uri);
final String foundTargetPackage = androidMojo.extractPackageNameFromAndroidManifest(file);
Assert.... | [FOCAL] protected String AbstractAndroidMojo.extractPackageNameFromAndroidManifest(File androidManifestFile)
[CLASS] class AbstractAndroidMojo extends AbstractMojo
[METRICS] loc=11 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] androidManifestFile.toURI().toURL/0, File.toURI/0, JXPathContext.newC... | /* static context
[FOCAL] protected String AbstractAndroidMojo.extractPackageNameFromAndroidManifest(File androidManifestFile)
[THROWS-WHEN] MojoExecutionException when try-body throws
[PATH1] try-body throws -> throw new MojoExecutionException("Error while trying to figure out packag...
[PATH2] return (String) package... | /* static context
[FOCAL] protected String AbstractAndroidMojo.extractPackageNameFromAndroidManifest(File androidManifestFile)
[THROWS-WHEN] MojoExecutionException when try-body throws
[PATH1] try-body throws -> throw new MojoExecutionException("Error while trying to figure out packag...
[PATH2] return (String) package... | true | ok | {"focal": {"class": "AbstractAndroidMojo", "name": "extractPackageNameFromAndroidManifest", "signature": "String extractPackageNameFromAndroidManifest(File androidManifestFile) throws MojoExecutionException", "start_line": 3, "modifiers": "protected", "params": [{"name": "androidManifestFile", "type": "File"}], "return... |
678267_10 | class DateUtility {
public static DateTime parseXSDDateTime(String input) {
Matcher m = XSD_DATETIME.matcher(input);
if (!m.find()) {
throw new IllegalArgumentException(input +
" is not a valid XML Schema 1.1 dateTime.");
}
int year = Integer.parseIn... | String s4 = "-0001-12-31T24:00:00Z";
DateTime dt4 = DateUtility.parseXSDDateTime(s4);
String s5 = "0000-01-01T00:00:00Z";
DateTime dt5 = DateUtility.parseXSDDateTime(s5);
assertTrue(dt4.isEqual(dt5));
}
} | [FOCAL] public static DateTime DateUtility.parseXSDDateTime(String input)
[CLASS] class DateUtility
[METRICS] loc=51 cc=7 branches=6 loops=0 returns=2 throws=1 nesting=2
[CALLS-EXTERNAL] XSD_DATETIME.matcher/1, Matcher.find/0, Integer.parseInt/1, Matcher.group/1, m.group(9).isEmpty/0, Double.parseDouble/1, String.equal... | /* static context
[FOCAL] public static DateTime DateUtility.parseXSDDateTime(String input)
[THROWS-WHEN] IllegalArgumentException when !m.find()
[PATH1] if(!m.find())=F -> if(!hasEndOfDayFrag)=T -> if(m.group(9) != null && !m.group(9).isEmpty())=T -> if(m.group(13) != null)=T -> if(tmp.equals("Z"))=T -> if(hasEndOfDay... | /* static context
[FOCAL] public static DateTime DateUtility.parseXSDDateTime(String input)
[THROWS-WHEN] IllegalArgumentException when !m.find()
[PATH1] if(!m.find())=F -> if(!hasEndOfDayFrag)=T -> if(m.group(9) != null && !m.group(9).isEmpty())=T -> if(m.group(13) != null)=T -> if(tmp.equals("Z"))=T -> if(hasEndOfDay... | true | ok | {"focal": {"class": "DateUtility", "name": "parseXSDDateTime", "signature": "DateTime parseXSDDateTime(String input)", "start_line": 3, "modifiers": "public static", "params": [{"name": "input", "type": "String"}], "return_type": "DateTime"}, "class_info": {"name": "DateUtility", "kind": "class", "modifiers": "", "supe... |
684382_1 | class VersionCheckUtil {
public static boolean validateMinJREVersion(String runtimeVersion, String minVersion){
String[] requestedVersioning = minVersion.split("\\.");
String[] clientVersioning = runtimeVersion.split("\\.");
if (requestedVersioning.length < 3 || clientVersioning.length < 3)
return false;
... | boolean passed = VersionCheckUtil.validateMinJREVersion("1.8.0_11", "1.7.0_51");
Assert.assertTrue(passed, "The version check should pass.");
}
} | [FOCAL] public static boolean VersionCheckUtil.validateMinJREVersion(String runtimeVersion, String minVersion)
[CLASS] class VersionCheckUtil
[METRICS] loc=56 cc=11 branches=10 loops=0 returns=9 throws=0 nesting=6
[CALLS-EXTERNAL] String.split/1, Integer.parseInt/1, clientVersioning[2].indexOf/1, requestedVersioning[2]... | /* static context
[FOCAL] public static boolean VersionCheckUtil.validateMinJREVersion(String runtimeVersion, String minVersion)
[PATH1] if(requestedVersioning.length < 3 || clientVersioning.length < 3)=F -> if(Integer.parseInt(clientVersioning[0]) > Integer.parseInt(requestedVersioning[0]))=F -> if(Integer.parseInt(cl... | /* static context
[FOCAL] public static boolean VersionCheckUtil.validateMinJREVersion(String runtimeVersion, String minVersion)
[PATH1] if(requestedVersioning.length < 3 || clientVersioning.length < 3)=F -> if(Integer.parseInt(clientVersioning[0]) > Integer.parseInt(requestedVersioning[0]))=F -> if(Integer.parseInt(cl... | true | ok | {"focal": {"class": "VersionCheckUtil", "name": "validateMinJREVersion", "signature": "boolean validateMinJREVersion(String runtimeVersion, String minVersion)", "start_line": 3, "modifiers": "public static", "params": [{"name": "runtimeVersion", "type": "String"}, {"name": "minVersion", "type": "String"}], "return_type... |
690050_71 | class UserServiceImpl implements UserService {
protected String generateCode() {
return UUID.randomUUID().toString();
}
@Override @Transactional(readOnly = true) public long countUserForRole(Role role);
@Override @Transactional(readOnly = true) public boolean existsUsername(String username);
... | assertNotNull(impl.generateCode());
}
} | [FOCAL] protected String UserServiceImpl.generateCode()
[CLASS] class UserServiceImpl implements UserService
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] UUID.randomUUID().toString/0, UUID.randomUUID/0
[CLASS-MEMBERS] long countUserForRole(Role role); boolean existsUsername(Stri... | /* static context
[FOCAL] protected String UserServiceImpl.generateCode()
[CALLS-EXTERNAL] UUID.randomUUID().toString/0, UUID.randomUUID/0
*/
| /* static context
[FOCAL] protected String UserServiceImpl.generateCode()
[CALLS-EXTERNAL] UUID.randomUUID().toString/0, UUID.randomUUID/0
*/
class UserServiceImpl implements UserService {
protected String generateCode() {
return UUID.randomUUID().toString();
}
@Override @Transactional(readOnly = ... | true | ok | {"focal": {"class": "UserServiceImpl", "name": "generateCode", "signature": "String generateCode()", "start_line": 3, "modifiers": "protected", "params": [], "return_type": "String"}, "class_info": {"name": "UserServiceImpl", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "UserService", "fields": [... |
692484_7 | class GramKeyPartitioner implements Partitioner<GramKey, Gram> {
@Override
public int getPartition(GramKey key, Gram value, int numPartitions) {
// see: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/partition/BinaryPartitioner.java?revision=816664&view=markup
... | byte[] foo = new byte[1];
foo[0] = 1;
foo[0] = 2;
byte[] empty = new byte[0];
GramKey a = new GramKey(new Gram("foo", 1, Gram.Type.HEAD), empty);
GramKey b = new GramKey(new Gram("foo", 1, Gram.Type.HEAD), foo);
byte[] bar = new byte[1];
GramKey c = new GramKey(new Gram("foo", 2, Gram.... | [FOCAL] @Override public int GramKeyPartitioner.getPartition(GramKey key, Gram value, int numPartitions)
[CLASS] class GramKeyPartitioner implements Partitioner<GramKey, Gram>
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] GramKey.getLength/0, WritableComparator.hashBytes/2, GramK... | /* static context
[FOCAL] @Override public int GramKeyPartitioner.getPartition(GramKey key, Gram value, int numPartitions)
[INPUTS] branches=- | result=key, numPartitions | unused=value
[COLLABORATORS] param key:GramKey getLength/0,getBytes/0
[CALLS-EXTERNAL] GramKey.getLength/0, WritableComparator.hashBytes/2, GramKey... | /* static context
[FOCAL] @Override public int GramKeyPartitioner.getPartition(GramKey key, Gram value, int numPartitions)
[INPUTS] branches=- | result=key, numPartitions | unused=value
[COLLABORATORS] param key:GramKey getLength/0,getBytes/0
[CALLS-EXTERNAL] GramKey.getLength/0, WritableComparator.hashBytes/2, GramKey... | true | ok | {"focal": {"class": "GramKeyPartitioner", "name": "getPartition", "signature": "int getPartition(GramKey key, Gram value, int numPartitions)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "key", "type": "GramKey"}, {"name": "value", "type": "Gram"}, {"name": "numPartitions", "type": "int"}], "r... |
697210_2 | class CSVReader implements Closeable {
public String[] readNext() throws IOException {
while (recordsQueue.isEmpty() && !eof) {
char[] data = new char[CHUNK_SIZE];
int size = r.read(data);
if (size == -1) {
break;
}
processChunk(da... | String[] files = new String[]{"/com/gooddata/util/crazy.csv", "/com/gooddata/util/crazy.csv.win"};
for (final String f : files) {
Reader reader = new InputStreamReader(
CSVReaderTest.class.getResourceAsStream(f),
"utf8");
CSVReader csv = ne... | [FOCAL] public String[] CSVReader.readNext()
[CLASS] class CSVReader implements Closeable
[METRICS] loc=31 cc=8 branches=6 loops=1 returns=3 throws=1 nesting=3
[CALLS-INTERNAL] void handlePreviousEscapeOrQuote(Character c); void processChunk(char[] data, int size)
[CALLS-EXTERNAL] recordsQueue.isEmpty/0, r.read/1, open... | /* static context
[FOCAL] public String[] CSVReader.readNext()
[THROWS-WHEN] IllegalStateException when recordsQueue.isEmpty() && !eof && size == -1 && recordsQueue.isEmpty() && wasEscapeOrNotOpeningQuote && quotedField
[THROWS-WHEN] IllegalStateException when recordsQueue.isEmpty() && !eof && size == -1 && recordsQueu... | /* static context
[FOCAL] public String[] CSVReader.readNext()
[THROWS-WHEN] IllegalStateException when recordsQueue.isEmpty() && !eof && size == -1 && recordsQueue.isEmpty() && wasEscapeOrNotOpeningQuote && quotedField
[THROWS-WHEN] IllegalStateException when recordsQueue.isEmpty() && !eof && size == -1 && recordsQueu... | true | ok | {"focal": {"class": "CSVReader", "name": "readNext", "signature": "String[] readNext() throws IOException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String[]"}, "class_info": {"name": "CSVReader", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Closeable", "fields": [],... |
711931_2 | class GalleryComm implements PreferenceNames {
public boolean checkAuth() {
throw new RuntimeException("This method is not available on this protocol");
}
protected GalleryComm(Gallery g, StatusUpdate su);
public void uploadFiles(StatusUpdate su, boolean async);
public void fetchAlbums(StatusUpdate su, boole... | g.setKey("badkey");
g.setUsername("admin");
g.setPassword("admin");
assertTrue(comm.checkAuth());
}
} | [FOCAL] public boolean GalleryComm.checkAuth()
[CLASS] class GalleryComm implements PreferenceNames
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=1 nesting=0
[NEW] RuntimeException
[EXCEPTIONS] throws RuntimeException
[THROWS-WHEN] RuntimeException when always
[CLASS-MEMBERS] GalleryComm(Gallery g, StatusUpd... | /* static context
[FOCAL] public boolean GalleryComm.checkAuth()
[THROWS-WHEN] RuntimeException when always
[EXCEPTIONS] throws RuntimeException
[NEW] RuntimeException
*/
| /* static context
[FOCAL] public boolean GalleryComm.checkAuth()
[THROWS-WHEN] RuntimeException when always
[EXCEPTIONS] throws RuntimeException
[NEW] RuntimeException
*/
class GalleryComm implements PreferenceNames {
public boolean checkAuth() {
throw new RuntimeException("This method is not available on this prot... | true | ok | {"focal": {"class": "GalleryComm", "name": "checkAuth", "signature": "boolean checkAuth()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "GalleryComm", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "PreferenceNames", "fields": [{"name": "M... |
726694_18 | class Node implements INode, IsSerializable {
@Override
public double findMaximumDistanceToLeaf()
{
return this.findMaximumDistanceToLeaf(0.0);
}
public Node(int id, String label);
public Node(Node[] children);
public Node();
@Override public String findLabelOfFirstLeafNode();
@Override public int find... | Node root = new Node();
Node a = new Node();
a.setBranchLength(1.0);
Node b = new Node();
b.setBranchLength(2.0);
Node c = new Node();
c.setBranchLength(1.0);
Node d = new Node();
d.setBranchLength(3.0);
root.addChild(a);
root.addChild(b);
b.addChild(c);
b.addChild(d);
double distan... | [FOCAL] @Override public double Node.findMaximumDistanceToLeaf()
[CLASS] class Node implements INode, IsSerializable
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] double findMaximumDistanceToLeaf(double currentDistance)
[CLASS-MEMBERS] Node(int id, String label); Node(Node[] chil... | /* static context
[FOCAL] @Override public double Node.findMaximumDistanceToLeaf()
[CALLS-INTERNAL] double findMaximumDistanceToLeaf(double currentDistance)
*/
| /* static context
[FOCAL] @Override public double Node.findMaximumDistanceToLeaf()
[CALLS-INTERNAL] double findMaximumDistanceToLeaf(double currentDistance)
*/
class Node implements INode, IsSerializable {
@Override
public double findMaximumDistanceToLeaf()
{
return this.findMaximumDistanceToLeaf(0.0);
}
publi... | true | ok | {"focal": {"class": "Node", "name": "findMaximumDistanceToLeaf", "signature": "double findMaximumDistanceToLeaf()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "double"}, "class_info": {"name": "Node", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "INode, IsSeria... |
747707_9 | class HexFormatter {
public static void writeBytes(PrintStream print, byte[] bytes) {
writeBytes(print, bytes, 0, bytes.length);
}
public static void writeBytes(PrintStream print, byte[] bytes, int offset, int length);
private static void printLine(PrintStream print, int count, byte[] bytes, i... | writeBytes(print, new byte[]{'a', 0x00, 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't'});
assertEquals("61 00 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 a.cdefgh ijklmnop" + EOL +
"71 72 73 74 qrst" + E... | [FOCAL] public static void HexFormatter.writeBytes(PrintStream print, byte[] bytes)
[CLASS] class HexFormatter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void writeBytes(PrintStream print, byte[] bytes, int offset, int length)
[DATAFLOW] bytes@param->L2; print@param->L2
[CLASS... | /* static context
[FOCAL] public static void HexFormatter.writeBytes(PrintStream print, byte[] bytes)
[CALLS-INTERNAL] void writeBytes(PrintStream print, byte[] bytes, int offset, int length)
*/
| /* static context
[FOCAL] public static void HexFormatter.writeBytes(PrintStream print, byte[] bytes)
[CALLS-INTERNAL] void writeBytes(PrintStream print, byte[] bytes, int offset, int length)
*/
class HexFormatter {
public static void writeBytes(PrintStream print, byte[] bytes) {
writeBytes(print, bytes, 0... | true | ok | {"focal": {"class": "HexFormatter", "name": "writeBytes", "signature": "void writeBytes(PrintStream print, byte[] bytes)", "start_line": 3, "modifiers": "public static", "params": [{"name": "print", "type": "PrintStream"}, {"name": "bytes", "type": "byte[]"}], "return_type": "void"}, "class_info": {"name": "HexFormatte... |
749137_19 | class SimpleRestInterceptor extends AtmosphereInterceptorAdapter {
protected static JSONObject parseJsonPart(Reader reader) throws JSONException {
return (JSONObject)(new JSONTokener(reader).nextValue());
}
public SimpleRestInterceptor();
@Override public void configure(AtmosphereConfig conf... | final String data = "{'id': \"123\", \"size\" : 69124, 'ack' : true }";
Reader r = new StringReader(data);
JSONObject jsonpart = SimpleRestInterceptor.parseJsonPart(r);
Map<String, Object> expectedHeaders = new HashMap<String, Object>();
expectedHeaders.put("id", "123");
... | [FOCAL] protected static JSONObject SimpleRestInterceptor.parseJsonPart(Reader reader)
[CLASS] class SimpleRestInterceptor extends AtmosphereInterceptorAdapter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] new JSONTokener(reader).nextValue/0
[NEW] JSONTokener
[EXCEPTIONS] declare... | /* static context
[FOCAL] protected static JSONObject SimpleRestInterceptor.parseJsonPart(Reader reader)
[INPUTS] branches=- | result=reader
[EXCEPTIONS] declares JSONException
[NEW] JSONTokener
[CALLS-EXTERNAL] new JSONTokener(reader).nextValue/0
*/
| /* static context
[FOCAL] protected static JSONObject SimpleRestInterceptor.parseJsonPart(Reader reader)
[INPUTS] branches=- | result=reader
[EXCEPTIONS] declares JSONException
[NEW] JSONTokener
[CALLS-EXTERNAL] new JSONTokener(reader).nextValue/0
*/
class SimpleRestInterceptor extends AtmosphereInterceptorAdapter {
... | true | ok | {"focal": {"class": "SimpleRestInterceptor", "name": "parseJsonPart", "signature": "JSONObject parseJsonPart(Reader reader) throws JSONException", "start_line": 3, "modifiers": "protected static", "params": [{"name": "reader", "type": "Reader"}], "return_type": "JSONObject"}, "class_info": {"name": "SimpleRestIntercept... |
762097_13 | class QueryBinder {
public static void bind(AnnotationBindingContext bindingContext) {
List<AnnotationInstance> annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERY );
for ( AnnotationInstance query : annotations ) {
bindNamedQuery( bindingContext.getMetadataImplementor(), query );
... | @NamedNativeQuery(name = "fubar", query = "SELECT * FROM FOO", resultClass = Foo.class)
class Foo {
}
Index index = JandexHelper.indexForClass( service, Foo.class );
QueryBinder.bind( new AnnotationBindingContextImpl( meta, index ) );
NamedSQLQueryDefinition namedQuery = meta.getNamedNativeQuery( "fubar" )... | [FOCAL] public static void QueryBinder.bind(AnnotationBindingContext bindingContext)
[CLASS] class QueryBinder
[METRICS] loc=49 cc=13 branches=0 loops=12 returns=0 throws=0 nesting=2
[CALLS-INTERNAL] void bindNamedNativeQuery(MetadataImplementor metadata, AnnotationInstance annotation); void bindNamedQuery(MetadataImpl... | /* static context
[FOCAL] public static void QueryBinder.bind(AnnotationBindingContext bindingContext)
[PATH1] foreach(AnnotationInstance query : annotations)#1=T -> exit loop -> foreach(AnnotationInstance queries : annotations)#1=T -> foreach(AnnotationInstance query : JandexHelper.getValue( queries, "value", Annotati... | /* static context
[FOCAL] public static void QueryBinder.bind(AnnotationBindingContext bindingContext)
[PATH1] foreach(AnnotationInstance query : annotations)#1=T -> exit loop -> foreach(AnnotationInstance queries : annotations)#1=T -> foreach(AnnotationInstance query : JandexHelper.getValue( queries, "value", Annotati... | true | ok | {"focal": {"class": "QueryBinder", "name": "bind", "signature": "void bind(AnnotationBindingContext bindingContext)", "start_line": 3, "modifiers": "public static", "params": [{"name": "bindingContext", "type": "AnnotationBindingContext"}], "return_type": "void"}, "class_info": {"name": "QueryBinder", "kind": "class", ... |
763770_9 | class Neo4jStorage implements DMXStorage {
@Override
public List<TopicModelImpl> fetchTopicsByPropertyRange(String propUri, Number from, Number to) {
return buildTopics(queryIndexByPropertyRange(topicIndex, propUri, from, to));
}
Neo4jStorage(String databasePath, ModelFactoryImpl mf);
@... | List<TopicModelImpl> topics;
topics = db.fetchTopicsByPropertyRange("score", 1L, 1000L); assertEquals(3, topics.size());
topics = db.fetchTopicsByPropertyRange("score", 23L, 23L); assertEquals(2, topics.size());
topics = db.fetchTopicsByPropertyRange("score", 23L, 1234L); assertEquals... | [FOCAL] @Override public List<TopicModelImpl> Neo4jStorage.fetchTopicsByPropertyRange(String propUri, Number from, Number to)
[CLASS] class Neo4jStorage implements DMXStorage
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] IndexHits<Node> queryIndexByPropertyRange(Index<Node> index... | class Neo4jStorage implements DMXStorage {
@Override
public List<TopicModelImpl> fetchTopicsByPropertyRange(String propUri, Number from, Number to) {
return buildTopics(queryIndexByPropertyRange(topicIndex, propUri, from, to));
}
Neo4jStorage(String databasePath, ModelFactoryImpl mf);
@... | false | ok | {"focal": {"class": "Neo4jStorage", "name": "fetchTopicsByPropertyRange", "signature": "List<TopicModelImpl> fetchTopicsByPropertyRange(String propUri, Number from, Number to)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "propUri", "type": "String"}, {"name": "from", "type": "Number"}, {"name... | |
766240_36 | class StubAnimation implements IsAnimation {
public void tick(final double progress) {
if (progress < 0 || progress > 1.0) {
throw new IllegalStateException("New progress must be between 0 and 1");
}
if (isCancelled()) {
throw new IllegalStateException("Animation is cancelled");
}
if ... | StubAnimation a = new StubAnimation(l);
try {
a.tick(1.0);
fail();
} catch (IllegalStateException ise) {
assertThat(ise.getMessage(), is("Animation is not currently in progress"));
}
}
} | [FOCAL] public void StubAnimation.tick(double progress)
[CLASS] class StubAnimation implements IsAnimation
[METRICS] loc=22 cc=7 branches=6 loops=0 returns=0 throws=4 nesting=1
[CALLS-INTERNAL] boolean isCancelled(); boolean isFinished(); boolean isRunning()
[CALLS-EXTERNAL] logic.onStart/0, logic.onUpdate/1, logic.int... | /* static context
[FOCAL] public void StubAnimation.tick(double progress)
[THROWS-WHEN] IllegalStateException when progress < 0 || progress > 1.0
[THROWS-WHEN] IllegalStateException when !(progress < 0 || progress > 1.0) && isCancelled()
[THROWS-WHEN] IllegalStateException when !(progress < 0 || progress > 1.0) && !isC... | /* static context
[FOCAL] public void StubAnimation.tick(double progress)
[THROWS-WHEN] IllegalStateException when progress < 0 || progress > 1.0
[THROWS-WHEN] IllegalStateException when !(progress < 0 || progress > 1.0) && isCancelled()
[THROWS-WHEN] IllegalStateException when !(progress < 0 || progress > 1.0) && !isC... | true | ok | {"focal": {"class": "StubAnimation", "name": "tick", "signature": "void tick(double progress)", "start_line": 3, "modifiers": "public", "params": [{"name": "progress", "type": "double"}], "return_type": "void"}, "class_info": {"name": "StubAnimation", "kind": "class", "modifiers": "", "superclass": null, "interfaces": ... |
766548_687 | class SpringSecurityContextPrincipalPopulator implements PrincipalPopulator,
Transformer<Request, Principal> {
private Principal getPrincipal()
{
try
{
SecurityContext securityCtx = SecurityContextHolder.getContext();
if (securityCtx == null)
{
... | context.checking(new Expectations()
{
{
oneOf(securityContext).getAuthentication();
will(returnValue(authentication));
oneOf(authentication).getPrincipal();
will(returnValue(null));
}
});
assertNull... | [FOCAL] private Principal SpringSecurityContextPrincipalPopulator.getPrincipal()
[CLASS] class SpringSecurityContextPrincipalPopulator implements PrincipalPopulator, Transformer<Request, Principal>
[METRICS] loc=42 cc=6 branches=4 loops=0 returns=4 throws=2 nesting=2
[CALLS-EXTERNAL] SecurityContextHolder.getContext/0,... | /* static context
[FOCAL] private Principal SpringSecurityContextPrincipalPopulator.getPrincipal()
[THROWS-WHEN] AuthorizationException when try-body throws && exceptionOnError
[THROWS-WHEN] AuthorizationException when securityCtx == null && throw new AuthorizationException("No security context available.") && exceptio... | /* static context
[FOCAL] private Principal SpringSecurityContextPrincipalPopulator.getPrincipal()
[THROWS-WHEN] AuthorizationException when try-body throws && exceptionOnError
[THROWS-WHEN] AuthorizationException when securityCtx == null && throw new AuthorizationException("No security context available.") && exceptio... | true | ok | {"focal": {"class": "SpringSecurityContextPrincipalPopulator", "name": "getPrincipal", "signature": "Principal getPrincipal()", "start_line": 4, "modifiers": "private", "params": [], "return_type": "Principal"}, "class_info": {"name": "SpringSecurityContextPrincipalPopulator", "kind": "class", "modifiers": "", "supercl... |
771158_3 | class StatementComparator implements Comparator<Statement> {
@Override
public int compare(Statement first, Statement second) {
// Cannot use Statement.equals as it does not take Context into account,
// but can check for reference equality (==)
if (first == second) {
return ... | statement1 = valueFactory.createStatement(testSubjectUri1, testPredicateUri1, testObjectUri1, null);
statement2 = valueFactory.createStatement(testSubjectUri1, testPredicateUri1, testObjectUri1, null);
assertEquals(0, testComparator.compare(statement1, statement2));
assertEquals(0, test... | [FOCAL] @Override public int StatementComparator.compare(Statement first, Statement second)
[CLASS] class StatementComparator implements Comparator<Statement>
[METRICS] loc=33 cc=8 branches=7 loops=0 returns=8 throws=0 nesting=5
[CALLS-EXTERNAL] first.getSubject().equals/1, Statement.getSubject/0, first.getPredicate().... | /* static context
[FOCAL] @Override public int StatementComparator.compare(Statement first, Statement second)
[PATH1] if(first == second)=F -> if(first.getSubject().equals(second.getSubject()))=T -> if(first.getPredicate().equals(second.getPredicate()))=T -> if(first.getObject().equals(second.getObject()))=T -> if(firs... | /* static context
[FOCAL] @Override public int StatementComparator.compare(Statement first, Statement second)
[PATH1] if(first == second)=F -> if(first.getSubject().equals(second.getSubject()))=T -> if(first.getPredicate().equals(second.getPredicate()))=T -> if(first.getObject().equals(second.getObject()))=T -> if(firs... | true | ok | {"focal": {"class": "StatementComparator", "name": "compare", "signature": "int compare(Statement first, Statement second)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "first", "type": "Statement"}, {"name": "second", "type": "Statement"}], "return_type": "int"}, "class_info": {"name": "State... |
774658_11 | class Util {
static Protocol determineProtocol(String server) {
checkNotNull(server);
String[] splitServer = server.split(":");
Protocol protocol = Protocol.HTTPS;
if (splitServer.length > 1) {
String port = splitServer[1];
String protocolInTheUrl = splitSe... | // Given
String testUrl = "https://sqs.softwaremill.pl";
// When and then
assertThat(determineProtocol(testUrl)).isEqualTo(Protocol.HTTPS);
}
} | [FOCAL] static Protocol Util.determineProtocol(String server)
[CLASS] class Util
[METRICS] loc=23 cc=6 branches=5 loops=0 returns=3 throws=0 nesting=4
[CALLS-EXTERNAL] checkNotNull/1 (inherited), String.split/1, splitServer[0].toLowerCase/0, splitServer[1].startsWith/1, Objects.equal/2, "443".equals/1
[PATH1] if(splitS... | /* static context
[FOCAL] static Protocol Util.determineProtocol(String server)
[PATH1] if(splitServer.length > 1)=T -> if(splitServer[1].startsWith("//"))=T -> if(Objects.equal(protocolInTheUrl, "http"))=F -> if(Objects.equal(protocolInTheUrl, "https"))=F -> if(!"443".equals(port))=T -> return protocol
[PATH2] if(spli... | /* static context
[FOCAL] static Protocol Util.determineProtocol(String server)
[PATH1] if(splitServer.length > 1)=T -> if(splitServer[1].startsWith("//"))=T -> if(Objects.equal(protocolInTheUrl, "http"))=F -> if(Objects.equal(protocolInTheUrl, "https"))=F -> if(!"443".equals(port))=T -> return protocol
[PATH2] if(spli... | true | ok | {"focal": {"class": "Util", "name": "determineProtocol", "signature": "Protocol determineProtocol(String server)", "start_line": 3, "modifiers": "static", "params": [{"name": "server", "type": "String"}], "return_type": "Protocol"}, "class_info": {"name": "Util", "kind": "class", "modifiers": "", "superclass": null, "i... |
782257_47 | class ConnectorServiceImpl implements ConnectorService {
@Override
public Connection open( final String aName ) throws IOException
{
return open( aName, ConnectorService.READ_WRITE );
}
public ConnectorServiceImpl( final BundleContext aContext );
static final String determineSchemeName( final String... | final MyConnectionFactory factory = create( new String[] { Protocols.FTP.protocol(), Protocols.HTTP.protocol() },
1 );
registerConnectionFactory( factory );
Connection returnedConn = this.connectorService.open( Protocols.HTTP.url() );
assertEquals( factory.getConnection(), returnedConn );
... | [FOCAL] @Override public Connection ConnectorServiceImpl.open(String aName)
[CLASS] class ConnectorServiceImpl implements ConnectorService
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Connection open(String aName, int aMode)
[EXCEPTIONS] declares IOException
[INPUTS] branches=- ... | /* static context
[FOCAL] @Override public Connection ConnectorServiceImpl.open(String aName)
[INPUTS] branches=- | result=aName
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] Connection open(String aName, int aMode)
*/
| /* static context
[FOCAL] @Override public Connection ConnectorServiceImpl.open(String aName)
[INPUTS] branches=- | result=aName
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] Connection open(String aName, int aMode)
*/
class ConnectorServiceImpl implements ConnectorService {
@Override
public Connection open( ... | true | ok | {"focal": {"class": "ConnectorServiceImpl", "name": "open", "signature": "Connection open(String aName) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "aName", "type": "String"}], "return_type": "Connection"}, "class_info": {"name": "ConnectorServiceImpl", "kind": "class", "m... |
806019_7 | class IntegerDataItem implements DataItem {
@Override
public Short getShort()
{
return value.shortValue();
}
public IntegerDataItem();
public IntegerDataItem(final int value);
@Override public Boolean getBoolean();
@Override public Byte getByte();
@Override public Intege... | Assert.assertEquals(value0.getShort(), Short.valueOf((short) 0));
Assert.assertEquals(value1.getShort(), Short.valueOf((short) 1));
Assert.assertEquals(value1000000.getShort(), Short.valueOf((short) 16960)); //overflow
Assert.assertEquals(valueMinus1000000.getShort(), Short.valueOf((shor... | [FOCAL] @Override public Short IntegerDataItem.getShort()
[CLASS] class IntegerDataItem implements DataItem
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] value.shortValue/0
[COLLABORATORS] field value shortValue/0
[CLASS-MEMBERS] IntegerDataItem(); IntegerDataItem(int value); Boo... | /* static context
[FOCAL] @Override public Short IntegerDataItem.getShort()
[COLLABORATORS] field value shortValue/0
[CALLS-EXTERNAL] value.shortValue/0
*/
| /* static context
[FOCAL] @Override public Short IntegerDataItem.getShort()
[COLLABORATORS] field value shortValue/0
[CALLS-EXTERNAL] value.shortValue/0
*/
class IntegerDataItem implements DataItem {
@Override
public Short getShort()
{
return value.shortValue();
}
public IntegerDataItem()... | true | ok | {"focal": {"class": "IntegerDataItem", "name": "getShort", "signature": "Short getShort()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Short"}, "class_info": {"name": "IntegerDataItem", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "DataItem", "fields": [{"name... |
811072_0 | class HelloEJB {
public String sayHelloEJB(String name) {
return "Hello " + name;
}
@EJB
private HelloEJB helloEJB;
}
class HelloEJBTest {
@EJB
private HelloEJB helloEJB;
@Test
public void testHelloEJB() {
| String result = helloEJB.sayHelloEJB("Michael");
assertEquals("Hello Michael", result);
}
} | [FOCAL] public String HelloEJB.sayHelloEJB(String name)
[CLASS] class HelloEJB
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[INPUTS] branches=- | result=name
[DATAFLOW] name@param->L3
[TEST] HelloEJBTest: @Test public void testHelloEJB()
[TEST-FIELDS] HelloEJB helloEJB | /* static context
[FOCAL] public String HelloEJB.sayHelloEJB(String name)
[INPUTS] branches=- | result=name
*/
| /* static context
[FOCAL] public String HelloEJB.sayHelloEJB(String name)
[INPUTS] branches=- | result=name
*/
class HelloEJB {
public String sayHelloEJB(String name) {
return "Hello " + name;
}
@EJB
private HelloEJB helloEJB;
}
class HelloEJBTest {
@EJB
private HelloEJB helloEJB;
@Test
... | true | ok | {"focal": {"class": "HelloEJB", "name": "sayHelloEJB", "signature": "String sayHelloEJB(String name)", "start_line": 3, "modifiers": "public", "params": [{"name": "name", "type": "String"}], "return_type": "String"}, "class_info": {"name": "HelloEJB", "kind": "class", "modifiers": "", "superclass": null, "interfaces": ... |
812511_8 | class CertificateUtil {
public static X500Principal toPrincipal(String globusID) {
if (globusID == null) {
return null;
}
String id = globusID.trim();
StringBuilder buf = new StringBuilder(id.length());
if (!id.isEmpty()) {
final int IDLE = 0;
... | X500Principal principal =
CertificateUtil.toPrincipal("");
assertThat(principal, is(new X500Principal("")));
}
} | [FOCAL] public static X500Principal CertificateUtil.toPrincipal(String globusID)
[CLASS] class CertificateUtil
[METRICS] loc=65 cc=11 branches=7 loops=1 returns=2 throws=0 nesting=5
[CALLS-EXTERNAL] String.trim/0, String.length/0, String.isEmpty/0, String.toCharArray/0, String.substring/2, String.indexOf/1, String.subs... | /* static context
[FOCAL] public static X500Principal CertificateUtil.toPrincipal(String globusID)
[PATH1] if(globusID == null)=F -> if(!id.isEmpty())=T -> for(i >= 0)=T -> switch(state)=case KEY -> if(c == '/' || c == ' ')#1=T -> if(commaIndex != -1)=T -> exit loop -> return new X500Principal(dn, KEYWORD_MAP)
[PATH2] ... | /* static context
[FOCAL] public static X500Principal CertificateUtil.toPrincipal(String globusID)
[PATH1] if(globusID == null)=F -> if(!id.isEmpty())=T -> for(i >= 0)=T -> switch(state)=case KEY -> if(c == '/' || c == ' ')#1=T -> if(commaIndex != -1)=T -> exit loop -> return new X500Principal(dn, KEYWORD_MAP)
[PATH2] ... | true | ok | {"focal": {"class": "CertificateUtil", "name": "toPrincipal", "signature": "X500Principal toPrincipal(String globusID)", "start_line": 3, "modifiers": "public static", "params": [{"name": "globusID", "type": "String"}], "return_type": "X500Principal"}, "class_info": {"name": "CertificateUtil", "kind": "class", "modifie... |
819907_5 | class JsonObjects {
static String annotationToString(Annotation annotation) {
StringBuilder string = new StringBuilder();
string.append('@').append(annotation.annotationType().getName()).append('(');
String classAffix = ".class";
String quotationMark = "\"";
try {
... | String expectedOutcome = "@org.jboss.weld.probe.JsonObjectsTest$SomeAnnotation(someInt=1, someString=\"bar\", someStringArray={\"charlie\", \"delta\"})";
assertEquals(expectedOutcome, JsonObjects.annotationToString(getBarTypeAnnotation()));
assertEquals(expectedOutcome, JsonObjects.annotationToS... | [FOCAL] static String JsonObjects.annotationToString(Annotation annotation)
[CLASS] class JsonObjects
[METRICS] loc=68 cc=19 branches=14 loops=3 returns=2 throws=0 nesting=15
[CALLS-INTERNAL] void appendInBraces(StringBuilder buf, String s)
[CALLS-EXTERNAL] string.append('@').append(annotation.annotationType().get....a... | class JsonObjects {
static String annotationToString(Annotation annotation) {
StringBuilder string = new StringBuilder();
string.append('@').append(annotation.annotationType().getName()).append('(');
String classAffix = ".class";
String quotationMark = "\"";
try {
... | false | ok | {"focal": {"class": "JsonObjects", "name": "annotationToString", "signature": "String annotationToString(Annotation annotation)", "start_line": 3, "modifiers": "static", "params": [{"name": "annotation", "type": "Annotation"}], "return_type": "String"}, "class_info": {"name": "JsonObjects", "kind": "class", "modifiers"... | |
828909_18 | class AccessController extends BaseRegionObserver implements MasterObserver, AccessControllerProtocol {
@Override
public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e,
final Store store, final List<StoreFile> candidates) throws IOException {
requirePermission(getTableName... | PrivilegedExceptionAction action = new PrivilegedExceptionAction() {
public Object run() throws Exception {
ACCESS_CONTROLLER.preCompactSelection(ObserverContext.createAndPrepare(RCP_ENV, null), null, null);
return null;
}
};
verifyAllowed(action, SUPERUSER, USER_ADMIN, USER_OWN... | [FOCAL] @Override public void AccessController.preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> e, Store store, List<StoreFile> candidates)
[CLASS] class AccessController extends BaseRegionObserver implements MasterObserver, AccessControllerProtocol
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 thr... | class AccessController extends BaseRegionObserver implements MasterObserver, AccessControllerProtocol {
@Override
public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e,
final Store store, final List<StoreFile> candidates) throws IOException {
requirePermission(getTableName... | false | ok | {"focal": {"class": "AccessController", "name": "preCompactSelection", "signature": "void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> e, Store store, List<StoreFile> candidates) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "e", "type": "ObserverContext... | |
832025_13 | class RetrofitApiClient {
public Blog getBlogEntries() throws IOException {
Response<BlogFeedDto> response = blogApi.getBlogEntries().execute();
return response.body().toBlog();
}
@SuppressWarnings("deprecation") public RetrofitApiClient(Builder builder);
private static String toBboxString(double lo... | // given
stubFor(get(urlPathEqualTo("/news/feed/"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "application/rss+xml; charset=UTF-8")
.withBodyFile("blogfeed.xml")));
// when
Blog blog = apiClient.getBlogEn... | [FOCAL] public Blog RetrofitApiClient.getBlogEntries()
[CLASS] class RetrofitApiClient
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] blogApi.getBlogEntries().execute/0, blogApi.getBlogEntries/0, response.body().toBlog/0, Response<BlogFeedDto>.body/0
[EXCEPTIONS] declares IOExcept... | /* static context
[FOCAL] public Blog RetrofitApiClient.getBlogEntries()
[COLLABORATORS] field blogApi getBlogEntries/0
[EXCEPTIONS] declares IOException
[CALLS-EXTERNAL] blogApi.getBlogEntries().execute/0, blogApi.getBlogEntries/0, response.body().toBlog/0, Response<BlogFeedDto>.body/0
*/
| /* static context
[FOCAL] public Blog RetrofitApiClient.getBlogEntries()
[COLLABORATORS] field blogApi getBlogEntries/0
[EXCEPTIONS] declares IOException
[CALLS-EXTERNAL] blogApi.getBlogEntries().execute/0, blogApi.getBlogEntries/0, response.body().toBlog/0, Response<BlogFeedDto>.body/0
*/
class RetrofitApiClient {
... | true | ok | {"focal": {"class": "RetrofitApiClient", "name": "getBlogEntries", "signature": "Blog getBlogEntries() throws IOException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Blog"}, "class_info": {"name": "RetrofitApiClient", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, ... |
832676_97 | class RunMojo extends MojoSupport {
void addFeatureRepositories(Object featureService) throws MojoExecutionException {
if (featureRepositories != null) {
try {
Class<? extends Object> serviceClass = featureService.getClass();
Method addRepositoryMethod = serviceClass.g... | FeaturesService featureService = mock(FeaturesService.class);
replay(featureService);
RunMojo mojo = new RunMojo();
String[] empty = new String[0];
setPrivateField(mojo, "featureRepositories", empty);
mojo.addFeatureRepositories(featureService);
verify(featureSer... | [FOCAL] void RunMojo.addFeatureRepositories(Object featureService)
[CLASS] class RunMojo extends MojoSupport
[METRICS] loc=14 cc=4 branches=1 loops=1 returns=0 throws=1 nesting=3
[CALLS-EXTERNAL] Object.getClass/0, Class<? extends Object>.getMethod/2, Method.invoke/2, URI.create/1
[NEW] MojoExecutionException
[EXCEPTIO... | /* static context
[FOCAL] void RunMojo.addFeatureRepositories(Object featureService)
[THROWS-WHEN] MojoExecutionException when featureRepositories != null && try-body throws
[PATH1] if(featureRepositories != null)=T -> try-body throws -> throw new MojoExecutionException("Failed to add feature repositories to k...
[PATH... | /* static context
[FOCAL] void RunMojo.addFeatureRepositories(Object featureService)
[THROWS-WHEN] MojoExecutionException when featureRepositories != null && try-body throws
[PATH1] if(featureRepositories != null)=T -> try-body throws -> throw new MojoExecutionException("Failed to add feature repositories to k...
[PATH... | true | ok | {"focal": {"class": "RunMojo", "name": "addFeatureRepositories", "signature": "void addFeatureRepositories(Object featureService) throws MojoExecutionException", "start_line": 3, "modifiers": "", "params": [{"name": "featureService", "type": "Object"}], "return_type": "void"}, "class_info": {"name": "RunMojo", "kind": ... |
832679_7 | class InstallModuleFromGit implements Statement {
@Override
public String render(OsFamily arg0) {
return exec(
"git clone " + (vcsBranch != null ? "-b " + vcsBranch + " " : "") + url + " " + MODULES_DIR
+ module).render(arg0);
}
public InstallModuleFromGit(String module, URI url... |
InstallModuleFromGit nginx = new InstallModuleFromGit("nginx", URI
.create("git://github.com/puppetlabs/puppetlabs-nginx.git"), "WHIRR-385");
assertEquals("git clone -b WHIRR-385 git://github.com/puppetlabs/puppetlabs-nginx.git /etc/puppet/modules/nginx\n", nginx
.render(OsFamily.UNIX));
... | [FOCAL] @Override public String InstallModuleFromGit.render(OsFamily arg0)
[CLASS] class InstallModuleFromGit implements Statement
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] exec( "git clone " + (vcsBranch != null ? "-b " + vcsBran....render/1, exec/1 (inherited)
[INPUTS] bran... | /* static context
[FOCAL] @Override public String InstallModuleFromGit.render(OsFamily arg0)
[INPUTS] branches=- | result=arg0
[CALLS-EXTERNAL] exec( "git clone " + (vcsBranch != null ? "-b " + vcsBran....render/1, exec/1 (inherited)
*/
| /* static context
[FOCAL] @Override public String InstallModuleFromGit.render(OsFamily arg0)
[INPUTS] branches=- | result=arg0
[CALLS-EXTERNAL] exec( "git clone " + (vcsBranch != null ? "-b " + vcsBran....render/1, exec/1 (inherited)
*/
class InstallModuleFromGit implements Statement {
@Override
public String rend... | true | ok | {"focal": {"class": "InstallModuleFromGit", "name": "render", "signature": "String render(OsFamily arg0)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "arg0", "type": "OsFamily"}], "return_type": "String"}, "class_info": {"name": "InstallModuleFromGit", "kind": "class", "modifiers": "", "super... |
832680_187 | class IsolatedClassLoader extends URLClassLoader {
@Override
public synchronized Class loadClass( String name )
throws ClassNotFoundException
{
if ( childDelegation )
{
Class<?> c = findLoadedClass( name );
if ( c == null )
{
try
... | Class<?> isolatedClass = classLoader.loadClass( AbstractProvider.class.getName() );
assertThat( isolatedClass, is( notNullValue() ) );
assertThat( isolatedClass.getName(), is( AbstractProvider.class.getName() ) );
assertThat( isolatedClass, is( not( (Class) AbstractProvider.class ) ) );
... | [FOCAL] @Override public synchronized Class IsolatedClassLoader.loadClass(String name)
[CLASS] class IsolatedClassLoader extends URLClassLoader
[METRICS] loc=34 cc=5 branches=3 loops=0 returns=2 throws=1 nesting=4
[CALLS-EXTERNAL] findLoadedClass/1 (inherited), findClass/1 (inherited), parent.loadClass/1, URLClassLoade... | /* static context
[FOCAL] @Override public synchronized Class IsolatedClassLoader.loadClass(String name)
[THROWS-WHEN] e when childDelegation && c == null && try-body throws && parent == null
[PATH1] if(childDelegation)=T -> if(c == null)=T -> try-body throws -> if(parent == null)=T -> throw e
[PATH2] if(childDelegatio... | /* static context
[FOCAL] @Override public synchronized Class IsolatedClassLoader.loadClass(String name)
[THROWS-WHEN] e when childDelegation && c == null && try-body throws && parent == null
[PATH1] if(childDelegation)=T -> if(c == null)=T -> try-body throws -> if(parent == null)=T -> throw e
[PATH2] if(childDelegatio... | true | ok | {"focal": {"class": "IsolatedClassLoader", "name": "loadClass", "signature": "Class loadClass(String name) throws ClassNotFoundException", "start_line": 3, "modifiers": "@Override public synchronized", "params": [{"name": "name", "type": "String"}], "return_type": "Class"}, "class_info": {"name": "IsolatedClassLoader",... |
834344_39 | class StringValidations {
public static boolean isZipCode(final String zipCode)
{
if (zipCode != null)
{
return zipCode.matches("\\d{5}((-| +)\\d{4})?$");
}
return false;
}
public static boolean isAlphabetic(final String text);
public static boolean isAlphanumeric(fina... | assertTrue(StringValidations.isZipCode("28212"));
}
} | [FOCAL] public static boolean StringValidations.isZipCode(String zipCode)
[CLASS] class StringValidations
[METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] String.matches/1
[PATH1] if(zipCode != null)=T -> return zipCode.matches("\\d{5}((-| +)\\d{4})?$")
[PATH2] if(zipCode != null)=F... | /* static context
[FOCAL] public static boolean StringValidations.isZipCode(String zipCode)
[PATH1] if(zipCode != null)=T -> return zipCode.matches("\\d{5}((-| +)\\d{4})?$")
[PATH2] if(zipCode != null)=F -> return false
[INPUTS] branches=zipCode | result=zipCode
[CALLS-EXTERNAL] String.matches/1
*/
| /* static context
[FOCAL] public static boolean StringValidations.isZipCode(String zipCode)
[PATH1] if(zipCode != null)=T -> return zipCode.matches("\\d{5}((-| +)\\d{4})?$")
[PATH2] if(zipCode != null)=F -> return false
[INPUTS] branches=zipCode | result=zipCode
[CALLS-EXTERNAL] String.matches/1
*/
class StringValidati... | true | ok | {"focal": {"class": "StringValidations", "name": "isZipCode", "signature": "boolean isZipCode(String zipCode)", "start_line": 3, "modifiers": "public static", "params": [{"name": "zipCode", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "StringValidations", "kind": "class", "modifiers": "", "supe... |
844592_1 | class LogPerLineExceptionHandlingStrategyFactory implements ExceptionHandlingStrategyFactory {
public ExceptionHandlingStrategy makeExceptionHandlingStrategy(
final Level logLevel, final PrintStream originalPrintStream) {
return new LogPerLineExceptionHandlingStrategy(logLevel);
}
priv... | ExceptionHandlingStrategy strategy = STRATEGY_FACTORY.makeExceptionHandlingStrategy(Level.ERROR, null);
strategy.handleExceptionLine(EXCEPTION_LINE, log);
assertEquals(asList(error(STACKTRACE, EXCEPTION_LINE)), log.getLoggingEvents());
}
} | [FOCAL] public ExceptionHandlingStrategy LogPerLineExceptionHandlingStrategyFactory.makeExceptionHandlingStrategy(Level logLevel, PrintStream originalPrintStream)
[CLASS] class LogPerLineExceptionHandlingStrategyFactory implements ExceptionHandlingStrategyFactory
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws... | /* static context
[FOCAL] public ExceptionHandlingStrategy LogPerLineExceptionHandlingStrategyFactory.makeExceptionHandlingStrategy(Level logLevel, PrintStream originalPrintStream)
[INPUTS] branches=- | result=logLevel | unused=originalPrintStream
[NEW] LogPerLineExceptionHandlingStrategy
*/
| /* static context
[FOCAL] public ExceptionHandlingStrategy LogPerLineExceptionHandlingStrategyFactory.makeExceptionHandlingStrategy(Level logLevel, PrintStream originalPrintStream)
[INPUTS] branches=- | result=logLevel | unused=originalPrintStream
[NEW] LogPerLineExceptionHandlingStrategy
*/
class LogPerLineExceptionHa... | true | ok | {"focal": {"class": "LogPerLineExceptionHandlingStrategyFactory", "name": "makeExceptionHandlingStrategy", "signature": "ExceptionHandlingStrategy makeExceptionHandlingStrategy(Level logLevel, PrintStream originalPrintStream)", "start_line": 3, "modifiers": "public", "params": [{"name": "logLevel", "type": "Level"}, {"... |
851175_3 | class MfgMSAProductReader extends AbstractProductReader {
static boolean mfgAlbedoFileNameMatches(String fileName) {
if (!(fileName.matches("MSA_Albedo_L2.0_V[0-9].[0-9]{2}_[0-9]{3}_[0-9]{4}_[0-9]{3}_[0-9]{3}.(?i)(hdf)"))) {
throw new IllegalArgumentException("Input file name '" + fileName +
... | String filename = "bla.txt";
try {
MfgMSAProductReader.mfgAlbedoFileNameMatches(filename);
} catch (Exception e) {
assertEquals(true, e instanceof IllegalArgumentException);
assertEquals("Input file name '" + filename +
"' does not match na... | [FOCAL] static boolean MfgMSAProductReader.mfgAlbedoFileNameMatches(String fileName)
[CLASS] class MfgMSAProductReader extends AbstractProductReader
[METRICS] loc=7 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] String.matches/1
[NEW] IllegalArgumentException
[EXCEPTIONS] throws IllegalArgumentEx... | /* static context
[FOCAL] static boolean MfgMSAProductReader.mfgAlbedoFileNameMatches(String fileName)
[THROWS-WHEN] IllegalArgumentException when !(fileName.matches("MSA_Albedo_L2.0_V[0-9].[0-9]{2}_[0-9]{3}_[0-9]{4}_[0-9]{3}_[0-9]{3}.(?i)(hdf)"))
[PATH1] if(!(fileName.matches("MSA_Albedo_L2.0_V[0-9].[0-9]{2}_[0-9]{3}_... | /* static context
[FOCAL] static boolean MfgMSAProductReader.mfgAlbedoFileNameMatches(String fileName)
[THROWS-WHEN] IllegalArgumentException when !(fileName.matches("MSA_Albedo_L2.0_V[0-9].[0-9]{2}_[0-9]{3}_[0-9]{4}_[0-9]{3}_[0-9]{3}.(?i)(hdf)"))
[PATH1] if(!(fileName.matches("MSA_Albedo_L2.0_V[0-9].[0-9]{2}_[0-9]{3}_... | true | ok | {"focal": {"class": "MfgMSAProductReader", "name": "mfgAlbedoFileNameMatches", "signature": "boolean mfgAlbedoFileNameMatches(String fileName)", "start_line": 3, "modifiers": "static", "params": [{"name": "fileName", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "MfgMSAProductReader", "kind": "c... |
859322_0 | class FacesResourceProcessor {
public static byte[] execute(URL url, InputStream input, String encoding) throws IOException {
byte[] bytes;
try {
StringBuilder sb = new StringBuilder();
UnicodeReader reader = new UnicodeReader(input, encoding);
try {
char[] cbuf = new char[32];
... |
URL url;
byte[] bytes;
String encoding = (String) ResourceUtils.getProperty("app.encoding");
url = ResourceUtils.getClasspathResource("META-INF/pages/index.html");
bytes = FacesResourceProcessor.execute(url, url.openConnection().getInputStream(), encoding);
assertEquals(
"<!DOCTYPE html>\n" + ... | [FOCAL] public static byte[] FacesResourceProcessor.execute(URL url, InputStream input, String encoding)
[CLASS] class FacesResourceProcessor
[METRICS] loc=101 cc=7 branches=2 loops=1 returns=1 throws=1 nesting=5
[CALLS-EXTERNAL] UnicodeReader.read/3, StringBuilder.append/3, StringBuilder.toString/0, String.contains/1,... | /* static context
[FOCAL] public static byte[] FacesResourceProcessor.execute(URL url, InputStream input, String encoding)
[THROWS-WHEN] e when try-body throws
[PATH1] while((r = reader.read(cbuf, 0, 32)) != -1)=T -> exit loop -> if(!str.contains("ui:component"))=T -> try-body throws -> if(url.getFile().contains("META-... | /* static context
[FOCAL] public static byte[] FacesResourceProcessor.execute(URL url, InputStream input, String encoding)
[THROWS-WHEN] e when try-body throws
[PATH1] while((r = reader.read(cbuf, 0, 32)) != -1)=T -> exit loop -> if(!str.contains("ui:component"))=T -> try-body throws -> if(url.getFile().contains("META-... | true | ok | {"focal": {"class": "FacesResourceProcessor", "name": "execute", "signature": "byte[] execute(URL url, InputStream input, String encoding) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "url", "type": "URL"}, {"name": "input", "type": "InputStream"}, {"name": "encoding", "type":... |
860694_1 | class ZipUtils {
public static void zipDir(final File zipFile, final File srcDir, final String prefix) throws IOException
{
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFile));
try
{
addZipPrefixes(srcDir, out, prefix);
addZipDir(srcDir, out,... | File zipFile = new File(tempDir, "zip-nested-prefix.zip");
ZipUtils.zipDir(zipFile, sourceZipDir, NESTED_PREFIX);
zip = new ZipFile(zipFile);
final Enumeration<? extends ZipEntry> entries = zip.entries();
while (entries.hasMoreElements())
{
final ZipEntry zi... | [FOCAL] public static void ZipUtils.zipDir(File zipFile, File srcDir, String prefix)
[CLASS] class ZipUtils
[METRICS] loc=14 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] void addZipDir(File dirObj, ZipOutputStream out, String prefix); void addZipPrefixes(File dirObj, ZipOutputStream out, String... | /* static context
[FOCAL] public static void ZipUtils.zipDir(File zipFile, File srcDir, String prefix)
[PATH1] try-body throws
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] void addZipDir(File dirObj, ZipOutputStream out, String prefix); void addZipPrefixes(File dirObj, ZipOutputStream out, String prefix)
[NEW] Zi... | /* static context
[FOCAL] public static void ZipUtils.zipDir(File zipFile, File srcDir, String prefix)
[PATH1] try-body throws
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] void addZipDir(File dirObj, ZipOutputStream out, String prefix); void addZipPrefixes(File dirObj, ZipOutputStream out, String prefix)
[NEW] Zi... | true | ok | {"focal": {"class": "ZipUtils", "name": "zipDir", "signature": "void zipDir(File zipFile, File srcDir, String prefix) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "zipFile", "type": "File"}, {"name": "srcDir", "type": "File"}, {"name": "prefix", "type": "String"}], "return_typ... |
860937_24 | class DenseDoubleVector implements DoubleVector {
@Override
public final DoubleVector subtractFrom(double v) {
DenseDoubleVector newv = new DenseDoubleVector(vector.length);
for (int i = 0; i < vector.length; i++) {
newv.set(i, v - vector[i]);
}
return newv;
}
public DenseDoubleVector()... | double[] vals1 = {1, 2, 3, 4, 5, 6, 7, 8};
DoubleVector vec1 = new DenseDoubleVector(vals1);
double constant = 10;
DoubleVector vec3 = vec1.subtractFrom(constant);
for (int i = 0; i < vals1.length; ++i) {
assertEquals(constant - vec1.get(i), vec3.get(i), 0.000001);
}
}
} | [FOCAL] @Override public final DoubleVector DenseDoubleVector.subtractFrom(double v)
[CLASS] class DenseDoubleVector implements DoubleVector
[METRICS] loc=8 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] DenseDoubleVector.set/2
[NEW] DenseDoubleVector
[PATH1] for(i < vector.length)=T -> exit loop... | /* static context
[FOCAL] @Override public final DoubleVector DenseDoubleVector.subtractFrom(double v)
[PATH1] for(i < vector.length)=T -> exit loop -> return newv
[PATH2] for(i < vector.length)=F -> return newv
[NEW] DenseDoubleVector
[CALLS-EXTERNAL] DenseDoubleVector.set/2
*/
| /* static context
[FOCAL] @Override public final DoubleVector DenseDoubleVector.subtractFrom(double v)
[PATH1] for(i < vector.length)=T -> exit loop -> return newv
[PATH2] for(i < vector.length)=F -> return newv
[NEW] DenseDoubleVector
[CALLS-EXTERNAL] DenseDoubleVector.set/2
*/
class DenseDoubleVector implements Doubl... | true | ok | {"focal": {"class": "DenseDoubleVector", "name": "subtractFrom", "signature": "DoubleVector subtractFrom(double v)", "start_line": 3, "modifiers": "@Override public final", "params": [{"name": "v", "type": "double"}], "return_type": "DoubleVector"}, "class_info": {"name": "DenseDoubleVector", "kind": "class", "modifier... |
862445_0 | class MultiXmlDocumentReader implements DocumentProducer {
@Override
public Iterator<Document> iterator() {
if (inputStream != null) {
throw new IllegalStateException("already fetched inputStream!");
}
return new MultiXmlDocumentIterator();
}
@Override public void init();
@Ov... | reader.setElemMatch(QName.valueOf("{mynamespace}state"));
reader.setInput(new ClassPathResource("/dummyXml.xml"));
int count = 0;
for (Document document : reader) {
count++;
assertNotNull(((DomRawData)document.getRawData()).getDom());
}
assertEquals(2,count);
}
... | [FOCAL] @Override public Iterator<Document> MultiXmlDocumentReader.iterator()
[CLASS] class MultiXmlDocumentReader implements DocumentProducer
[METRICS] loc=7 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[NEW] IllegalStateException, MultiXmlDocumentIterator
[EXCEPTIONS] throws IllegalStateException
[THROWS-WHEN... | /* static context
[FOCAL] @Override public Iterator<Document> MultiXmlDocumentReader.iterator()
[THROWS-WHEN] IllegalStateException when inputStream != null
[PATH1] if(inputStream != null)=T -> throw new IllegalStateException("already fetched inputStream!")
[PATH2] if(inputStream != null)=F -> return new MultiXmlDocume... | /* static context
[FOCAL] @Override public Iterator<Document> MultiXmlDocumentReader.iterator()
[THROWS-WHEN] IllegalStateException when inputStream != null
[PATH1] if(inputStream != null)=T -> throw new IllegalStateException("already fetched inputStream!")
[PATH2] if(inputStream != null)=F -> return new MultiXmlDocume... | true | ok | {"focal": {"class": "MultiXmlDocumentReader", "name": "iterator", "signature": "Iterator<Document> iterator()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Iterator<Document>"}, "class_info": {"name": "MultiXmlDocumentReader", "kind": "class", "modifiers": "", "superclass": null, "in... |
870849_0 | class JGitAPIExceptions {
public static RuntimeException exceptionWithFriendlyMessageFor(Exception e) {
Throwable cause = getRootCause(e);
String message = cause.getMessage();
if (message == null) {
message = cause.getClass().getSimpleName();
}
if (cause instance... | RuntimeException re = exceptionWithFriendlyMessageFor(new NullPointerException());
assertThat(re.getMessage(), equalTo("NullPointerException"));
}
} | [FOCAL] public static RuntimeException JGitAPIExceptions.exceptionWithFriendlyMessageFor(Exception e)
[CLASS] class JGitAPIExceptions
[METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] getRootCause/1 (inherited), Throwable.getMessage/0, cause.getClass().getSimpleName/0, Throwable.get... | /* static context
[FOCAL] public static RuntimeException JGitAPIExceptions.exceptionWithFriendlyMessageFor(Exception e)
[PATH1] if(message == null)=T -> if(cause instanceof JSchException)=T -> return new RuntimeException(message, cause)
[PATH2] if(message == null)=F -> if(cause instanceof JSchException)=F -> return new... | /* static context
[FOCAL] public static RuntimeException JGitAPIExceptions.exceptionWithFriendlyMessageFor(Exception e)
[PATH1] if(message == null)=T -> if(cause instanceof JSchException)=T -> return new RuntimeException(message, cause)
[PATH2] if(message == null)=F -> if(cause instanceof JSchException)=F -> return new... | true | ok | {"focal": {"class": "JGitAPIExceptions", "name": "exceptionWithFriendlyMessageFor", "signature": "RuntimeException exceptionWithFriendlyMessageFor(Exception e)", "start_line": 3, "modifiers": "public static", "params": [{"name": "e", "type": "Exception"}], "return_type": "RuntimeException"}, "class_info": {"name": "JGi... |
884758_0 | class GrizzlyExecutorService extends AbstractExecutorService implements ExtendedThreadPool {
public static GrizzlyExecutorService createInstance() {
return createInstance(ThreadPoolConfig.DEFAULT);
}
protected GrizzlyExecutorService(ThreadPoolConfig config);
protected GrizzlyExecutorService(... | int threads = 100;
ThreadPoolConfig cfg = new ThreadPoolConfig("test", -1, threads,
null, -1, 0, null, null, Thread.NORM_PRIORITY, null);
GrizzlyExecutorService r = GrizzlyExecutorService.createInstance(cfg);
final int tasks = 2000000;
doTest(r,tasks);
... | [FOCAL] public static GrizzlyExecutorService GrizzlyExecutorService.createInstance()
[CLASS] class GrizzlyExecutorService extends AbstractExecutorService implements ExtendedThreadPool
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] GrizzlyExecutorService createInstance(ThreadPoolCo... | /* static context
[FOCAL] public static GrizzlyExecutorService GrizzlyExecutorService.createInstance()
[CALLS-INTERNAL] GrizzlyExecutorService createInstance(ThreadPoolConfig cfg)
*/
| /* static context
[FOCAL] public static GrizzlyExecutorService GrizzlyExecutorService.createInstance()
[CALLS-INTERNAL] GrizzlyExecutorService createInstance(ThreadPoolConfig cfg)
*/
class GrizzlyExecutorService extends AbstractExecutorService implements ExtendedThreadPool {
public static GrizzlyExecutorService cr... | true | ok | {"focal": {"class": "GrizzlyExecutorService", "name": "createInstance", "signature": "GrizzlyExecutorService createInstance()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "GrizzlyExecutorService"}, "class_info": {"name": "GrizzlyExecutorService", "kind": "class", "modifiers": "", "super... |
889932_13 | class RSASha1SignatureService implements SignatureService {
@Override
public String getSignatureMethod() {
return METHOD;
}
public RSASha1SignatureService(PrivateKey privateKey);
@Override public String getSignature(String baseString, String apiSecret, String tokenSecret);
private f... | final String expected = "RSA-SHA1";
assertEquals(expected, service.getSignatureMethod());
}
} | [FOCAL] @Override public String RSASha1SignatureService.getSignatureMethod()
[CLASS] class RSASha1SignatureService implements SignatureService
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] RSASha1SignatureService(PrivateKey privateKey); String getSignature(String baseString, Strin... | /* static context
[FOCAL] @Override public String RSASha1SignatureService.getSignatureMethod()
*/
| /* static context
[FOCAL] @Override public String RSASha1SignatureService.getSignatureMethod()
*/
class RSASha1SignatureService implements SignatureService {
@Override
public String getSignatureMethod() {
return METHOD;
}
public RSASha1SignatureService(PrivateKey privateKey);
@Override p... | true | ok | {"focal": {"class": "RSASha1SignatureService", "name": "getSignatureMethod", "signature": "String getSignatureMethod()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "RSASha1SignatureService", "kind": "class", "modifiers": "", "superclass": null, "inte... |
892275_5 | class RxJava3CallAdapterFactory extends CallAdapter.Factory {
@SuppressWarnings("ConstantConditions") // Guarding public API nullability.
public static RxJava3CallAdapterFactory createWithScheduler(Scheduler scheduler) {
if (scheduler == null) throw new NullPointerException("scheduler == null");
return new... | try {
RxJava3CallAdapterFactory.createWithScheduler(null);
fail();
} catch (NullPointerException e) {
assertThat(e).hasMessage("scheduler == null");
}
}
} | [FOCAL] @SuppressWarnings("ConstantConditions") // Guarding public API nullability. public static RxJava3CallAdapterFactory RxJava3CallAdapterFactory.createWithScheduler(Scheduler scheduler)
[CLASS] class RxJava3CallAdapterFactory extends CallAdapter.Factory
[METRICS] loc=5 cc=2 branches=1 loops=0 returns=1 throws=1 ne... | /* static context
[FOCAL] @SuppressWarnings("ConstantConditions") // Guarding public API nullability. public static RxJava3CallAdapterFactory RxJava3CallAdapterFactory.createWithScheduler(Scheduler scheduler)
[THROWS-WHEN] NullPointerException when scheduler == null
[PATH1] if(scheduler == null)=T -> throw new NullPoin... | /* static context
[FOCAL] @SuppressWarnings("ConstantConditions") // Guarding public API nullability. public static RxJava3CallAdapterFactory RxJava3CallAdapterFactory.createWithScheduler(Scheduler scheduler)
[THROWS-WHEN] NullPointerException when scheduler == null
[PATH1] if(scheduler == null)=T -> throw new NullPoin... | true | ok | {"focal": {"class": "RxJava3CallAdapterFactory", "name": "createWithScheduler", "signature": "RxJava3CallAdapterFactory createWithScheduler(Scheduler scheduler)", "start_line": 3, "modifiers": "@SuppressWarnings(\"ConstantConditions\") // Guarding public API nullability. public static", "params": [{"name": "scheduler",... |
899555_4 | class ElementProviderExtension implements IOCExtensionConfigurator {
static Collection<String> elemental2ElementTags(final MetaClass type) {
final Collection<String> customElementTags = customElementTags(type);
if (!customElementTags.isEmpty()) {
return customElementTags;
}
return Elemental2T... |
final Collection<String> tags = elemental2ElementTags(
metaClass(CustomElement.WithCustomTag.ChildWithoutElementAnnotation.class));
//@Element annotation is not inherited
assertEquals(emptyList(), tags);
}
} | [FOCAL] static Collection<String> ElementProviderExtension.elemental2ElementTags(MetaClass type)
[CLASS] class ElementProviderExtension implements IOCExtensionConfigurator
[METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-INTERNAL] Collection<String> customElementTags(MetaClass type)
[CALLS-EX... | /* static context
[FOCAL] static Collection<String> ElementProviderExtension.elemental2ElementTags(MetaClass type)
[PATH1] if(!customElementTags.isEmpty())=T -> return customElementTags
[PATH2] if(!customElementTags.isEmpty())=F -> return Elemental2TagMapping.getTags(type.asClass())
[INPUTS] branches=type | result=type... | /* static context
[FOCAL] static Collection<String> ElementProviderExtension.elemental2ElementTags(MetaClass type)
[PATH1] if(!customElementTags.isEmpty())=T -> return customElementTags
[PATH2] if(!customElementTags.isEmpty())=F -> return Elemental2TagMapping.getTags(type.asClass())
[INPUTS] branches=type | result=type... | true | ok | {"focal": {"class": "ElementProviderExtension", "name": "elemental2ElementTags", "signature": "Collection<String> elemental2ElementTags(MetaClass type)", "start_line": 3, "modifiers": "static", "params": [{"name": "type", "type": "MetaClass"}], "return_type": "Collection<String>"}, "class_info": {"name": "ElementProvid... |
901534_1 | class UmlModelLoader extends ModelLoader<UmlModel, File> {
@Override
public UmlModel loadModel(File modelFile) throws UmlModelException {
if (modelFile == null) {
return new UmlModel(UmlModelProducer.getInstance().createUmlModel(null));
}
try {
Model model = ge... |
UmlModelLoader loader = new UmlModelLoader();
UmlModel umlModel = loader.loadModel(new File("conf/template/uml/sample.uml"));
Assert.assertNotNull(umlModel);
Assert.assertNotNull(umlModel.getModel());
Assert.assertSame(ModelImpl.class, umlModel.getModel().getClass());
}
} | [FOCAL] @Override public UmlModel UmlModelLoader.loadModel(File modelFile)
[CLASS] class UmlModelLoader extends ModelLoader<UmlModel, File>
[METRICS] loc=22 cc=4 branches=1 loops=0 returns=2 throws=2 nesting=1
[CALLS-INTERNAL] Model getUmlRootModel(File modelFile)
[CALLS-EXTERNAL] UmlModelProducer.getInstance().createU... | /* static context
[FOCAL] @Override public UmlModel UmlModelLoader.loadModel(File modelFile)
[THROWS-WHEN] UmlModelException when !(modelFile == null) && try-body throws
[PATH1] if(modelFile == null)=F -> try-body throws -> throw new UmlModelException("Cannot load Template " + modelFile.getName()...
[PATH2] if(modelFil... | /* static context
[FOCAL] @Override public UmlModel UmlModelLoader.loadModel(File modelFile)
[THROWS-WHEN] UmlModelException when !(modelFile == null) && try-body throws
[PATH1] if(modelFile == null)=F -> try-body throws -> throw new UmlModelException("Cannot load Template " + modelFile.getName()...
[PATH2] if(modelFil... | true | ok | {"focal": {"class": "UmlModelLoader", "name": "loadModel", "signature": "UmlModel loadModel(File modelFile) throws UmlModelException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "modelFile", "type": "File"}], "return_type": "UmlModel"}, "class_info": {"name": "UmlModelLoader", "kind": "class"... |
904044_3 | class VariableResolver {
public abstract Object resolve(String name)public abstract Object resolve(String name);
public abstract Object resolve(String name)public abstract String replaceTokens(String template);
}
class TestVariableResolver {
@Test
public void testNestedNamespace() {
| VariableResolverImpl vri = new VariableResolverImpl();
Map<String, Object> ns = new HashMap<String, Object>();
ns.put("world", "WORLD");
vri.addNamespace("hello", ns);
ns = new HashMap<String, Object>();
ns.put("world1", "WORLD1");
vri.addNamespace("hello.my", ns);
Assert.assertEquals("W... | [FOCAL] public abstract Object VariableResolver.resolve(String name)
[CLASS] class VariableResolver
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] String replaceTokens(String template)
[TEST] TestVariableResolver: @Test public void testNestedNamespace() | /* static context
[FOCAL] public abstract Object VariableResolver.resolve(String name)
*/
| /* static context
[FOCAL] public abstract Object VariableResolver.resolve(String name)
*/
class VariableResolver {
public abstract Object resolve(String name)public abstract Object resolve(String name);
public abstract Object resolve(String name)public abstract String replaceTokens(String template);
}
class TestVar... | true | partial | {"focal": {"class": "VariableResolver", "name": "resolve", "signature": "Object resolve(String name)", "start_line": 3, "modifiers": "public abstract", "params": [{"name": "name", "type": "String"}], "return_type": "Object"}, "class_info": {"name": "VariableResolver", "kind": "class", "modifiers": "", "superclass": nul... |
904873_9 | class Parser {
public String getResourceName()
{
return m_resourceName;
}
public Parser( final String path );
}
class ParserTest {
@Test
public void getResourceNameWithLeadingSlash()
throws MalformedURLException
{
| assertEquals( "Resource name", "resource", new Parser( "/resource" ).getResourceName() );
}
} | [FOCAL] public String Parser.getResourceName()
[CLASS] class Parser
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] Parser(String path)
[TEST] ParserTest: @Test public void getResourceNameWithLeadingSlash() throws MalformedURLException | /* static context
[FOCAL] public String Parser.getResourceName()
*/
| /* static context
[FOCAL] public String Parser.getResourceName()
*/
class Parser {
public String getResourceName()
{
return m_resourceName;
}
public Parser( final String path );
}
class ParserTest {
@Test
public void getResourceNameWithLeadingSlash()
throws MalformedURLExce... | true | ok | {"focal": {"class": "Parser", "name": "getResourceName", "signature": "String getResourceName()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "Parser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": ... |
906854_11 | class CompositeScannerProvisionOption extends AbstractUrlProvisionOption<CompositeScannerProvisionOption> implements Scanner {
public String getURL()
{
return new StringBuilder()
.append( SCHEMA )
.append( SEPARATOR_SCHEME )
.append( super.getURL() )
.app... | assertThat(
"Scan composite url",
new CompositeScannerProvisionOption(
maven().groupId( "bar" ).artifactId( "foo" ).type( "composite" )
).getURL(),
is( equalTo( "scan-composite:mvn:bar/foo//composite@update" ) )
);
}
} | [FOCAL] public String CompositeScannerProvisionOption.getURL()
[CLASS] class CompositeScannerProvisionOption extends AbstractUrlProvisionOption<CompositeScannerProvisionOption> implements Scanner
[METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] new StringBuilder() .append( SCHEMA ) ... | /* static context
[FOCAL] public String CompositeScannerProvisionOption.getURL()
[NEW] StringBuilder
[CALLS-EXTERNAL] new StringBuilder() .append( SCHEMA ) .append( SEPARATOR_....toString/0, new StringBuilder() .append( SCHEMA ) .append( SEPARATOR_....append/1, new StringBuilder() .append( SCHEMA ).append/1, new String... | /* static context
[FOCAL] public String CompositeScannerProvisionOption.getURL()
[NEW] StringBuilder
[CALLS-EXTERNAL] new StringBuilder() .append( SCHEMA ) .append( SEPARATOR_....toString/0, new StringBuilder() .append( SCHEMA ) .append( SEPARATOR_....append/1, new StringBuilder() .append( SCHEMA ).append/1, new String... | true | ok | {"focal": {"class": "CompositeScannerProvisionOption", "name": "getURL", "signature": "String getURL()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "CompositeScannerProvisionOption", "kind": "class", "modifiers": "", "superclass": "AbstractUrlProvisionOption<C... |
907274_29 | class EventBusManager {
public <T extends EventBus> T register(Class<T> busType, Object subscriber) {
return this.register(busType,subscriber,null);
}
public EventBusManager();
public T register(Class<T> busType, Object subscriber,EventBus parentEventBus);
private boolean isPrivateEventBus(Class<T> bu... | EventBus eventBus = eventBusManager.register(StubPrivateEventBus.class,new Object());
EventBus eventBus2 = eventBusManager.register(StubPrivateEventBus.class,new Object());
Assert.assertNotSame("Same event bus instances",eventBus,eventBus2);
}
} | [FOCAL] public T EventBusManager.register(Class<T> busType, Object subscriber)
[CLASS] class EventBusManager
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] T register(Class<T> busType, Object subscriber, EventBus parentEventBus)
[INPUTS] branches=- | result=busType, subscriber
[DA... | /* static context
[FOCAL] public T EventBusManager.register(Class<T> busType, Object subscriber)
[INPUTS] branches=- | result=busType, subscriber
[CALLS-INTERNAL] T register(Class<T> busType, Object subscriber, EventBus parentEventBus)
*/
| /* static context
[FOCAL] public T EventBusManager.register(Class<T> busType, Object subscriber)
[INPUTS] branches=- | result=busType, subscriber
[CALLS-INTERNAL] T register(Class<T> busType, Object subscriber, EventBus parentEventBus)
*/
class EventBusManager {
public <T extends EventBus> T register(Class<T> busTyp... | true | ok | {"focal": {"class": "EventBusManager", "name": "register", "signature": "T register(Class<T> busType, Object subscriber)", "start_line": 3, "modifiers": "public", "params": [{"name": "busType", "type": "Class<T>"}, {"name": "subscriber", "type": "Object"}], "return_type": "T"}, "class_info": {"name": "EventBusManager",... |
908709_29 | class TextUtil {
public static String cleanTerm(String term) {
term = term.toLowerCase().trim();
if (term.matches("[0-9\\-\\.:]+"))
return "<NUM>";
if (term.startsWith("http:") ||
term.startsWith("ftp:"))
return "<URL>";
while (term.length() > 0 ... | String[] numbers = {
"1900", ":123", "1-2", "1.2", "10000:", "125121", ".123", "123.",
};
for (String number : numbers)
assertEquals("<NUM>", TextUtil.cleanTerm(number));
}
} | [FOCAL] public static String TextUtil.cleanTerm(String term)
[CLASS] class TextUtil
[METRICS] loc=29 cc=5 branches=2 loops=2 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] term.toLowerCase().trim/0, String.toLowerCase/0, String.matches/1, String.startsWith/1, String.length/0, String.substring/2, String.endsWith/1, Strin... | /* static context
[FOCAL] public static String TextUtil.cleanTerm(String term)
[PATH1] if(term.matches("[0-9\\-\\.:]+"))=F -> if(term.startsWith("http:") || term.startsWith("ftp:"))=F -> while(term.length() > 0 && term.startsWith("-"))=T -> exit loop -> while(term.length() > 0 && term.endsWith("-"))=F -> return term.tr... | /* static context
[FOCAL] public static String TextUtil.cleanTerm(String term)
[PATH1] if(term.matches("[0-9\\-\\.:]+"))=F -> if(term.startsWith("http:") || term.startsWith("ftp:"))=F -> while(term.length() > 0 && term.startsWith("-"))=T -> exit loop -> while(term.length() > 0 && term.endsWith("-"))=F -> return term.tr... | true | ok | {"focal": {"class": "TextUtil", "name": "cleanTerm", "signature": "String cleanTerm(String term)", "start_line": 3, "modifiers": "public static", "params": [{"name": "term", "type": "String"}], "return_type": "String"}, "class_info": {"name": "TextUtil", "kind": "class", "modifiers": "", "superclass": null, "interfaces... |
909809_66 | class ChartMarkersParameter extends AbstractParameter {
void addFreeMarker(final Marker marker, final double xPos, final double yPos) {
markers.add(new FreeMarker(marker, xPos, yPos));
}
void addFillAreaMarker(final FillAreaType fillAreaType, final Color color, final int startLineIndex, final int... | final ChartMarkersParameter p = new ChartMarkersParameter();
final Marker sm = Markers.newShapeMarker(Shape.CIRCLE, PERU, 13, Priority.LOW);
p.addFreeMarker(sm, 10, 20);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info(p.toURLParameterString());
final String expectedString = "chm... | [FOCAL] void ChartMarkersParameter.addFreeMarker(Marker marker, double xPos, double yPos)
[CLASS] class ChartMarkersParameter extends AbstractParameter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] markers.add/1
[NEW] FreeMarker
[COLLABORATORS] field markers add/1
[DATAFLOW] mark... | /* static context
[FOCAL] void ChartMarkersParameter.addFreeMarker(Marker marker, double xPos, double yPos)
[COLLABORATORS] field markers add/1
[NEW] FreeMarker
[CALLS-EXTERNAL] markers.add/1
*/
| /* static context
[FOCAL] void ChartMarkersParameter.addFreeMarker(Marker marker, double xPos, double yPos)
[COLLABORATORS] field markers add/1
[NEW] FreeMarker
[CALLS-EXTERNAL] markers.add/1
*/
class ChartMarkersParameter extends AbstractParameter {
void addFreeMarker(final Marker marker, final double xPos, final... | true | ok | {"focal": {"class": "ChartMarkersParameter", "name": "addFreeMarker", "signature": "void addFreeMarker(Marker marker, double xPos, double yPos)", "start_line": 3, "modifiers": "", "params": [{"name": "marker", "type": "Marker"}, {"name": "xPos", "type": "double"}, {"name": "yPos", "type": "double"}], "return_type": "vo... |
912291_21 | class SpecificCharacterSet {
public byte[] encode(String val, String delimiters) {
return codecs[0].encode(val);
}
protected SpecificCharacterSet(Codec[] codecs, String... codes);
public static SpecificCharacterSet getDefaultCharacterSet();
public static void setDefaultCharacterSet(Strin... | assertArrayEquals(HEBREW_PERSON_NAME_BYTE,
iso8859_8().encode(HEBREW_PERSON_NAME, PN_DELIMS));
}
} | [FOCAL] public byte[] SpecificCharacterSet.encode(String val, String delimiters)
[CLASS] class SpecificCharacterSet
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] codecs[0].encode/1
[INPUTS] branches=- | result=val | unused=delimiters
[DATAFLOW] val@param->L2
[CLASS-MEMBERS] Speci... | /* static context
[FOCAL] public byte[] SpecificCharacterSet.encode(String val, String delimiters)
[INPUTS] branches=- | result=val | unused=delimiters
[CALLS-EXTERNAL] codecs[0].encode/1
*/
| /* static context
[FOCAL] public byte[] SpecificCharacterSet.encode(String val, String delimiters)
[INPUTS] branches=- | result=val | unused=delimiters
[CALLS-EXTERNAL] codecs[0].encode/1
*/
class SpecificCharacterSet {
public byte[] encode(String val, String delimiters) {
return codecs[0].encode(val);
... | true | ok | {"focal": {"class": "SpecificCharacterSet", "name": "encode", "signature": "byte[] encode(String val, String delimiters)", "start_line": 3, "modifiers": "public", "params": [{"name": "val", "type": "String"}, {"name": "delimiters", "type": "String"}], "return_type": "byte[]"}, "class_info": {"name": "SpecificCharacterS... |
915029_21 | class FilteredObservableList extends AbstractObservableList<E> {
@Override
public E remove(final int index) {
return d_inner.remove((int) d_indices.get(index));
}
public FilteredObservableList(final ObservableList<E> inner, final Predicate<E> filter);
private void initializeIndices();
public void setFilter(... | ListDataListener mock = createStrictMock(ListDataListener.class);
replay(mock);
d_outer.addListDataListener(mock);
d_inner.remove("Daan");
assertEquals(Arrays.asList("Gert", "Jan"), d_outer);
verify(mock);
}
} | [FOCAL] @Override public E FilteredObservableList.remove(int index)
[CLASS] class FilteredObservableList extends AbstractObservableList<E>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] ArrayListModel<String>.remove/1, d_indices.get/1
[FIELDS] read=d_inner:ArrayListModel<String>
[... | /* static context
[FOCAL] @Override public E FilteredObservableList.remove(int index)
[INPUTS] branches=- | result=index, d_inner
[COLLABORATORS] field d_inner:ArrayListModel<String> remove/1; field d_indices get/1
[FIELDS] read=d_inner:ArrayListModel<String>
[CALLS-EXTERNAL] ArrayListModel<String>.remove/1, d_indices.... | /* static context
[FOCAL] @Override public E FilteredObservableList.remove(int index)
[INPUTS] branches=- | result=index, d_inner
[COLLABORATORS] field d_inner:ArrayListModel<String> remove/1; field d_indices get/1
[FIELDS] read=d_inner:ArrayListModel<String>
[CALLS-EXTERNAL] ArrayListModel<String>.remove/1, d_indices.... | true | ok | {"focal": {"class": "FilteredObservableList", "name": "remove", "signature": "E remove(int index)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "index", "type": "int"}], "return_type": "E"}, "class_info": {"name": "FilteredObservableList", "kind": "class", "modifiers": "", "superclass": "Abstr... |
917362_1 | class Solve {
Solve() {
}
Solve();
public int solve(int dimension, int[][] gridCopy);
public static int[] rc2box(int i, int j);
private void fillSquare(int i, int j, int K);
private int countNumKnown();
}
class SolveTest {
@Test
public void testGameGrid() {
| Solve grid1 = new Solve();
GameGrid grid = new GameGrid(9);
assertTrue(0< grid1.solve(9, grid.grid));
}
} | [FOCAL] Solve.Solve()
[CLASS] class Solve
[METRICS] loc=2 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] Solve(); int solve(int dimension, int[][] gridCopy); int[] rc2box(int i, int j); void fillSquare(int i, int j, int K); int countNumKnown()
[TEST] SolveTest: @Test public void testGameGrid() | /* static context
[FOCAL] Solve.Solve()
*/
| /* static context
[FOCAL] Solve.Solve()
*/
class Solve {
Solve() {
}
Solve();
public int solve(int dimension, int[][] gridCopy);
public static int[] rc2box(int i, int j);
private void fillSquare(int i, int j, int K);
private int countNumKnown();
}
class SolveTest {
@Test
public void testGameGrid() {
| true | ok | {"focal": {"class": "Solve", "name": "Solve", "signature": "Solve()", "start_line": 3, "modifiers": "", "params": [], "return_type": null}, "class_info": {"name": "Solve", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "Solve", "kind": "constructor", "arity"... |
917947_24 | class CglibProxyFactory extends AbstractProxyFactory {
public boolean canProxy(final Class<?> type) {
return !Modifier.isFinal(type.getModifiers());
}
public CglibProxyFactory();
public CglibProxyFactory(boolean interceptDuringConstruction);
public T createProxy(final Invoker invoker, f... | ProxyFactory factory = new CglibProxyFactory();
assertFalse(factory.canProxy(String.class));
}
} | [FOCAL] public boolean CglibProxyFactory.canProxy(Class<?> type)
[CLASS] class CglibProxyFactory extends AbstractProxyFactory
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Modifier.isFinal/1, Class<?>.getModifiers/0
[INPUTS] branches=- | result=type
[COLLABORATORS] param type:Cla... | /* static context
[FOCAL] public boolean CglibProxyFactory.canProxy(Class<?> type)
[INPUTS] branches=- | result=type
[COLLABORATORS] param type:Class<?> getModifiers/0
[CALLS-EXTERNAL] Modifier.isFinal/1, Class<?>.getModifiers/0
*/
| /* static context
[FOCAL] public boolean CglibProxyFactory.canProxy(Class<?> type)
[INPUTS] branches=- | result=type
[COLLABORATORS] param type:Class<?> getModifiers/0
[CALLS-EXTERNAL] Modifier.isFinal/1, Class<?>.getModifiers/0
*/
class CglibProxyFactory extends AbstractProxyFactory {
public boolean canProxy(fina... | true | ok | {"focal": {"class": "CglibProxyFactory", "name": "canProxy", "signature": "boolean canProxy(Class<?> type)", "start_line": 3, "modifiers": "public", "params": [{"name": "type", "type": "Class<?>"}], "return_type": "boolean"}, "class_info": {"name": "CglibProxyFactory", "kind": "class", "modifiers": "", "superclass": "A... |
918574_14 | class Path {
public static String normalizeResourcePath(final String path) {
if (path == null) {
return null;
}
String normalizedPath = replaceSlashes(path.trim());
if (normalizedPath.startsWith("/") && normalizedPath.length() > 1) {
normalizedPath = normalizedPath.substring(1);
}
return normalizedP... | assertEquals("Normalized", "/", Path.normalizeResourcePath("/ "));
}
} | [FOCAL] public static String Path.normalizeResourcePath(String path)
[CLASS] class Path
[METRICS] loc=10 cc=3 branches=2 loops=0 returns=2 throws=0 nesting=1
[CALLS-INTERNAL] String replaceSlashes(String target)
[CALLS-EXTERNAL] String.trim/0, String.startsWith/1, String.length/0, String.substring/1
[PATH1] if(path == ... | /* static context
[FOCAL] public static String Path.normalizeResourcePath(String path)
[PATH1] if(path == null)=F -> if(normalizedPath.startsWith("/") && normalizedPath.length() > 1)=T -> return normalizedPath
[PATH2] if(path == null)=T -> return null
[PATH3] if(path == null)=F -> if(normalizedPath.startsWith("/") && n... | /* static context
[FOCAL] public static String Path.normalizeResourcePath(String path)
[PATH1] if(path == null)=F -> if(normalizedPath.startsWith("/") && normalizedPath.length() > 1)=T -> return normalizedPath
[PATH2] if(path == null)=T -> return null
[PATH3] if(path == null)=F -> if(normalizedPath.startsWith("/") && n... | true | ok | {"focal": {"class": "Path", "name": "normalizeResourcePath", "signature": "String normalizeResourcePath(String path)", "start_line": 3, "modifiers": "public static", "params": [{"name": "path", "type": "String"}], "return_type": "String"}, "class_info": {"name": "Path", "kind": "class", "modifiers": "", "superclass": n... |
921110_24 | class BootstrapConfigForGroup implements Function<String, DatabagItem> {
@Override
public DatabagItem apply(String from) {
DatabagItem bootstrapConfig = api.getDatabagItem(databag, from);
checkState(bootstrapConfig != null, "databag item %s/%s not found", databag, from);
return bootstrapConfig;... | ChefApi chefApi = createMock(ChefApi.class);
Client client = createMock(Client.class);
BootstrapConfigForGroup fn = new BootstrapConfigForGroup("jclouds", chefApi);
expect(chefApi.getDatabagItem("jclouds", "foo")).andReturn(null);
replay(client);
replay(chefApi);
fn.apply("... | [FOCAL] @Override public DatabagItem BootstrapConfigForGroup.apply(String from)
[CLASS] class BootstrapConfigForGroup implements Function<String, DatabagItem>
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] api.getDatabagItem/2, checkState/4 (inherited)
[INPUTS] branches=- | result... | /* static context
[FOCAL] @Override public DatabagItem BootstrapConfigForGroup.apply(String from)
[INPUTS] branches=- | result=from
[COLLABORATORS] field api getDatabagItem/2
[CALLS-EXTERNAL] api.getDatabagItem/2, checkState/4 (inherited)
*/
| /* static context
[FOCAL] @Override public DatabagItem BootstrapConfigForGroup.apply(String from)
[INPUTS] branches=- | result=from
[COLLABORATORS] field api getDatabagItem/2
[CALLS-EXTERNAL] api.getDatabagItem/2, checkState/4 (inherited)
*/
class BootstrapConfigForGroup implements Function<String, DatabagItem> {
@... | true | ok | {"focal": {"class": "BootstrapConfigForGroup", "name": "apply", "signature": "DatabagItem apply(String from)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "from", "type": "String"}], "return_type": "DatabagItem"}, "class_info": {"name": "BootstrapConfigForGroup", "kind": "class", "modifiers": ... |
922501_4 | class RepositoryDirectoryUtil {
public static List<String> getEntries(File root)
{
return walk(root.toURI(), root);
}
public static List<String> walk(URI root, File dir);
private static String stackToPath(List<File> stack, File leaf);
private static void addEntry(StringBuilder sb, File... | final File dir = tmp.newFolder("names");
new File(dir, "foo.txt").createNewFile();
new File(dir, "a/b").mkdirs();
new File(dir, "a/bar.txt").createNewFile();
new File(dir, "c").mkdirs();
assertEquals(newArrayList("a/", "a/b/", "a/bar.txt", "c/", "foo.txt"), RepositoryDi... | [FOCAL] public static List<String> RepositoryDirectoryUtil.getEntries(File root)
[CLASS] class RepositoryDirectoryUtil
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] List<String> walk(URI root, File dir)
[CALLS-EXTERNAL] File.toURI/0
[INPUTS] branches=- | result=root
[COLLABORATOR... | /* static context
[FOCAL] public static List<String> RepositoryDirectoryUtil.getEntries(File root)
[INPUTS] branches=- | result=root
[COLLABORATORS] param root:File toURI/0
[CALLS-INTERNAL] List<String> walk(URI root, File dir)
[CALLS-EXTERNAL] File.toURI/0
*/
| /* static context
[FOCAL] public static List<String> RepositoryDirectoryUtil.getEntries(File root)
[INPUTS] branches=- | result=root
[COLLABORATORS] param root:File toURI/0
[CALLS-INTERNAL] List<String> walk(URI root, File dir)
[CALLS-EXTERNAL] File.toURI/0
*/
class RepositoryDirectoryUtil {
public static List<Str... | true | ok | {"focal": {"class": "RepositoryDirectoryUtil", "name": "getEntries", "signature": "List<String> getEntries(File root)", "start_line": 3, "modifiers": "public static", "params": [{"name": "root", "type": "File"}], "return_type": "List<String>"}, "class_info": {"name": "RepositoryDirectoryUtil", "kind": "class", "modifie... |
927454_3 | class PublisherConfirms {
static boolean waitUntil(Duration timeout, BooleanSupplier condition) throws InterruptedException {
int waited = 0;
while (!condition.getAsBoolean() && waited < timeout.toMillis()) {
Thread.sleep(100L);
waited = +100;
}
return condit... | Channel ch = connection.createChannel();
ch.confirmSelect();
Map<Long, String> outstandingConfirms = resendUnconfirmedMessages(ch);
assertThat(waitUntil(Duration.ofSeconds(5), () -> outstandingConfirms.isEmpty())).isTrue();
ch.close();
Set<String> receivedMessages = Conc... | [FOCAL] static boolean PublisherConfirms.waitUntil(Duration timeout, BooleanSupplier condition)
[CLASS] class PublisherConfirms
[METRICS] loc=8 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] BooleanSupplier.getAsBoolean/0, Duration.toMillis/0, Thread.sleep/1
[EXCEPTIONS] declares InterruptedExcep... | /* static context
[FOCAL] static boolean PublisherConfirms.waitUntil(Duration timeout, BooleanSupplier condition)
[PATH1] while(!condition.getAsBoolean() && waited < timeout.toMillis())=T -> exit loop -> return condition.getAsBoolean()
[PATH2] while(!condition.getAsBoolean() && waited < timeout.toMillis())=F -> return ... | /* static context
[FOCAL] static boolean PublisherConfirms.waitUntil(Duration timeout, BooleanSupplier condition)
[PATH1] while(!condition.getAsBoolean() && waited < timeout.toMillis())=T -> exit loop -> return condition.getAsBoolean()
[PATH2] while(!condition.getAsBoolean() && waited < timeout.toMillis())=F -> return ... | true | ok | {"focal": {"class": "PublisherConfirms", "name": "waitUntil", "signature": "boolean waitUntil(Duration timeout, BooleanSupplier condition) throws InterruptedException", "start_line": 3, "modifiers": "static", "params": [{"name": "timeout", "type": "Duration"}, {"name": "condition", "type": "BooleanSupplier"}], "return_... |
936063_9 | class CreateISO {
public void process(ISO9660Config iso9660Config, RockRidgeConfig rrConfig, JolietConfig jolietConfig,
ElToritoConfig elToritoConfig) throws HandlerException {
if (iso9660Config == null) {
throw new NullPointerException("Cannot create ISO without ISO9660... | File outfile = new File(workDir, "truncate.iso");
ISO9660RootDirectory root = new ISO9660RootDirectory();
root.addFile(new ISO9660File(new ByteArrayDataReference("Hello, world!".getBytes(StandardCharsets.UTF_8)) , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.wsdl", 1121040000l));
Stre... | [FOCAL] public void CreateISO.process(ISO9660Config iso9660Config, RockRidgeConfig rrConfig, JolietConfig jolietConfig, ElToritoConfig elToritoConfig)
[CLASS] class CreateISO
[METRICS] loc=49 cc=4 branches=3 loops=0 returns=0 throws=1 nesting=1
[CALLS-EXTERNAL] ((LogicalSectorPaddingHandler) streamHandler).setPadEnd/1,... | /* static context
[FOCAL] public void CreateISO.process(ISO9660Config iso9660Config, RockRidgeConfig rrConfig, JolietConfig jolietConfig, ElToritoConfig elToritoConfig)
[THROWS-WHEN] NullPointerException when iso9660Config == null
[PATH1] if(iso9660Config == null)=F -> if(jolietConfig != null)=T -> if(elToritoConfig !=... | /* static context
[FOCAL] public void CreateISO.process(ISO9660Config iso9660Config, RockRidgeConfig rrConfig, JolietConfig jolietConfig, ElToritoConfig elToritoConfig)
[THROWS-WHEN] NullPointerException when iso9660Config == null
[PATH1] if(iso9660Config == null)=F -> if(jolietConfig != null)=T -> if(elToritoConfig !=... | true | ok | {"focal": {"class": "CreateISO", "name": "process", "signature": "void process(ISO9660Config iso9660Config, RockRidgeConfig rrConfig, JolietConfig jolietConfig, ElToritoConfig elToritoConfig) throws HandlerException", "start_line": 3, "modifiers": "public", "params": [{"name": "iso9660Config", "type": "ISO9660Config"},... |
940337_6 | class PathUtil {
static String getRelativeFileInternal(File canonicalBaseFile, File canonicalFileToRelativize) {
ArrayList<String> basePath = getPathComponents(canonicalBaseFile);
ArrayList<String> pathToRelativize = getPathComponents(canonicalFileToRelativize);
//if the roots aren't the s... | File[] roots = File.listRoots();
File basePath = new File(roots[0] + "some");
File relativePath = new File(roots[0] + "some" + File.separatorChar + "dir");
String path = PathUtil.getRelativeFileInternal(basePath, relativePath);
Assert.assertEquals(path, "dir");
}
} | [FOCAL] static String PathUtil.getRelativeFileInternal(File canonicalBaseFile, File canonicalFileToRelativize)
[CLASS] class PathUtil
[METRICS] loc=50 cc=10 branches=6 loops=3 returns=3 throws=0 nesting=3
[CALLS-INTERNAL] ArrayList<String> getPathComponents(File file)
[CALLS-EXTERNAL] basePath.get(0).equals/1, ArrayLis... | /* static context
[FOCAL] static String PathUtil.getRelativeFileInternal(File canonicalBaseFile, File canonicalFileToRelativize)
[PATH1] if(!basePath.get(0).equals(pathToRelativize.get(0)))=F -> for(commonDirs<basePath.size() && commonDirs<pathToRelativize.size())=T -> if(!basePath.get(commonDirs).equals(pathToRelativi... | /* static context
[FOCAL] static String PathUtil.getRelativeFileInternal(File canonicalBaseFile, File canonicalFileToRelativize)
[PATH1] if(!basePath.get(0).equals(pathToRelativize.get(0)))=F -> for(commonDirs<basePath.size() && commonDirs<pathToRelativize.size())=T -> if(!basePath.get(commonDirs).equals(pathToRelativi... | true | ok | {"focal": {"class": "PathUtil", "name": "getRelativeFileInternal", "signature": "String getRelativeFileInternal(File canonicalBaseFile, File canonicalFileToRelativize)", "start_line": 3, "modifiers": "static", "params": [{"name": "canonicalBaseFile", "type": "File"}, {"name": "canonicalFileToRelativize", "type": "File"... |
944926_18 | class EventBus {
public void register(Object object) {
subscribeAll(finder.findAllSubscribers(object));
}
public void subscribe(Class<?> clazz, EventHandler handler);
public void subscribeAll(Multimap<Class<?>, EventHandler> handlers);
public void unsubscribe(Class<?> clazz, EventHandler h... | Subscriber subscriber = new Subscriber();
eventBus.register(subscriber);
Event e1 = new Event();
eventBus.post(e1);
Event e2 = new Event();
eventBus.post(e2);
assertEquals(asList(e1, e2), subscriber.events);
}
} | [FOCAL] public void EventBus.register(Object object)
[CLASS] class EventBus
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void subscribeAll(Multimap<Class<?>, EventHandler> handlers)
[CALLS-EXTERNAL] finder.findAllSubscribers/1
[COLLABORATORS] field finder findAllSubscribers/1
[D... | /* static context
[FOCAL] public void EventBus.register(Object object)
[COLLABORATORS] field finder findAllSubscribers/1
[CALLS-INTERNAL] void subscribeAll(Multimap<Class<?>, EventHandler> handlers)
[CALLS-EXTERNAL] finder.findAllSubscribers/1
*/
| /* static context
[FOCAL] public void EventBus.register(Object object)
[COLLABORATORS] field finder findAllSubscribers/1
[CALLS-INTERNAL] void subscribeAll(Multimap<Class<?>, EventHandler> handlers)
[CALLS-EXTERNAL] finder.findAllSubscribers/1
*/
class EventBus {
public void register(Object object) {
subsc... | true | ok | {"focal": {"class": "EventBus", "name": "register", "signature": "void register(Object object)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "Object"}], "return_type": "void"}, "class_info": {"name": "EventBus", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, ... |
947990_0 | class ValidadorDniNie implements ConstraintValidator<ValidarDniNie, Asociado> {
@Override
public boolean isValid(Asociado asociado, ConstraintValidatorContext context) {
if (asociado == null || asociado.getFechaNacimiento() == null)
return true;
context.disableDefaultConstraintViol... | asociado.setDni("AAA");
asociado.setFechaNacimiento(null);
assertTrue(validador.isValid(asociado, context));
}
} | [FOCAL] @Override public boolean ValidadorDniNie.isValid(Asociado asociado, ConstraintValidatorContext context)
[CLASS] class ValidadorDniNie implements ConstraintValidator<ValidarDniNie, Asociado>
[METRICS] loc=20 cc=4 branches=3 loops=0 returns=4 throws=0 nesting=2
[CALLS-INTERNAL] boolean validarDniNie(String value,... | /* static context
[FOCAL] @Override public boolean ValidadorDniNie.isValid(Asociado asociado, ConstraintValidatorContext context)
[PATH1] if(asociado == null || asociado.getFechaNacimiento() == null)=F -> if(Strings.isNullOrEmpty(asociado.getDni()))=T -> if(mayorDeEdad)=T -> return false
[PATH2] if(asociado == null || ... | /* static context
[FOCAL] @Override public boolean ValidadorDniNie.isValid(Asociado asociado, ConstraintValidatorContext context)
[PATH1] if(asociado == null || asociado.getFechaNacimiento() == null)=F -> if(Strings.isNullOrEmpty(asociado.getDni()))=T -> if(mayorDeEdad)=T -> return false
[PATH2] if(asociado == null || ... | true | ok | {"focal": {"class": "ValidadorDniNie", "name": "isValid", "signature": "boolean isValid(Asociado asociado, ConstraintValidatorContext context)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "asociado", "type": "Asociado"}, {"name": "context", "type": "ConstraintValidatorContext"}], "return_type... |
960343_8 | class SimpleFormula implements ICompactTripletsStructure, ICompactTripletsStructureHolder {
public boolean evaluate(Properties properties)
{
boolean result = true;
for (int j = 0; j < getTiers().size(); j++)
{
for (ITripletValue tiplet : getTier(j))
{
... | ITabularFormula formula = Helper.createFormula(1, 2, 3);
ObjectArrayList route = new ObjectArrayList();
// Route contains inverse values
route.add(new SimpleVertex(new SimpleTripletPermutation(1, 2, 3), 0, _111_instance, null));
assertTrue(formula.evaluate(rout... | [FOCAL] public boolean SimpleFormula.evaluate(Properties properties)
[CLASS] class SimpleFormula implements ICompactTripletsStructure, ICompactTripletsStructureHolder
[METRICS] loc=27 cc=7 branches=4 loops=2 returns=2 throws=0 nesting=3
[CALLS-INTERNAL] ITier getTier(int tierIndex); ObjectArrayList getTiers()
[CALLS-EX... | /* static context
[FOCAL] public boolean SimpleFormula.evaluate(Properties properties)
[PATH1] for(j < getTiers().size())=T -> foreach(ITripletValue tiplet : getTier(j))=T -> if(tiplet.isNotA())=T -> if(tiplet.isNotB())=T -> if(tiplet.isNotC())=T -> if(!result)=F -> exit loop -> exit loop -> return result
[PATH2] for(j... | /* static context
[FOCAL] public boolean SimpleFormula.evaluate(Properties properties)
[PATH1] for(j < getTiers().size())=T -> foreach(ITripletValue tiplet : getTier(j))=T -> if(tiplet.isNotA())=T -> if(tiplet.isNotB())=T -> if(tiplet.isNotC())=T -> if(!result)=F -> exit loop -> exit loop -> return result
[PATH2] for(j... | true | ok | {"focal": {"class": "SimpleFormula", "name": "evaluate", "signature": "boolean evaluate(Properties properties)", "start_line": 3, "modifiers": "public", "params": [{"name": "properties", "type": "Properties"}], "return_type": "boolean"}, "class_info": {"name": "SimpleFormula", "kind": "class", "modifiers": "", "supercl... |
960760_9 | class QuadTree implements Layer, BoundingBoxChangeListener {
@Override
public void bringToFront(final DrawingObject dob) {
if (threadSafe) {
synchronized (lock) {
insertionOrder.put(dob, ++insertionOrderLargest);
}
} else {
insertionOrder.put(dob, ++insertionOrderLargest);
}
}
@SuppressWarnings... |
Set<DrawingObject> set;
addAllRectangles();
set = tree.getDrawingObjects(true);
assertTrue(set.toArray()[0] == rectangle1);
assertTrue(set.toArray()[3] == rectangle4);
tree.bringToFront(rectangle1);
set = tree.getDrawingObjects(true);
assertTrue(set.toArray()[3] == rectangle1);
tree.bringToFront(... | [FOCAL] @Override public void QuadTree.bringToFront(DrawingObject dob)
[CLASS] class QuadTree implements Layer, BoundingBoxChangeListener
[METRICS] loc=10 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=2
[CALLS-EXTERNAL] insertionOrder.put/2
[PATH1] if(threadSafe)=T
[PATH2] if(threadSafe)=F
[COLLABORATORS] field in... | /* static context
[FOCAL] @Override public void QuadTree.bringToFront(DrawingObject dob)
[PATH1] if(threadSafe)=T
[PATH2] if(threadSafe)=F
[COLLABORATORS] field insertionOrder put/2
[CALLS-EXTERNAL] insertionOrder.put/2
*/
| /* static context
[FOCAL] @Override public void QuadTree.bringToFront(DrawingObject dob)
[PATH1] if(threadSafe)=T
[PATH2] if(threadSafe)=F
[COLLABORATORS] field insertionOrder put/2
[CALLS-EXTERNAL] insertionOrder.put/2
*/
class QuadTree implements Layer, BoundingBoxChangeListener {
@Override
public void bringToFron... | true | ok | {"focal": {"class": "QuadTree", "name": "bringToFront", "signature": "void bringToFront(DrawingObject dob)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "dob", "type": "DrawingObject"}], "return_type": "void"}, "class_info": {"name": "QuadTree", "kind": "class", "modifiers": "", "superclass": ... |
990281_80 | class ConfiguredBeanResolver implements BeanResolver {
@Override
public <T> BeanHolder<T> resolve(Class<T> typeReference) {
Contracts.assertNotNull( typeReference, "typeReference" );
try {
return beanProvider.forType( typeReference );
}
catch (SearchException e) {
try {
return resolveSingleConfigur... | // Setup
BeanReference<Type1> beanReference1Mock = beanReferenceMock();
BeanReference<Type1> beanReference2Mock = beanReferenceMock();
BeanConfigurer beanConfigurer1 = context -> {
context.define( Type1.class, beanReference1Mock );
};
BeanConfigurer beanConfigurer2 = context -> {
context.define( Type... | [FOCAL] @Override public BeanHolder<T> ConfiguredBeanResolver.resolve(Class<T> typeReference)
[CLASS] class ConfiguredBeanResolver implements BeanResolver
[METRICS] loc=15 cc=3 branches=0 loops=0 returns=2 throws=1 nesting=2
[CALLS-INTERNAL] BeanHolder<T> resolveSingleConfiguredBean(Class<T> exposedType)
[CALLS-EXTERNA... | /* static context
[FOCAL] @Override public BeanHolder<T> ConfiguredBeanResolver.resolve(Class<T> typeReference)
[THROWS-WHEN] log.cannotResolveBeanReference( typeReference, e.getMessage(), e2.g... when try-body throws && try-body throws
[PATH1] try-body throws -> return resolveSingleConfiguredBean( typeReference )
[PAT... | /* static context
[FOCAL] @Override public BeanHolder<T> ConfiguredBeanResolver.resolve(Class<T> typeReference)
[THROWS-WHEN] log.cannotResolveBeanReference( typeReference, e.getMessage(), e2.g... when try-body throws && try-body throws
[PATH1] try-body throws -> return resolveSingleConfiguredBean( typeReference )
[PAT... | true | ok | {"focal": {"class": "ConfiguredBeanResolver", "name": "resolve", "signature": "BeanHolder<T> resolve(Class<T> typeReference)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "typeReference", "type": "Class<T>"}], "return_type": "BeanHolder<T>"}, "class_info": {"name": "ConfiguredBeanResolver", "k... |
991965_51 | class Iterables {
public static <T> Iterable<T> mix( final Iterable<T>... iterables )
{
return new Iterable<T>()
{
@Override
public Iterator<T> iterator()
{
final Iterable<Iterator<T>> iterators = toList(map( new Function<Iterable<T>, Iterator... | assertThat( Iterables.toList(Iterables.mix( Iterables.iterable( "A","B","C" ),Iterables.iterable( "1","2","3","4","5" ),Iterables.iterable( "X","Y","Z" ) )).toString(), equalTo( "[A, 1, X, B, 2, Y, C, 3, Z, 4, 5]" ));
}
} | [FOCAL] public static Iterable<T> Iterables.mix(Iterable<T>... iterables)
[CLASS] class Iterables
[METRICS] loc=67 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=2
[CALLS-INTERNAL] Iterable<TO> map(Function<? super FROM, TO> function, Iterable<FROM> from); List<T> toList(Iterable<T> iterable)
[CALLS-EXTERNAL] itera... | /* static context
[FOCAL] public static Iterable<T> Iterables.mix(Iterable<T>... iterables)
[INPUTS] branches=- | result=iterables
[COLLABORATORS] field iterable iterator/0; field iter hasNext/0,next/0,remove/0
[CALLS-INTERNAL] Iterable<TO> map(Function<? super FROM, TO> function, Iterable<FROM> from); List<T> toList(I... | /* static context
[FOCAL] public static Iterable<T> Iterables.mix(Iterable<T>... iterables)
[INPUTS] branches=- | result=iterables
[COLLABORATORS] field iterable iterator/0; field iter hasNext/0,next/0,remove/0
[CALLS-INTERNAL] Iterable<TO> map(Function<? super FROM, TO> function, Iterable<FROM> from); List<T> toList(I... | true | ok | {"focal": {"class": "Iterables", "name": "mix", "signature": "Iterable<T> mix(Iterable<T>... iterables)", "start_line": 3, "modifiers": "public static", "params": [{"name": "iterables", "type": "Iterable<T>..."}], "return_type": "Iterable<T>"}, "class_info": {"name": "Iterables", "kind": "class", "modifiers": "", "supe... |
992007_8 | class ParameterizedTypes {
public static <S, T extends S> Type[] findTypeVariables( Class<T> type, Class<S> searchType )
{
return ParameterizedTypes.findParameterizedType( type, searchType ).getActualTypeArguments();
}
private ParameterizedTypes();
public static ParameterizedType findPar... | assertArrayEquals(
((ParameterizedType) GarbageMan.class.getGenericInterfaces()[0]).getActualTypeArguments(),
ParameterizedTypes.findTypeVariables( GarbageMan.class, HandlerOf.class )
);
}
} | [FOCAL] public static Type[] ParameterizedTypes.findTypeVariables(Class<T> type, Class<S> searchType)
[CLASS] class ParameterizedTypes
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] ParameterizedTypes.findParameterizedType( type, searchType ).getActualTypeArguments/0, Parameterize... | /* static context
[FOCAL] public static Type[] ParameterizedTypes.findTypeVariables(Class<T> type, Class<S> searchType)
[INPUTS] branches=- | result=searchType, type
[CALLS-EXTERNAL] ParameterizedTypes.findParameterizedType( type, searchType ).getActualTypeArguments/0, ParameterizedTypes.findParameterizedType/2
*/
| /* static context
[FOCAL] public static Type[] ParameterizedTypes.findTypeVariables(Class<T> type, Class<S> searchType)
[INPUTS] branches=- | result=searchType, type
[CALLS-EXTERNAL] ParameterizedTypes.findParameterizedType( type, searchType ).getActualTypeArguments/0, ParameterizedTypes.findParameterizedType/2
*/
clas... | true | ok | {"focal": {"class": "ParameterizedTypes", "name": "findTypeVariables", "signature": "Type[] findTypeVariables(Class<T> type, Class<S> searchType)", "start_line": 3, "modifiers": "public static", "params": [{"name": "type", "type": "Class<T>"}, {"name": "searchType", "type": "Class<S>"}], "return_type": "Type[]"}, "clas... |
992012_3 | class CapitalizingIdentifierConverter implements IdentifierConverter {
public Object getValueFromData( final Map<String, Object> rawData, final QualifiedName qualifiedName )
{
String convertedIdentifier = convertIdentifier( qualifiedName );
if( rawData.containsKey( convertedIdentifier ) )
... | Map<String, Object> rawData = new HashMap<String, Object>();
assertEquals( "converted key and found value", null, converter.getValueFromData( rawData, QualifiedName.fromQN( "aaa:abc" ) ) );
}
} | [FOCAL] public Object CapitalizingIdentifierConverter.getValueFromData(Map<String, Object> rawData, QualifiedName qualifiedName)
[CLASS] class CapitalizingIdentifierConverter implements IdentifierConverter
[METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-INTERNAL] String convertIdentifier(Qua... | /* static context
[FOCAL] public Object CapitalizingIdentifierConverter.getValueFromData(Map<String, Object> rawData, QualifiedName qualifiedName)
[PATH1] if(rawData.containsKey( convertedIdentifier ))=T -> return rawData.remove( convertedIdentifier )
[PATH2] if(rawData.containsKey( convertedIdentifier ))=F -> return n... | /* static context
[FOCAL] public Object CapitalizingIdentifierConverter.getValueFromData(Map<String, Object> rawData, QualifiedName qualifiedName)
[PATH1] if(rawData.containsKey( convertedIdentifier ))=T -> return rawData.remove( convertedIdentifier )
[PATH2] if(rawData.containsKey( convertedIdentifier ))=F -> return n... | true | ok | {"focal": {"class": "CapitalizingIdentifierConverter", "name": "getValueFromData", "signature": "Object getValueFromData(Map<String, Object> rawData, QualifiedName qualifiedName)", "start_line": 3, "modifiers": "public", "params": [{"name": "rawData", "type": "Map<String, Object>"}, {"name": "qualifiedName", "type": "Q... |
992971_0 | class ExceptionStack implements Serializable {
public Collection<Throwable> getCauseElements() {
return Collections.unmodifiableCollection(this.causes);
}
public ExceptionStack();
public ExceptionStack(final Throwable exception);
@Deprecated protected ExceptionStack(final Collection<Thr... | SQLTransactionRollbackException transactionRollbackException = new SQLTransactionRollbackException();
SQLRecoverableException recoverableException = new SQLRecoverableException();
SQLSyntaxErrorException syntaxErrorException = new SQLSyntaxErrorException();
recoverableException.setNextEx... | [FOCAL] public Collection<Throwable> ExceptionStack.getCauseElements()
[CLASS] class ExceptionStack implements Serializable
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Collections.unmodifiableCollection/1
[FIELDS] read=causes
[CLASS-MEMBERS] ExceptionStack(); ExceptionStack(Thr... | /* static context
[FOCAL] public Collection<Throwable> ExceptionStack.getCauseElements()
[FIELDS] read=causes
[CALLS-EXTERNAL] Collections.unmodifiableCollection/1
*/
| /* static context
[FOCAL] public Collection<Throwable> ExceptionStack.getCauseElements()
[FIELDS] read=causes
[CALLS-EXTERNAL] Collections.unmodifiableCollection/1
*/
class ExceptionStack implements Serializable {
public Collection<Throwable> getCauseElements() {
return Collections.unmodifiableCollection(t... | true | ok | {"focal": {"class": "ExceptionStack", "name": "getCauseElements", "signature": "Collection<Throwable> getCauseElements()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Collection<Throwable>"}, "class_info": {"name": "ExceptionStack", "kind": "class", "modifiers": "", "superclass": null, "interf... |
993994_1 | class HttpLoader {
public LoadedXml load(final String url, final int timeout) {
try {
final InputStream stream = loadAsStream(url, timeout);
final DocumentBuilder builder = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();
final Document document = builder.parse(stream);
... | HttpLoader httpLoader = new HttpLoader();
final LoadedXml loadedXml = httpLoader.load("http://localhost:33333/test-timeout.xml?_ox&sleep=100", 300);
assertFalse(loadedXml.isEmpty());
}
} | [FOCAL] public LoadedXml HttpLoader.load(String url, int timeout)
[CLASS] class HttpLoader
[METRICS] loc=17 cc=5 branches=0 loops=0 returns=3 throws=0 nesting=1
[CALLS-INTERNAL] InputStream loadAsStream(String url, int timeout)
[CALLS-EXTERNAL] DOCUMENT_BUILDER_FACTORY.newDocumentBuilder/0, DocumentBuilder.parse/1, log... | /* static context
[FOCAL] public LoadedXml HttpLoader.load(String url, int timeout)
[PATH1] try-body throws -> return LoadedXml.EMPTY_XML
[PATH2] return new LoadedXml(document)
[INPUTS] branches=- | result=timeout, url
[EXCEPTIONS] catches SocketTimeoutException e, IOException e, ParserConfigurationException e, SAXExce... | /* static context
[FOCAL] public LoadedXml HttpLoader.load(String url, int timeout)
[PATH1] try-body throws -> return LoadedXml.EMPTY_XML
[PATH2] return new LoadedXml(document)
[INPUTS] branches=- | result=timeout, url
[EXCEPTIONS] catches SocketTimeoutException e, IOException e, ParserConfigurationException e, SAXExce... | true | ok | {"focal": {"class": "HttpLoader", "name": "load", "signature": "LoadedXml load(String url, int timeout)", "start_line": 3, "modifiers": "public", "params": [{"name": "url", "type": "String"}, {"name": "timeout", "type": "int"}], "return_type": "LoadedXml"}, "class_info": {"name": "HttpLoader", "kind": "class", "modifie... |
1001284_61 | class Reflection {
public static Object defaultValueOf(
Class<? extends Annotation> annotationType,
String attribute) {
try {
return annotationType.getMethod(attribute).getDefaultValue();
} catch (Exception ex) {
throw reflectionException(ex);
}
... | assertEquals("baz", defaultValueOf(Foo.class, "bar"));
}
} | [FOCAL] public static Object Reflection.defaultValueOf(Class<? extends Annotation> annotationType, String attribute)
[CLASS] class Reflection
[METRICS] loc=10 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] RuntimeException reflectionException(Exception ex)
[CALLS-EXTERNAL] annotationType.getMetho... | /* static context
[FOCAL] public static Object Reflection.defaultValueOf(Class<? extends Annotation> annotationType, String attribute)
[THROWS-WHEN] reflectionException(ex) when try-body throws
[PATH1] try-body throws -> throw reflectionException(ex)
[PATH2] return annotationType.getMethod(attribute).getDefaultValue()
... | /* static context
[FOCAL] public static Object Reflection.defaultValueOf(Class<? extends Annotation> annotationType, String attribute)
[THROWS-WHEN] reflectionException(ex) when try-body throws
[PATH1] try-body throws -> throw reflectionException(ex)
[PATH2] return annotationType.getMethod(attribute).getDefaultValue()
... | true | ok | {"focal": {"class": "Reflection", "name": "defaultValueOf", "signature": "Object defaultValueOf(Class<? extends Annotation> annotationType, String attribute)", "start_line": 3, "modifiers": "public static", "params": [{"name": "annotationType", "type": "Class<? extends Annotation>"}, {"name": "attribute", "type": "Stri... |
1006123_0 | class ClientWave {
public Wavelet fetchWavelet(WaveId waveId, WaveletId waveletId)
throws ClientWaveException {
return fetchWavelet(waveId, waveletId, null);
}
public ClientWave(JSONRpcHandler jsonHandler);
public List<JsonRpcResponse> submit(Wavelet wavelet);
public Wavelet blindWavelet(WaveId waveId, Wa... |
ClientWave wave = new ClientWave(new JSONRpcHandler() {
public String request(String jsonBody) throws Exception {
Assert
.assertEquals(
"[{\"method\":\"wave.robot.fetchWave\",\"id\":\"op1\",\"params\":{\"waveId\":\"googlewave.com!testwaveid\",\"waveletId\":\"googlewave.com!conv+root\"}}]",
... | [FOCAL] public Wavelet ClientWave.fetchWavelet(WaveId waveId, WaveletId waveletId)
[CLASS] class ClientWave
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Wavelet fetchWavelet(WaveId waveId, WaveletId waveletId, String proxyForId)
[EXCEPTIONS] declares ClientWaveException
[INPUTS]... | /* static context
[FOCAL] public Wavelet ClientWave.fetchWavelet(WaveId waveId, WaveletId waveletId)
[INPUTS] branches=- | result=waveId, waveletId
[EXCEPTIONS] declares ClientWaveException
[CALLS-INTERNAL] Wavelet fetchWavelet(WaveId waveId, WaveletId waveletId, String proxyForId)
*/
| /* static context
[FOCAL] public Wavelet ClientWave.fetchWavelet(WaveId waveId, WaveletId waveletId)
[INPUTS] branches=- | result=waveId, waveletId
[EXCEPTIONS] declares ClientWaveException
[CALLS-INTERNAL] Wavelet fetchWavelet(WaveId waveId, WaveletId waveletId, String proxyForId)
*/
class ClientWave {
public Wavele... | true | ok | {"focal": {"class": "ClientWave", "name": "fetchWavelet", "signature": "Wavelet fetchWavelet(WaveId waveId, WaveletId waveletId) throws ClientWaveException", "start_line": 3, "modifiers": "public", "params": [{"name": "waveId", "type": "WaveId"}, {"name": "waveletId", "type": "WaveletId"}], "return_type": "Wavelet"}, "... |
1007836_19 | class CyclicWordsKata {
public List<List<String>> process()
{
List<List<String>> processed = new ArrayList<List<String>>();
Map<Integer,List<String>> buckets ;
List<List<String>> returnArray ;
buckets = separateInputBySize(_input);
if(buckets == null)
return proc... | String[] input = null;
CyclicWordsKata tester = new CyclicWordsKata(input);
List<List<String>> results = tester.process();
assertNull("results", results);
}
} | [FOCAL] public List<List<String>> CyclicWordsKata.process()
[CLASS] class CyclicWordsKata
[METRICS] loc=23 cc=4 branches=1 loops=2 returns=2 throws=0 nesting=2
[CALLS-INTERNAL] List<List<String>> processSameSizeArray(List<String> input); Map<Integer,List<String>> separateInputBySize(String[] input)
[CALLS-EXTERNAL] Map... | /* static context
[FOCAL] public List<List<String>> CyclicWordsKata.process()
[PATH1] if(buckets == null)=F -> foreach(int size : buckets.keySet())=T -> while(elements != null && elements.size() > 0)=F -> exit loop -> return processed
[PATH2] if(buckets == null)=T -> return processed
[PATH3] if(buckets == null)=F -> fo... | /* static context
[FOCAL] public List<List<String>> CyclicWordsKata.process()
[PATH1] if(buckets == null)=F -> foreach(int size : buckets.keySet())=T -> while(elements != null && elements.size() > 0)=F -> exit loop -> return processed
[PATH2] if(buckets == null)=T -> return processed
[PATH3] if(buckets == null)=F -> fo... | true | ok | {"focal": {"class": "CyclicWordsKata", "name": "process", "signature": "List<List<String>> process()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "List<List<String>>"}, "class_info": {"name": "CyclicWordsKata", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields":... |
1014623_5 | class Configuration {
static String getRequiredConfigValue(final String propertyName)
{
String value = getConfiguration().getProperty(propertyName);
if (value == null)
{
throw new ConfigurationException("Te requested property [" + propertyName
+ "] was not s... | assertEquals(getRequiredConfigValue(REDIS_HOST), "localhost");
}
} | [FOCAL] static String Configuration.getRequiredConfigValue(String propertyName)
[CLASS] class Configuration
[METRICS] loc=12 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] Properties getConfiguration()
[CALLS-EXTERNAL] getConfiguration().getProperty/1
[NEW] ConfigurationException
[EXCEPTIONS] thr... | /* static context
[FOCAL] static String Configuration.getRequiredConfigValue(String propertyName)
[THROWS-WHEN] ConfigurationException when value == null
[PATH1] if(value == null)=T -> throw new ConfigurationException("Te requested property [" + propertyName...
[PATH2] if(value == null)=F -> return value
[INPUTS] branc... | /* static context
[FOCAL] static String Configuration.getRequiredConfigValue(String propertyName)
[THROWS-WHEN] ConfigurationException when value == null
[PATH1] if(value == null)=T -> throw new ConfigurationException("Te requested property [" + propertyName...
[PATH2] if(value == null)=F -> return value
[INPUTS] branc... | true | ok | {"focal": {"class": "Configuration", "name": "getRequiredConfigValue", "signature": "String getRequiredConfigValue(String propertyName)", "start_line": 3, "modifiers": "static", "params": [{"name": "propertyName", "type": "String"}], "return_type": "String"}, "class_info": {"name": "Configuration", "kind": "class", "mo... |
1017889_4 | class Path implements Iterable<String>, Serializable {
public Path append(Path relative) {
if (relative == null) {
throw new IllegalArgumentException("Argument 'relative' cannot be null");
}
if (relative.isAbsolute()) {
throw new IllegalArgumentException("Cannot appe... | assertEquals(new Path("/").append(new Path("foo")), new Path("/foo"));
assertEquals(new Path("/").append(new Path("foo/bar")), new Path("/foo/bar"));
assertEquals(new Path("/foo").append(new Path("bar")), new Path("/foo/bar"));
assertEquals(new Path("/foo").append(new Path("../bar")), ne... | [FOCAL] public Path Path.append(Path relative)
[CLASS] class Path implements Iterable<String>, Serializable
[METRICS] loc=16 cc=4 branches=3 loops=0 returns=1 throws=2 nesting=1
[CALLS-EXTERNAL] Path.isAbsolute/0, path.length/0, relative.path.length/0, StringBuilder.append/1, path.endsWith/1, StringBuilder.toString/0
[... | /* static context
[FOCAL] public Path Path.append(Path relative)
[THROWS-WHEN] IllegalArgumentException when relative == null
[THROWS-WHEN] IllegalArgumentException when !(relative == null) && relative.isAbsolute()
[PATH1] if(relative == null)=F -> if(relative.isAbsolute())=F -> if(!path.endsWith(SEPARATOR))=T -> retur... | /* static context
[FOCAL] public Path Path.append(Path relative)
[THROWS-WHEN] IllegalArgumentException when relative == null
[THROWS-WHEN] IllegalArgumentException when !(relative == null) && relative.isAbsolute()
[PATH1] if(relative == null)=F -> if(relative.isAbsolute())=F -> if(!path.endsWith(SEPARATOR))=T -> retur... | true | ok | {"focal": {"class": "Path", "name": "append", "signature": "Path append(Path relative)", "start_line": 3, "modifiers": "public", "params": [{"name": "relative", "type": "Path"}], "return_type": "Path"}, "class_info": {"name": "Path", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Iterable<String>,... |
1020601_4 | class NumberConverter implements ConditionalConverter<Object, Number> {
public Number convert(MappingContext<Object, Number> context) {
Object source = context.getSource();
if (source == null)
return null;
Class<?> destinationType = Primitives.wrapperFor(context.getDestinationType());
if (sou... | XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar());
assertEquals(xmlGregorianCalendar.toGregorianCalendar().getTimeInMillis(), convert(xmlGregorianCalendar, Long.class));
}
} | [FOCAL] public Number NumberConverter.convert(MappingContext<Object, Number> context)
[CLASS] class NumberConverter implements ConditionalConverter<Object, Number>
[METRICS] loc=19 cc=7 branches=6 loops=0 returns=7 throws=0 nesting=1
[CALLS-INTERNAL] Number numberFor(Number source, Class<?> destinationType)
[CALLS-EXTE... | /* static context
[FOCAL] public Number NumberConverter.convert(MappingContext<Object, Number> context)
[PATH1] if(source == null)=F -> if(source instanceof Number)=F -> if(source instanceof Boolean)=F -> if(source instanceof Date && Long.class.equals(destinationType))=F -> if(source instanceof Calendar && Long.class.e... | /* static context
[FOCAL] public Number NumberConverter.convert(MappingContext<Object, Number> context)
[PATH1] if(source == null)=F -> if(source instanceof Number)=F -> if(source instanceof Boolean)=F -> if(source instanceof Date && Long.class.equals(destinationType))=F -> if(source instanceof Calendar && Long.class.e... | true | ok | {"focal": {"class": "NumberConverter", "name": "convert", "signature": "Number convert(MappingContext<Object, Number> context)", "start_line": 3, "modifiers": "public", "params": [{"name": "context", "type": "MappingContext<Object, Number>"}], "return_type": "Number"}, "class_info": {"name": "NumberConverter", "kind": ... |
1024699_26 | class G3Client implements IG3Client {
public List<Item> getAlbumAndSubAlbums(int albumId)
throws G3GalleryException {
List<Item> items = new ArrayList<Item>();
Item item = getItems(albumId, items, "album");
// we add to the list the parent album
items.add(0, item);
return items;
}
public G3Client(Str... |
List<Item> subAlbums = itemClient.getAlbumAndSubAlbums(11);
boolean foundRecentlyAddedAlbum = false;
for (Item album : subAlbums) {
// we test if we can find the previously added album
if (album.getEntity().getId() == createdAlbumId) {
foundRecentlyAddedAlbum = true;
}
}
assertTrue(foundRecent... | [FOCAL] public List<Item> G3Client.getAlbumAndSubAlbums(int albumId)
[CLASS] class G3Client implements IG3Client
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Item getItems(int albumId, List<Item> items, String type)
[CALLS-EXTERNAL] List<Item>.add/2
[NEW] ArrayList<Item>
[EXCEPT... | /* static context
[FOCAL] public List<Item> G3Client.getAlbumAndSubAlbums(int albumId)
[EXCEPTIONS] declares G3GalleryException
[CALLS-INTERNAL] Item getItems(int albumId, List<Item> items, String type)
[NEW] ArrayList<Item>
[CALLS-EXTERNAL] List<Item>.add/2
*/
| /* static context
[FOCAL] public List<Item> G3Client.getAlbumAndSubAlbums(int albumId)
[EXCEPTIONS] declares G3GalleryException
[CALLS-INTERNAL] Item getItems(int albumId, List<Item> items, String type)
[NEW] ArrayList<Item>
[CALLS-EXTERNAL] List<Item>.add/2
*/
class G3Client implements IG3Client {
public List<Item> ... | true | ok | {"focal": {"class": "G3Client", "name": "getAlbumAndSubAlbums", "signature": "List<Item> getAlbumAndSubAlbums(int albumId) throws G3GalleryException", "start_line": 3, "modifiers": "public", "params": [{"name": "albumId", "type": "int"}], "return_type": "List<Item>"}, "class_info": {"name": "G3Client", "kind": "class",... |
1025574_2 | class ToolSpec {
String toXMlFormatted() throws JAXBException, UnsupportedEncodingException {
//Create marshaller
Marshaller m = jc.createMarshaller();
m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
ByteArrayOutputStream bos = new ByteArrayOutputStream();
m.marshal(this, bos);
return bos... | fail("Not yet implemented");
}
} | [FOCAL] String ToolSpec.toXMlFormatted()
[CLASS] class ToolSpec
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] jc.createMarshaller/0, Marshaller.setProperty/2, Marshaller.marshal/2, ByteArrayOutputStream.toString/1
[NEW] ByteArrayOutputStream
[EXCEPTIONS] declares JAXBException, U... | /* static context
[FOCAL] String ToolSpec.toXMlFormatted()
[COLLABORATORS] field jc createMarshaller/0
[EXCEPTIONS] declares JAXBException, UnsupportedEncodingException
[NEW] ByteArrayOutputStream
[CALLS-EXTERNAL] jc.createMarshaller/0, Marshaller.setProperty/2, Marshaller.marshal/2, ByteArrayOutputStream.toString/1
*/... | /* static context
[FOCAL] String ToolSpec.toXMlFormatted()
[COLLABORATORS] field jc createMarshaller/0
[EXCEPTIONS] declares JAXBException, UnsupportedEncodingException
[NEW] ByteArrayOutputStream
[CALLS-EXTERNAL] jc.createMarshaller/0, Marshaller.setProperty/2, Marshaller.marshal/2, ByteArrayOutputStream.toString/1
*/... | true | ok | {"focal": {"class": "ToolSpec", "name": "toXMlFormatted", "signature": "String toXMlFormatted() throws JAXBException, UnsupportedEncodingException", "start_line": 3, "modifiers": "", "params": [], "return_type": "String"}, "class_info": {"name": "ToolSpec", "kind": "class", "modifiers": "", "superclass": null, "interfa... |
1028034_7 | class NURBS {
public double[] getBasicFunctions(int i, double u) {
double[] n = new double[degree + 1];
n[0] = 1.0;
double[] left = new double[degree + 1];
double[] right = new double[degree + 1];
for (int j = 1; j <= degree; j++) {
left[j] = u - this.knots[(i ... | Point3D[] points = new Point3D[]{};
double[] knots = new double[]{0, 0, 0, 1, 2, 3, 4, 4, 5, 5};
double[] w = new double[]{};
NURBS n = new NURBS(points, knots, w, 2);
double[] bf = n.getBasicFunctions(4, 2.5);
assertEquals(3, bf.length);
assertEquals(1.0 / 8.0, ... | [FOCAL] public double[] NURBS.getBasicFunctions(int i, double u)
[CLASS] class NURBS
[METRICS] loc=24 cc=3 branches=0 loops=2 returns=1 throws=0 nesting=2
[FIELDS] read=knots
[PATH1] for(j <= degree)=T -> for(r < j)=F -> exit loop -> return n
[PATH2] for(j <= degree)=F -> return n
[PATH3] for(j <= degree)=T -> for(r < ... | /* static context
[FOCAL] public double[] NURBS.getBasicFunctions(int i, double u)
[PATH1] for(j <= degree)=T -> for(r < j)=F -> exit loop -> return n
[PATH2] for(j <= degree)=F -> return n
[PATH3] for(j <= degree)=T -> for(r < j)=T -> exit loop -> exit loop -> return n
[FIELDS] read=knots
*/
| /* static context
[FOCAL] public double[] NURBS.getBasicFunctions(int i, double u)
[PATH1] for(j <= degree)=T -> for(r < j)=F -> exit loop -> return n
[PATH2] for(j <= degree)=F -> return n
[PATH3] for(j <= degree)=T -> for(r < j)=T -> exit loop -> exit loop -> return n
[FIELDS] read=knots
*/
class NURBS {
public ... | true | ok | {"focal": {"class": "NURBS", "name": "getBasicFunctions", "signature": "double[] getBasicFunctions(int i, double u)", "start_line": 3, "modifiers": "public", "params": [{"name": "i", "type": "int"}, {"name": "u", "type": "double"}], "return_type": "double[]"}, "class_info": {"name": "NURBS", "kind": "class", "modifiers... |
1031515_0 | class LocalizedFieldNames {
public Lookup createLookup(List<String> keys) {
return new LookupImpl(keys);
}
public void setMessageSource(MessageSource messageSource);
private String fieldNameToKey(String fieldName);
private String localizedToKey(String localizedName);
private Reloadabl... | LocalizedFieldNames.Lookup lookup = localizedFieldNames.createLookup(Arrays.asList("dc.title"));
final Locale english = new Locale("en");
String title = lookup.toLocalizedName("dc_title", english);
Assert.assertEquals("Title", title);
String fieldName = lookup.toFieldName(title, ... | [FOCAL] public Lookup LocalizedFieldNames.createLookup(List<String> keys)
[CLASS] class LocalizedFieldNames
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] LookupImpl
[INPUTS] branches=- | result=keys
[DATAFLOW] keys@param->L2
[CLASS-MEMBERS] void setMessageSource(MessageSource messageSource)... | /* static context
[FOCAL] public Lookup LocalizedFieldNames.createLookup(List<String> keys)
[INPUTS] branches=- | result=keys
[NEW] LookupImpl
*/
| /* static context
[FOCAL] public Lookup LocalizedFieldNames.createLookup(List<String> keys)
[INPUTS] branches=- | result=keys
[NEW] LookupImpl
*/
class LocalizedFieldNames {
public Lookup createLookup(List<String> keys) {
return new LookupImpl(keys);
}
public void setMessageSource(MessageSource me... | true | ok | {"focal": {"class": "LocalizedFieldNames", "name": "createLookup", "signature": "Lookup createLookup(List<String> keys)", "start_line": 3, "modifiers": "public", "params": [{"name": "keys", "type": "List<String>"}], "return_type": "Lookup"}, "class_info": {"name": "LocalizedFieldNames", "kind": "class", "modifiers": ""... |
1052717_4 | class AnnotatedFieldProcessor {
static <X> Set<Field> camelInjectAnnotatedFieldsIn(final Class<X> type) {
final Set<Field> camelInjectAnnotatedFields = new HashSet<Field>();
for (final Field fieldToInspect : allFieldsAndSuperclassFieldsIn(type)) {
if (isAnnotatedWithOneOf(fieldToInspect, CAMEL)) {
camelInj... | final Set<Field> camelInjectAnnotatedFields = AnnotatedFieldProcessor
.camelInjectAnnotatedFieldsIn(BeanHavingEndpointInjectAnnotatedField.class);
assertEquals("AnnotatedFieldProcessor.hasCamelInjectAnnotatedFields("
+ BeanHavingEndpointInjectAnnotatedField.class.getName()
+ ") should... | [FOCAL] static Set<Field> AnnotatedFieldProcessor.camelInjectAnnotatedFieldsIn(Class<X> type)
[CLASS] class AnnotatedFieldProcessor
[METRICS] loc=10 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-INTERNAL] Field[] allFieldsAndSuperclassFieldsIn(Class<X> type); boolean isAnnotatedWithOneOf(Field fieldToInsp... | /* static context
[FOCAL] static Set<Field> AnnotatedFieldProcessor.camelInjectAnnotatedFieldsIn(Class<X> type)
[PATH1] foreach(Field fieldToInspect : allFieldsAndSuperclassFieldsIn(type))=T -> if(isAnnotatedWithOneOf(fieldToInspect, CAMEL))=T -> exit loop -> return Collections.unmodifiableSet(camelInjectAnnotatedField... | /* static context
[FOCAL] static Set<Field> AnnotatedFieldProcessor.camelInjectAnnotatedFieldsIn(Class<X> type)
[PATH1] foreach(Field fieldToInspect : allFieldsAndSuperclassFieldsIn(type))=T -> if(isAnnotatedWithOneOf(fieldToInspect, CAMEL))=T -> exit loop -> return Collections.unmodifiableSet(camelInjectAnnotatedField... | true | ok | {"focal": {"class": "AnnotatedFieldProcessor", "name": "camelInjectAnnotatedFieldsIn", "signature": "Set<Field> camelInjectAnnotatedFieldsIn(Class<X> type)", "start_line": 3, "modifiers": "static", "params": [{"name": "type", "type": "Class<X>"}], "return_type": "Set<Field>"}, "class_info": {"name": "AnnotatedFieldProc... |
1068402_84 | class VersionMatcher implements Serializable {
public boolean versionSupported(final String requiredVersion, final String publishedVersion) {
if (requiredVersion == null) {
throw new IllegalArgumentException("requiredVersion is null");
}
if (publishedVersion == null) {
... | VersionMatcher versionMatcher = new VersionMatcher();
Assert.assertFalse(versionMatcher.versionSupported("3.24.1", "3.23.13.4, 3.24"));
Assert.assertFalse(versionMatcher.versionSupported("3.23.1", "3.23.13.4, 3.24"));
Assert.assertTrue(versionMatcher.versionSupported("3.23.1", "3.23, 3.2... | [FOCAL] public boolean VersionMatcher.versionSupported(String requiredVersion, String publishedVersion)
[CLASS] class VersionMatcher implements Serializable
[METRICS] loc=50 cc=11 branches=8 loops=0 returns=4 throws=2 nesting=3
[CALLS-INTERNAL] boolean checkMajorVersion(int[] required, int[] configured); boolean checkM... | /* static context
[FOCAL] public boolean VersionMatcher.versionSupported(String requiredVersion, String publishedVersion)
[THROWS-WHEN] IllegalArgumentException when requiredVersion == null
[THROWS-WHEN] IllegalArgumentException when !(requiredVersion == null) && publishedVersion == null
[PATH1] if(requiredVersion == n... | /* static context
[FOCAL] public boolean VersionMatcher.versionSupported(String requiredVersion, String publishedVersion)
[THROWS-WHEN] IllegalArgumentException when requiredVersion == null
[THROWS-WHEN] IllegalArgumentException when !(requiredVersion == null) && publishedVersion == null
[PATH1] if(requiredVersion == n... | true | ok | {"focal": {"class": "VersionMatcher", "name": "versionSupported", "signature": "boolean versionSupported(String requiredVersion, String publishedVersion)", "start_line": 3, "modifiers": "public", "params": [{"name": "requiredVersion", "type": "String"}, {"name": "publishedVersion", "type": "String"}], "return_type": "b... |
1071043_0 | class NativeQuestionSetImporter extends AbstractQuestionSetImporter {
@Override
public QuestionSet processDocument( Document doc ) throws ParseException {
Element root = doc.getRootElement();
if ( !root.getName().equalsIgnoreCase( "QuestionSet" ) )
throw new ParseException( "Questi... | Collection<QuestionSet> bundledQuestionSets = QuestionSetManager.loadBundledQuestionSets();
NativeQuestionSetImporter questionSetImporter = new NativeQuestionSetImporter();
XmlQuestionSetParser questionSetParser = new XmlQuestionSetParser();
for (QuestionSet questionSet : bundledQuestion... | [FOCAL] @Override public QuestionSet NativeQuestionSetImporter.processDocument(Document doc)
[CLASS] class NativeQuestionSetImporter extends AbstractQuestionSetImporter
[METRICS] loc=102 cc=21 branches=16 loops=2 returns=1 throws=2 nesting=10
[CALLS-EXTERNAL] Document.getRootElement/0, root.getName().equalsIgnoreCase/1... | /* static context
[FOCAL] @Override public QuestionSet NativeQuestionSetImporter.processDocument(Document doc)
[THROWS-WHEN] ParseException when !root.getName().equalsIgnoreCase( "QuestionSet" )
[THROWS-WHEN] ParseException when !(!root.getName().equalsIgnoreCase( "QuestionSet" )) && versionString == null && foreach(Ob... | /* static context
[FOCAL] @Override public QuestionSet NativeQuestionSetImporter.processDocument(Document doc)
[THROWS-WHEN] ParseException when !root.getName().equalsIgnoreCase( "QuestionSet" )
[THROWS-WHEN] ParseException when !(!root.getName().equalsIgnoreCase( "QuestionSet" )) && versionString == null && foreach(Ob... | true | ok | {"focal": {"class": "NativeQuestionSetImporter", "name": "processDocument", "signature": "QuestionSet processDocument(Document doc) throws ParseException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "doc", "type": "Document"}], "return_type": "QuestionSet"}, "class_info": {"name": "NativeQues... |
1071767_0 | class IPNMessageParser {
public IPNMessage parse() {
IPNMessage.Builder builder = new IPNMessage.Builder(nvp);
if(validated)
builder.validated();
for(Map.Entry<String, String> param : nvp.entrySet()) {
addVariable(builder, param);
}
return builder.build();
}
public IPNMessageParser(Map<String, Str... | final Map<String, String> nvp = new HashMap<String, String>();
nvp.put("txn_type", "unknown");
parser = new IPNMessageParser(nvp, true);
final IPNMessage message = parser.parse();
assertThat(message.getTransactionType(), nullValue());
}
} | [FOCAL] public IPNMessage IPNMessageParser.parse()
[CLASS] class IPNMessageParser
[METRICS] loc=9 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] void addVariable(Builder builder, Entry<String, String> param)
[CALLS-EXTERNAL] IPNMessage.Builder.validated/0, nvp.entrySet/0, IPNMessage.Builder.build... | /* static context
[FOCAL] public IPNMessage IPNMessageParser.parse()
[PATH1] if(validated)=T -> foreach(Map.Entry<String, String> param : nvp.entrySet())=T -> exit loop -> return builder.build()
[PATH2] if(validated)=F -> foreach(Map.Entry<String, String> param : nvp.entrySet())=F -> return builder.build()
[COLLABORATO... | /* static context
[FOCAL] public IPNMessage IPNMessageParser.parse()
[PATH1] if(validated)=T -> foreach(Map.Entry<String, String> param : nvp.entrySet())=T -> exit loop -> return builder.build()
[PATH2] if(validated)=F -> foreach(Map.Entry<String, String> param : nvp.entrySet())=F -> return builder.build()
[COLLABORATO... | true | ok | {"focal": {"class": "IPNMessageParser", "name": "parse", "signature": "IPNMessage parse()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "IPNMessage"}, "class_info": {"name": "IPNMessageParser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "parser... |
1072630_1 | class EntityMapper implements PathMapper<T> {
public abstract T mapPath(EntityPath<S,E> entityPath)public abstract T mapPath(EntityPath<S,E> entityPath);
public abstract T mapPath(EntityPath<S,E> entityPath)protected EntityMapper(GraphDatabaseContext graphDatabaseContext);
public abstract T mapPath(EntityPath<S,E> ... | Person michael = new Person("Michael", 36).persist();
EntityMapper<Person, Person, String> mapper = new EntityMapper<Person, Person, String>(ctx) {
@Override
public String mapPath(EntityPath<Person, Person> entityPath) {
return entityPath.<Person>startEntity().get... | [FOCAL] public abstract T EntityMapper.mapPath(EntityPath<S,E> entityPath)
[CLASS] class EntityMapper implements PathMapper<T>
[METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CLASS-MEMBERS] EntityMapper(GraphDatabaseContext graphDatabaseContext); T mapPath(Path path)
[TEST] EntityMapperTest: @Test... | /* static context
[FOCAL] public abstract T EntityMapper.mapPath(EntityPath<S,E> entityPath)
*/
| /* static context
[FOCAL] public abstract T EntityMapper.mapPath(EntityPath<S,E> entityPath)
*/
class EntityMapper implements PathMapper<T> {
public abstract T mapPath(EntityPath<S,E> entityPath)public abstract T mapPath(EntityPath<S,E> entityPath);
public abstract T mapPath(EntityPath<S,E> entityPath)protected Enti... | true | partial | {"focal": {"class": "EntityMapper", "name": "mapPath", "signature": "T mapPath(EntityPath<S,E> entityPath)", "start_line": 3, "modifiers": "public abstract", "params": [{"name": "entityPath", "type": "EntityPath<S,E>"}], "return_type": "T"}, "class_info": {"name": "EntityMapper", "kind": "class", "modifiers": "", "supe... |
1076094_132 | class CompositeGatewayManager implements GatewayManager {
@Transactional
@SuppressWarnings("unchecked")
public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest)
{
if ( gatewayRequest
.getMessageRequest()
.getMessageType() == MessageType.VOICE ) {
return voiceGatewayManager.send... |
Set<GatewayResponse> voiceResponseSet = new HashSet<GatewayResponse>();
voiceResponseSet.add(voiceGatewayResponse);
expect(voiceManager.sendMessage(voiceGatewayRequest)).andReturn(voiceResponseSet);
replay(voiceManager);
compositeGateway.sendMessage(voiceGatewayRequest);
verify(voiceManager);
... | [FOCAL] @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> CompositeGatewayManager.sendMessage(GatewayRequest gatewayRequest)
[CLASS] class CompositeGatewayManager implements GatewayManager
[METRICS] loc=19 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] gatewayRequest .getM... | /* static context
[FOCAL] @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> CompositeGatewayManager.sendMessage(GatewayRequest gatewayRequest)
[PATH1] if(gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE)=F -> if(gatewayRequest .getMessageRequest() .getMessageType() == M... | /* static context
[FOCAL] @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> CompositeGatewayManager.sendMessage(GatewayRequest gatewayRequest)
[PATH1] if(gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE)=F -> if(gatewayRequest .getMessageRequest() .getMessageType() == M... | true | ok | {"focal": {"class": "CompositeGatewayManager", "name": "sendMessage", "signature": "Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest)", "start_line": 3, "modifiers": "@Transactional @SuppressWarnings(\"unchecked\") public", "params": [{"name": "gatewayRequest", "type": "GatewayRequest"}], "return_type": "... |
1076159_32 | class ConstructorAnalysis {
static AnalysisResult analyse(
Class<?> klass, Constructor<?> constructor) throws IOException {
Class<?>[] parameterTypes = constructor.getParameterTypes();
InputStream in = klass.getResourceAsStream("/" + klass.getName().replace('.', '/') + ".class");
if (in == null) {
... | InputStream classInputStream = this.getClass().getResourceAsStream("example_scala_class02.bin");
assertNotNull(classInputStream);
Map<String, FormalParameter> assignements =
analyse(classInputStream,
"com/kaching/user/GetAllModels",
"com/kaching/platform/queryengine/AbstractQuery",... | [FOCAL] static AnalysisResult ConstructorAnalysis.analyse(Class<?> klass, Constructor<?> constructor)
[CLASS] class ConstructorAnalysis
[METRICS] loc=11 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] AnalysisResult analyse(InputStream classInputStream, String owner, String superclass, Class<?>...... | /* static context
[FOCAL] static AnalysisResult ConstructorAnalysis.analyse(Class<?> klass, Constructor<?> constructor)
[THROWS-WHEN] IllegalArgumentException when in == null
[PATH1] if(in == null)=T -> throw new IllegalArgumentException(format("can not find bytecode for %s",...
[PATH2] if(in == null)=F -> return analy... | /* static context
[FOCAL] static AnalysisResult ConstructorAnalysis.analyse(Class<?> klass, Constructor<?> constructor)
[THROWS-WHEN] IllegalArgumentException when in == null
[PATH1] if(in == null)=T -> throw new IllegalArgumentException(format("can not find bytecode for %s",...
[PATH2] if(in == null)=F -> return analy... | true | ok | {"focal": {"class": "ConstructorAnalysis", "name": "analyse", "signature": "AnalysisResult analyse(Class<?> klass, Constructor<?> constructor) throws IOException", "start_line": 3, "modifiers": "static", "params": [{"name": "klass", "type": "Class<?>"}, {"name": "constructor", "type": "Constructor<?>"}], "return_type":... |
1076632_14 | class StaffMessageServiceImpl implements StaffMessageService {
public void sendStaffCareMessages(Date startDate, Date endDate,
Date deliveryDate, Date deliveryTime,
String[] careGroups,
boolean sendUpc... |
Date forDate = new Date();
String careGroups[] = {"ANC", "TT", "IPT"};
Location location = new Location();
location.setName("Test Facility");
Facility facility = new Facility();
facility.setLocation(location);
facility.setPhoneNumber("+1 555 123-1234");
... | [FOCAL] public void StaffMessageServiceImpl.sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage)
[CLASS] class StaffMessageServiceImpl implements StaffMessageService
... | /* static context
[FOCAL] public void StaffMessageServiceImpl.sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage)
[PATH1] if(shouldBlackOut)=F -> foreach(Facility fa... | /* static context
[FOCAL] public void StaffMessageServiceImpl.sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage)
[PATH1] if(shouldBlackOut)=F -> foreach(Facility fa... | true | ok | {"focal": {"class": "StaffMessageServiceImpl", "name": "sendStaffCareMessages", "signature": "void sendStaffCareMessages(Date startDate, Date endDate, Date deliveryDate, Date deliveryTime, String[] careGroups, boolean sendUpcoming, boolean blackoutEnabled, boolean sendNoDefaulterAndNoUpcomingCareMessage)", "start_line"... |
1077753_0 | class SQLFile {
public static List<String> statementsFrom(Reader reader) throws IOException {
SQLFile file = new SQLFile();
file.parse(reader);
return file.getStatements();
}
public void parse(Reader in);
private String stripOffTrailingComment(String line);
public List<Stri... | String firstLine = "CREATE TABLE 'testTable'";
String secondLine = "_id INTEGER PRIMARY KEY AUTOINCREMENT;";
String singleLineCommand = firstLine + " " + secondLine;
String multiLineCommand = firstLine + "\n" + secondLine;
List<String> statementsFromMultiline = SQLFile.statements... | [FOCAL] public static List<String> SQLFile.statementsFrom(Reader reader)
[CLASS] class SQLFile
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] SQLFile.parse/1, SQLFile.getStatements/0
[NEW] SQLFile
[EXCEPTIONS] declares IOException
[DATAFLOW] file@L2->L3,L4; reader@param->L3
[CLASS... | /* static context
[FOCAL] public static List<String> SQLFile.statementsFrom(Reader reader)
[EXCEPTIONS] declares IOException
[NEW] SQLFile
[CALLS-EXTERNAL] SQLFile.parse/1, SQLFile.getStatements/0
*/
| /* static context
[FOCAL] public static List<String> SQLFile.statementsFrom(Reader reader)
[EXCEPTIONS] declares IOException
[NEW] SQLFile
[CALLS-EXTERNAL] SQLFile.parse/1, SQLFile.getStatements/0
*/
class SQLFile {
public static List<String> statementsFrom(Reader reader) throws IOException {
SQLFile file ... | true | ok | {"focal": {"class": "SQLFile", "name": "statementsFrom", "signature": "List<String> statementsFrom(Reader reader) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "reader", "type": "Reader"}], "return_type": "List<String>"}, "class_info": {"name": "SQLFile", "kind": "class", "modi... |
1079636_7 | class DifferenceAccumulatingHandler extends AbstractDiffHandler {
protected boolean isClassConsidered( final String className ) {
// Fix case where class names are reported with '.'
final String fixedClassName = className.replace('.', '/');
for ( String exclude : this.excludes ) {
... |
List<String> inclusions = new ArrayList<String>();
Set<String> inclusionSet = new HashSet<String>( inclusions );
List<String> exclusions = new ArrayList<String>();
exclusions.add( "java/*" );
Set<String> exclusionSet = new HashSet<String>( exclusions );
Assert.assertEqu... | [FOCAL] protected boolean DifferenceAccumulatingHandler.isClassConsidered(String className)
[CLASS] class DifferenceAccumulatingHandler extends AbstractDiffHandler
[METRICS] loc=46 cc=12 branches=7 loops=4 returns=4 throws=0 nesting=4
[CALLS-INTERNAL] Pattern simplifyRegularExpression(String regEx, boolean caseSensitiv... | /* static context
[FOCAL] protected boolean DifferenceAccumulatingHandler.isClassConsidered(String className)
[PATH1] foreach(String exclude : this.excludes)=T -> if(!excludesAreRegExp)=T -> if(exclude.contains( "/** /" ))=T -> if(exclude.contains( "/* /" ))=T -> while(excludeMatcher.find())=F -> exit loop -> if(!this.... | /* static context
[FOCAL] protected boolean DifferenceAccumulatingHandler.isClassConsidered(String className)
[PATH1] foreach(String exclude : this.excludes)=T -> if(!excludesAreRegExp)=T -> if(exclude.contains( "/** /" ))=T -> if(exclude.contains( "/* /" ))=T -> while(excludeMatcher.find())=F -> exit loop -> if(!this.... | true | ok | {"focal": {"class": "DifferenceAccumulatingHandler", "name": "isClassConsidered", "signature": "boolean isClassConsidered(String className)", "start_line": 3, "modifiers": "protected", "params": [{"name": "className", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "DifferenceAccumulatingHandler",... |
1081991_13 | class DependenciesDeployer {
static void writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions) {
XMLOutputFactory xof = XMLOutputFactory.newInstance();
xof.setProperty("javax.xml.stream.isRepairingNamespaces", true);
XMLStreamWriter sw = null;
try {
... | MavenArtifactProvisionOption option = mavenBundle().groupId("mygroup").artifactId("myArtifactId").version("1.0");
StringWriter wr = new StringWriter();
DependenciesDeployer.writeDependenciesFeature(wr, option);
Assert.assertEquals(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\... | [FOCAL] static void DependenciesDeployer.writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions)
[CLASS] class DependenciesDeployer
[METRICS] loc=39 cc=5 branches=2 loops=1 returns=0 throws=1 nesting=3
[CALLS-INTERNAL] void close(XMLStreamWriter sw); void endElement(XMLStreamWriter sw)
[CALLS-EX... | /* static context
[FOCAL] static void DependenciesDeployer.writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions)
[THROWS-WHEN] RuntimeException when try-body throws
[PATH1] foreach(ProvisionOption<?> provisionOption : provisionOptions)=T -> if(provisionOption.getURL().startsWith("link") || pro... | /* static context
[FOCAL] static void DependenciesDeployer.writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions)
[THROWS-WHEN] RuntimeException when try-body throws
[PATH1] foreach(ProvisionOption<?> provisionOption : provisionOptions)=T -> if(provisionOption.getURL().startsWith("link") || pro... | true | ok | {"focal": {"class": "DependenciesDeployer", "name": "writeDependenciesFeature", "signature": "void writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions)", "start_line": 3, "modifiers": "static", "params": [{"name": "writer", "type": "Writer"}, {"name": "provisionOptions", "type": "ProvisionOpt... |
1089023_0 | class AsyncCountDownLatch extends CountDownLatch implements Completable.Source {
@Override
public void subscribe(Completable.Observer subscriber) {
completionSignal.subscribe(subscriber);
}
public AsyncCountDownLatch(int count);
public boolean isCompleted();
public void countDown();
... | AsyncCountDownLatch latch = new AsyncCountDownLatch(0);
MyObserver subscriber = new MyObserver();
latch.subscribe(subscriber);
Assert.assertFalse(subscriber.onSubscribeSeen.get());
Assert.assertTrue(subscriber.onCompleteSeen.get());
}
} | [FOCAL] @Override public void AsyncCountDownLatch.subscribe(Completable.Observer subscriber)
[CLASS] class AsyncCountDownLatch extends CountDownLatch implements Completable.Source
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] completionSignal.subscribe/1
[COLLABORATORS] field com... | /* static context
[FOCAL] @Override public void AsyncCountDownLatch.subscribe(Completable.Observer subscriber)
[COLLABORATORS] field completionSignal subscribe/1
[CALLS-EXTERNAL] completionSignal.subscribe/1
*/
| /* static context
[FOCAL] @Override public void AsyncCountDownLatch.subscribe(Completable.Observer subscriber)
[COLLABORATORS] field completionSignal subscribe/1
[CALLS-EXTERNAL] completionSignal.subscribe/1
*/
class AsyncCountDownLatch extends CountDownLatch implements Completable.Source {
@Override
public vo... | true | ok | {"focal": {"class": "AsyncCountDownLatch", "name": "subscribe", "signature": "void subscribe(Completable.Observer subscriber)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "subscriber", "type": "Completable.Observer"}], "return_type": "void"}, "class_info": {"name": "AsyncCountDownLatch", "kin... |
1090553_36 | class FlagValueCalculator {
@Nullable
public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) {
Collection<V> values = queryAllValues(subject, flag, true);
return flag.chooseValue(values);
}
public FlagValueCalculator(List<ProtectedRegion> regions, @Nullable Protecte... | MockApplicableRegionSet mock = new MockApplicableRegionSet();
LocalPlayer nonMember = mock.createPlayer();
LocalPlayer member = mock.createPlayer();
ProtectedRegion global = mock.global();
global.getMembers().addPlayer(member);
FlagValueCalculator result = mock.getFlag... | [FOCAL] @Nullable public V FlagValueCalculator.queryValue(RegionAssociable subject, Flag<V> flag)
[CLASS] class FlagValueCalculator
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Collection<V> queryAllValues(RegionAssociable subject, Flag<V> flag, boolean acceptOne)
[CALLS-EXTERNA... | /* static context
[FOCAL] @Nullable public V FlagValueCalculator.queryValue(RegionAssociable subject, Flag<V> flag)
[INPUTS] branches=- | result=flag, subject
[COLLABORATORS] param flag:Flag<V> chooseValue/1
[CALLS-INTERNAL] Collection<V> queryAllValues(RegionAssociable subject, Flag<V> flag, boolean acceptOne)
[CALLS-... | /* static context
[FOCAL] @Nullable public V FlagValueCalculator.queryValue(RegionAssociable subject, Flag<V> flag)
[INPUTS] branches=- | result=flag, subject
[COLLABORATORS] param flag:Flag<V> chooseValue/1
[CALLS-INTERNAL] Collection<V> queryAllValues(RegionAssociable subject, Flag<V> flag, boolean acceptOne)
[CALLS-... | true | ok | {"focal": {"class": "FlagValueCalculator", "name": "queryValue", "signature": "V queryValue(RegionAssociable subject, Flag<V> flag)", "start_line": 3, "modifiers": "@Nullable public", "params": [{"name": "subject", "type": "RegionAssociable"}, {"name": "flag", "type": "Flag<V>"}], "return_type": "V"}, "class_info": {"n... |
1091655_1 | class ManagedBasicDataSource extends BasicDataSource {
public String getMBeanName() {
return mBeanName;
}
public ManagedBasicDataSource();
public ManagedBasicDataSource(String mBeanName);
public ManagedBasicDataSource(MBeanServer mBeanServer, String mBeanName);
protected synchroniz... | final ManagedBasicDataSource testDataSource = (ManagedBasicDataSource) ManagedBasicDataSourceFactory.createDataSource(new Properties());
assertTrue(getMBeanServerConnection().isRegistered(new ObjectName(testDataSource.getMBeanName())));
}
} | [FOCAL] public String ManagedBasicDataSource.getMBeanName()
[CLASS] class ManagedBasicDataSource extends BasicDataSource
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] ManagedBasicDataSource(); ManagedBasicDataSource(String mBeanName); ManagedBasicDataSource(MBeanServer mBeanServer... | /* static context
[FOCAL] public String ManagedBasicDataSource.getMBeanName()
*/
| /* static context
[FOCAL] public String ManagedBasicDataSource.getMBeanName()
*/
class ManagedBasicDataSource extends BasicDataSource {
public String getMBeanName() {
return mBeanName;
}
public ManagedBasicDataSource();
public ManagedBasicDataSource(String mBeanName);
public ManagedBasi... | true | ok | {"focal": {"class": "ManagedBasicDataSource", "name": "getMBeanName", "signature": "String getMBeanName()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "ManagedBasicDataSource", "kind": "class", "modifiers": "", "superclass": "BasicDataSource", "interfaces": nu... |
1091966_0 | class RequestReader {
public Request read(InputStream in) throws IOException {
String header = null;
String body = null;
byte[] headerBytes = new byte[headerLength];
int n = in.read(headerBytes);
if (n > 0) {
header = new String(headerBytes, encoding);
... | String body = "123ABC";
String header = rightPad("", headerBodyLengthBeginIndex) + leftPad(String.valueOf(body.length()), headerBodyLengthEndIndex - headerBodyLengthBeginIndex, "0") + rightPad("", headerLength - headerBodyLengthEndIndex);
byte[] buffer = new byte[header.length() + body.length()... | [FOCAL] public Request RequestReader.read(InputStream in)
[CLASS] class RequestReader
[METRICS] loc=23 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] InputStream.read/1, log.debug/2, Integer.parseInt/1, String.substring/2, log.info/2
[NEW] String, Request
[FIELDS] read=encoding:String, headerBody... | /* static context
[FOCAL] public Request RequestReader.read(InputStream in)
[PATH1] if(n > 0)=T -> return new Request(header, body)
[PATH2] if(n > 0)=F -> return new Request(header, body)
[INPUTS] branches=in, headerLength | result=encoding, headerBodyLengthBeginIndex, headerBodyLengthEndIndex, headerLength
[COLLABORAT... | /* static context
[FOCAL] public Request RequestReader.read(InputStream in)
[PATH1] if(n > 0)=T -> return new Request(header, body)
[PATH2] if(n > 0)=F -> return new Request(header, body)
[INPUTS] branches=in, headerLength | result=encoding, headerBodyLengthBeginIndex, headerBodyLengthEndIndex, headerLength
[COLLABORAT... | true | ok | {"focal": {"class": "RequestReader", "name": "read", "signature": "Request read(InputStream in) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "in", "type": "InputStream"}], "return_type": "Request"}, "class_info": {"name": "RequestReader", "kind": "class", "modifiers": "", "superclass... |
1095208_79 | class WeatherService extends TimeslotPhaseProcessor implements
InitializationService {
@Override
public void activate (Instant time, int phaseNumber)
{
long msec = time.getMillis();
if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) {
log.info("WeatherService reports not time to grab... |
weatherService.activate(start, 1);
// There should be 24 predictions in the forecast
assertEquals(24, weatherForecastRepo.currentWeatherForecast()
.getPredictions().size());
// Predictions should increment by one each time
int i = 1;
for (WeatherForecastPrediction p : weathe... | [FOCAL] @Override public void WeatherService.activate(Instant time, int phaseNumber)
[CLASS] class WeatherService extends TimeslotPhaseProcessor implements InitializationService
[METRICS] loc=29 cc=4 branches=2 loops=1 returns=0 throws=0 nesting=3
[CALLS-INTERNAL] int getWeatherReqInterval(); void broadcastWeatherForec... | /* static context
[FOCAL] @Override public void WeatherService.activate(Instant time, int phaseNumber)
[PATH1] if(msec % (getWeatherReqInterval() * TimeService.HOUR) != 0)=F -> if(blocking)=F -> while(aheadDays.size() > 0)=T -> exit loop
[PATH2] if(msec % (getWeatherReqInterval() * TimeService.HOUR) != 0)=T
[PATH3] if(... | /* static context
[FOCAL] @Override public void WeatherService.activate(Instant time, int phaseNumber)
[PATH1] if(msec % (getWeatherReqInterval() * TimeService.HOUR) != 0)=F -> if(blocking)=F -> while(aheadDays.size() > 0)=T -> exit loop
[PATH2] if(msec % (getWeatherReqInterval() * TimeService.HOUR) != 0)=T
[PATH3] if(... | true | ok | {"focal": {"class": "WeatherService", "name": "activate", "signature": "void activate(Instant time, int phaseNumber)", "start_line": 4, "modifiers": "@Override public", "params": [{"name": "time", "type": "Instant"}, {"name": "phaseNumber", "type": "int"}], "return_type": "void"}, "class_info": {"name": "WeatherService... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.