code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
private boolean isImageType(String mime) {
if (StringUtils.hasText(mime)) {
for (String imageMime : IMAGE_MIMES) {
if (mime.equalsIgnoreCase(imageMime)) {
return true;
}
}
}
return false;
} } | public class class_name {
private boolean isImageType(String mime) {
if (StringUtils.hasText(mime)) {
for (String imageMime : IMAGE_MIMES) {
if (mime.equalsIgnoreCase(imageMime)) {
return true; // depends on control dependency: [if], data = [none]
}
}
}
return false;
} } |
public class class_name {
@Action(name = "Extract text from PDF",
description = EXTRACT_TEXT_FROM_PDF_DESC,
outputs = {
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
... | public class class_name {
@Action(name = "Extract text from PDF",
description = EXTRACT_TEXT_FROM_PDF_DESC,
outputs = {
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
... |
public class class_name {
@Override
public <TInput, TOutput> VortexFuture<TOutput>
enqueueTasklet(final VortexFunction<TInput, TOutput> function, final TInput input,
final Optional<FutureCallback<TOutput>> callback) {
// TODO[REEF-500]: Simple duplicate Vortex Tasklet launch.
final... | public class class_name {
@Override
public <TInput, TOutput> VortexFuture<TOutput>
enqueueTasklet(final VortexFunction<TInput, TOutput> function, final TInput input,
final Optional<FutureCallback<TOutput>> callback) {
// TODO[REEF-500]: Simple duplicate Vortex Tasklet launch.
final... |
public class class_name {
public void writeHtmlString(String strHTML, PrintWriter out)
{
int iIndex;
if (strHTML == null)
return;
while ((iIndex = strHTML.indexOf(HtmlConstants.TITLE_TAG)) != -1)
{ // ** FIX THIS to look for a <xxx/> and look up the token **
... | public class class_name {
public void writeHtmlString(String strHTML, PrintWriter out)
{
int iIndex;
if (strHTML == null)
return;
while ((iIndex = strHTML.indexOf(HtmlConstants.TITLE_TAG)) != -1)
{ // ** FIX THIS to look for a <xxx/> and look up the token **
... |
public class class_name {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("/metrics")
@Description("Submits externally collected metric data.")
public Map<String, Object> submitMetrics(@Context HttpServletRequest req, final List<MetricDto> metricDtos) {
... | public class class_name {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("/metrics")
@Description("Submits externally collected metric data.")
public Map<String, Object> submitMetrics(@Context HttpServletRequest req, final List<MetricDto> metricDtos) {
... |
public class class_name {
private int findRow(int rangeStart) {
int index = 0;
// check the vicinity of the last-seen row (start
// searching with an unrolled loop)
index = prevRow * columns;
if (rangeStart >= v[index]) {
if (rangeStart < v[index + 1]) {
... | public class class_name {
private int findRow(int rangeStart) {
int index = 0;
// check the vicinity of the last-seen row (start
// searching with an unrolled loop)
index = prevRow * columns;
if (rangeStart >= v[index]) {
if (rangeStart < v[index + 1]) {
... |
public class class_name {
public void marshall(Offering offering, ProtocolMarshaller protocolMarshaller) {
if (offering == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(offering.getArn(), ARN_BINDI... | public class class_name {
public void marshall(Offering offering, ProtocolMarshaller protocolMarshaller) {
if (offering == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(offering.getArn(), ARN_BINDI... |
public class class_name {
public void ensureFailover( HttpServletRequest request )
{
//
// remove() puts the pageflow instance into a request attribute. Make sure not to re-save this
// instance if it's being removed. Also, if the session is null (after having been invalidated
// ... | public class class_name {
public void ensureFailover( HttpServletRequest request )
{
//
// remove() puts the pageflow instance into a request attribute. Make sure not to re-save this
// instance if it's being removed. Also, if the session is null (after having been invalidated
// ... |
public class class_name {
public SecretsManagerSecretResourceData withAdditionalStagingLabelsToDownload(String... additionalStagingLabelsToDownload) {
if (this.additionalStagingLabelsToDownload == null) {
setAdditionalStagingLabelsToDownload(new java.util.ArrayList<String>(additionalStagingLabelsTo... | public class class_name {
public SecretsManagerSecretResourceData withAdditionalStagingLabelsToDownload(String... additionalStagingLabelsToDownload) {
if (this.additionalStagingLabelsToDownload == null) {
setAdditionalStagingLabelsToDownload(new java.util.ArrayList<String>(additionalStagingLabelsTo... |
public class class_name {
public static void addElement(@Nonnull StringBuilder buf, @Nonnull String separator, @Nonnull String element) {
if (buf.length() > 0) {
buf.append(separator);
}
buf.append(element);
} } | public class class_name {
public static void addElement(@Nonnull StringBuilder buf, @Nonnull String separator, @Nonnull String element) {
if (buf.length() > 0) {
buf.append(separator); // depends on control dependency: [if], data = [none]
}
buf.append(element);
} } |
public class class_name {
private static Properties getFilterInitParameters(final FilterConfig config) {
Properties props = new Properties();
Enumeration en = config.getInitParameterNames();
while (en.hasMoreElements()) {
String key = (String)en.nextElement();
String value = config.getInitParame... | public class class_name {
private static Properties getFilterInitParameters(final FilterConfig config) {
Properties props = new Properties();
Enumeration en = config.getInitParameterNames();
while (en.hasMoreElements()) {
String key = (String)en.nextElement();
String value = config.getInitParame... |
public class class_name {
public EnvironmentPlatform withLanguages(EnvironmentLanguage... languages) {
if (this.languages == null) {
setLanguages(new java.util.ArrayList<EnvironmentLanguage>(languages.length));
}
for (EnvironmentLanguage ele : languages) {
this.languages... | public class class_name {
public EnvironmentPlatform withLanguages(EnvironmentLanguage... languages) {
if (this.languages == null) {
setLanguages(new java.util.ArrayList<EnvironmentLanguage>(languages.length)); // depends on control dependency: [if], data = [none]
}
for (Environment... |
public class class_name {
public static INDArray pLeftInvert(INDArray arr, boolean inPlace) {
try {
final INDArray inv = invert(arr.transpose().mmul(arr), inPlace).mmul(arr.transpose());
if (inPlace) arr.assign(inv);
return inv;
} catch (SingularMatrixException e) {
... | public class class_name {
public static INDArray pLeftInvert(INDArray arr, boolean inPlace) {
try {
final INDArray inv = invert(arr.transpose().mmul(arr), inPlace).mmul(arr.transpose());
if (inPlace) arr.assign(inv);
return inv; // depends on control dependency: [try], data = [non... |
public class class_name {
private static LongConsumer adapt(Sink<Long> sink) {
if (sink instanceof LongConsumer) {
return (LongConsumer) sink;
} else {
// if (Tripwire.ENABLED)
// Tripwire.trip(AbstractPipeline.class,
// "using LongStre... | public class class_name {
private static LongConsumer adapt(Sink<Long> sink) {
if (sink instanceof LongConsumer) {
return (LongConsumer) sink; // depends on control dependency: [if], data = [none]
} else {
// if (Tripwire.ENABLED)
// Tripwire.trip(AbstractPipeline.... |
public class class_name {
@SuppressWarnings({"unchecked", "rawtypes"})
public <T extends BaseWrapper<T>, U> CollectionWrapper<T> createCollection(final Collection<U> collection, final Class<U> entityClass,
boolean isRevisionCollection) {
if (collection == null) {
return null;
... | public class class_name {
@SuppressWarnings({"unchecked", "rawtypes"})
public <T extends BaseWrapper<T>, U> CollectionWrapper<T> createCollection(final Collection<U> collection, final Class<U> entityClass,
boolean isRevisionCollection) {
if (collection == null) {
return null; // dep... |
public class class_name {
private static UriPart unionUriParts(UriPart a, UriPart b) {
Preconditions.checkArgument(a != b);
if (a == UriPart.DANGEROUS_SCHEME || b == UriPart.DANGEROUS_SCHEME) {
// Dangerous schemes (like javascript:) are poison -- if either side is dangerous, the whole
// thing is.... | public class class_name {
private static UriPart unionUriParts(UriPart a, UriPart b) {
Preconditions.checkArgument(a != b);
if (a == UriPart.DANGEROUS_SCHEME || b == UriPart.DANGEROUS_SCHEME) {
// Dangerous schemes (like javascript:) are poison -- if either side is dangerous, the whole
// thing is.... |
public class class_name {
public File getTargetFile(final MiscContentItem item) {
final State state = this.state;
if (state == State.NEW || state == State.ROLLBACK_ONLY) {
return getTargetFile(miscTargetRoot, item);
} else {
throw new IllegalStateException(); // internal... | public class class_name {
public File getTargetFile(final MiscContentItem item) {
final State state = this.state;
if (state == State.NEW || state == State.ROLLBACK_ONLY) {
return getTargetFile(miscTargetRoot, item); // depends on control dependency: [if], data = [none]
} else {
... |
public class class_name {
public static boolean isUri(String potentialUri) {
if (StringUtils.isBlank(potentialUri)) {
return false;
}
try {
URI uri = new URI(potentialUri);
return uri.getScheme() != null && uri.getHost() != null;
} catch (URISyntaxEx... | public class class_name {
public static boolean isUri(String potentialUri) {
if (StringUtils.isBlank(potentialUri)) {
return false; // depends on control dependency: [if], data = [none]
}
try {
URI uri = new URI(potentialUri);
return uri.getScheme() != null ... |
public class class_name {
protected void suspendForcedlyBegunLazyTransactionIfNeeds() throws SystemException {
if (logger.isDebugEnabled()) {
logger.debug("#lazyTx ...Suspending the outer forcedly-begun lazy transaction: {}", buildLazyTxExp());
}
final Transaction suspended = transa... | public class class_name {
protected void suspendForcedlyBegunLazyTransactionIfNeeds() throws SystemException {
if (logger.isDebugEnabled()) {
logger.debug("#lazyTx ...Suspending the outer forcedly-begun lazy transaction: {}", buildLazyTxExp());
}
final Transaction suspended = transa... |
public class class_name {
public static String getText(TextView view) {
String text = "";
if (view != null) {
text = view.getText().toString();
} else {
Log.e("Caffeine", "Null view given to getText(). \"\" will be returned.");
}
return text;
} } | public class class_name {
public static String getText(TextView view) {
String text = "";
if (view != null) {
text = view.getText().toString(); // depends on control dependency: [if], data = [none]
} else {
Log.e("Caffeine", "Null view given to getText(). \"\" will be r... |
public class class_name {
public Choice<T> or(final Choice<T> other) {
checkNotNull(other);
if (other == none()) {
return this;
} else {
final Choice<T> thisChoice = this;
return new Choice<T>() {
@Override
protected Iterator<T> iterator() {
return Iterators.conc... | public class class_name {
public Choice<T> or(final Choice<T> other) {
checkNotNull(other);
if (other == none()) {
return this; // depends on control dependency: [if], data = [none]
} else {
final Choice<T> thisChoice = this;
return new Choice<T>() {
@Override
protected It... |
public class class_name {
@Override
public CommerceWishList fetchByG_U_D_Last(long groupId, long userId,
boolean defaultWishList,
OrderByComparator<CommerceWishList> orderByComparator) {
int count = countByG_U_D(groupId, userId, defaultWishList);
if (count == 0) {
return null;
}
List<CommerceWishList... | public class class_name {
@Override
public CommerceWishList fetchByG_U_D_Last(long groupId, long userId,
boolean defaultWishList,
OrderByComparator<CommerceWishList> orderByComparator) {
int count = countByG_U_D(groupId, userId, defaultWishList);
if (count == 0) {
return null; // depends on control depend... |
public class class_name {
public synchronized BeanO createSingletonBeanO()
{
boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "createSingletonBeanO: " + j2eeName);
// F743-4950 - This check is done (unsynchronized) fro... | public class class_name {
public synchronized BeanO createSingletonBeanO()
{
boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "createSingletonBeanO: " + j2eeName);
// F743-4950 - This check is done (unsynchronized) fro... |
public class class_name {
@Transactional
@Override
public void importData(ExternalStylesheetDescriptor data) {
final String stylesheetName = data.getName();
final String uri = data.getUri();
IStylesheetDescriptor stylesheetDescriptor =
this.stylesheetDescriptorDao.getSt... | public class class_name {
@Transactional
@Override
public void importData(ExternalStylesheetDescriptor data) {
final String stylesheetName = data.getName();
final String uri = data.getUri();
IStylesheetDescriptor stylesheetDescriptor =
this.stylesheetDescriptorDao.getSt... |
public class class_name {
protected String getStringArg(int index, String defaultValue) {
String result = defaultValue;
String[] arg = getArgs();
if (arg != null) {
if (arg.length > index) {
result = arg[index];
}
}
return result;
} } | public class class_name {
protected String getStringArg(int index, String defaultValue) {
String result = defaultValue;
String[] arg = getArgs();
if (arg != null) {
if (arg.length > index) {
result = arg[index]; // depends on control dependency: [if], data = [none]
... |
public class class_name {
public StackSetOperationPreferences withRegionOrder(String... regionOrder) {
if (this.regionOrder == null) {
setRegionOrder(new com.amazonaws.internal.SdkInternalList<String>(regionOrder.length));
}
for (String ele : regionOrder) {
this.regionOr... | public class class_name {
public StackSetOperationPreferences withRegionOrder(String... regionOrder) {
if (this.regionOrder == null) {
setRegionOrder(new com.amazonaws.internal.SdkInternalList<String>(regionOrder.length)); // depends on control dependency: [if], data = [none]
}
for ... |
public class class_name {
public static String joinWithOriginalWhiteSpace(List<CoreLabel> tokens) {
if (tokens.size() == 0) {
return "";
}
CoreLabel lastToken = tokens.get(0);
StringBuffer buffer = new StringBuffer(lastToken.word());
for (int i = 1; i < tokens.size(); i++) {
... | public class class_name {
public static String joinWithOriginalWhiteSpace(List<CoreLabel> tokens) {
if (tokens.size() == 0) {
return "";
// depends on control dependency: [if], data = [none]
}
CoreLabel lastToken = tokens.get(0);
StringBuffer buffer = new StringBuffer(lastToken.word());
... |
public class class_name {
public static void decodeUtf8To(String query, int offset, int length, MultiMap<String> map) {
Utf8StringBuilder buffer = new Utf8StringBuilder();
synchronized (map) {
String key = null;
String value = null;
int end = offset + length;
... | public class class_name {
public static void decodeUtf8To(String query, int offset, int length, MultiMap<String> map) {
Utf8StringBuilder buffer = new Utf8StringBuilder();
synchronized (map) {
String key = null;
String value = null;
int end = offset + length;
... |
public class class_name {
public void setItems(java.util.Collection<RequestValidator> items) {
if (items == null) {
this.items = null;
return;
}
this.items = new java.util.ArrayList<RequestValidator>(items);
} } | public class class_name {
public void setItems(java.util.Collection<RequestValidator> items) {
if (items == null) {
this.items = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
}
this.items = new ... |
public class class_name {
private String requestShareUrl(DropboxAPI<AndroidAuthSession> dropboxApi) {
String shareUrl = null;
if (dropboxApi != null) {
try {
shareUrl = dropboxApi.share("/" + mContext.getString(R.string.wings_dropbox__photo_folder)).url;
} catch ... | public class class_name {
private String requestShareUrl(DropboxAPI<AndroidAuthSession> dropboxApi) {
String shareUrl = null;
if (dropboxApi != null) {
try {
shareUrl = dropboxApi.share("/" + mContext.getString(R.string.wings_dropbox__photo_folder)).url; // depends on contro... |
public class class_name {
BusGroup getBus()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getBus");
SibTr.exit(tc, "getBus", iBusGroup);
}
return iBusGroup;
} } | public class class_name {
BusGroup getBus()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getBus"); // depends on control dependency: [if], data = [none]
SibTr.exit(tc, "getBus", iBusGroup); // depends on control dependency: [if], data = [none]
}
r... |
public class class_name {
private String fillClazz(String configClazz, String clazz) {
if (!clazz.equals(configClazz)) {
return configClazz;
} else {
return null;
}
} } | public class class_name {
private String fillClazz(String configClazz, String clazz) {
if (!clazz.equals(configClazz)) {
return configClazz; // depends on control dependency: [if], data = [none]
} else {
return null; // depends on control dependency: [if], data = [none]
}
} } |
public class class_name {
public static FieldExtension getField(DelegateExecution execution,
String fieldName) {
if (isExecutingExecutionListener(execution)) {
return getListenerField(execution,
fieldName);
} else... | public class class_name {
public static FieldExtension getField(DelegateExecution execution,
String fieldName) {
if (isExecutingExecutionListener(execution)) {
return getListenerField(execution,
fieldName); // depends on ... |
public class class_name {
public static Object getFieldValue(Object bean, String fieldNameOrIndex) {
if (null == bean || null == fieldNameOrIndex) {
return null;
}
if (bean instanceof Map) {
return ((Map<?, ?>) bean).get(fieldNameOrIndex);
} else if (bean instanceof Collection) {
return CollU... | public class class_name {
public static Object getFieldValue(Object bean, String fieldNameOrIndex) {
if (null == bean || null == fieldNameOrIndex) {
return null;
// depends on control dependency: [if], data = [none]
}
if (bean instanceof Map) {
return ((Map<?, ?>) bean).get(fieldNameOrIndex);
// de... |
public class class_name {
public static <T> void finish(T query, long correlationId, EventBus bus, String... types) {
for (String type : types) {
RemoveQuery<T> next = finish(query, correlationId, type);
bus.post(next);
}
} } | public class class_name {
public static <T> void finish(T query, long correlationId, EventBus bus, String... types) {
for (String type : types) {
RemoveQuery<T> next = finish(query, correlationId, type);
bus.post(next); // depends on control dependency: [for], data = [none]
}
... |
public class class_name {
public String resolveExpression() {
String expr = getType().getMetricExpression();
if (expr == null || expr.isEmpty()) {
expr = "$metric";
}
if (expr.contains("$metric")) {
StringBuilder metricString = new StringBuilder();
if... | public class class_name {
public String resolveExpression() {
String expr = getType().getMetricExpression();
if (expr == null || expr.isEmpty()) {
expr = "$metric"; // depends on control dependency: [if], data = [none]
}
if (expr.contains("$metric")) {
StringBuil... |
public class class_name {
public static void main(String[] args) {
//============================================================================================//
//=============================== Submitting a Request =======================================//
//=============================... | public class class_name {
public static void main(String[] args) {
//============================================================================================//
//=============================== Submitting a Request =======================================//
//=============================... |
public class class_name {
void insertMacros(TokenList tokens ) {
TokenList.Token t = tokens.getFirst();
while( t != null ) {
if( t.getType() == Type.WORD ) {
Macro v = lookupMacro(t.word);
if (v != null) {
TokenList.Token before = t.previo... | public class class_name {
void insertMacros(TokenList tokens ) {
TokenList.Token t = tokens.getFirst();
while( t != null ) {
if( t.getType() == Type.WORD ) {
Macro v = lookupMacro(t.word);
if (v != null) {
TokenList.Token before = t.previo... |
public class class_name {
public RedisURI getViewedBy(Map<RedisURI, Partitions> map, Partitions partitions) {
for (Map.Entry<RedisURI, Partitions> entry : map.entrySet()) {
if (entry.getValue() == partitions) {
return entry.getKey();
}
}
return null;
... | public class class_name {
public RedisURI getViewedBy(Map<RedisURI, Partitions> map, Partitions partitions) {
for (Map.Entry<RedisURI, Partitions> entry : map.entrySet()) {
if (entry.getValue() == partitions) {
return entry.getKey(); // depends on control dependency: [if], data = [... |
public class class_name {
@Override
public void prepare(FeatureProvider provider)
{
super.prepare(provider);
if (provider instanceof ProducerListener)
{
addListener((ProducerListener) provider);
}
if (provider instanceof ProducerChecker)
{
... | public class class_name {
@Override
public void prepare(FeatureProvider provider)
{
super.prepare(provider);
if (provider instanceof ProducerListener)
{
addListener((ProducerListener) provider);
// depends on control dependency: [if], data = [none]
}
... |
public class class_name {
private synchronized static void delete(File file) {
// Check if file is directory
if (file.isDirectory()) {
// Get all files in the folder
File[] files = file.listFiles();
// Delete each file in the folder
for (int i = 0; i < f... | public class class_name {
private synchronized static void delete(File file) {
// Check if file is directory
if (file.isDirectory()) {
// Get all files in the folder
File[] files = file.listFiles();
// Delete each file in the folder
for (int i = 0; i < f... |
public class class_name {
public static String relative(String startPath, String targetPath) {
// If the start and target path's are the same then link to the current directory
if (startPath.equals(targetPath)) {
return CURRENT_DIR;
}
String[] start = toSegments(canonical(startPath));
String... | public class class_name {
public static String relative(String startPath, String targetPath) {
// If the start and target path's are the same then link to the current directory
if (startPath.equals(targetPath)) {
return CURRENT_DIR; // depends on control dependency: [if], data = [none]
}
String[... |
public class class_name {
private Map<String, Map> volumes() {
final ImmutableMap.Builder<String, Map> volumes = ImmutableMap.builder();
for (final Map.Entry<String, String> entry : job.getVolumes().entrySet()) {
final String path = entry.getKey();
final String source = entry.getValue();
if (... | public class class_name {
private Map<String, Map> volumes() {
final ImmutableMap.Builder<String, Map> volumes = ImmutableMap.builder();
for (final Map.Entry<String, String> entry : job.getVolumes().entrySet()) {
final String path = entry.getKey();
final String source = entry.getValue();
if (... |
public class class_name {
private static BigInteger checkAndReturn(String which,
BigInteger expected,
String asbigintcs)
{
BigInteger other =
BigIntStringChecksum.fromString(asbigintcs).asBigInteger();... | public class class_name {
private static BigInteger checkAndReturn(String which,
BigInteger expected,
String asbigintcs)
{
BigInteger other =
BigIntStringChecksum.fromString(asbigintcs).asBigInteger();... |
public class class_name {
public void associate(HttpSession context) {
try {
context.setAttribute(COMPONENTS, new ConcurrentHashMap<Descriptor<?>, Object>());
} catch (Exception e) {
logger.debug("HTTP session is disabled or invalid in the current environment", e);
}
} } | public class class_name {
public void associate(HttpSession context) {
try {
context.setAttribute(COMPONENTS, new ConcurrentHashMap<Descriptor<?>, Object>()); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
logger.debug("HTTP session is disabled or invalid in the current enviro... |
public class class_name {
@Override
protected List<ConfigIssue> init() {
List<ConfigIssue> issues = super.init();
errorRecordHandler = new DefaultErrorRecordHandler(getContext()); // NOSONAR
double rateLimit = conf.rateLimit > 0 ? (1000.0 / conf.rateLimit) : Double.MAX_VALUE;
rateLimiter = RateLimit... | public class class_name {
@Override
protected List<ConfigIssue> init() {
List<ConfigIssue> issues = super.init();
errorRecordHandler = new DefaultErrorRecordHandler(getContext()); // NOSONAR
double rateLimit = conf.rateLimit > 0 ? (1000.0 / conf.rateLimit) : Double.MAX_VALUE;
rateLimiter = RateLimit... |
public class class_name {
public ByteBuffer getElementAt(int index) {
if (index >= elementsInBucket) {
return null;
} else {
int chunk = index * gp.getElementSize() / memory[0].length;
int offset = index * gp.getElementSize() % memory[0].length;
return By... | public class class_name {
public ByteBuffer getElementAt(int index) {
if (index >= elementsInBucket) {
return null; // depends on control dependency: [if], data = [none]
} else {
int chunk = index * gp.getElementSize() / memory[0].length;
int offset = index * gp.getE... |
public class class_name {
public String getScheme() {
if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
checkRequestObjectInUse();
}
// 321485
String scheme = this._request.getScheme();
if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { /... | public class class_name {
public String getScheme() {
if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
checkRequestObjectInUse(); // depends on control dependency: [if], data = [none]
}
// 321485
String scheme = this._request.getScheme();
if (TraceComponent.isAny... |
public class class_name {
public void put(URI uri, byte[] bimg, BufferedImage img)
{
synchronized (bytemap)
{
while (bytesize > 1000 * 1000 * 50)
{
URI olduri = bytemapAccessQueue.removeFirst();
byte[] oldbimg = bytemap.remove(olduri);
... | public class class_name {
public void put(URI uri, byte[] bimg, BufferedImage img)
{
synchronized (bytemap)
{
while (bytesize > 1000 * 1000 * 50)
{
URI olduri = bytemapAccessQueue.removeFirst();
byte[] oldbimg = bytemap.remove(olduri);
... |
public class class_name {
static public String makeStandardFilename(String appName, String storeName) {
// the directory
String userHome = null;
try {
userHome = System.getProperty("user.home");
} catch (Exception e) {
System.out.println( "XMLStore.makeStandardFilename: error System.getPr... | public class class_name {
static public String makeStandardFilename(String appName, String storeName) {
// the directory
String userHome = null;
try {
userHome = System.getProperty("user.home"); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
System.out.prin... |
public class class_name {
public static Map getProperties( JSONObject jsonObject ) {
Map properties = new HashMap();
for( Iterator keys = jsonObject.keys(); keys.hasNext(); ){
String key = (String) keys.next();
/*
* String parsedKey = key; if( !JSONUtils.isJavaIdentifier( parsed... | public class class_name {
public static Map getProperties( JSONObject jsonObject ) {
Map properties = new HashMap();
for( Iterator keys = jsonObject.keys(); keys.hasNext(); ){
String key = (String) keys.next();
/*
* String parsedKey = key; if( !JSONUtils.isJavaIdentifier( parsed... |
public class class_name {
void writeCode(Code code) {
databuf.appendChar(code.max_stack);
databuf.appendChar(code.max_locals);
databuf.appendInt(code.cp);
databuf.appendBytes(code.code, 0, code.cp);
databuf.appendChar(code.catchInfo.length());
for (List<char[]> l = code.... | public class class_name {
void writeCode(Code code) {
databuf.appendChar(code.max_stack);
databuf.appendChar(code.max_locals);
databuf.appendInt(code.cp);
databuf.appendBytes(code.code, 0, code.cp);
databuf.appendChar(code.catchInfo.length());
for (List<char[]> l = code.... |
public class class_name {
public void remove( Element<T> element ) {
if( element.next == null ) {
last = element.previous;
} else {
element.next.previous = element.previous;
}
if( element.previous == null ) {
first = element.next;
} else {
element.previous.next = element.next;
}
size--;
ele... | public class class_name {
public void remove( Element<T> element ) {
if( element.next == null ) {
last = element.previous; // depends on control dependency: [if], data = [none]
} else {
element.next.previous = element.previous; // depends on control dependency: [if], data = [none]
}
if( element.previous ... |
public class class_name {
public void marshall(ApiKey apiKey, ProtocolMarshaller protocolMarshaller) {
if (apiKey == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(apiKey.getId(), ID_BINDING);
... | public class class_name {
public void marshall(ApiKey apiKey, ProtocolMarshaller protocolMarshaller) {
if (apiKey == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(apiKey.getId(), ID_BINDING); // de... |
public class class_name {
public Set<String> generateIdsToUse(long nextFreeTransactionalId) {
Set<String> transactionalIds = new HashSet<>();
for (int i = 0; i < poolSize; i++) {
long transactionalId = nextFreeTransactionalId + subtaskIndex * poolSize + i;
transactionalIds.add(generateTransactionalId(transac... | public class class_name {
public Set<String> generateIdsToUse(long nextFreeTransactionalId) {
Set<String> transactionalIds = new HashSet<>();
for (int i = 0; i < poolSize; i++) {
long transactionalId = nextFreeTransactionalId + subtaskIndex * poolSize + i;
transactionalIds.add(generateTransactionalId(transac... |
public class class_name {
public static String message(final Throwable throwable) {
String message = throwable.getMessage();
if (StringUtil.isBlank(message)) {
message = throwable.toString();
}
return message;
} } | public class class_name {
public static String message(final Throwable throwable) {
String message = throwable.getMessage();
if (StringUtil.isBlank(message)) {
message = throwable.toString(); // depends on control dependency: [if], data = [none]
}
return message;
} } |
public class class_name {
protected void validate(List<TableInfo> tableInfos)
{
try
{
HTableDescriptor hTableDescriptor = admin.getTableDescriptor(databaseName.getBytes());
HColumnDescriptor[] columnFamilies = hTableDescriptor.getColumnFamilies();
for (TableInfo ... | public class class_name {
protected void validate(List<TableInfo> tableInfos)
{
try
{
HTableDescriptor hTableDescriptor = admin.getTableDescriptor(databaseName.getBytes());
HColumnDescriptor[] columnFamilies = hTableDescriptor.getColumnFamilies();
for (TableInfo ... |
public class class_name {
public static String randomIdString() {
MersenneTwister twister = new MersenneTwister();
final int length = 27;
char[] chars = new char[length];
for (int i = 0; i < length; i++) {
chars[i] = (char) ('a' + twister.nextInt(26));
}
// A... | public class class_name {
public static String randomIdString() {
MersenneTwister twister = new MersenneTwister();
final int length = 27;
char[] chars = new char[length];
for (int i = 0; i < length; i++) {
chars[i] = (char) ('a' + twister.nextInt(26)); // depends on control ... |
public class class_name {
public static void encode(StringBuilder sb, long data)
{
for (int i = 58; i > 0; i -= 6) {
sb.append(encode(data >> i));
}
sb.append(encode(data << 2));
} } | public class class_name {
public static void encode(StringBuilder sb, long data)
{
for (int i = 58; i > 0; i -= 6) {
sb.append(encode(data >> i)); // depends on control dependency: [for], data = [i]
}
sb.append(encode(data << 2));
} } |
public class class_name {
protected void reConnect(VirtualConnection inVC, IOException ioe) {
if (getLink().isReconnectAllowed()) {
// start the reconnect
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Attempting reconnect: " + getLink(... | public class class_name {
protected void reConnect(VirtualConnection inVC, IOException ioe) {
if (getLink().isReconnectAllowed()) {
// start the reconnect
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Attempting reconnect: " + getLink(... |
public class class_name {
public static boolean isPrime(int number) {
// For performance, check if the number is divisable by severl of
// the smaller prime numbers. Note that a prime is divisible by
// itself, so check for the smaller primes prior to performing
// the divion check.
... | public class class_name {
public static boolean isPrime(int number) {
// For performance, check if the number is divisable by severl of
// the smaller prime numbers. Note that a prime is divisible by
// itself, so check for the smaller primes prior to performing
// the divion check.
... |
public class class_name {
synchronized @CheckForNull RunExecution peek() {
Executor e = Executor.currentExecutor();
if (e != null) {
Stack<RunExecution> s = stack.get(e);
if (s != null && !s.isEmpty()) {
return s.peek();
}
}
return nul... | public class class_name {
synchronized @CheckForNull RunExecution peek() {
Executor e = Executor.currentExecutor();
if (e != null) {
Stack<RunExecution> s = stack.get(e);
if (s != null && !s.isEmpty()) {
return s.peek(); // depends on control dependency: [if], da... |
public class class_name {
public String getInitField(FieldData recFieldData, boolean bConstantsNotVariables, boolean bThinConstants)
{
boolean bConstantValue = false;
boolean bValidThinConstant = true;
String strInitField = recFieldData.getField(FieldData.INITIAL_VALUE).getString();
... | public class class_name {
public String getInitField(FieldData recFieldData, boolean bConstantsNotVariables, boolean bThinConstants)
{
boolean bConstantValue = false;
boolean bValidThinConstant = true;
String strInitField = recFieldData.getField(FieldData.INITIAL_VALUE).getString();
... |
public class class_name {
private final int readPIPrimary()
throws XMLStreamException
{
// Ok, first we need the name:
String target = parseFullName();
mCurrName = target;
if (target.length() == 0) {
throwParseError(ErrorConsts.ERR_WF_PI_MISSING_TARGET);
... | public class class_name {
private final int readPIPrimary()
throws XMLStreamException
{
// Ok, first we need the name:
String target = parseFullName();
mCurrName = target;
if (target.length() == 0) {
throwParseError(ErrorConsts.ERR_WF_PI_MISSING_TARGET);
... |
public class class_name {
public EMap<String, String> getXMLNSPrefixMap() {
if (xMLNSPrefixMap == null) {
xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
}
return xMLNSPref... | public class class_name {
public EMap<String, String> getXMLNSPrefixMap() {
if (xMLNSPrefixMap == null) {
xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP); // depends on control ... |
public class class_name {
protected String readText(Postcard postcard, String path, boolean html, boolean filesystem, OptionalThing<Locale> receiverLocale,
OptionalThing<Object> dynamicData) {
if (dynamicData.isPresent()) {
final OptionalThing<String> assisted = assistDynamicText(postca... | public class class_name {
protected String readText(Postcard postcard, String path, boolean html, boolean filesystem, OptionalThing<Locale> receiverLocale,
OptionalThing<Object> dynamicData) {
if (dynamicData.isPresent()) {
final OptionalThing<String> assisted = assistDynamicText(postca... |
public class class_name {
@Nullable
public static String javaScriptEscape (@Nullable final String sInput)
{
if (StringHelper.hasNoText (sInput))
return sInput;
final char [] aInput = sInput.toCharArray ();
if (!StringHelper.containsAny (aInput, CHARS_TO_MASK))
return sInput;
final cha... | public class class_name {
@Nullable
public static String javaScriptEscape (@Nullable final String sInput)
{
if (StringHelper.hasNoText (sInput))
return sInput;
final char [] aInput = sInput.toCharArray ();
if (!StringHelper.containsAny (aInput, CHARS_TO_MASK))
return sInput;
final cha... |
public class class_name {
protected <IPW extends IndentingPrintWriter> IPW writeChildrenTo(IPW output) {
Collection<? extends UMLNode> children = getChildren();
if (!children.isEmpty()) {
IndentingPrintWriter indented = output.indent();
children.forEach(child -> child.writeTo(in... | public class class_name {
protected <IPW extends IndentingPrintWriter> IPW writeChildrenTo(IPW output) {
Collection<? extends UMLNode> children = getChildren();
if (!children.isEmpty()) {
IndentingPrintWriter indented = output.indent();
children.forEach(child -> child.writeTo(in... |
public class class_name {
public CompressionCodec getCodec(Path file) {
CompressionCodec result = null;
if (codecs != null) {
String filename = file.getName();
String reversedFilename = new StringBuffer(filename).reverse().toString();
SortedMap<String, CompressionCodec> subMap =
code... | public class class_name {
public CompressionCodec getCodec(Path file) {
CompressionCodec result = null;
if (codecs != null) {
String filename = file.getName();
String reversedFilename = new StringBuffer(filename).reverse().toString();
SortedMap<String, CompressionCodec> subMap =
code... |
public class class_name {
public static boolean deleteDirRecursively(File dir) {
if (!dir.exists() || !dir.isDirectory()) {
// No hay ficheros que borrar a si que OK
log.warn("El directorio:'" + dir.getAbsolutePath()
+ "' no existe o no es un directorio");
return false;
}
// el fichero es un... | public class class_name {
public static boolean deleteDirRecursively(File dir) {
if (!dir.exists() || !dir.isDirectory()) {
// No hay ficheros que borrar a si que OK
log.warn("El directorio:'" + dir.getAbsolutePath()
+ "' no existe o no es un directorio");
// depends on control dependency: [if], data... |
public class class_name {
public boolean match(String word) {
if(word == null || word.length() < 2) {
return false;
}
CharNode cn = dict.get(word.charAt(0));
return search(cn, word.toCharArray(), 0, word.length()-1) >= 0;
} } | public class class_name {
public boolean match(String word) {
if(word == null || word.length() < 2) {
return false;
// depends on control dependency: [if], data = [none]
}
CharNode cn = dict.get(word.charAt(0));
return search(cn, word.toCharArray(), 0, word.length()-1) >= 0;
} } |
public class class_name {
public static String toSeparatedString(List<?> values, String separator, String prefix) {
StringBuilder result = new StringBuilder();
for (Object each : values) {
if (each == null) {
continue;
}
if (result.length() > 0)... | public class class_name {
public static String toSeparatedString(List<?> values, String separator, String prefix) {
StringBuilder result = new StringBuilder();
for (Object each : values) {
if (each == null) {
continue;
}
if (result.length() > 0)... |
public class class_name {
public void discardFirstWords(long x) {
if (this.runningLength >= x) {
this.runningLength -= x;
return;
}
x -= this.runningLength;
this.runningLength = 0;
this.literalWordOffset += x;
this.numberOfLiteralWords -= x;
}... | public class class_name {
public void discardFirstWords(long x) {
if (this.runningLength >= x) {
this.runningLength -= x; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
}
x -= this.runningLength;
... |
public class class_name {
public <T extends WebServiceTemplate> T configure(T webServiceTemplate) {
Assert.notNull(webServiceTemplate, "WebServiceTemplate must not be null");
configureMessageSenders(webServiceTemplate);
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
applyCustomizers(web... | public class class_name {
public <T extends WebServiceTemplate> T configure(T webServiceTemplate) {
Assert.notNull(webServiceTemplate, "WebServiceTemplate must not be null");
configureMessageSenders(webServiceTemplate);
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
applyCustomizers(web... |
public class class_name {
public static ImmutableSet<UnicodeFriendlyString> unicodeFriendlySet(Iterable<String> strings) {
final ImmutableSet.Builder<UnicodeFriendlyString> ret = ImmutableSet.builder();
for (final String s : strings) {
ret.add(unicodeFriendly(s));
}
return ret.build();
} } | public class class_name {
public static ImmutableSet<UnicodeFriendlyString> unicodeFriendlySet(Iterable<String> strings) {
final ImmutableSet.Builder<UnicodeFriendlyString> ret = ImmutableSet.builder();
for (final String s : strings) {
ret.add(unicodeFriendly(s)); // depends on control dependency: [for]... |
public class class_name {
@Override
protected DataPoint[] getAllInRange(long timestampStartMs, long timestampEndMs) {
SortedSet<DataPoint> result = new TreeSet<DataPoint>(new Comparator<DataPoint>() {
@Override
public int compare(DataPoint block1, DataPoint block2) {
... | public class class_name {
@Override
protected DataPoint[] getAllInRange(long timestampStartMs, long timestampEndMs) {
SortedSet<DataPoint> result = new TreeSet<DataPoint>(new Comparator<DataPoint>() {
@Override
public int compare(DataPoint block1, DataPoint block2) {
... |
public class class_name {
private Node tryFoldLeftChildOp(Node n, Node left, Node right) {
Token opType = n.getToken();
checkState((NodeUtil.isAssociative(opType) && NodeUtil.isCommutative(opType)) || n.isAdd());
checkState(!n.isAdd() || !NodeUtil.mayBeString(n, shouldUseTypes));
// Use getNumberValu... | public class class_name {
private Node tryFoldLeftChildOp(Node n, Node left, Node right) {
Token opType = n.getToken();
checkState((NodeUtil.isAssociative(opType) && NodeUtil.isCommutative(opType)) || n.isAdd());
checkState(!n.isAdd() || !NodeUtil.mayBeString(n, shouldUseTypes));
// Use getNumberValu... |
public class class_name {
private static BundleContext checkBundleContext() {
if (bundleContext == null) {
if (tc.isDebugEnabled()) {
Tr.debug(tc, "BundleContext is null and should not be");
}
}
return bundleContext;
} } | public class class_name {
private static BundleContext checkBundleContext() {
if (bundleContext == null) {
if (tc.isDebugEnabled()) {
Tr.debug(tc, "BundleContext is null and should not be"); // depends on control dependency: [if], data = [none]
}
}
return... |
public class class_name {
public void error(String message, Object ... args) {
if (log.isErrorEnabled()) {
log.error(String.format(message, args));
}
} } | public class class_name {
public void error(String message, Object ... args) {
if (log.isErrorEnabled()) {
log.error(String.format(message, args)); // depends on control dependency: [if], data = [none]
}
} } |
public class class_name {
public final void ruleXAnnotationElementValueOrCommaList() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXbaseWithAnnotations.g:121:2: ( ( ( rule__XAnnotationElementValueOrCommaList__Alternatives ) ) )
// I... | public class class_name {
public final void ruleXAnnotationElementValueOrCommaList() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXbaseWithAnnotations.g:121:2: ( ( ( rule__XAnnotationElementValueOrCommaList__Alternatives ) ) )
// I... |
public class class_name {
public void declareRequestedFieldname(String name) {
if (name.endsWith(".*")) {
stringSetValues.put(name, new HashMap<>());
stringSetPrefixes.put(name.substring(0, name.length() - 1), name);
}
} } | public class class_name {
public void declareRequestedFieldname(String name) {
if (name.endsWith(".*")) {
stringSetValues.put(name, new HashMap<>()); // depends on control dependency: [if], data = [none]
stringSetPrefixes.put(name.substring(0, name.length() - 1), name); // depends on co... |
public class class_name {
public static String getPrimaryType(Resource resource) {
String result = null;
if (resource != null) {
if (resource instanceof JcrResource) {
// use the resource itself if it implements the JcrResource interface (maybe a version of a resource)
... | public class class_name {
public static String getPrimaryType(Resource resource) {
String result = null;
if (resource != null) {
if (resource instanceof JcrResource) {
// use the resource itself if it implements the JcrResource interface (maybe a version of a resource)
... |
public class class_name {
@Override
public Msg genKeys() {
final Msg infoLines = new Msg();
try {
final PKITools pki = new PKITools();
if (getPrivKeyFileName() == null) {
infoLines.add("Must provide a -privkey <file> parameter");
return infoLines;
}
if (getPublicKey... | public class class_name {
@Override
public Msg genKeys() {
final Msg infoLines = new Msg();
try {
final PKITools pki = new PKITools();
if (getPrivKeyFileName() == null) {
infoLines.add("Must provide a -privkey <file> parameter"); // depends on control dependency: [if], data = [none]
... |
public class class_name {
public void setResourceSpecificResults(java.util.Collection<ResourceSpecificResult> resourceSpecificResults) {
if (resourceSpecificResults == null) {
this.resourceSpecificResults = null;
return;
}
this.resourceSpecificResults = new com.amazonaw... | public class class_name {
public void setResourceSpecificResults(java.util.Collection<ResourceSpecificResult> resourceSpecificResults) {
if (resourceSpecificResults == null) {
this.resourceSpecificResults = null; // depends on control dependency: [if], data = [none]
return; // depends o... |
public class class_name {
private void configureSecurityContextChain(
final Map<String, String> principals,
final Map<String, String> credentials,
final ISecurityContext securityContext,
final String baseContextName)
throws PortalSecurityException {
t... | public class class_name {
private void configureSecurityContextChain(
final Map<String, String> principals,
final Map<String, String> credentials,
final ISecurityContext securityContext,
final String baseContextName)
throws PortalSecurityException {
t... |
public class class_name {
private void doRemoveRemoteSource(RequestErrorTracker errorTracker, Request request, SettableFuture<?> future)
{
errorTracker.startRequest();
FutureCallback<StatusResponse> callback = new FutureCallback<StatusResponse>() {
@Override
public void onS... | public class class_name {
private void doRemoveRemoteSource(RequestErrorTracker errorTracker, Request request, SettableFuture<?> future)
{
errorTracker.startRequest();
FutureCallback<StatusResponse> callback = new FutureCallback<StatusResponse>() {
@Override
public void onS... |
public class class_name {
public static String toLegacyType(String keyword, String value) {
String legacyType = KeyTypeData.toLegacyType(keyword, value, null, null);
if (legacyType == null) {
// Checks if the specified locale type is well-formed with the legacy locale syntax.
//... | public class class_name {
public static String toLegacyType(String keyword, String value) {
String legacyType = KeyTypeData.toLegacyType(keyword, value, null, null);
if (legacyType == null) {
// Checks if the specified locale type is well-formed with the legacy locale syntax.
//... |
public class class_name {
public final File getTemplateDir() {
if ((templateDir == null) && (templatePath != null)) {
try {
templateDir = new File(templatePath).getCanonicalFile();
} catch (final IOException ex) {
throw new RuntimeException("Couldn't... | public class class_name {
public final File getTemplateDir() {
if ((templateDir == null) && (templatePath != null)) {
try {
templateDir = new File(templatePath).getCanonicalFile();
// depends on control dependency: [try], data = [none]
} catch (final IOException ex) ... |
public class class_name {
protected final void setEndpoints(Iterable<Endpoint> endpoints) {
final List<Endpoint> oldEndpoints = this.endpoints;
final List<Endpoint> newEndpoints = ImmutableList.sortedCopyOf(endpoints);
if (oldEndpoints.equals(newEndpoints)) {
return;
}
... | public class class_name {
protected final void setEndpoints(Iterable<Endpoint> endpoints) {
final List<Endpoint> oldEndpoints = this.endpoints;
final List<Endpoint> newEndpoints = ImmutableList.sortedCopyOf(endpoints);
if (oldEndpoints.equals(newEndpoints)) {
return; // depends on ... |
public class class_name {
public boolean moveElement(String name, Object sourceParent, Object targetParent) {
Element sourceGroup = null;
Element targetGroup = null;
Element element = null;
if (sourceParent != null) {
sourceGroup = getGroup(sourceParent);
element = getElement(sourceParent, name);
}
i... | public class class_name {
public boolean moveElement(String name, Object sourceParent, Object targetParent) {
Element sourceGroup = null;
Element targetGroup = null;
Element element = null;
if (sourceParent != null) {
sourceGroup = getGroup(sourceParent); // depends on control dependency: [if], data = [(sou... |
public class class_name {
public void addActionResult(ActionResult actionResult) {
ActionResult existActionResult = getActionResult(actionResult.getActionId());
if (existActionResult != null &&
existActionResult.getResultValue() instanceof ResultValueMap &&
actionResult.... | public class class_name {
public void addActionResult(ActionResult actionResult) {
ActionResult existActionResult = getActionResult(actionResult.getActionId());
if (existActionResult != null &&
existActionResult.getResultValue() instanceof ResultValueMap &&
actionResult.... |
public class class_name {
void dropSchemas(Grantee grantee, boolean cascade) {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(schema.name.name, cascade);
}
... | public class class_name {
void dropSchemas(Grantee grantee, boolean cascade) {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(schema.name.name, cascade); // depends ... |
public class class_name {
protected void expandClusterOrder(DBID ipt, ClusterOrder order, DistanceQuery<V> dq, FiniteProgress prog) {
UpdatableHeap<OPTICSHeapEntry> heap = new UpdatableHeap<>();
heap.add(new OPTICSHeapEntry(ipt, null, Double.POSITIVE_INFINITY));
while(!heap.isEmpty()) {
final OPTICSH... | public class class_name {
protected void expandClusterOrder(DBID ipt, ClusterOrder order, DistanceQuery<V> dq, FiniteProgress prog) {
UpdatableHeap<OPTICSHeapEntry> heap = new UpdatableHeap<>();
heap.add(new OPTICSHeapEntry(ipt, null, Double.POSITIVE_INFINITY));
while(!heap.isEmpty()) {
final OPTICSH... |
public class class_name {
public static IAMInfo getIAMInstanceProfileInfo() {
String json = getData(EC2_METADATA_ROOT + "/iam/info");
if (null == json) {
return null;
}
try {
return mapper.readValue(json, IAMInfo.class);
} catch (Exception e) {
... | public class class_name {
public static IAMInfo getIAMInstanceProfileInfo() {
String json = getData(EC2_METADATA_ROOT + "/iam/info");
if (null == json) {
return null; // depends on control dependency: [if], data = [none]
}
try {
return mapper.readValue(json, IA... |
public class class_name {
@Override
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
// @Data
this.addAnnotations(topLevelClass, EnumLombokAnnotations.DATA);
if (topLevelClass.getSuperClass() != null) {
this.addAnno... | public class class_name {
@Override
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
// @Data
this.addAnnotations(topLevelClass, EnumLombokAnnotations.DATA);
if (topLevelClass.getSuperClass() != null) {
this.addAnno... |
public class class_name {
public List<PrimaryKey> getPrimaryKeys(final String catalog, final String schema, final String table)
throws SQLException {
final List<PrimaryKey> list = new ArrayList<>();
try (ResultSet results = databaseMetadata.getPrimaryKeys(catalog, schema, table)) {
... | public class class_name {
public List<PrimaryKey> getPrimaryKeys(final String catalog, final String schema, final String table)
throws SQLException {
final List<PrimaryKey> list = new ArrayList<>();
try (ResultSet results = databaseMetadata.getPrimaryKeys(catalog, schema, table)) {
... |
public class class_name {
@SuppressWarnings("unchecked")
public static <Item extends IItem, A extends IAdapter> FastAdapter<Item> with(@Nullable Collection<A> adapters, @Nullable Collection<IAdapterExtension<Item>> extensions) {
FastAdapter<Item> fastAdapter = new FastAdapter<>();
if (adapters == n... | public class class_name {
@SuppressWarnings("unchecked")
public static <Item extends IItem, A extends IAdapter> FastAdapter<Item> with(@Nullable Collection<A> adapters, @Nullable Collection<IAdapterExtension<Item>> extensions) {
FastAdapter<Item> fastAdapter = new FastAdapter<>();
if (adapters == n... |
public class class_name {
public final String[] getContext(final int index, final Object[] tokens,
final String[] tags) {
String next, nextnext, lex, prev, prevprev;
String tagprev, tagprevprev;
tagprev = tagprevprev = null;
next = nextnext = lex = prev = prevprev = null;
lex = tokens[index]... | public class class_name {
public final String[] getContext(final int index, final Object[] tokens,
final String[] tags) {
String next, nextnext, lex, prev, prevprev;
String tagprev, tagprevprev;
tagprev = tagprevprev = null;
next = nextnext = lex = prev = prevprev = null;
lex = tokens[index]... |
public class class_name {
public final void updateObjectInUse(T object, boolean inUse) {
int origSize = inUseObjects.size();
if (inUse) {
inUseObjects.add(object);
if (origSize == 0) {
handleInUse();
}
} else {
boolean removed = inUseObjects.remove(object);
if (removed... | public class class_name {
public final void updateObjectInUse(T object, boolean inUse) {
int origSize = inUseObjects.size();
if (inUse) {
inUseObjects.add(object); // depends on control dependency: [if], data = [none]
if (origSize == 0) {
handleInUse(); // depends on control dependency: [if... |
public class class_name {
private void checkMatrixBounds() {
RectF rect = getMatrixRectF();
float deltaX = 0, deltaY = 0;
final float viewWidth = getWidth();
final float viewHeight = getHeight();
// Check if image boundary exceeds imageView boundary
if (rect.top > 0 && isCheckTopAndBottom) {
deltaY = -... | public class class_name {
private void checkMatrixBounds() {
RectF rect = getMatrixRectF();
float deltaX = 0, deltaY = 0;
final float viewWidth = getWidth();
final float viewHeight = getHeight();
// Check if image boundary exceeds imageView boundary
if (rect.top > 0 && isCheckTopAndBottom) {
deltaY = -... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.