code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
private static void unpackFile(InputStream in, File file) {
byte[] buffer = new byte[4096];
try {
OutputStream out = new FileOutputStream(file);
int read;
while ((read = in.read(buffer)) != -1) {
out.write(buffer, 0, read);
... | public class class_name {
private static void unpackFile(InputStream in, File file) {
byte[] buffer = new byte[4096];
try {
OutputStream out = new FileOutputStream(file);
int read;
while ((read = in.read(buffer)) != -1) {
out.write(buffer, 0, read); ... |
public class class_name {
protected static boolean getBooleanProperty(TreeLogger logger, PropertyOracle propertyOracle, String propertyName,
boolean defaultValue) {
try {
SelectionProperty prop = propertyOracle.getSelectionProperty(logger, propertyNam... | public class class_name {
protected static boolean getBooleanProperty(TreeLogger logger, PropertyOracle propertyOracle, String propertyName,
boolean defaultValue) {
try {
SelectionProperty prop = propertyOracle.getSelectionProperty(logger, propertyNam... |
public class class_name {
private static void setMetaStoreURI(
Configuration conf, Map<String, String> match) {
try {
// If the host is set, construct a new MetaStore URI and set the property
// in the Configuration. Otherwise, do not change the MetaStore URI.
String host = match.get(URIPat... | public class class_name {
private static void setMetaStoreURI(
Configuration conf, Map<String, String> match) {
try {
// If the host is set, construct a new MetaStore URI and set the property
// in the Configuration. Otherwise, do not change the MetaStore URI.
String host = match.get(URIPat... |
public class class_name {
static OcAgentTraceServiceExportRpcHandler create(TraceServiceStub stub) {
OcAgentTraceServiceExportRpcHandler exportRpcHandler =
new OcAgentTraceServiceExportRpcHandler();
ExportResponseObserver exportResponseObserver = new ExportResponseObserver(exportRpcHandler);
try {
... | public class class_name {
static OcAgentTraceServiceExportRpcHandler create(TraceServiceStub stub) {
OcAgentTraceServiceExportRpcHandler exportRpcHandler =
new OcAgentTraceServiceExportRpcHandler();
ExportResponseObserver exportResponseObserver = new ExportResponseObserver(exportRpcHandler);
try {
... |
public class class_name {
private static int getStyle(TextStyle style)
{
final int value;
if (TextStyle.NORMAL == style)
{
value = Font.TRUETYPE_FONT;
}
else if (TextStyle.BOLD == style)
{
value = Font.BOLD;
}
else if (TextStyl... | public class class_name {
private static int getStyle(TextStyle style)
{
final int value;
if (TextStyle.NORMAL == style)
{
value = Font.TRUETYPE_FONT; // depends on control dependency: [if], data = [none]
}
else if (TextStyle.BOLD == style)
{
... |
public class class_name {
public static void registerSubscription(Subscription subscription) {
mSubscriptions.add(subscription);
if (isConnected()) {
executeQuery(subscription.getQuery());
}
} } | public class class_name {
public static void registerSubscription(Subscription subscription) {
mSubscriptions.add(subscription);
if (isConnected()) {
executeQuery(subscription.getQuery()); // depends on control dependency: [if], data = [none]
}
} } |
public class class_name {
public Vector3f orthogonalize(Vector3fc v, Vector3f dest) {
/*
* http://lolengine.net/blog/2013/09/21/picking-orthogonal-vector-combing-coconuts
*/
float rx, ry, rz;
if (Math.abs(v.x()) > Math.abs(v.z())) {
rx = -v.y();
ry = v.... | public class class_name {
public Vector3f orthogonalize(Vector3fc v, Vector3f dest) {
/*
* http://lolengine.net/blog/2013/09/21/picking-orthogonal-vector-combing-coconuts
*/
float rx, ry, rz;
if (Math.abs(v.x()) > Math.abs(v.z())) {
rx = -v.y(); // depends on contr... |
public class class_name {
private void updateServiceLocalCache() {
try {
LOG.info("Update local cache now...");
zkClient.getChildren(NaviCommonConstant.ZOOKEEPER_BASE_PATH);
LOG.info("Zookeeper global root path is " + NaviCommonConstant.ZOOKEEPER_BASE_PATH);
... | public class class_name {
private void updateServiceLocalCache() {
try {
LOG.info("Update local cache now...");
// depends on control dependency: [try], data = [none]
zkClient.getChildren(NaviCommonConstant.ZOOKEEPER_BASE_PATH);
// depends on control dependency: [try], data = [none]... |
public class class_name {
public static Object createOptional(final Object value) {
if ((OPTIONAL_CLASS == null) || (OFNULLABLE == null)) {
throw new IllegalStateException("Unreachable Code executed. You just found a bug. Please report!");
}
try {
return OFNULLABLE.invok... | public class class_name {
public static Object createOptional(final Object value) {
if ((OPTIONAL_CLASS == null) || (OFNULLABLE == null)) {
throw new IllegalStateException("Unreachable Code executed. You just found a bug. Please report!");
}
try {
return OFNULLABLE.invok... |
public class class_name {
public final static String getDefaultType() {
String cstype;
cstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
public String run() {
return Security.getProperty(CERTSTORE_TYPE);
}
});
if (cstype == n... | public class class_name {
public final static String getDefaultType() {
String cstype;
cstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
public String run() {
return Security.getProperty(CERTSTORE_TYPE);
}
});
if (cstype == n... |
public class class_name {
protected String getSecurityName(String loginName, String urAuthenticatedId) throws EntryNotFoundException, RegistryException {
UserRegistry ur = getUserRegistry();
if (ur != null && ur.getType() != "CUSTOM") { // Preserve the existing behavior for CUSTOM user registries
... | public class class_name {
protected String getSecurityName(String loginName, String urAuthenticatedId) throws EntryNotFoundException, RegistryException {
UserRegistry ur = getUserRegistry();
if (ur != null && ur.getType() != "CUSTOM") { // Preserve the existing behavior for CUSTOM user registries
... |
public class class_name {
private Set<ModelDescription> scanBundleForModels(Bundle bundle) {
Set<ModelDescription> models = new HashSet<ModelDescription>();
if (!shouldSkipBundle(bundle)) {
models = loadModelsOfBundle(bundle);
}
return models;
} } | public class class_name {
private Set<ModelDescription> scanBundleForModels(Bundle bundle) {
Set<ModelDescription> models = new HashSet<ModelDescription>();
if (!shouldSkipBundle(bundle)) {
models = loadModelsOfBundle(bundle); // depends on control dependency: [if], data = [none]
}
... |
public class class_name {
public EEnum getIfcPlateTypeEnum() {
if (ifcPlateTypeEnumEEnum == null) {
ifcPlateTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(871);
}
return ifcPlateTypeEnumEEnum;
} } | public class class_name {
public EEnum getIfcPlateTypeEnum() {
if (ifcPlateTypeEnumEEnum == null) {
ifcPlateTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(871);
// depends on control dependency: [if], data = [none]
}
return ifcPlateTyp... |
public class class_name {
public <T> Iterable<T> sort( Class<T> componentClass, Iterable<T> iterable ) {
if (iterable instanceof List) {
sort((List) iterable);
return iterable;
}
if (iterable instanceof Collection) {
return sort(componentClass, (Collection... | public class class_name {
public <T> Iterable<T> sort( Class<T> componentClass, Iterable<T> iterable ) {
if (iterable instanceof List) {
sort((List) iterable); // depends on control dependency: [if], data = [none]
return iterable; // depends on control dependency: [if], data = [none]
... |
public class class_name {
private void doUpdateRO(final Collection<String> remove, final Collection<Document> add) throws IOException
{
SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Object>()
{
@SuppressWarnings("resource")
public Object run() throws Except... | public class class_name {
private void doUpdateRO(final Collection<String> remove, final Collection<Document> add) throws IOException
{
SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Object>()
{
@SuppressWarnings("resource")
public Object run() throws Except... |
public class class_name {
public void setPoolManagerRef(WsByteBufferPoolManagerImpl oManagerRef) {
this.oWsByteBufferPoolManager = oManagerRef;
this.trusted = oManagerRef.isTrustedUsers();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setPoolManag... | public class class_name {
public void setPoolManagerRef(WsByteBufferPoolManagerImpl oManagerRef) {
this.oWsByteBufferPoolManager = oManagerRef;
this.trusted = oManagerRef.isTrustedUsers();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setPoolManag... |
public class class_name {
private static void generateAllCombinations(
List<Filter> result,
List<Filter> andList,
List<Filter> nonAndList
)
{
List<Filter> children = ((AndFilter) andList.get(0)).getFilters();
if (result.isEmpty()) {
for (Filter child : children) {
List<Filte... | public class class_name {
private static void generateAllCombinations(
List<Filter> result,
List<Filter> andList,
List<Filter> nonAndList
)
{
List<Filter> children = ((AndFilter) andList.get(0)).getFilters();
if (result.isEmpty()) {
for (Filter child : children) {
List<Filte... |
public class class_name {
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
{ // Read a valid record
double dMainValue, dCurrentValue;
int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record
if (iErrorCode != DB... | public class class_name {
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
{ // Read a valid record
double dMainValue, dCurrentValue;
int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record
if (iErrorCode != DB... |
public class class_name {
public static void build(
final Key jobKey,
final Key modelKey,
final DRFParams drfParams,
final Data localData,
int ntrees,
int numSplitFeatures,
int[] rowsPerChunks) {
Timer t_alltrees = new Timer();
... | public class class_name {
public static void build(
final Key jobKey,
final Key modelKey,
final DRFParams drfParams,
final Data localData,
int ntrees,
int numSplitFeatures,
int[] rowsPerChunks) {
Timer t_alltrees = new Timer();
... |
public class class_name {
private int index() {
ElementImpl parent = (ElementImpl) getParent();
if (parent == null) {
return -1;
}
Node n = parent.node.getFirstChild();
int index = 0;
int twinsCount = 0;
boolean indexFound = false;
while (n != null) {
if (n == node) {
indexFound = ... | public class class_name {
private int index() {
ElementImpl parent = (ElementImpl) getParent();
if (parent == null) {
return -1;
// depends on control dependency: [if], data = [none]
}
Node n = parent.node.getFirstChild();
int index = 0;
int twinsCount = 0;
boolean indexFound = false;
while... |
public class class_name {
public void marshall(UpgradeAppliedSchemaRequest upgradeAppliedSchemaRequest, ProtocolMarshaller protocolMarshaller) {
if (upgradeAppliedSchemaRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | public class class_name {
public void marshall(UpgradeAppliedSchemaRequest upgradeAppliedSchemaRequest, ProtocolMarshaller protocolMarshaller) {
if (upgradeAppliedSchemaRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... |
public class class_name {
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException {
try {
String[] array = new String[]{token, timestamp, nonce, encrypt};
StringBuilder sb = new StringBuilder();
// 字符串排序
Arra... | public class class_name {
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException {
try {
String[] array = new String[]{token, timestamp, nonce, encrypt};
StringBuilder sb = new StringBuilder();
// 字符串排序
Arra... |
public class class_name {
private static boolean longLongCompareMagnitude(long hi0, long lo0, long hi1, long lo1) {
if(hi0!=hi1) {
return hi0<hi1;
}
return (lo0+Long.MIN_VALUE) <(lo1+Long.MIN_VALUE);
} } | public class class_name {
private static boolean longLongCompareMagnitude(long hi0, long lo0, long hi1, long lo1) {
if(hi0!=hi1) {
return hi0<hi1; // depends on control dependency: [if], data = [none]
}
return (lo0+Long.MIN_VALUE) <(lo1+Long.MIN_VALUE);
} } |
public class class_name {
public static Object getTarget(final Object proxy) {
if (!AopUtils.isAopProxy(proxy)) {
return proxy;
}
if (AopUtils.isJdkDynamicProxy(proxy)) {
return getProxyTargetObject(proxy, "h");
} else {
return getProxyTargetObject(pr... | public class class_name {
public static Object getTarget(final Object proxy) {
if (!AopUtils.isAopProxy(proxy)) {
return proxy; // depends on control dependency: [if], data = [none]
}
if (AopUtils.isJdkDynamicProxy(proxy)) {
return getProxyTargetObject(proxy, "h"); // de... |
public class class_name {
public int getMessageLength(){
if(this.identifierRegex == null){
return 1;
}
try {
return this.identifierRegex.getBytes("UTF-16BE").length + 1;
} catch (UnsupportedEncodingException e) {
log.error("Unable to decode UTF-16BE String: {}", e);
return 1;
}
} } | public class class_name {
public int getMessageLength(){
if(this.identifierRegex == null){
return 1; // depends on control dependency: [if], data = [none]
}
try {
return this.identifierRegex.getBytes("UTF-16BE").length + 1; // depends on control dependency: [try], data = [none]
} catch (UnsupportedEncodi... |
public class class_name {
@Override
public void expandStatements(final Document doc, final ProtoNetwork pn,
final boolean stmtExpand) {
final ProtoNetworkBuilder pnb = new ProtoNetworkBuilder(doc);
final ArrayList<ExpansionRule<Statement>> rules = sizedArrayList(2);
if (stmtExpa... | public class class_name {
@Override
public void expandStatements(final Document doc, final ProtoNetwork pn,
final boolean stmtExpand) {
final ProtoNetworkBuilder pnb = new ProtoNetworkBuilder(doc);
final ArrayList<ExpansionRule<Statement>> rules = sizedArrayList(2);
if (stmtExpa... |
public class class_name {
public void addAll( T[] array , int first , int length ) {
if( length <= 0 )
return;
Element<T> a = requestNew();
a.object = array[first];
if( this.first == null ) {
this.first = a;
} else if( last != null ) {
last.next = a;
a.previous = last;
}
for (int i = 1; i ... | public class class_name {
public void addAll( T[] array , int first , int length ) {
if( length <= 0 )
return;
Element<T> a = requestNew();
a.object = array[first];
if( this.first == null ) {
this.first = a; // depends on control dependency: [if], data = [none]
} else if( last != null ) {
last.nex... |
public class class_name {
public BeanMappingObject getBeanMapObject(Class src, Class target, boolean autoRegister) {
BeanMappingObject object = autoRepository.getBeanMappingObject(src, target);
if (object == null && autoRegister) {
if (isMap(src)) {// 判断是否为map接口的子类
autoRepos... | public class class_name {
public BeanMappingObject getBeanMapObject(Class src, Class target, boolean autoRegister) {
BeanMappingObject object = autoRepository.getBeanMappingObject(src, target);
if (object == null && autoRegister) {
if (isMap(src)) {// 判断是否为map接口的子类
autoRepos... |
public class class_name {
public static String unescapeNewlines(String str) {
boolean hadSlash = false;
final int len = str.length();
StringWriter out = new StringWriter(len);
for (int i = 0; i < len; i++) {
char c = str.charAt(i);
if (hadSlash) {
switch (c) {
case 'n':
... | public class class_name {
public static String unescapeNewlines(String str) {
boolean hadSlash = false;
final int len = str.length();
StringWriter out = new StringWriter(len);
for (int i = 0; i < len; i++) {
char c = str.charAt(i);
if (hadSlash) {
switch (c) {
case 'n':
... |
public class class_name {
private void mergeReleased(List<Segment> segments, List<OffsetPredicate> predicates, Segment compactSegment) {
for (int i = 0; i < segments.size(); i++) {
mergeReleasedEntries(segments.get(i), predicates.get(i), compactSegment);
}
} } | public class class_name {
private void mergeReleased(List<Segment> segments, List<OffsetPredicate> predicates, Segment compactSegment) {
for (int i = 0; i < segments.size(); i++) {
mergeReleasedEntries(segments.get(i), predicates.get(i), compactSegment); // depends on control dependency: [for], data = [i]
... |
public class class_name {
public static String replaceTabsWithSpaces(String text, int tabSize) {
String tabText = "";
for (int i = 0; i < tabSize; i++) {
tabText += " ";
}
return text.replaceAll("\t", " ");
} } | public class class_name {
public static String replaceTabsWithSpaces(String text, int tabSize) {
String tabText = "";
for (int i = 0; i < tabSize; i++) {
tabText += " "; // depends on control dependency: [for], data = [none]
}
return text.replaceAll("\t", " ");
} } |
public class class_name {
public JSONResult getConfig() {
if (attempts == 0) {
try {
resolve();
} catch(Exception e) {
// discard exception
}
}
if (config == null) {
logger.info("{} => no response", url);
return null;
}
logger.info("{} => {}", url, config.get... | public class class_name {
public JSONResult getConfig() {
if (attempts == 0) {
try {
resolve(); // depends on control dependency: [try], data = [none]
} catch(Exception e) {
// discard exception
} // depends on control dependency: [catch], data = [none]
}
if (config == null) {
... |
public class class_name {
public void marshall(Instance instance, ProtocolMarshaller protocolMarshaller) {
if (instance == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(instance.getBoundingBox(), B... | public class class_name {
public void marshall(Instance instance, ProtocolMarshaller protocolMarshaller) {
if (instance == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(instance.getBoundingBox(), B... |
public class class_name {
public RepositoryTrigger withEvents(RepositoryTriggerEventEnum... events) {
java.util.ArrayList<String> eventsCopy = new java.util.ArrayList<String>(events.length);
for (RepositoryTriggerEventEnum value : events) {
eventsCopy.add(value.toString());
}
... | public class class_name {
public RepositoryTrigger withEvents(RepositoryTriggerEventEnum... events) {
java.util.ArrayList<String> eventsCopy = new java.util.ArrayList<String>(events.length);
for (RepositoryTriggerEventEnum value : events) {
eventsCopy.add(value.toString()); // depends on co... |
public class class_name {
public static boolean isAllASCII(final InputStream in) throws IOException {
boolean ret = true;
int read = -1;
do {
read = in.read();
if (read > 0x7F) {
ret = false;
break;
}
} while (read != -1);
return ret;
} } | public class class_name {
public static boolean isAllASCII(final InputStream in) throws IOException {
boolean ret = true;
int read = -1;
do {
read = in.read();
if (read > 0x7F) {
ret = false; // depends on control dependency: [if], data = [none]
break;
}
} while (read... |
public class class_name {
private static String checkP2WPKH(byte[] scriptPubKey) {
if ((scriptPubKey.length==22) && (scriptPubKey[0]==0) && (scriptPubKey[1]==0x14)){
byte[] keyhash = Arrays.copyOfRange(scriptPubKey, 2, 22);
return "P2WPKH_"+BitcoinUtil.convertByteArrayToHexString(keyhash);
}
return null;
} } | public class class_name {
private static String checkP2WPKH(byte[] scriptPubKey) {
if ((scriptPubKey.length==22) && (scriptPubKey[0]==0) && (scriptPubKey[1]==0x14)){
byte[] keyhash = Arrays.copyOfRange(scriptPubKey, 2, 22);
return "P2WPKH_"+BitcoinUtil.convertByteArrayToHexString(keyhash); // depends on control d... |
public class class_name {
protected WritableDataStore<Meta> initializeMeta(Relation<V> relation, double[][] means) {
NumberVectorDistanceFunction<? super V> df = getDistanceFunction();
// The actual storage
final WritableDataStore<Meta> metas = DataStoreUtil.makeStorage(relation.getDBIDs(), DataStoreFactor... | public class class_name {
protected WritableDataStore<Meta> initializeMeta(Relation<V> relation, double[][] means) {
NumberVectorDistanceFunction<? super V> df = getDistanceFunction();
// The actual storage
final WritableDataStore<Meta> metas = DataStoreUtil.makeStorage(relation.getDBIDs(), DataStoreFactor... |
public class class_name {
private Link getAnchorLink(Element element) {
SyntheticLinkResource resource = new SyntheticLinkResource(resourceResolver);
ValueMap resourceProps = resource.getValueMap();
// get link metadata from data element
boolean foundMetadata = getAnchorMetadataFromData(resourceProps,... | public class class_name {
private Link getAnchorLink(Element element) {
SyntheticLinkResource resource = new SyntheticLinkResource(resourceResolver);
ValueMap resourceProps = resource.getValueMap();
// get link metadata from data element
boolean foundMetadata = getAnchorMetadataFromData(resourceProps,... |
public class class_name {
public final Period add(final Period period) {
DateTime newPeriodStart;
DateTime newPeriodEnd;
if (period == null) {
newPeriodStart = getStart();
newPeriodEnd = getEnd();
}
else {
if (getStart().before(period.getStar... | public class class_name {
public final Period add(final Period period) {
DateTime newPeriodStart;
DateTime newPeriodEnd;
if (period == null) {
newPeriodStart = getStart(); // depends on control dependency: [if], data = [none]
newPeriodEnd = getEnd(); // depends on contr... |
public class class_name {
public Byte getAsByte(String key) {
Object value = mValues.get(key);
try {
return value != null ? ((Number) value).byteValue() : null;
} catch (ClassCastException e) {
if (value instanceof CharSequence) {
try {
... | public class class_name {
public Byte getAsByte(String key) {
Object value = mValues.get(key);
try {
return value != null ? ((Number) value).byteValue() : null; // depends on control dependency: [try], data = [none]
} catch (ClassCastException e) {
if (value instanceof C... |
public class class_name {
public static <T> Collection<T> grep(Collection<T> self, Object filter) {
Collection<T> answer = createSimilarCollection(self);
BooleanReturningMethodInvoker bmi = new BooleanReturningMethodInvoker("isCase");
for (T element : self) {
if (bmi.invoke(filter, ... | public class class_name {
public static <T> Collection<T> grep(Collection<T> self, Object filter) {
Collection<T> answer = createSimilarCollection(self);
BooleanReturningMethodInvoker bmi = new BooleanReturningMethodInvoker("isCase");
for (T element : self) {
if (bmi.invoke(filter, ... |
public class class_name {
@Nullable
protected HttpEntity getHttpEntity(ClientRequest jerseyRequest) {
if (jerseyRequest.getEntity() == null) {
return null;
}
return chunkedEncodingEnabled ? new JerseyRequestHttpEntity(jerseyRequest) :
new BufferedJerseyRequestHt... | public class class_name {
@Nullable
protected HttpEntity getHttpEntity(ClientRequest jerseyRequest) {
if (jerseyRequest.getEntity() == null) {
return null; // depends on control dependency: [if], data = [none]
}
return chunkedEncodingEnabled ? new JerseyRequestHttpEntity(jersey... |
public class class_name {
protected void printFeatures(IN wi, Collection<String> features) {
if (flags.printFeatures == null || writtenNum > flags.printFeaturesUpto) {
return;
}
try {
if (cliqueWriter == null) {
cliqueWriter = new PrintWriter(new FileOutputStream("feats" + flags.p... | public class class_name {
protected void printFeatures(IN wi, Collection<String> features) {
if (flags.printFeatures == null || writtenNum > flags.printFeaturesUpto) {
return;
// depends on control dependency: [if], data = [none]
}
try {
if (cliqueWriter == null) {
cliqueWriter = ... |
public class class_name {
void takeMastership(int partitionId) {
synchronized(m_dataSourcesByPartition) {
Map<String, ExportDataSource> partitionDataSourceMap = m_dataSourcesByPartition.get(partitionId);
// this case happens when there are no export tables
if (partitionData... | public class class_name {
void takeMastership(int partitionId) {
synchronized(m_dataSourcesByPartition) {
Map<String, ExportDataSource> partitionDataSourceMap = m_dataSourcesByPartition.get(partitionId);
// this case happens when there are no export tables
if (partitionData... |
public class class_name {
@Override
public void contextInitialized(
final ServletContextEvent servletContextEvent) {
logger.info("Rebuilding Search Index...");
// Build the session factory.
SessionFactory factory = createSessionFactory();
// Build the hibernate session... | public class class_name {
@Override
public void contextInitialized(
final ServletContextEvent servletContextEvent) {
logger.info("Rebuilding Search Index...");
// Build the session factory.
SessionFactory factory = createSessionFactory();
// Build the hibernate session... |
public class class_name {
public static void installBinderService(final ServiceTarget serviceTarget,
final String name,
final Service<?> service,
final ServiceName dependency) {
f... | public class class_name {
public static void installBinderService(final ServiceTarget serviceTarget,
final String name,
final Service<?> service,
final ServiceName dependency) {
f... |
public class class_name {
public static String convertCamelToUpperCase(String _str) {
if (isEmpty(_str) || isAllUpperCase(_str)) {
return _str;
}
StringBuffer sb = new StringBuffer(String.valueOf(_str.charAt(0)).toUpperCase());
for (int i = 1; i < _str.length(); i++) {
... | public class class_name {
public static String convertCamelToUpperCase(String _str) {
if (isEmpty(_str) || isAllUpperCase(_str)) {
return _str; // depends on control dependency: [if], data = [none]
}
StringBuffer sb = new StringBuffer(String.valueOf(_str.charAt(0)).toUpperCase());
... |
public class class_name {
protected void removeExecutor(final Executor e) {
final Runnable task = new Runnable() {
@Override
public void run() {
synchronized (Computer.this) {
executors.remove(e);
addNewExecutorIfNecessary();
... | public class class_name {
protected void removeExecutor(final Executor e) {
final Runnable task = new Runnable() {
@Override
public void run() {
synchronized (Computer.this) {
executors.remove(e);
addNewExecutorIfNecessary();
... |
public class class_name {
private static Field getField(final Class cls, final String fieldName, boolean declared) {
$.checkNotEmpty(fieldName);
List<Field> fields = getFieldsList(cls, declared);
for (int i = 0; i < fields.size(); i++) {
if (fieldName.equals(fields.get(i).getName())) {
return fields.... | public class class_name {
private static Field getField(final Class cls, final String fieldName, boolean declared) {
$.checkNotEmpty(fieldName);
List<Field> fields = getFieldsList(cls, declared);
for (int i = 0; i < fields.size(); i++) {
if (fieldName.equals(fields.get(i).getName())) {
return fields.... |
public class class_name {
@Override
public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
synchronized (UppercaseTransliterator.class) {
if (sourceTargetUtility == null) {
sourceTargetUtility = new SourceTargetUtility(new Transform<... | public class class_name {
@Override
public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
synchronized (UppercaseTransliterator.class) {
if (sourceTargetUtility == null) {
sourceTargetUtility = new SourceTargetUtility(new Transform<... |
public class class_name {
@Override
public void initialize() {
if (detectChanges) {
try {
watcher = FileSystems.getDefault().newWatchService();
} catch (IOException e) {
log.error("Can't start watcher service.", e);
return;
}
}
generateSqlInfos();
if (detectChanges) {
// Path監視用のスレッド... | public class class_name {
@Override
public void initialize() {
if (detectChanges) {
try {
watcher = FileSystems.getDefault().newWatchService(); // depends on control dependency: [try], data = [none]
} catch (IOException e) {
log.error("Can't start watcher service.", e);
return;
} // depends on ... |
public class class_name {
public boolean validate(DependencyExplorerOutput output, InvalidKeys invalidKeys) {
Collection<Map.Entry<Key<?>, String>> invalidRequiredKeys =
invalidKeys.getInvalidRequiredKeys();
for (Map.Entry<Key<?>, String> error : invalidRequiredKeys) {
reportError(output, error.... | public class class_name {
public boolean validate(DependencyExplorerOutput output, InvalidKeys invalidKeys) {
Collection<Map.Entry<Key<?>, String>> invalidRequiredKeys =
invalidKeys.getInvalidRequiredKeys();
for (Map.Entry<Key<?>, String> error : invalidRequiredKeys) {
reportError(output, error.... |
public class class_name {
public static String encode(final List<LatLng> path) {
long lastLat = 0;
long lastLng = 0;
final StringBuilder result = new StringBuilder();
for (final LatLng point : path) {
long lat = Math.round(point.lat * 1e5);
long lng = Math.round(point.lng * 1e5);
l... | public class class_name {
public static String encode(final List<LatLng> path) {
long lastLat = 0;
long lastLng = 0;
final StringBuilder result = new StringBuilder();
for (final LatLng point : path) {
long lat = Math.round(point.lat * 1e5);
long lng = Math.round(point.lng * 1e5);
l... |
public class class_name {
static boolean polylineRelateMultiPoint_(Polyline polyline_a,
MultiPoint multipoint_b, double tolerance, String scl,
ProgressTracker progress_tracker) {
RelationalOperationsMatrix relOps = new RelationalOperationsMatrix();
relOps.resetMatrix_();
relOps.setPredicates_(scl);
relOp... | public class class_name {
static boolean polylineRelateMultiPoint_(Polyline polyline_a,
MultiPoint multipoint_b, double tolerance, String scl,
ProgressTracker progress_tracker) {
RelationalOperationsMatrix relOps = new RelationalOperationsMatrix();
relOps.resetMatrix_();
relOps.setPredicates_(scl);
relOp... |
public class class_name {
private static boolean matchDns(String hostname, String tlsDnsPattern) throws SSLException {
boolean hostIsIp = Utils.isIPv4(hostname) || Utils.isIPv6(hostname);
StringTokenizer hostnameSt = new StringTokenizer(hostname.toLowerCase(Locale.ROOT), ".");
StringTokenizer templateSt = ... | public class class_name {
private static boolean matchDns(String hostname, String tlsDnsPattern) throws SSLException {
boolean hostIsIp = Utils.isIPv4(hostname) || Utils.isIPv6(hostname);
StringTokenizer hostnameSt = new StringTokenizer(hostname.toLowerCase(Locale.ROOT), ".");
StringTokenizer templateSt = ... |
public class class_name {
@JSConstructor
public static Scriptable jsConstructor(Context cx, Object[] args,
Function ctorObj,
boolean inNewExpr)
{
File result = new File();
if (args.length == 0 || args[0] == Co... | public class class_name {
@JSConstructor
public static Scriptable jsConstructor(Context cx, Object[] args,
Function ctorObj,
boolean inNewExpr)
{
File result = new File();
if (args.length == 0 || args[0] == Co... |
public class class_name {
void updateServer(ServerHeartbeat server, UpdateServerHeartbeat update)
{
if (server.isSelf()) {
return;
}
String externalId = update.getExternalId();
updateExternal(server, externalId);
// XXX: validation
server.setSeedIndex(update.getSeedIndex());
... | public class class_name {
void updateServer(ServerHeartbeat server, UpdateServerHeartbeat update)
{
if (server.isSelf()) {
return; // depends on control dependency: [if], data = [none]
}
String externalId = update.getExternalId();
updateExternal(server, externalId);
// XXX: validatio... |
public class class_name {
protected boolean accept(char c){
// Whitespace
if(c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == ' '){
return true;
}
// ASCII letters, numbers and control characters
if(c >= '\u0021' && c <= '\u007f'){
return true;
}
// Latin-1 supplement letters
if((c >= ... | public class class_name {
protected boolean accept(char c){
// Whitespace
if(c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == ' '){
return true; // depends on control dependency: [if], data = [none]
}
// ASCII letters, numbers and control characters
if(c >= '\u0021' && c <= '\u007f'){
return ... |
public class class_name {
public void insertBlock(AbstractBaseDTNode<I, D> blockRoot) {
blockRoot.removeFromBlockList();
blockRoot.setNextElement(next);
if (getNextElement() != null) {
next.setPrevElement(blockRoot);
}
blockRoot.setPrevElement(this);
next = ... | public class class_name {
public void insertBlock(AbstractBaseDTNode<I, D> blockRoot) {
blockRoot.removeFromBlockList();
blockRoot.setNextElement(next);
if (getNextElement() != null) {
next.setPrevElement(blockRoot); // depends on control dependency: [if], data = [none]
}
... |
public class class_name {
private byte[] pbkdf2(final String password, final byte[] salt, int iterations) {
try {
Mac mac = Mac.getInstance(hmacAlgorithm);
Key key;
if (password == null || password.isEmpty()) {
key = new EmptySecretKey(hmacAlgorithm);
... | public class class_name {
private byte[] pbkdf2(final String password, final byte[] salt, int iterations) {
try {
Mac mac = Mac.getInstance(hmacAlgorithm);
Key key;
if (password == null || password.isEmpty()) {
key = new EmptySecretKey(hmacAlgorithm); // depe... |
public class class_name {
@FFDCIgnore({ IllegalStateException.class, Exception.class })
public BundleLifecycleStatus uninstallBundles(final BundleContext bundleContext,
final BundleList removeBundles,
final BundleIn... | public class class_name {
@FFDCIgnore({ IllegalStateException.class, Exception.class })
public BundleLifecycleStatus uninstallBundles(final BundleContext bundleContext,
final BundleList removeBundles,
final BundleIn... |
public class class_name {
public void save(Map<String, Object> data) throws PersistenceException {
logger.debug("enter - save(Map)");
try {
Class<?> cls = persistent.getClass();
state = new HashMap<String, Object>();
while( cls != null && !cls.getName().... | public class class_name {
public void save(Map<String, Object> data) throws PersistenceException {
logger.debug("enter - save(Map)");
try {
Class<?> cls = persistent.getClass();
state = new HashMap<String, Object>();
while( cls != null && !cls.getName().... |
public class class_name {
@SuppressWarnings("unchecked")
private void siftDown (int k, E x) {
int half = size >>> 1; // loop while a non-leaf
while (k < half) {
int child = (k << 1) + 1; // assume left child is least
E c = (E)queue[child];
int right = child + 1;
if (right < size && c.compareTo((E)queu... | public class class_name {
@SuppressWarnings("unchecked")
private void siftDown (int k, E x) {
int half = size >>> 1; // loop while a non-leaf
while (k < half) {
int child = (k << 1) + 1; // assume left child is least
E c = (E)queue[child];
int right = child + 1;
if (right < size && c.compareTo((E)queu... |
public class class_name {
@Deprecated
public static byte[] encodeToBytes(byte[] bytes)
{
try {
char[] chars = Base64.encode(bytes);
String string = new String(chars);
return string.getBytes(DEFAULT_ENCODING);
} catch (UnsupportedEncodingException e) {
... | public class class_name {
@Deprecated
public static byte[] encodeToBytes(byte[] bytes)
{
try {
char[] chars = Base64.encode(bytes);
String string = new String(chars);
return string.getBytes(DEFAULT_ENCODING); // depends on control dependency: [try], data = [none]
... |
public class class_name {
List<ColumnOrSuperColumn> getSlice(ColumnParent colParent, SlicePredicate slicePred, ByteBuffer key) {
m_logger.debug("Fetching {}.{} from {}", new Object[]{Utils.toString(key), toString(slicePred), toString(colParent)});
List<ColumnOrSuperColumn> columnList = null;
... | public class class_name {
List<ColumnOrSuperColumn> getSlice(ColumnParent colParent, SlicePredicate slicePred, ByteBuffer key) {
m_logger.debug("Fetching {}.{} from {}", new Object[]{Utils.toString(key), toString(slicePred), toString(colParent)});
List<ColumnOrSuperColumn> columnList = null;
... |
public class class_name {
private URI handleLocalDita(final URI href, final AttributesImpl atts) {
final URI attValue = href;
final int sharpIndex = attValue.toString().indexOf(SHARP);
URI pathFromMap;
URI retAttValue;
if (sharpIndex != -1) { // href value refer to an id in a to... | public class class_name {
private URI handleLocalDita(final URI href, final AttributesImpl atts) {
final URI attValue = href;
final int sharpIndex = attValue.toString().indexOf(SHARP);
URI pathFromMap;
URI retAttValue;
if (sharpIndex != -1) { // href value refer to an id in a to... |
public class class_name {
Iterator<Subscriber> getSubscribers(Object event) {
ImmutableSet<Class<?>> eventTypes = flattenHierarchy(event.getClass());
List<Iterator<Subscriber>> subscriberIterators =
Lists.newArrayListWithCapacity(eventTypes.size());
for (Class<?> eventType : eventTypes) {
C... | public class class_name {
Iterator<Subscriber> getSubscribers(Object event) {
ImmutableSet<Class<?>> eventTypes = flattenHierarchy(event.getClass());
List<Iterator<Subscriber>> subscriberIterators =
Lists.newArrayListWithCapacity(eventTypes.size());
for (Class<?> eventType : eventTypes) {
C... |
public class class_name {
public List<Response> bulk(List<?> objects, boolean newEdits) {
assertNotEmpty(objects, "objects");
HttpResponse response = null;
try {
final String newEditsVal = newEdits ? "\"new_edits\": true, " : "\"new_edits\": false, ";
final String json = String.format("{%s%s%s}", newEdits... | public class class_name {
public List<Response> bulk(List<?> objects, boolean newEdits) {
assertNotEmpty(objects, "objects");
HttpResponse response = null;
try {
final String newEditsVal = newEdits ? "\"new_edits\": true, " : "\"new_edits\": false, ";
final String json = String.format("{%s%s%s}", newEdits... |
public class class_name {
@Override
public boolean hasNext()
{
currentObject = fetchObject();
if (count < fetchSize && fetchSize > 0 && currentObject != null)
{
count++;
return true;
}
scrollComplete = true;
return false;
} } | public class class_name {
@Override
public boolean hasNext()
{
currentObject = fetchObject();
if (count < fetchSize && fetchSize > 0 && currentObject != null)
{
count++; // depends on control dependency: [if], data = [none]
return true; // depends on control depe... |
public class class_name {
<T> T _deserialize(String body, Class<T> clazz) {
if(body == null || body.isEmpty()){
throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR.getMessageTemplate(),
"the message body... | public class class_name {
<T> T _deserialize(String body, Class<T> clazz) {
if(body == null || body.isEmpty()){
throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR.getMessageTemplate(),
"the message body... |
public class class_name {
private static VarValueDef asValueDef( String valueName, JsonObject json)
{
try
{
VarValueDef valueDef = new VarValueDef( ObjectUtils.toObject( valueName));
// Get the type of this value
boolean failure = json.getBoolean( FAILURE_KEY, false);
boolean onc... | public class class_name {
private static VarValueDef asValueDef( String valueName, JsonObject json)
{
try
{
VarValueDef valueDef = new VarValueDef( ObjectUtils.toObject( valueName));
// Get the type of this value
boolean failure = json.getBoolean( FAILURE_KEY, false);
boolean onc... |
public class class_name {
public static void main(String[] args)
{
try
{
if (args.length != 4)
{
System.out.println("Usage: MpxjBatchConvert <source directory> <source suffix> <target directory> <target suffix>");
}
else
{
File sourceD... | public class class_name {
public static void main(String[] args)
{
try
{
if (args.length != 4)
{
System.out.println("Usage: MpxjBatchConvert <source directory> <source suffix> <target directory> <target suffix>"); // depends on control dependency: [if], data = [none]
... |
public class class_name {
protected List<String> getTypeNames(CmsGalleryDataBean data) {
List<String> types = new ArrayList<String>();
for (CmsResourceTypeBean info : data.getTypes()) {
types.add(info.getType());
}
return types;
} } | public class class_name {
protected List<String> getTypeNames(CmsGalleryDataBean data) {
List<String> types = new ArrayList<String>();
for (CmsResourceTypeBean info : data.getTypes()) {
types.add(info.getType()); // depends on control dependency: [for], data = [info]
}
retu... |
public class class_name {
public void marshall(Toolchain toolchain, ProtocolMarshaller protocolMarshaller) {
if (toolchain == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(toolchain.getSource(), SO... | public class class_name {
public void marshall(Toolchain toolchain, ProtocolMarshaller protocolMarshaller) {
if (toolchain == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(toolchain.getSource(), SO... |
public class class_name {
public String decodePPM(byte[] data, int context) {
try {
BitInputStream in = new BitInputStream(new ByteArrayInputStream(data));
StringBuilder out = new StringBuilder();
String contextStr = "";
while (true) {
TrieNode fromNode = inner.matchPredictor(getRig... | public class class_name {
public String decodePPM(byte[] data, int context) {
try {
BitInputStream in = new BitInputStream(new ByteArrayInputStream(data));
StringBuilder out = new StringBuilder();
String contextStr = "";
while (true) {
TrieNode fromNode = inner.matchPredictor(getRig... |
public class class_name {
private static Subject setCallerSubject(Subject s) {
Subject currentCallerSubject = null;
SubjectManagerService sms = smServiceRef.getService();
if (sms != null) {
if (s == null) {
s = new Subject();
}
currentCallerSu... | public class class_name {
private static Subject setCallerSubject(Subject s) {
Subject currentCallerSubject = null;
SubjectManagerService sms = smServiceRef.getService();
if (sms != null) {
if (s == null) {
s = new Subject(); // depends on control dependency: [if], d... |
public class class_name {
public static Cookie getCookie(String name, HttpServletRequest request) {
Cookie[] cookies = request.getCookies();
if (ArrayUtils.isNotEmpty(cookies)) {
for (Cookie cookie : cookies) {
if (cookie.getName().equals(name)) {
return ... | public class class_name {
public static Cookie getCookie(String name, HttpServletRequest request) {
Cookie[] cookies = request.getCookies();
if (ArrayUtils.isNotEmpty(cookies)) {
for (Cookie cookie : cookies) {
if (cookie.getName().equals(name)) {
return ... |
public class class_name {
public void rebind(final Name name, Object object) throws NamingException {
check(name, JndiPermission.ACTION_REBIND);
if(namingStore instanceof WritableNamingStore) {
final Name absoluteName = getAbsoluteName(name);
if (object instanceof Referenceable... | public class class_name {
public void rebind(final Name name, Object object) throws NamingException {
check(name, JndiPermission.ACTION_REBIND);
if(namingStore instanceof WritableNamingStore) {
final Name absoluteName = getAbsoluteName(name);
if (object instanceof Referenceable... |
public class class_name {
private void fixScaleTrans() {
fixTrans();
matrix.getValues(m);
if (getImageWidth() < viewWidth) {
m[Matrix.MTRANS_X] = (viewWidth - getImageWidth()) / 2;
}
if (getImageHeight() < viewHeight) {
m[Matrix.MTRANS_Y] = (viewHeight -... | public class class_name {
private void fixScaleTrans() {
fixTrans();
matrix.getValues(m);
if (getImageWidth() < viewWidth) {
m[Matrix.MTRANS_X] = (viewWidth - getImageWidth()) / 2; // depends on control dependency: [if], data = [none]
}
if (getImageHeight() < viewHe... |
public class class_name {
private static String decodeUrl(String url) {
if (url == null) {
return null;
}
try {
return URLDecoder.decode(url, CHARSET_UTF8);
} catch (UnsupportedEncodingException e) {
return url;
}
} } | public class class_name {
private static String decodeUrl(String url) {
if (url == null) {
return null; // depends on control dependency: [if], data = [none]
}
try {
return URLDecoder.decode(url, CHARSET_UTF8); // depends on control dependency: [try], data = [none]
... |
public class class_name {
public Iterator<Operator<Term>> traverse(Clause clause, boolean reverse)
{
/*log.fine("Traversing clause " + clause.toString(interner, true, false));*/
Functor head = clause.getHead();
Functor[] body = clause.getBody();
Queue<Operator<Term>> queue = (!rev... | public class class_name {
public Iterator<Operator<Term>> traverse(Clause clause, boolean reverse)
{
/*log.fine("Traversing clause " + clause.toString(interner, true, false));*/
Functor head = clause.getHead();
Functor[] body = clause.getBody();
Queue<Operator<Term>> queue = (!rev... |
public class class_name {
private static List<String> parseExecParameters(String paramText)
{
final String SafeParamStringValuePattern = "#(SQL_PARSER_SAFE_PARAMSTRING)";
// Find all quoted strings.
// Mask out strings that contain whitespace or commas
// that must not be confused w... | public class class_name {
private static List<String> parseExecParameters(String paramText)
{
final String SafeParamStringValuePattern = "#(SQL_PARSER_SAFE_PARAMSTRING)";
// Find all quoted strings.
// Mask out strings that contain whitespace or commas
// that must not be confused w... |
public class class_name {
public ListDocumentsRequest withDocumentFilterList(DocumentFilter... documentFilterList) {
if (this.documentFilterList == null) {
setDocumentFilterList(new com.amazonaws.internal.SdkInternalList<DocumentFilter>(documentFilterList.length));
}
for (DocumentFi... | public class class_name {
public ListDocumentsRequest withDocumentFilterList(DocumentFilter... documentFilterList) {
if (this.documentFilterList == null) {
setDocumentFilterList(new com.amazonaws.internal.SdkInternalList<DocumentFilter>(documentFilterList.length)); // depends on control dependency:... |
public class class_name {
public void write(Parameters parameters) throws IOException {
if (parameters != null) {
for (Parameter pv : parameters.getParameterValueMap().values()) {
if (pv.isAssigned()) {
write(pv);
}
}
}
} } | public class class_name {
public void write(Parameters parameters) throws IOException {
if (parameters != null) {
for (Parameter pv : parameters.getParameterValueMap().values()) {
if (pv.isAssigned()) {
write(pv); // depends on control dependency: [if], data = [n... |
public class class_name {
public static boolean isChineseNumber(final String text, final int start, final int len){
for(int i=start; i<start+len; i++){
char c = text.charAt(i);
boolean isChineseNumber = false;
for(char chineseNumber : chineseNumbers){
if(c ==... | public class class_name {
public static boolean isChineseNumber(final String text, final int start, final int len){
for(int i=start; i<start+len; i++){
char c = text.charAt(i);
boolean isChineseNumber = false;
for(char chineseNumber : chineseNumbers){
if(c ==... |
public class class_name {
private void drawElements(Bbox bounds, String url) {
if (bounds != null && url != null) {
drawRedRectangle(bounds, container);
drawImageFromUrl(url, bounds, container);
}
} } | public class class_name {
private void drawElements(Bbox bounds, String url) {
if (bounds != null && url != null) {
drawRedRectangle(bounds, container); // depends on control dependency: [if], data = [(bounds]
drawImageFromUrl(url, bounds, container); // depends on control dependency: [if], data = [none]
}
... |
public class class_name {
public static String escapeAssertion(String s) {
//Replace the first dot, because the string doesn't start with "m="
// and is not covered by the regex.
if (s.startsWith("r") || s.startsWith("p")) {
s = s.replaceFirst("\\.", "_");
}
String r... | public class class_name {
public static String escapeAssertion(String s) {
//Replace the first dot, because the string doesn't start with "m="
// and is not covered by the regex.
if (s.startsWith("r") || s.startsWith("p")) {
s = s.replaceFirst("\\.", "_"); // depends on control depe... |
public class class_name {
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public static Flowable<Long> rangeLong(long start, long count) {
if (count < 0) {
throw new IllegalArgumentException("count >= 0 required but it was " + count... | public class class_name {
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public static Flowable<Long> rangeLong(long start, long count) {
if (count < 0) {
throw new IllegalArgumentException("count >= 0 required but it was " + count... |
public class class_name {
public static String queryString(Connection con, String def, String query, Object... param) throws SQLException {
PreparedStatement stmt = null;
try {
stmt = con.prepareStatement(query);
stmt.setMaxRows(1);
for (int i = 0; i < param.length; i++) {
stmt.setObj... | public class class_name {
public static String queryString(Connection con, String def, String query, Object... param) throws SQLException {
PreparedStatement stmt = null;
try {
stmt = con.prepareStatement(query); // depends on control dependency: [try], data = [none]
stmt.setMaxRows(1); // depends ... |
public class class_name {
@SafeVarargs
public static <T extends Throwable, C extends Class<? extends T>> T findCause(Throwable root, C... ofClasses) {
for (C c : ofClasses) {
Throwable t = root;
while (t != null) {
if (c.isInstance(t)) {
return c.... | public class class_name {
@SafeVarargs
public static <T extends Throwable, C extends Class<? extends T>> T findCause(Throwable root, C... ofClasses) {
for (C c : ofClasses) {
Throwable t = root;
while (t != null) {
if (c.isInstance(t)) {
return c.... |
public class class_name {
private List<String> getDefaultTextValue(FormField field) {
// Get the Id
String fieldId = field.getName();
// Create new HashMap 'fieldAttributes' and new list 'definedValues'
Map<String, String> fieldAttributes = new HashMap<String, String>();
List<String> definedValues = new Ar... | public class class_name {
private List<String> getDefaultTextValue(FormField field) {
// Get the Id
String fieldId = field.getName();
// Create new HashMap 'fieldAttributes' and new list 'definedValues'
Map<String, String> fieldAttributes = new HashMap<String, String>();
List<String> definedValues = new Ar... |
public class class_name {
private static Set getCryptoImpls(String serviceType) {
Set result = new TreeSet();
// All all providers
Provider[] providers = Security.getProviders();
for (int i = 0; i < providers.length; i++) {
// Get services provided by each provider
Set keys = providers[i].... | public class class_name {
private static Set getCryptoImpls(String serviceType) {
Set result = new TreeSet();
// All all providers
Provider[] providers = Security.getProviders();
for (int i = 0; i < providers.length; i++) {
// Get services provided by each provider
Set keys = providers[i].... |
public class class_name {
public GraphType transpose(GraphType orig, GraphToolkit<GraphType, EdgeType, VertexType> toolkit) {
GraphType trans = toolkit.createGraph();
// For each vertex in original graph, create an equivalent
// vertex in the transposed graph,
// ensuring that vertex ... | public class class_name {
public GraphType transpose(GraphType orig, GraphToolkit<GraphType, EdgeType, VertexType> toolkit) {
GraphType trans = toolkit.createGraph();
// For each vertex in original graph, create an equivalent
// vertex in the transposed graph,
// ensuring that vertex ... |
public class class_name {
public long getPID() {
long currentPID = cachedPID.get();
if (currentPID != 0) {
return currentPID;
}
try {
currentPID = detectPID();
} catch (Throwable cause) {
logger.info("Unable to detect process ID!", cause);
}
if (currentPID == 0) {
currentPID = Syst... | public class class_name {
public long getPID() {
long currentPID = cachedPID.get();
if (currentPID != 0) {
return currentPID;
// depends on control dependency: [if], data = [none]
}
try {
currentPID = detectPID();
// depends on control dependency: [try], data = [none]
} catch (Throwable cause) {... |
public class class_name {
public List<JAXBElement<? extends AbstractGeometryType>> get_Geometry() {
if (_Geometry == null) {
_Geometry = new ArrayList<JAXBElement<? extends AbstractGeometryType>>();
}
return this._Geometry;
} } | public class class_name {
public List<JAXBElement<? extends AbstractGeometryType>> get_Geometry() {
if (_Geometry == null) {
_Geometry = new ArrayList<JAXBElement<? extends AbstractGeometryType>>(); // depends on control dependency: [if], data = [none]
}
return this._Geometry;
}... |
public class class_name {
public static int indexOf( String[] array, String s )
{
for (int index = 0; index < array.length; index++)
{
if( s.equals( array[index] ) )
{
return index;
}
}
return -1;
} } | public class class_name {
public static int indexOf( String[] array, String s )
{
for (int index = 0; index < array.length; index++)
{
if( s.equals( array[index] ) )
{
return index;
// depends on control dependency: [if], data = [none]
}
}
return -1;
} } |
public class class_name {
public void marshall(RemoveTagsRequest removeTagsRequest, ProtocolMarshaller protocolMarshaller) {
if (removeTagsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(r... | public class class_name {
public void marshall(RemoveTagsRequest removeTagsRequest, ProtocolMarshaller protocolMarshaller) {
if (removeTagsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(r... |
public class class_name {
private byte[][] readSocket(ZMQ.Socket socket, int nb) {
byte[][] inputs = new byte[nb][];
// Try to resynchronize if drifts
if (socket==heartbeatSocket) {
if (heartbeatDrift>0) {
System.err.println("------> try to resynchronize heartbe... | public class class_name {
private byte[][] readSocket(ZMQ.Socket socket, int nb) {
byte[][] inputs = new byte[nb][];
// Try to resynchronize if drifts
if (socket==heartbeatSocket) {
if (heartbeatDrift>0) {
System.err.println("------> try to resynchronize heartbe... |
public class class_name {
private void reverseAfter(int i) {
int start = i+1;
int end = n-1;
while (start < end) {
swap(index,start,end);
start++;
end--;
}
} } | public class class_name {
private void reverseAfter(int i) {
int start = i+1;
int end = n-1;
while (start < end) {
swap(index,start,end); // depends on control dependency: [while], data = [end)]
start++; // depends on control dependency: [while], data = [none]
end--; // depends on control dependency: [w... |
public class class_name {
public static void copyStream(Reader inStream, Writer outStream, boolean ignoreErrors)
{
char[] data = new char[BUFFER];
int count;
try {
while((count = inStream.read(data, 0, BUFFER)) != -1)
{
outStream.write(data, 0, count)... | public class class_name {
public static void copyStream(Reader inStream, Writer outStream, boolean ignoreErrors)
{
char[] data = new char[BUFFER];
int count;
try {
while((count = inStream.read(data, 0, BUFFER)) != -1)
{
outStream.write(data, 0, count)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.