code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
public boolean addLockedObjectOwner(String owner) {
if (_owner == null) {
_owner = new String[1];
} else {
int size = _owner.length;
String[] newLockObjectOwner = new String[size + 1];
// check if the owner is already here (th... | public class class_name {
public boolean addLockedObjectOwner(String owner) {
if (_owner == null) {
_owner = new String[1]; // depends on control dependency: [if], data = [none]
} else {
int size = _owner.length;
String[] newLockObjectOwner = new String[size + 1];
... |
public class class_name {
public HandyDate date(Object expression, Object pattern, Object locale) {
if (!(expression instanceof String)) {
String msg = "First argument as three arguments should be String(expression): " + expression;
throw new TemplateProcessingException(msg);
}
... | public class class_name {
public HandyDate date(Object expression, Object pattern, Object locale) {
if (!(expression instanceof String)) {
String msg = "First argument as three arguments should be String(expression): " + expression; // depends on control dependency: [if], data = [none]
... |
public class class_name {
public HttpResponse executeCommand(HttpUriRequest request, boolean apiHeaders) {
if (apiHeaders) {
setApiHeaders(request);
}
try {
CloseableHttpResponse response = client.getHttpClient().execute(request);
try {
check... | public class class_name {
public HttpResponse executeCommand(HttpUriRequest request, boolean apiHeaders) {
if (apiHeaders) {
setApiHeaders(request); // depends on control dependency: [if], data = [none]
}
try {
CloseableHttpResponse response = client.getHttpClient().exe... |
public class class_name {
@Override
public Realm removeRealmApplicationId(String realmName, ApplicationId appId) {
RealmSet set = this.realmNameToRealmSet.get(realmName);
if (set != null) {
Realm r = set.getRealm(appId);
set.removeRealm(appId);
if (set.size() == 0 && !realmName.equa... | public class class_name {
@Override
public Realm removeRealmApplicationId(String realmName, ApplicationId appId) {
RealmSet set = this.realmNameToRealmSet.get(realmName);
if (set != null) {
Realm r = set.getRealm(appId);
set.removeRealm(appId);
// depends on control dependency: [if], data... |
public class class_name {
static int clamp(int value, int upperLimit) {
if (value < 0) {
return value + (-1 * (int) Math.floor(value / (float) upperLimit)) * upperLimit;
} else {
return value % upperLimit;
}
} } | public class class_name {
static int clamp(int value, int upperLimit) {
if (value < 0) {
return value + (-1 * (int) Math.floor(value / (float) upperLimit)) * upperLimit; // depends on control dependency: [if], data = [(value]
} else {
return value % upperLimit; // depends on con... |
public class class_name {
public static Cookie parseSetCookieHeader(final String headerValue) {
String key = null;
CookieImpl cookie = null;
int state = 0;
int current = 0;
for (int i = 0; i < headerValue.length(); ++i) {
char c = headerValue.charAt(i);
... | public class class_name {
public static Cookie parseSetCookieHeader(final String headerValue) {
String key = null;
CookieImpl cookie = null;
int state = 0;
int current = 0;
for (int i = 0; i < headerValue.length(); ++i) {
char c = headerValue.charAt(i);
... |
public class class_name {
@Override
public Object deserialize(Writable blob) {
HiveBitcoinBlock result = null;
if (blob instanceof BitcoinBlock) {
result = convertToHiveBitcoinBlock((BitcoinBlock) blob);
}
return result;
} } | public class class_name {
@Override
public Object deserialize(Writable blob) {
HiveBitcoinBlock result = null;
if (blob instanceof BitcoinBlock) {
result = convertToHiveBitcoinBlock((BitcoinBlock) blob); // depends on control dependency: [if], data = [none]
}
return result;
} } |
public class class_name {
public static void reverse(int[] a) {
int i = 0, j = a.length - 1;
while (i < j) {
SortUtils.swap(a, i++, j--); // code for swap not shown, but easy enough
}
} } | public class class_name {
public static void reverse(int[] a) {
int i = 0, j = a.length - 1;
while (i < j) {
SortUtils.swap(a, i++, j--); // code for swap not shown, but easy enough // depends on control dependency: [while], data = [none]
}
} } |
public class class_name {
public String getUrl(String htmlLink) {
String result = htmlLink;
if (htmlLink != null) {
Matcher linkMatcher = LINKPATTERN.matcher(htmlLink);
Matcher imgMatcher = IMAGEPATTERN.matcher(htmlLink);
if (linkMatcher.matches()) {
... | public class class_name {
public String getUrl(String htmlLink) {
String result = htmlLink;
if (htmlLink != null) {
Matcher linkMatcher = LINKPATTERN.matcher(htmlLink);
Matcher imgMatcher = IMAGEPATTERN.matcher(htmlLink);
if (linkMatcher.matches()) {
... |
public class class_name {
private Archive openArchive(File zipFileName, boolean useOptimizedZip) throws IOException {
File origZipFileName = zipFileName;
if (symbolFileEnabled && locations.isDefaultBootClassPathRtJar(zipFileName)) {
File file = zipFileName.getParentFile().getParentFile(); /... | public class class_name {
private Archive openArchive(File zipFileName, boolean useOptimizedZip) throws IOException {
File origZipFileName = zipFileName;
if (symbolFileEnabled && locations.isDefaultBootClassPathRtJar(zipFileName)) {
File file = zipFileName.getParentFile().getParentFile(); /... |
public class class_name {
public static String exampleOrderBy(Class<?> entityClass) {
StringBuilder sql = new StringBuilder();
sql.append("<if test=\"orderByClause != null\">");
sql.append("order by ${orderByClause}");
sql.append("</if>");
String orderByClause = EntityHelper.get... | public class class_name {
public static String exampleOrderBy(Class<?> entityClass) {
StringBuilder sql = new StringBuilder();
sql.append("<if test=\"orderByClause != null\">");
sql.append("order by ${orderByClause}");
sql.append("</if>");
String orderByClause = EntityHelper.get... |
public class class_name {
private void toggleDrawer() {
if (drawerLayout.isDrawerVisible(GravityCompat.START)) {
drawerLayout.closeDrawer(GravityCompat.START);
} else {
drawerLayout.openDrawer(GravityCompat.START);
}
} } | public class class_name {
private void toggleDrawer() {
if (drawerLayout.isDrawerVisible(GravityCompat.START)) {
drawerLayout.closeDrawer(GravityCompat.START); // depends on control dependency: [if], data = [none]
} else {
drawerLayout.openDrawer(GravityCompat.START); // depends on control dependency: [if], ... |
public class class_name {
public static IntToDoubleFunction intToDoubleFunction(CheckedIntToDoubleFunction function, Consumer<Throwable> handler) {
return t -> {
try {
return function.applyAsDouble(t);
}
catch (Throwable e) {
handler.accept(e)... | public class class_name {
public static IntToDoubleFunction intToDoubleFunction(CheckedIntToDoubleFunction function, Consumer<Throwable> handler) {
return t -> {
try {
return function.applyAsDouble(t); // depends on control dependency: [try], data = [none]
}
... |
public class class_name {
private static void softmax(double[] prob) {
double max = Double.NEGATIVE_INFINITY;
for (int i = 0; i < prob.length; i++) {
if (prob[i] > max) {
max = prob[i];
}
}
double Z = 0.0;
for (int i = 0; i < prob.length;... | public class class_name {
private static void softmax(double[] prob) {
double max = Double.NEGATIVE_INFINITY;
for (int i = 0; i < prob.length; i++) {
if (prob[i] > max) {
max = prob[i]; // depends on control dependency: [if], data = [none]
}
}
do... |
public class class_name {
private IDLProxyObject doSetFieldValue(String fullField, String field, Object value, Object object,
boolean useCache, Map<String, ReflectInfo> cachedFields) {
Field f;
// check cache
if (useCache) {
ReflectInfo info = cachedFields.get(fullF... | public class class_name {
private IDLProxyObject doSetFieldValue(String fullField, String field, Object value, Object object,
boolean useCache, Map<String, ReflectInfo> cachedFields) {
Field f;
// check cache
if (useCache) {
ReflectInfo info = cachedFields.get(fullF... |
public class class_name {
protected static URL normalizeToEndWithSlash(URL url) {
if(url.getPath().endsWith("/"))
return url;
// normalize
String q = url.getQuery();
q = q!=null?('?'+q):"";
try {
return new URL(url,url.getPath()+'/'+q);
} catch (... | public class class_name {
protected static URL normalizeToEndWithSlash(URL url) {
if(url.getPath().endsWith("/"))
return url;
// normalize
String q = url.getQuery();
q = q!=null?('?'+q):"";
try {
return new URL(url,url.getPath()+'/'+q); // depends on con... |
public class class_name {
@Override
public void alarm(DeployService2Impl<I> deploy, Result<I> result)
{
LifecycleState state = deploy.getState();
if (! state.isActive()) {
result.ok(deploy.get());
}
else if (deploy.isModifiedNow()) {
// baratine/801g
deploy.logModified(deploy... | public class class_name {
@Override
public void alarm(DeployService2Impl<I> deploy, Result<I> result)
{
LifecycleState state = deploy.getState();
if (! state.isActive()) {
result.ok(deploy.get()); // depends on control dependency: [if], data = [none]
}
else if (deploy.isModifiedNow()) {
... |
public class class_name {
private void processResource(final Group group, final Resource resource) {
final UriLocator uriLocator = locatorFactory.getInstance(resource.getUri());
if (uriLocator instanceof WildcardUriLocatorSupport) {
final WildcardStreamLocator wildcardStreamLocator = ((WildcardUriLocato... | public class class_name {
private void processResource(final Group group, final Resource resource) {
final UriLocator uriLocator = locatorFactory.getInstance(resource.getUri());
if (uriLocator instanceof WildcardUriLocatorSupport) {
final WildcardStreamLocator wildcardStreamLocator = ((WildcardUriLocato... |
public class class_name {
static final DocumentFragment createContent(Document doc, String text) {
// [#150] Text might hold XML content, which can be leniently identified by the presence
// of either < or & characters (other entities, like >, ", ' are not stricly XML content)
if (text ... | public class class_name {
static final DocumentFragment createContent(Document doc, String text) {
// [#150] Text might hold XML content, which can be leniently identified by the presence
// of either < or & characters (other entities, like >, ", ' are not stricly XML content)
if (text ... |
public class class_name {
protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = ... | public class class_name {
protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = ... |
public class class_name {
public void map(final UserResource user, final Principal p,
final Credential credential) {
user.setUserName(p.getId());
if (credential instanceof UsernamePasswordCredential) {
user.setPassword(UsernamePasswordCredential.class.cast(credential).ge... | public class class_name {
public void map(final UserResource user, final Principal p,
final Credential credential) {
user.setUserName(p.getId());
if (credential instanceof UsernamePasswordCredential) {
user.setPassword(UsernamePasswordCredential.class.cast(credential).ge... |
public class class_name {
private JSONArray executeStatementToJson(
PreparedStatement stmt,
List<SelectedColumn> selectFields) throws Exception {
//logger.info("about to execute: " + stmt.toString());
if( stmt.execute() ) {
// There's a ResultSet to be had
ResultSet rs = stmt.getResultSet();
JSONAr... | public class class_name {
private JSONArray executeStatementToJson(
PreparedStatement stmt,
List<SelectedColumn> selectFields) throws Exception {
//logger.info("about to execute: " + stmt.toString());
if( stmt.execute() ) {
// There's a ResultSet to be had
ResultSet rs = stmt.getResultSet();
JSONAr... |
public class class_name {
public String get(byte b) {
Object o = m_infos.get(key(b));
String o2 = null;
if (m_bookInfos != null)
o2 = m_bookInfos.get(b);
if ((o == null) && (o2 == null))
return null;
else {
String ret = "";
if (o != null) {
ret += (String)o;
if (o2 != null)
... | public class class_name {
public String get(byte b) {
Object o = m_infos.get(key(b));
String o2 = null;
if (m_bookInfos != null)
o2 = m_bookInfos.get(b);
if ((o == null) && (o2 == null))
return null;
else {
String ret = "";
if (o != null) {
ret += (String)o;
// depends on control d... |
public class class_name {
public ValidationResult validate(X509Certificate[] certChain) {
certChainSanityChecks(certChain);
String certFingerprint = null;
try {
certFingerprint = FingerprintHelper
.getFingerprint(certChain[certChain.length - 1]);
} catch (Throwable t) {
String ... | public class class_name {
public ValidationResult validate(X509Certificate[] certChain) {
certChainSanityChecks(certChain);
String certFingerprint = null;
try {
certFingerprint = FingerprintHelper
.getFingerprint(certChain[certChain.length - 1]); // depends on control dependency: [try], da... |
public class class_name {
public Proxy setPort( int port )
{
if ( this.port == port )
{
return this;
}
return new Proxy( type, host, port, auth );
} } | public class class_name {
public Proxy setPort( int port )
{
if ( this.port == port )
{
return this; // depends on control dependency: [if], data = [none]
}
return new Proxy( type, host, port, auth );
} } |
public class class_name {
@Override
public CommerceWishList fetchByPrimaryKey(Serializable primaryKey) {
Serializable serializable = entityCache.getResult(CommerceWishListModelImpl.ENTITY_CACHE_ENABLED,
CommerceWishListImpl.class, primaryKey);
if (serializable == nullModel) {
return null;
}
CommerceW... | public class class_name {
@Override
public CommerceWishList fetchByPrimaryKey(Serializable primaryKey) {
Serializable serializable = entityCache.getResult(CommerceWishListModelImpl.ENTITY_CACHE_ENABLED,
CommerceWishListImpl.class, primaryKey);
if (serializable == nullModel) {
return null; // depends on co... |
public class class_name {
public static List<LogLine> setConsumer(Consumer<LogLine> subscriber)
{
// Switch to the new subscriber
LOG_SUBSCRIBER = subscriber;
// If there are queued messages (if this is the first consumer to register) then we should take a copy for them
if (QUEUE != null)
{
List<LogLine... | public class class_name {
public static List<LogLine> setConsumer(Consumer<LogLine> subscriber)
{
// Switch to the new subscriber
LOG_SUBSCRIBER = subscriber;
// If there are queued messages (if this is the first consumer to register) then we should take a copy for them
if (QUEUE != null)
{
List<LogLine... |
public class class_name {
@Override
public String getBrowserVersion() {
if (wd != null) {
Capabilities capabilities = ((HasCapabilities) wd)
.getCapabilities();
if (capabilities != null) {
return capabilities.getVersion();
}
return null;
}
return null;
} } | public class class_name {
@Override
public String getBrowserVersion() {
if (wd != null) {
Capabilities capabilities = ((HasCapabilities) wd)
.getCapabilities();
if (capabilities != null) {
return capabilities.getVersion(); // depends on control dependency: [if], data = [none]
}
return null; // ... |
public class class_name {
@Override
public EClass getIfcSlippageConnectionCondition() {
if (ifcSlippageConnectionConditionEClass == null) {
ifcSlippageConnectionConditionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(606);
}
return ifcSlippageC... | public class class_name {
@Override
public EClass getIfcSlippageConnectionCondition() {
if (ifcSlippageConnectionConditionEClass == null) {
ifcSlippageConnectionConditionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(606);
// depends on control depe... |
public class class_name {
private synchronized void onContextReady(final ContextStatusPOJO contextStatus,
final boolean notifyClientOnNewActiveContext) {
assert ContextState.READY == contextStatus.getContextState();
final String contextID = contextStatus.getContextId(... | public class class_name {
private synchronized void onContextReady(final ContextStatusPOJO contextStatus,
final boolean notifyClientOnNewActiveContext) {
assert ContextState.READY == contextStatus.getContextState();
final String contextID = contextStatus.getContextId(... |
public class class_name {
public void adjustToParentHeight() {
Element tableElt = getElement();
Element wrapper = null;
Element scrollBody = null;
Element elt = tableElt.getParentElement();
while (elt != null) {
if (scrollBody == null) {
if (JQMCommon... | public class class_name {
public void adjustToParentHeight() {
Element tableElt = getElement();
Element wrapper = null;
Element scrollBody = null;
Element elt = tableElt.getParentElement();
while (elt != null) {
if (scrollBody == null) {
if (JQMCommon... |
public class class_name {
public static Object runGetter(Object object, Field field) throws IllegalAccessException, IllegalArgumentException,
InvocationTargetException
{
final Class<?> clazz = object.getClass();
final String fieldName = field.getName();
Map<String, Method> fieldMethodMap = MET... | public class class_name {
public static Object runGetter(Object object, Field field) throws IllegalAccessException, IllegalArgumentException,
InvocationTargetException
{
final Class<?> clazz = object.getClass();
final String fieldName = field.getName();
Map<String, Method> fieldMethodMap = MET... |
public class class_name {
public List<String> getPeers() {
final URI uri = createURI("/peers");
final HttpRequestBuilder httpRequestBuilder = RequestUtils
.getHttpRequestBuilder(null, null, RequestOptions.BLANK, "");
final HTTP.Response httpResponse = HTTP.getResponse(uri + ... | public class class_name {
public List<String> getPeers() {
final URI uri = createURI("/peers");
final HttpRequestBuilder httpRequestBuilder = RequestUtils
.getHttpRequestBuilder(null, null, RequestOptions.BLANK, "");
final HTTP.Response httpResponse = HTTP.getResponse(uri + ... |
public class class_name {
private void unhookFromTrigger(final T trigger) {
// Unhook from trigger
final TriggerListener triggerAdapter = triggersToTriggerAdapters.get(trigger);
trigger.removeTriggerListener(triggerAdapter);
// Check if trigger was added several times
if (!trig... | public class class_name {
private void unhookFromTrigger(final T trigger) {
// Unhook from trigger
final TriggerListener triggerAdapter = triggersToTriggerAdapters.get(trigger);
trigger.removeTriggerListener(triggerAdapter);
// Check if trigger was added several times
if (!trig... |
public class class_name {
public static String getChecksum(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig)
throws IOException, ResourceNotFoundException {
String checksum = null;
InputStream is = null;
boolean generatedBinaryResource = jawrConfig.getGeneratorRegistry().isGeneratedBinaryRe... | public class class_name {
public static String getChecksum(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig)
throws IOException, ResourceNotFoundException {
String checksum = null;
InputStream is = null;
boolean generatedBinaryResource = jawrConfig.getGeneratorRegistry().isGeneratedBinaryRe... |
public class class_name {
public void writeFields (Object object) {
Class type = object.getClass();
Object[] defaultValues = getDefaultValues(type);
OrderedMap<String, FieldMetadata> fields = getFields(type);
int i = 0;
for (FieldMetadata metadata : new OrderedMapValues<FieldMetadata>(fields)) {
... | public class class_name {
public void writeFields (Object object) {
Class type = object.getClass();
Object[] defaultValues = getDefaultValues(type);
OrderedMap<String, FieldMetadata> fields = getFields(type);
int i = 0;
for (FieldMetadata metadata : new OrderedMapValues<FieldMetadata>(fields)) {
... |
public class class_name {
protected void populateTasksByStealer(List<StealerBasedRebalanceTask> sbTaskList) {
// Setup mapping of stealers to work for this run.
for(StealerBasedRebalanceTask task: sbTaskList) {
if(task.getStealInfos().size() != 1) {
throw new VoldemortExcept... | public class class_name {
protected void populateTasksByStealer(List<StealerBasedRebalanceTask> sbTaskList) {
// Setup mapping of stealers to work for this run.
for(StealerBasedRebalanceTask task: sbTaskList) {
if(task.getStealInfos().size() != 1) {
throw new VoldemortExcept... |
public class class_name {
static Schema createPublicSchema(SqlgGraph sqlgGraph, Topology topology, String publicSchemaName) {
Schema schema = new Schema(topology, publicSchemaName);
if (!existPublicSchema(sqlgGraph)) {
schema.createSchemaOnDb();
}
schema.committed = false;
... | public class class_name {
static Schema createPublicSchema(SqlgGraph sqlgGraph, Topology topology, String publicSchemaName) {
Schema schema = new Schema(topology, publicSchemaName);
if (!existPublicSchema(sqlgGraph)) {
schema.createSchemaOnDb(); // depends on control dependency: [if], data ... |
public class class_name {
@Override
public IReactionSet initiate(IAtomContainerSet reactants, IAtomContainerSet agents) throws CDKException {
logger.debug("initiate reaction: SharingLonePairReaction");
if (reactants.getAtomContainerCount() != 1) {
throw new CDKException("SharingLonePa... | public class class_name {
@Override
public IReactionSet initiate(IAtomContainerSet reactants, IAtomContainerSet agents) throws CDKException {
logger.debug("initiate reaction: SharingLonePairReaction");
if (reactants.getAtomContainerCount() != 1) {
throw new CDKException("SharingLonePa... |
public class class_name {
public static void visitStatistics (@Nonnull final IStatisticsVisitorCallback aCallback)
{
ValueEnforcer.notNull (aCallback, "Callback");
// For all cache handler
ICommonsList <String> aHandlers = StatisticsManager.getAllCacheHandler ().getSorted (Comparator.naturalOrder ());
... | public class class_name {
public static void visitStatistics (@Nonnull final IStatisticsVisitorCallback aCallback)
{
ValueEnforcer.notNull (aCallback, "Callback");
// For all cache handler
ICommonsList <String> aHandlers = StatisticsManager.getAllCacheHandler ().getSorted (Comparator.naturalOrder ());
... |
public class class_name {
Reference getInitializingReferenceForConstants() {
int size = references.size();
for (int i = 0; i < size; i++) {
if (isInitializingDeclarationAt(i) || isInitializingAssignmentAt(i)) {
return references.get(i);
}
}
return null;
} } | public class class_name {
Reference getInitializingReferenceForConstants() {
int size = references.size();
for (int i = 0; i < size; i++) {
if (isInitializingDeclarationAt(i) || isInitializingAssignmentAt(i)) {
return references.get(i); // depends on control dependency: [if], data = [none]
... |
public class class_name {
public static void fire(final HasRenderedHandlers source) {
if (TYPE != null) {
RenderedEvent event = new RenderedEvent();
source.fireEvent(event);
}
} } | public class class_name {
public static void fire(final HasRenderedHandlers source) {
if (TYPE != null) {
RenderedEvent event = new RenderedEvent();
source.fireEvent(event); // depends on control dependency: [if], data = [none]
}
} } |
public class class_name {
@Override
public String getNamingContextId() {
boolean append = isAppendID();
if (!append) {
// Check if this is the top level name context
NamingContextable top = WebUtilities.getParentNamingContext(this);
if (top != null) {
// Not top context, so always append
append ... | public class class_name {
@Override
public String getNamingContextId() {
boolean append = isAppendID();
if (!append) {
// Check if this is the top level name context
NamingContextable top = WebUtilities.getParentNamingContext(this);
if (top != null) {
// Not top context, so always append
append ... |
public class class_name {
@Override
public void showShareDialog(final Activity context, final Entity entity, int options, final SocialNetworkShareListener socialNetworkListener, final ShareDialogListener dialogListener) {
shareDialogFactory.show(context, entity, socialNetworkListener, new ShareDialogListener() {
... | public class class_name {
@Override
public void showShareDialog(final Activity context, final Entity entity, int options, final SocialNetworkShareListener socialNetworkListener, final ShareDialogListener dialogListener) {
shareDialogFactory.show(context, entity, socialNetworkListener, new ShareDialogListener() {
... |
public class class_name {
@Override
public JSONObject handleEvent(SlackEvent event) throws ServiceException {
if (event.getCallbackId() != null && event.getCallbackId().indexOf('_') > 0 && event.getCallbackId().indexOf('/') > 0 && event.getTs() != null) {
Long instanceId = Long.parseLong(event.... | public class class_name {
@Override
public JSONObject handleEvent(SlackEvent event) throws ServiceException {
if (event.getCallbackId() != null && event.getCallbackId().indexOf('_') > 0 && event.getCallbackId().indexOf('/') > 0 && event.getTs() != null) {
Long instanceId = Long.parseLong(event.... |
public class class_name {
protected void doExport() {
// Get archive
final Archive<?> archive = getArchive();
if (log.isLoggable(Level.FINE)) {
log.fine("Exporting archive - " + archive.getName());
}
// Obtain the root
final Node rootNode = archive.get(Archi... | public class class_name {
protected void doExport() {
// Get archive
final Archive<?> archive = getArchive();
if (log.isLoggable(Level.FINE)) {
log.fine("Exporting archive - " + archive.getName()); // depends on control dependency: [if], data = [none]
}
// Obtain th... |
public class class_name {
static public double rastrigin(double[] x) {
double sum = 0.0;
for (int i = 0; i < x.length; i++) {
sum += (x[i] * x[i]) - (10.0 * Math.cos(PIx2 * x[i])) + 10.0;
}
return (sum);
} } | public class class_name {
static public double rastrigin(double[] x) {
double sum = 0.0;
for (int i = 0; i < x.length; i++) {
sum += (x[i] * x[i]) - (10.0 * Math.cos(PIx2 * x[i])) + 10.0; // depends on control dependency: [for], data = [i]
}
return (sum);
} } |
public class class_name {
static boolean isMatchSymbol(final Symbol symbol) {
if (!(symbol instanceof BasisSymbol)) {
return false;
}
BasisSymbol basisSymbol = (BasisSymbol) symbol;
Set<Symbol> uniqueSymbols = new HashSet<Symbol>();
for (Object o : basisSymbol.getSym... | public class class_name {
static boolean isMatchSymbol(final Symbol symbol) {
if (!(symbol instanceof BasisSymbol)) {
return false; // depends on control dependency: [if], data = [none]
}
BasisSymbol basisSymbol = (BasisSymbol) symbol;
Set<Symbol> uniqueSymbols = new HashSet... |
public class class_name {
public long padData(File inFile, File outFile, File padFile, long offset) {
RandomAccessFile raf = null;
InputStream is = null;
OutputStream os = null;
try {
raf = new RandomAccessFile(padFile, zeroFill ? "rw" : "r");
raf.seek(offset);
is = new BufferedInputStream(new FileIn... | public class class_name {
public long padData(File inFile, File outFile, File padFile, long offset) {
RandomAccessFile raf = null;
InputStream is = null;
OutputStream os = null;
try {
raf = new RandomAccessFile(padFile, zeroFill ? "rw" : "r"); // depends on control dependency: [try], data = [none]
raf.se... |
public class class_name {
@Override
public void clearCached(ICacheManager mgr) {
Map<String, CacheEntry> moduleBuilds;
synchronized (this) {
moduleBuilds = _moduleBuilds;
_moduleBuilds = null;
}
if (moduleBuilds != null) {
for (Map.Entry<String, CacheEntry> entry : moduleBuilds.entrySet()) {
... | public class class_name {
@Override
public void clearCached(ICacheManager mgr) {
Map<String, CacheEntry> moduleBuilds;
synchronized (this) {
moduleBuilds = _moduleBuilds;
_moduleBuilds = null;
}
if (moduleBuilds != null) {
for (Map.Entry<String, CacheEntry> entry : moduleBuilds.entrySet()) {
... |
public class class_name {
public static int[][] validate2x2NonNegative(int[][] data, String paramName){
for(int[] part : data)
validateNonNegative(part, paramName);
return validate2x2(data, paramName);
}
/**
* Reformats the input array to a 2x2 array.
*
* If the arr... | public class class_name {
public static int[][] validate2x2NonNegative(int[][] data, String paramName){
for(int[] part : data)
validateNonNegative(part, paramName);
return validate2x2(data, paramName);
}
/**
* Reformats the input array to a 2x2 array.
*
* If the arr... |
public class class_name {
public static <T extends Enum<T>> Option<T> get(Class<T> enumClass, String value) {
try {
return Option.some(Enum.valueOf(enumClass, value));
} catch (IllegalArgumentException iae) {
return Option.none();
}
} } | public class class_name {
public static <T extends Enum<T>> Option<T> get(Class<T> enumClass, String value) {
try {
return Option.some(Enum.valueOf(enumClass, value)); // depends on control dependency: [try], data = [none]
} catch (IllegalArgumentException iae) {
return Option.none();
} // depe... |
public class class_name {
public void removeScripType(ScriptType type) {
ScriptType scriptType = typeMap.remove(type.getName());
if (scriptType != null) {
getTreeModel().removeType(scriptType);
}
} } | public class class_name {
public void removeScripType(ScriptType type) {
ScriptType scriptType = typeMap.remove(type.getName());
if (scriptType != null) {
getTreeModel().removeType(scriptType);
// depends on control dependency: [if], data = [(scriptType]
}
} } |
public class class_name {
private long search_ml(int request_size)
throws IOException
{
Block best_candidate = null;
Block best_candidate_pred = null;
Block block = ql_heads[last_ql_index].first_block;
long block_addr;
boolean found = false;
Block prev_block = nu... | public class class_name {
private long search_ml(int request_size)
throws IOException
{
Block best_candidate = null;
Block best_candidate_pred = null;
Block block = ql_heads[last_ql_index].first_block;
long block_addr;
boolean found = false;
Block prev_block = nu... |
public class class_name {
private boolean isTableMarkedVolatile(Connection con) {
if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[IS_TABLE_MARKED_VOLATILE]... | public class class_name {
private boolean isTableMarkedVolatile(Connection con) {
if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[IS_TABLE_MARKED_VOLATILE]... |
public class class_name {
public void unmarkCompacting(Iterable<SSTableReader> unmark)
{
boolean isValid = cfstore.isValid();
if (!isValid)
{
// The CF has been dropped. We don't know if the original compaction suceeded or failed,
// which makes it difficult to know... | public class class_name {
public void unmarkCompacting(Iterable<SSTableReader> unmark)
{
boolean isValid = cfstore.isValid();
if (!isValid)
{
// The CF has been dropped. We don't know if the original compaction suceeded or failed,
// which makes it difficult to know... |
public class class_name {
public static void closeAndSwallowIOExceptions(Closeable c) {
if (c == null) { return; }
try {
c.close();
} catch (IOException e) {
LOG.warn("Encountered exception closing closeable", e);
}
} } | public class class_name {
public static void closeAndSwallowIOExceptions(Closeable c) {
if (c == null) { return; } // depends on control dependency: [if], data = [none]
try {
c.close(); // depends on control dependency: [try], data = [none]
} catch (IOException e) {
LOG.warn("Encountered except... |
public class class_name {
@Inject
public void setSamplerConfiguration(@Nullable Configuration.SamplerConfiguration samplerConfiguration) {
if (samplerConfiguration != null) {
configuration.withSampler(samplerConfiguration);
}
} } | public class class_name {
@Inject
public void setSamplerConfiguration(@Nullable Configuration.SamplerConfiguration samplerConfiguration) {
if (samplerConfiguration != null) {
configuration.withSampler(samplerConfiguration); // depends on control dependency: [if], data = [(samplerConfiguration]
... |
public class class_name {
public static long getSnapshotRecordingId(final CountersReader counters, final int counterId, final int serviceId)
{
final DirectBuffer buffer = counters.metaDataBuffer();
if (counters.getCounterState(counterId) == RECORD_ALLOCATED)
{
final int recordO... | public class class_name {
public static long getSnapshotRecordingId(final CountersReader counters, final int counterId, final int serviceId)
{
final DirectBuffer buffer = counters.metaDataBuffer();
if (counters.getCounterState(counterId) == RECORD_ALLOCATED)
{
final int recordO... |
public class class_name {
public java.util.List<String> getIds() {
if (ids == null) {
ids = new com.amazonaws.internal.SdkInternalList<String>();
}
return ids;
} } | public class class_name {
public java.util.List<String> getIds() {
if (ids == null) {
ids = new com.amazonaws.internal.SdkInternalList<String>(); // depends on control dependency: [if], data = [none]
}
return ids;
} } |
public class class_name {
public boolean isSet() {
if (isUsageMode()) {
return true;
}
if (getJobFile() != null) {
return true;
}
if (getListType() != null) {
return true;
}
return false;
} } | public class class_name {
public boolean isSet() {
if (isUsageMode()) {
return true; // depends on control dependency: [if], data = [none]
}
if (getJobFile() != null) {
return true; // depends on control dependency: [if], data = [none]
}
if (getListType()... |
public class class_name {
public static String format(Object obj, String mask, double round) {
if (obj == null) {
return "";
}
if (obj instanceof Date) {
return formatDate((Date) obj, mask);
}
if (obj instanceof Number) {
return ... | public class class_name {
public static String format(Object obj, String mask, double round) {
if (obj == null) {
return "";
// depends on control dependency: [if], data = [none]
}
if (obj instanceof Date) {
return formatDate((Date) obj, mask);
// depends on co... |
public class class_name {
private void loginUser(final String userId, final String password, final BooleanCallback callback) {
LoginRequest request = new LoginRequest();
request.setLogin(userId);
request.setPassword(password);
GwtCommand command = new GwtCommand(loginCommandName);
command.setCommandRequest(r... | public class class_name {
private void loginUser(final String userId, final String password, final BooleanCallback callback) {
LoginRequest request = new LoginRequest();
request.setLogin(userId);
request.setPassword(password);
GwtCommand command = new GwtCommand(loginCommandName);
command.setCommandRequest(r... |
public class class_name {
@NotNull
public Set<String> getNormalForms(@NotNull String word, @NotNull Language language) {
com.fnklabs.metrics.Timer timer = MetricsFactory.getMetrics().getTimer(MetricsType.TEXT_UTILS_GET_NORMAL_FORMS.name());
Set<String> normalForms = new HashSet<>();
try {... | public class class_name {
@NotNull
public Set<String> getNormalForms(@NotNull String word, @NotNull Language language) {
com.fnklabs.metrics.Timer timer = MetricsFactory.getMetrics().getTimer(MetricsType.TEXT_UTILS_GET_NORMAL_FORMS.name());
Set<String> normalForms = new HashSet<>();
try {... |
public class class_name {
protected Collection createCollectionPath(String collectionPath, Collection rootCollection) throws PolicyIndexException {
try {
if (rootCollection.getParentCollection() != null) {
throw new PolicyIndexException("Collection supplied is not a root collection... | public class class_name {
protected Collection createCollectionPath(String collectionPath, Collection rootCollection) throws PolicyIndexException {
try {
if (rootCollection.getParentCollection() != null) {
throw new PolicyIndexException("Collection supplied is not a root collection... |
public class class_name {
protected final void notifyConnectionError(final Exception exception) {
if (!isConnected()) {
LOGGER.log(Level.INFO, "Connection was already disconnected when attempting to handle " + exception,
exception);
return;
}
... | public class class_name {
protected final void notifyConnectionError(final Exception exception) {
if (!isConnected()) {
LOGGER.log(Level.INFO, "Connection was already disconnected when attempting to handle " + exception,
exception); // depends on control dependency: [if]... |
public class class_name {
@Override
public Clustering<MeanModel> run(Database database, Relation<V> relation) {
// Database objects to process
final DBIDs ids = relation.getDBIDs();
// Choose initial means
double[][] means = initializer.chooseInitialMeans(database, relation, k, getDistanceFunction())... | public class class_name {
@Override
public Clustering<MeanModel> run(Database database, Relation<V> relation) {
// Database objects to process
final DBIDs ids = relation.getDBIDs();
// Choose initial means
double[][] means = initializer.chooseInitialMeans(database, relation, k, getDistanceFunction())... |
public class class_name {
public org.modeshape.jcr.api.Problems backupRepository( File backupDirectory, BackupOptions options ) throws RepositoryException {
// Create the activity ...
final BackupActivity backupActivity = createBackupActivity(backupDirectory, options);
//suspend any existing t... | public class class_name {
public org.modeshape.jcr.api.Problems backupRepository( File backupDirectory, BackupOptions options ) throws RepositoryException {
// Create the activity ...
final BackupActivity backupActivity = createBackupActivity(backupDirectory, options);
//suspend any existing t... |
public class class_name {
public I_CmsResourceType getResourceType() {
if (m_resourceType == null) {
m_resourceType = OpenCms.getResourceManager().getResourceType(m_resource);
}
return m_resourceType;
} } | public class class_name {
public I_CmsResourceType getResourceType() {
if (m_resourceType == null) {
m_resourceType = OpenCms.getResourceManager().getResourceType(m_resource); // depends on control dependency: [if], data = [none]
}
return m_resourceType;
} } |
public class class_name {
private static WildcardType canonicalizeWildcardType(
TypeVariable<?> declaration, WildcardType type) {
Type[] declared = declaration.getBounds();
List<Type> upperBounds = new ArrayList<>();
for (Type bound : type.getUpperBounds()) {
if (!any(declared).isSubtypeOf(boun... | public class class_name {
private static WildcardType canonicalizeWildcardType(
TypeVariable<?> declaration, WildcardType type) {
Type[] declared = declaration.getBounds();
List<Type> upperBounds = new ArrayList<>();
for (Type bound : type.getUpperBounds()) {
if (!any(declared).isSubtypeOf(boun... |
public class class_name {
public JvmIdentifiableElement getVisibleType(JvmMember context, String name) {
if (context == null)
return null;
Map<String, JvmIdentifiableElement> map = visibleElements.get(context);
if (map == null) {
map = create(context);
}
return map.get(name);
} } | public class class_name {
public JvmIdentifiableElement getVisibleType(JvmMember context, String name) {
if (context == null)
return null;
Map<String, JvmIdentifiableElement> map = visibleElements.get(context);
if (map == null) {
map = create(context); // depends on control dependency: [if], data = [none]
... |
public class class_name {
@Override
public org.apache.spark.unsafe.KVIterator<UnsafeRow, UnsafeRow> rowIterator() {
return new org.apache.spark.unsafe.KVIterator<UnsafeRow, UnsafeRow>() {
private final UnsafeRow key = new UnsafeRow(keySchema.length());
private final UnsafeRow value = new UnsafeRow(va... | public class class_name {
@Override
public org.apache.spark.unsafe.KVIterator<UnsafeRow, UnsafeRow> rowIterator() {
return new org.apache.spark.unsafe.KVIterator<UnsafeRow, UnsafeRow>() {
private final UnsafeRow key = new UnsafeRow(keySchema.length());
private final UnsafeRow value = new UnsafeRow(va... |
public class class_name {
public final ZMonitor verbose(boolean verbose)
{
if (started) {
System.out.println("ZMonitor: Unable to change verbosity while already started.");
return this;
}
agent.send(VERBOSE, true);
agent.send(Boolean.toString(verbose));
... | public class class_name {
public final ZMonitor verbose(boolean verbose)
{
if (started) {
System.out.println("ZMonitor: Unable to change verbosity while already started."); // depends on control dependency: [if], data = [none]
return this; // depends on control dependency: [if], dat... |
public class class_name {
protected ViewPropertyAnimatorCompat animateMoveImpl(final ViewHolder holder, int fromX, int fromY, int toX, int toY) {
final View view = holder.itemView;
final int deltaX = toX - fromX;
final int deltaY = toY - fromY;
ViewCompat.animate(view).cancel();
... | public class class_name {
protected ViewPropertyAnimatorCompat animateMoveImpl(final ViewHolder holder, int fromX, int fromY, int toX, int toY) {
final View view = holder.itemView;
final int deltaX = toX - fromX;
final int deltaY = toY - fromY;
ViewCompat.animate(view).cancel();
... |
public class class_name {
public List<String> getAllKeys(final int limit) {
final List<String> keyList = new ArrayList<String>(limit);
byte[] array = new byte[EVCacheConfig.getInstance().getDynamicIntProperty(appName + ".all.keys.reader.buffer.size.bytes", 4*1024*1024).get()];
final int waitInS... | public class class_name {
public List<String> getAllKeys(final int limit) {
final List<String> keyList = new ArrayList<String>(limit);
byte[] array = new byte[EVCacheConfig.getInstance().getDynamicIntProperty(appName + ".all.keys.reader.buffer.size.bytes", 4*1024*1024).get()];
final int waitInS... |
public class class_name {
public String buildUrl() {
StringBuilder sb = new StringBuilder();
boolean includePort = true;
if (null != scheme) {
sb.append(scheme).append("://");
includePort = (port != (scheme.equals("http") ? 80 : 443));
}
if (null != serverName) {
sb.append(serverN... | public class class_name {
public String buildUrl() {
StringBuilder sb = new StringBuilder();
boolean includePort = true;
if (null != scheme) {
sb.append(scheme).append("://");
includePort = (port != (scheme.equals("http") ? 80 : 443)); // depends on control dependency: [if], data = [scheme)]
... |
public class class_name {
public void exportData(CmsExportParameters parameters) throws CmsImportExportException {
m_parameters = parameters;
m_exportCount = 0;
// clear all caches
getReport().println(Messages.get().container(Messages.RPT_CLEARCACHE_0), I_CmsReport.FORMAT_NOTE);
... | public class class_name {
public void exportData(CmsExportParameters parameters) throws CmsImportExportException {
m_parameters = parameters;
m_exportCount = 0;
// clear all caches
getReport().println(Messages.get().container(Messages.RPT_CLEARCACHE_0), I_CmsReport.FORMAT_NOTE);
... |
public class class_name {
public Result run(Database db, Relation<O> relation) {
DistanceQuery<O> dq = db.getDistanceQuery(relation, getDistanceFunction());
ArrayDBIDs ids = DBIDUtil.ensureArray(relation.getDBIDs());
final int size = ids.size();
if(size > 0x10000) {
throw new AbortException("Thi... | public class class_name {
public Result run(Database db, Relation<O> relation) {
DistanceQuery<O> dq = db.getDistanceQuery(relation, getDistanceFunction());
ArrayDBIDs ids = DBIDUtil.ensureArray(relation.getDBIDs());
final int size = ids.size();
if(size > 0x10000) {
throw new AbortException("Thi... |
public class class_name {
public static String compressNumber(String value, CompressionLevel compressionLevel) {
value = value.replaceAll("([0-9])0+$", "$1");
if (compressionLevel.equals(CompressionLevel.NORMAL)) {
value = value.replaceAll("\\.0+$", ".0");
} else if (compressionLevel.equals(Compressi... | public class class_name {
public static String compressNumber(String value, CompressionLevel compressionLevel) {
value = value.replaceAll("([0-9])0+$", "$1");
if (compressionLevel.equals(CompressionLevel.NORMAL)) {
value = value.replaceAll("\\.0+$", ".0"); // depends on control dependency: [if], data = [... |
public class class_name {
public static long sum( InterleavedS64 img ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.sum(img);
} else {
return ImplImageStatistics.sum(img);
}
} } | public class class_name {
public static long sum( InterleavedS64 img ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.sum(img); // depends on control dependency: [if], data = [none]
} else {
return ImplImageStatistics.sum(img); // depends on control dependency: [if], data = [none]
... |
public class class_name {
public static String expand(String filename) {
if (filename.startsWith("~" + File.separator)) {
try {
String home = System.getProperty("user.home");
if (home != null) {
return home + filename.substring(1);
}
} catch (SecurityException e) {
... | public class class_name {
public static String expand(String filename) {
if (filename.startsWith("~" + File.separator)) {
try {
String home = System.getProperty("user.home");
if (home != null) {
return home + filename.substring(1); // depends on control dependency: [if], data = [non... |
public class class_name {
public static int charAt(CharSequence source, int offset16) {
char single = source.charAt(offset16);
if (single < UTF16.LEAD_SURROGATE_MIN_VALUE) {
return single;
}
return _charAt(source, offset16, single);
} } | public class class_name {
public static int charAt(CharSequence source, int offset16) {
char single = source.charAt(offset16);
if (single < UTF16.LEAD_SURROGATE_MIN_VALUE) {
return single; // depends on control dependency: [if], data = [none]
}
return _charAt(source, offset1... |
public class class_name {
private IOException checkRequest(long numBytes, boolean async) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "checkRequest");
}
IOException exception = null;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugE... | public class class_name {
private IOException checkRequest(long numBytes, boolean async) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "checkRequest"); // depends on control dependency: [if], data = [none]
}
IOException exception = null;
i... |
public class class_name {
public void setUnprocessedNamedQueryIds(java.util.Collection<UnprocessedNamedQueryId> unprocessedNamedQueryIds) {
if (unprocessedNamedQueryIds == null) {
this.unprocessedNamedQueryIds = null;
return;
}
this.unprocessedNamedQueryIds = new java.u... | public class class_name {
public void setUnprocessedNamedQueryIds(java.util.Collection<UnprocessedNamedQueryId> unprocessedNamedQueryIds) {
if (unprocessedNamedQueryIds == null) {
this.unprocessedNamedQueryIds = null; // depends on control dependency: [if], data = [none]
return; // depe... |
public class class_name {
private static float[] arcToBeziers(double angleStart, double angleExtent)
{
int numSegments = (int) Math.ceil(Math.abs(angleExtent) * 2.0 / Math.PI); // (angleExtent / 90deg)
double angleIncrement = angleExtent / numSegments;
// The length of each con... | public class class_name {
private static float[] arcToBeziers(double angleStart, double angleExtent)
{
int numSegments = (int) Math.ceil(Math.abs(angleExtent) * 2.0 / Math.PI); // (angleExtent / 90deg)
double angleIncrement = angleExtent / numSegments;
// The length of each con... |
public class class_name {
void createTable() {
Connection con = null;
java.sql.Statement s = null;
//PK55900 We can pass in true to the getConnection method since this method,
//createTable, is only called from the initDBSettings method.
con = getConnection(true);
if (c... | public class class_name {
void createTable() {
Connection con = null;
java.sql.Statement s = null;
//PK55900 We can pass in true to the getConnection method since this method,
//createTable, is only called from the initDBSettings method.
con = getConnection(true);
if (c... |
public class class_name {
public void addAutoLoginHandler()
{
this.getMainRecord().addListener(new FileListener(null)
{
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
{ // Return an error to stop the change
int iErrorCod... | public class class_name {
public void addAutoLoginHandler()
{
this.getMainRecord().addListener(new FileListener(null)
{
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
{ // Return an error to stop the change
int iErrorCod... |
public class class_name {
public static int byteSizeOf(Bitmap bitmap) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return bitmap.getAllocationByteCount();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
return bitmap.getByteCount();
... | public class class_name {
public static int byteSizeOf(Bitmap bitmap) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return bitmap.getAllocationByteCount(); // depends on control dependency: [if], data = [none]
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_... |
public class class_name {
private void addSlaveJulLogRecords(Container result, List<java.util.concurrent.Callable<List<FileContent>>> tasks, final Node node, final SmartLogFetcher logFetcher) {
final FilePath rootPath = node.getRootPath();
if (rootPath != null) {
// rotated log files stored... | public class class_name {
private void addSlaveJulLogRecords(Container result, List<java.util.concurrent.Callable<List<FileContent>>> tasks, final Node node, final SmartLogFetcher logFetcher) {
final FilePath rootPath = node.getRootPath();
if (rootPath != null) {
// rotated log files stored... |
public class class_name {
public void flushDataStoreEvents() {
DataStoreEvent e;
switch(currentDataStoreEventType){
case INSERT:
e = DataStoreEvent.insertionEvent(dataStoreObjects);
break;
case REMOVE:
e = DataStoreEvent.removalEvent(dataStoreObjects);
break;
case UPDATE:
... | public class class_name {
public void flushDataStoreEvents() {
DataStoreEvent e;
switch(currentDataStoreEventType){
case INSERT:
e = DataStoreEvent.insertionEvent(dataStoreObjects);
break;
case REMOVE:
e = DataStoreEvent.removalEvent(dataStoreObjects);
break;
case UPDATE:
... |
public class class_name {
@Override
public void addResponse(Response response) {
logger.warn("Security response " + response.getAction() + " triggered for user: " + response.getUser().getUsername());
Point.Builder builder = Point.measurement(Utils.RESPONSES)
.time(DateUtils.fromString(response.getTi... | public class class_name {
@Override
public void addResponse(Response response) {
logger.warn("Security response " + response.getAction() + " triggered for user: " + response.getUser().getUsername());
Point.Builder builder = Point.measurement(Utils.RESPONSES)
.time(DateUtils.fromString(response.getTi... |
public class class_name {
public void write(Object object, Object value) {
if(object == null) {
String msg = "Can not update the identifier \"" + _identifier + "\" on a null value object.";
LOGGER.error(msg);
throw new RuntimeException(msg);
}
if(TRACE_ENABL... | public class class_name {
public void write(Object object, Object value) {
if(object == null) {
String msg = "Can not update the identifier \"" + _identifier + "\" on a null value object."; // depends on control dependency: [if], data = [none]
LOGGER.error(msg); // depends on control de... |
public class class_name {
protected Class recompile(URL source, String className, Class oldClass) throws CompilationFailedException, IOException {
if (source != null) {
// found a source, compile it if newer
if ((oldClass != null && isSourceNewer(source, oldClass)) || (oldClass == null)... | public class class_name {
protected Class recompile(URL source, String className, Class oldClass) throws CompilationFailedException, IOException {
if (source != null) {
// found a source, compile it if newer
if ((oldClass != null && isSourceNewer(source, oldClass)) || (oldClass == null)... |
public class class_name {
protected Expression mapExpression(AST mapNode) {
List expressions = new ArrayList();
AST elist = mapNode.getFirstChild();
if (elist != null) { // totally empty in the case of [:]
assertNodeType(ELIST, elist);
for (AST node = elist.getFirstChil... | public class class_name {
protected Expression mapExpression(AST mapNode) {
List expressions = new ArrayList();
AST elist = mapNode.getFirstChild();
if (elist != null) { // totally empty in the case of [:]
assertNodeType(ELIST, elist); // depends on control dependency: [if], data =... |
public class class_name {
static void save(KAFDocument kaf, String filename) {
try {
File file = new File(filename);
Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF8"));
out.write(kafToStr(kaf));
out.flush();
} catch (Exception e) {
System.out.println(... | public class class_name {
static void save(KAFDocument kaf, String filename) {
try {
File file = new File(filename);
Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF8"));
out.write(kafToStr(kaf)); // depends on control dependency: [try], data = [none]
out.flu... |
public class class_name {
public Session currentSession() throws HibernateException {
SessionHolder sessionHolder = SessionUtils.currentSession(this.sessionFactory);
Session session = sessionHolder.getSession();
// TODO what time enter into the code?
if (TransactionSynchronizationManager.isSynchronizat... | public class class_name {
public Session currentSession() throws HibernateException {
SessionHolder sessionHolder = SessionUtils.currentSession(this.sessionFactory);
Session session = sessionHolder.getSession();
// TODO what time enter into the code?
if (TransactionSynchronizationManager.isSynchronizat... |
public class class_name {
public JMFMessage copy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "copy");
JMFMessage copy;
synchronized (getMessageLockArtefact()) {
if (map == null) {
// If there is no map, then this is already become just a delegat... | public class class_name {
public JMFMessage copy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "copy");
JMFMessage copy;
synchronized (getMessageLockArtefact()) {
if (map == null) {
// If there is no map, then this is already become just a delegat... |
public class class_name {
private final void push() {
if (ptr >= stack.length) {
// doubling here is probably overkill, but anything that needs to double more than
// once (32 levels deep) is very atypical anyway.
byte[] newstack = new byte[stack.length<<1];
System.arraycopy(stack,0,newstac... | public class class_name {
private final void push() {
if (ptr >= stack.length) {
// doubling here is probably overkill, but anything that needs to double more than
// once (32 levels deep) is very atypical anyway.
byte[] newstack = new byte[stack.length<<1];
System.arraycopy(stack,0,newstac... |
public class class_name {
public static final <T> T dropTableIfExists(
JdbcOperations jdbcOperations,
final String table,
final Function<JdbcOperations, T> preDropCallback) {
LOGGER.info("Dropping table: " + table);
final boolean tableExists = doesTableExist(jdbcOpe... | public class class_name {
public static final <T> T dropTableIfExists(
JdbcOperations jdbcOperations,
final String table,
final Function<JdbcOperations, T> preDropCallback) {
LOGGER.info("Dropping table: " + table);
final boolean tableExists = doesTableExist(jdbcOpe... |
public class class_name {
@Override
public void notificationReady(final CTInAppNotification inAppNotification){
if(Looper.myLooper() != Looper.getMainLooper()){
getHandlerUsingMainLooper().post(new Runnable() {
@Override
public void run() {
no... | public class class_name {
@Override
public void notificationReady(final CTInAppNotification inAppNotification){
if(Looper.myLooper() != Looper.getMainLooper()){
getHandlerUsingMainLooper().post(new Runnable() {
@Override
public void run() {
no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.