code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
protected String getArgumentValue(String arg, String[] args, ConsoleWrapper stdin, PrintStream stdout) {
for (int i = 1; i < args.length; i++) {
String key = args[i].split("=")[0];
if (key.equals(arg)) {
return getValue(args[i]);
}
... | public class class_name {
protected String getArgumentValue(String arg, String[] args, ConsoleWrapper stdin, PrintStream stdout) {
for (int i = 1; i < args.length; i++) {
String key = args[i].split("=")[0];
if (key.equals(arg)) {
return getValue(args[i]); // depends on c... |
public class class_name {
private static boolean isValidDate(String date, Calendar out, String separator) {
try {
String[] dates = date.split(separator);
out.set(Calendar.DATE, Integer.parseInt(dates[dates.length - 1]));
out.set(Calendar.MONTH, Integer.parseInt(dates[dates.l... | public class class_name {
private static boolean isValidDate(String date, Calendar out, String separator) {
try {
String[] dates = date.split(separator);
out.set(Calendar.DATE, Integer.parseInt(dates[dates.length - 1])); // depends on control dependency: [try], data = [none]
... |
public class class_name {
public static String join(final Object[] array, final String separator) {
if (isEmpty(array)) {
return "";
}
StringBuffer stringBuffer = new StringBuffer();
boolean isFirstVisited = true;
for (Object object : array) {
if (isFirstVisited) {
isFirstVisit... | public class class_name {
public static String join(final Object[] array, final String separator) {
if (isEmpty(array)) {
return ""; // depends on control dependency: [if], data = [none]
}
StringBuffer stringBuffer = new StringBuffer();
boolean isFirstVisited = true;
for (Object object : arr... |
public class class_name {
public Map<String, List<String>> revsDiff(final Map<String, List<String>> revisions) throws DocumentStoreException {
Misc.checkState(this.isOpen(), "Database is closed");
Misc.checkNotNull(revisions, "Input revisions");
Misc.checkArgument(!revisions.isEmpty(), "revisio... | public class class_name {
public Map<String, List<String>> revsDiff(final Map<String, List<String>> revisions) throws DocumentStoreException {
Misc.checkState(this.isOpen(), "Database is closed");
Misc.checkNotNull(revisions, "Input revisions");
Misc.checkArgument(!revisions.isEmpty(), "revisio... |
public class class_name {
public void hasFirstElement(@NullableDecl Object element) {
if (actualAsNavigableSet().isEmpty()) {
failWithActual("expected to have first element", element);
return;
}
if (!Objects.equal(actualAsNavigableSet().first(), element)) {
if (actualAsNavigableSet().con... | public class class_name {
public void hasFirstElement(@NullableDecl Object element) {
if (actualAsNavigableSet().isEmpty()) {
failWithActual("expected to have first element", element); // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
... |
public class class_name {
public static String toJsonStr(JSON json, int indentFactor) {
if (null == json) {
return null;
}
return json.toJSONString(indentFactor);
} } | public class class_name {
public static String toJsonStr(JSON json, int indentFactor) {
if (null == json) {
return null;
// depends on control dependency: [if], data = [none]
}
return json.toJSONString(indentFactor);
} } |
public class class_name {
@Nullable
public static Templates getXSLTTemplates (@Nonnull final EEbInterfaceVersion eVersion)
{
final String sNamespaceURI = eVersion.getNamespaceURI ();
final Templates ret = s_aRWLock.readLocked ( () -> s_aTemplates.get (sNamespaceURI));
if (ret != null)
return ret;... | public class class_name {
@Nullable
public static Templates getXSLTTemplates (@Nonnull final EEbInterfaceVersion eVersion)
{
final String sNamespaceURI = eVersion.getNamespaceURI ();
final Templates ret = s_aRWLock.readLocked ( () -> s_aTemplates.get (sNamespaceURI));
if (ret != null)
return ret;... |
public class class_name {
@SuppressWarnings("unchecked")
public void putAll(Map t) {
// don't delegate to putAll since we want case handling from put
for (Entry next : (Set<Entry>) t.entrySet()) {
put(next.getKey(), next.getValue());
}
} } | public class class_name {
@SuppressWarnings("unchecked")
public void putAll(Map t) {
// don't delegate to putAll since we want case handling from put
for (Entry next : (Set<Entry>) t.entrySet()) {
put(next.getKey(), next.getValue()); // depends on control dependency: [for], data = [next... |
public class class_name {
public static String randomChinese(int length) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < length; i++) {
sb.append((char) random(firstChineseNum, lastChineseNum).intValue());
}
return sb.toString();
} } | public class class_name {
public static String randomChinese(int length) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < length; i++) {
sb.append((char) random(firstChineseNum, lastChineseNum).intValue());
// depends on control dependency: [for], data = [none]
}
return sb.toString();
} ... |
public class class_name {
private User getUserFromFile(File userFile) {
if (userFile.isFile() && userFile.canRead()) {
try (FileInputStream userFileIO = new FileInputStream(userFile);) {
Properties userProps = new Properties();
userProps.load(userFileIO);
return new User(userFile.getName(), userProps)... | public class class_name {
private User getUserFromFile(File userFile) {
if (userFile.isFile() && userFile.canRead()) {
try (FileInputStream userFileIO = new FileInputStream(userFile);) {
Properties userProps = new Properties();
userProps.load(userFileIO);
return new User(userFile.getName(), userProps)... |
public class class_name {
public void addEventManager(String clazz) {
try {
m_eventManager = (CmsEventManager)Class.forName(clazz).newInstance();
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(
Messages.get().getBundle().key(Messages.INIT_EVENTM... | public class class_name {
public void addEventManager(String clazz) {
try {
m_eventManager = (CmsEventManager)Class.forName(clazz).newInstance(); // depends on control dependency: [try], data = [none]
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(
... |
public class class_name {
private void createAssertions(WyilFile.Decl declaration, List<VerificationCondition> vcs,
GlobalEnvironment environment) {
// FIXME: should be logged somehow?
for (int i = 0; i != vcs.size(); ++i) {
VerificationCondition vc = vcs.get(i);
// Build the actual verification condition... | public class class_name {
private void createAssertions(WyilFile.Decl declaration, List<VerificationCondition> vcs,
GlobalEnvironment environment) {
// FIXME: should be logged somehow?
for (int i = 0; i != vcs.size(); ++i) {
VerificationCondition vc = vcs.get(i);
// Build the actual verification condition... |
public class class_name {
private boolean setValue(String key, String value, String personaIdentifier) {
SQLiteDatabase db = getWritableDatabase();
// Create a new map of values, where column names are the keys
ContentValues values = new ContentValues();
values.put(Contract.COLUMN_KEY, key);
values.put(Cont... | public class class_name {
private boolean setValue(String key, String value, String personaIdentifier) {
SQLiteDatabase db = getWritableDatabase();
// Create a new map of values, where column names are the keys
ContentValues values = new ContentValues();
values.put(Contract.COLUMN_KEY, key);
values.put(Cont... |
public class class_name {
public void marshall(DeleteRepositoryRequest deleteRepositoryRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteRepositoryRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... | public class class_name {
public void marshall(DeleteRepositoryRequest deleteRepositoryRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteRepositoryRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... |
public class class_name {
protected void enforceTicketValidationAuthorizationFor(final HttpServletRequest request, final Service service, final Assertion assertion) {
val authorizers = serviceValidateConfigurationContext.getValidationAuthorizers().getAuthorizers();
for (val a : authorizers) {
... | public class class_name {
protected void enforceTicketValidationAuthorizationFor(final HttpServletRequest request, final Service service, final Assertion assertion) {
val authorizers = serviceValidateConfigurationContext.getValidationAuthorizers().getAuthorizers();
for (val a : authorizers) {
... |
public class class_name {
@SuppressWarnings("deprecation")
public void cleanup() {
if (null == mImageView) {
return; // cleanup already done
}
final ImageView imageView = mImageView.get();
if (null != imageView) {
// Remove this as a global layout listener
... | public class class_name {
@SuppressWarnings("deprecation")
public void cleanup() {
if (null == mImageView) {
return; // cleanup already done // depends on control dependency: [if], data = [none]
}
final ImageView imageView = mImageView.get();
if (null != imageView) {
... |
public class class_name {
void copyLocales(final Set<String> targetLocales) {
final CmsEntity entity = m_entityBackend.getEntity(m_entityId);
CmsRpcAction<Void> action = new CmsRpcAction<Void>() {
@Override
public void execute() {
start(200, true);
... | public class class_name {
void copyLocales(final Set<String> targetLocales) {
final CmsEntity entity = m_entityBackend.getEntity(m_entityId);
CmsRpcAction<Void> action = new CmsRpcAction<Void>() {
@Override
public void execute() {
start(200, true);
... |
public class class_name {
public Decision<Flow<T>> getOrCreateDecision()
{
List<Node> nodeList = childNode.get("decision");
if (nodeList != null && nodeList.size() > 0)
{
return new DecisionImpl<Flow<T>>(this, "decision", childNode, nodeList.get(0));
}
return createDecision()... | public class class_name {
public Decision<Flow<T>> getOrCreateDecision()
{
List<Node> nodeList = childNode.get("decision");
if (nodeList != null && nodeList.size() > 0)
{
return new DecisionImpl<Flow<T>>(this, "decision", childNode, nodeList.get(0)); // depends on control dependency: [if... |
public class class_name {
public boolean hasRoles(String... roleIdentifiers) {
List<Role> requiredRoles = new ArrayList<>();
for (String roleIdentifier : roleIdentifiers) {
requiredRoles.add(new Role(roleIdentifier));
}
return roles.containsAll(requiredRoles);
} } | public class class_name {
public boolean hasRoles(String... roleIdentifiers) {
List<Role> requiredRoles = new ArrayList<>();
for (String roleIdentifier : roleIdentifiers) {
requiredRoles.add(new Role(roleIdentifier)); // depends on control dependency: [for], data = [roleIdentifier]
... |
public class class_name {
public static Method findMethod(Class clazz, String methodName) {
final List<Method> methods = getDeclaredMethodsRecursively(clazz).get(methodName);
if (methods.isEmpty()) {
throw new IllegalArgumentException(clazz.getName() + "::" + methodName + " not found");
... | public class class_name {
public static Method findMethod(Class clazz, String methodName) {
final List<Method> methods = getDeclaredMethodsRecursively(clazz).get(methodName);
if (methods.isEmpty()) {
throw new IllegalArgumentException(clazz.getName() + "::" + methodName + " not found");
... |
public class class_name {
private boolean handleRpmFile(String innerDir, String archiveFile) {
boolean success = true;
File rpmFile = new File(archiveFile);
FileInputStream rpmFIS = null;
try {
rpmFIS = new FileInputStream(rpmFile.getPath());
} catch (FileNotFoundExc... | public class class_name {
private boolean handleRpmFile(String innerDir, String archiveFile) {
boolean success = true;
File rpmFile = new File(archiveFile);
FileInputStream rpmFIS = null;
try {
rpmFIS = new FileInputStream(rpmFile.getPath()); // depends on control dependency... |
public class class_name {
public static void findClasspathOrder(final ClassLoader classLoader, final ClasspathOrder classpathOrder,
final ScanSpec scanSpec, final LogNode log) {
// type ClasspathManager
final Object manager = ReflectionUtils.getFieldVal(classLoader, "manager", false);
... | public class class_name {
public static void findClasspathOrder(final ClassLoader classLoader, final ClasspathOrder classpathOrder,
final ScanSpec scanSpec, final LogNode log) {
// type ClasspathManager
final Object manager = ReflectionUtils.getFieldVal(classLoader, "manager", false);
... |
public class class_name {
public static void main(String[] args) throws IOException {
String s = doc(svg(
160,
200,
rect(0, 0, 160, 200, "fill:red;")
+ svg(10,
10,
100,
100,
rect(0, 0, 100, 100,
"fill:orange; stroke:rgb(0,0,0);"))
+ line(20, 20, 100, ... | public class class_name {
public static void main(String[] args) throws IOException {
String s = doc(svg(
160,
200,
rect(0, 0, 160, 200, "fill:red;")
+ svg(10,
10,
100,
100,
rect(0, 0, 100, 100,
"fill:orange; stroke:rgb(0,0,0);"))
+ line(20, 20, 100, ... |
public class class_name {
public void marshall(EnvironmentProperties environmentProperties, ProtocolMarshaller protocolMarshaller) {
if (environmentProperties == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshalle... | public class class_name {
public void marshall(EnvironmentProperties environmentProperties, ProtocolMarshaller protocolMarshaller) {
if (environmentProperties == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshalle... |
public class class_name {
public boolean writeToFile(String defaultFilePath, String realFilePath) {
try {
Files.copy(Paths.get(defaultFilePath), Paths.get(realFilePath), StandardCopyOption.REPLACE_EXISTING);
return true;
} catch (IOException e) {
error("Unable to wri... | public class class_name {
public boolean writeToFile(String defaultFilePath, String realFilePath) {
try {
Files.copy(Paths.get(defaultFilePath), Paths.get(realFilePath), StandardCopyOption.REPLACE_EXISTING); // depends on control dependency: [try], data = [none]
return true; // depends ... |
public class class_name {
public void configureAtoms(IAtomContainer container) {
for (int f = 0; f < container.getAtomCount(); f++) {
configure(container.getAtom(f));
}
} } | public class class_name {
public void configureAtoms(IAtomContainer container) {
for (int f = 0; f < container.getAtomCount(); f++) {
configure(container.getAtom(f)); // depends on control dependency: [for], data = [f]
}
} } |
public class class_name {
static public int getBlockCrc(DataNode datanode, ReplicaToRead ri,
int namespaceId, Block block) throws IOException {
InputStream rawStreamIn = null;
DataInputStream streamIn = null;
try {
int bytesPerCRC;
int checksumSize;
long crcPerBlock;
rawStre... | public class class_name {
static public int getBlockCrc(DataNode datanode, ReplicaToRead ri,
int namespaceId, Block block) throws IOException {
InputStream rawStreamIn = null;
DataInputStream streamIn = null;
try {
int bytesPerCRC;
int checksumSize;
long crcPerBlock;
rawStre... |
public class class_name {
@Override
public BlogEntry next() {
try {
final ClientEntry entry = iterator.next();
if (entry instanceof ClientMediaEntry) {
return new AtomResource(collection, (ClientMediaEntry) entry);
} else {
return new Atom... | public class class_name {
@Override
public BlogEntry next() {
try {
final ClientEntry entry = iterator.next();
if (entry instanceof ClientMediaEntry) {
return new AtomResource(collection, (ClientMediaEntry) entry); // depends on control dependency: [if], data = [none... |
public class class_name {
@Override public void filter(Filter filter) throws NoTestsRemainException {
List<FrameworkMethod> filteredChildren = ParentRunnerSpy.getFilteredChildren(this);
// Iterate over a clone so that we can safely mutate the original.
for (FrameworkMethod child : new ArrayList<>(filteredC... | public class class_name {
@Override public void filter(Filter filter) throws NoTestsRemainException {
List<FrameworkMethod> filteredChildren = ParentRunnerSpy.getFilteredChildren(this);
// Iterate over a clone so that we can safely mutate the original.
for (FrameworkMethod child : new ArrayList<>(filteredC... |
public class class_name {
@Override
public long until(Temporal endExclusive, TemporalUnit unit) {
LocalTime end = LocalTime.from(endExclusive);
if (unit instanceof ChronoUnit) {
long nanosUntil = end.toNanoOfDay() - toNanoOfDay(); // no overflow
switch ((ChronoUnit) unit) {... | public class class_name {
@Override
public long until(Temporal endExclusive, TemporalUnit unit) {
LocalTime end = LocalTime.from(endExclusive);
if (unit instanceof ChronoUnit) {
long nanosUntil = end.toNanoOfDay() - toNanoOfDay(); // no overflow
switch ((ChronoUnit) unit) {... |
public class class_name {
public void configInterceptor(Interceptors me) {
// add excetion interceptor
me.add(new ExceptionInterceptor());
if (this.getHttpPostMethod()) {
me.add(new POST());
}
// config others
configMoreInterceptors(me);
} } | public class class_name {
public void configInterceptor(Interceptors me) {
// add excetion interceptor
me.add(new ExceptionInterceptor());
if (this.getHttpPostMethod()) {
me.add(new POST()); // depends on control dependency: [if], data = [none]
}
// config others
configMoreInterceptors(me);
} } |
public class class_name {
@Override
public final void hndCartChan(final Map<String, Object> pRqVs,
final Cart pCart, final TaxDestination pTxRules) throws Exception {
@SuppressWarnings("unchecked")
List<Deliv> dlvMts = (List<Deliv>) pRqVs.get("dlvMts");
Deliv cdl = null;
for (Deliv dl : dlvMts) {... | public class class_name {
@Override
public final void hndCartChan(final Map<String, Object> pRqVs,
final Cart pCart, final TaxDestination pTxRules) throws Exception {
@SuppressWarnings("unchecked")
List<Deliv> dlvMts = (List<Deliv>) pRqVs.get("dlvMts");
Deliv cdl = null;
for (Deliv dl : dlvMts) {... |
public class class_name {
protected Map<String, String> getElementAttributes() {
// Preserve order of attributes
Map<String, String> attrs = new HashMap<>();
if (this.getAlphabet() != null) {
attrs.put("alphabet", this.getAlphabet().toString());
}
if (this.getPh() !... | public class class_name {
protected Map<String, String> getElementAttributes() {
// Preserve order of attributes
Map<String, String> attrs = new HashMap<>();
if (this.getAlphabet() != null) {
attrs.put("alphabet", this.getAlphabet().toString()); // depends on control dependency: [i... |
public class class_name {
public static MetadataTemplate getMetadataTemplate(
BoxAPIConnection api, String templateName, String scope, String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
... | public class class_name {
public static MetadataTemplate getMetadataTemplate(
BoxAPIConnection api, String templateName, String scope, String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields); // d... |
public class class_name {
protected void postEvent2C(final Object event) {
if (eventBus2C != null) {
eventBus2C.post(event);
} else {
logger.warn("Trying to post event {} to EventBusC which is null", event.getClass().getName());
}
} } | public class class_name {
protected void postEvent2C(final Object event) {
if (eventBus2C != null) {
eventBus2C.post(event); // depends on control dependency: [if], data = [none]
} else {
logger.warn("Trying to post event {} to EventBusC which is null", event.getClass().getName(... |
public class class_name {
public Set<Integer> removeConnections(String endpointId) {
Set<Integer> removed = this.entries.removeAll(endpointId);
if (!removed.isEmpty() && log.isDebugEnabled()) {
log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(... | public class class_name {
public Set<Integer> removeConnections(String endpointId) {
Set<Integer> removed = this.entries.removeAll(endpointId);
if (!removed.isEmpty() && log.isDebugEnabled()) {
log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(... |
public class class_name {
private static SubclassType typeofClassDefiningName(Node callName) {
// Check if the method name matches one of the class-defining methods.
String methodName = null;
if (callName.isGetProp()) {
methodName = callName.getLastChild().getString();
} else if (callName.isName(... | public class class_name {
private static SubclassType typeofClassDefiningName(Node callName) {
// Check if the method name matches one of the class-defining methods.
String methodName = null;
if (callName.isGetProp()) {
methodName = callName.getLastChild().getString(); // depends on control dependenc... |
public class class_name {
private final void computeGregorianAndDOWFields(int julianDay) {
computeGregorianFields(julianDay);
// Compute day of week: JD 0 = Monday
int dow = fields[DAY_OF_WEEK] = julianDayToDayOfWeek(julianDay);
// Calculate 1-based localized day of week
int d... | public class class_name {
private final void computeGregorianAndDOWFields(int julianDay) {
computeGregorianFields(julianDay);
// Compute day of week: JD 0 = Monday
int dow = fields[DAY_OF_WEEK] = julianDayToDayOfWeek(julianDay);
// Calculate 1-based localized day of week
int d... |
public class class_name {
private void findUsesSoftwareSystemsAnnotations(Component component, String typeName) {
try {
Class<?> type = getTypeRepository().loadClass(typeName);
UsesSoftwareSystem[] annotations = type.getAnnotationsByType(UsesSoftwareSystem.class);
for (UsesS... | public class class_name {
private void findUsesSoftwareSystemsAnnotations(Component component, String typeName) {
try {
Class<?> type = getTypeRepository().loadClass(typeName);
UsesSoftwareSystem[] annotations = type.getAnnotationsByType(UsesSoftwareSystem.class);
for (UsesS... |
public class class_name {
public ExecutionImpl createExecution(boolean initializeExecutionStartContext) {
// create the new child execution
ExecutionImpl createdExecution = newExecution();
// initialize sequence counter
createdExecution.setSequenceCounter(getSequenceCounter());
// manage the bidi... | public class class_name {
public ExecutionImpl createExecution(boolean initializeExecutionStartContext) {
// create the new child execution
ExecutionImpl createdExecution = newExecution();
// initialize sequence counter
createdExecution.setSequenceCounter(getSequenceCounter());
// manage the bidi... |
public class class_name {
public void marshall(Snapshot snapshot, ProtocolMarshaller protocolMarshaller) {
if (snapshot == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(snapshot.getDirectoryId(), D... | public class class_name {
public void marshall(Snapshot snapshot, ProtocolMarshaller protocolMarshaller) {
if (snapshot == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(snapshot.getDirectoryId(), D... |
public class class_name {
public static String getServletPath(Task task, String strServletParam)
{
String strServletName = null;
if (strServletParam == null)
strServletParam = Params.SERVLET;
if (task != null)
strServletName = task.getProperty(strServletParam);
... | public class class_name {
public static String getServletPath(Task task, String strServletParam)
{
String strServletName = null;
if (strServletParam == null)
strServletParam = Params.SERVLET;
if (task != null)
strServletName = task.getProperty(strServletParam);
... |
public class class_name {
private Attributes getAttributes(StartElement event)
{
AttributesImpl attrs = new AttributesImpl();
if (!event.isStartElement()) {
throw new InternalError("getAttributes() attempting to process: " + event);
}
// Add namspace declarations if re... | public class class_name {
private Attributes getAttributes(StartElement event)
{
AttributesImpl attrs = new AttributesImpl();
if (!event.isStartElement()) {
throw new InternalError("getAttributes() attempting to process: " + event);
}
// Add namspace declarations if re... |
public class class_name {
public void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners) {
this.lock();
try {
if (this.elementUnderEdit != null) {
Utils.safeSwingBlockingCall(new Runnable() {
@Override
public void run() {
endEdit(false... | public class class_name {
public void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners) {
this.lock();
try {
if (this.elementUnderEdit != null) {
Utils.safeSwingBlockingCall(new Runnable() {
@Override
public void run() {
endEdit(false... |
public class class_name {
public List<N> getConnectedComponents() {
setMarkedAllNodes(false);
ArrayList<N> roots = new ArrayList<N>();
//for (int i=0; i<nodes.size(); i++) {
for (N n : nodes) {
if (!n.isMarked()) {
roots.add(n);
dfs(n);
... | public class class_name {
public List<N> getConnectedComponents() {
setMarkedAllNodes(false);
ArrayList<N> roots = new ArrayList<N>();
//for (int i=0; i<nodes.size(); i++) {
for (N n : nodes) {
if (!n.isMarked()) {
roots.add(n); // depends on control dependen... |
public class class_name {
private List<ScoreWeight> processWidgetScores(List<Widget> widgets, ScoreCriteriaSettings scoreCriteriaSettings) {
List<ScoreWeight> scoreWeights = new ArrayList<>();
Map<String, ScoreComponentSettings> scoreParamSettingsMap = generateWidgetSettings(scoreCriteriaSettings);
Set<S... | public class class_name {
private List<ScoreWeight> processWidgetScores(List<Widget> widgets, ScoreCriteriaSettings scoreCriteriaSettings) {
List<ScoreWeight> scoreWeights = new ArrayList<>();
Map<String, ScoreComponentSettings> scoreParamSettingsMap = generateWidgetSettings(scoreCriteriaSettings);
Set<S... |
public class class_name {
public CompletableFuture<Collection<InetSocketAddress>> getRpcNodeAddresses(final Serializable userid) {
if (this.sncpNodeAddresses != null) {
tryAcquireSemaphore();
CompletableFuture<Collection<InetSocketAddress>> result = this.sncpNodeAddresses.getCollecti... | public class class_name {
public CompletableFuture<Collection<InetSocketAddress>> getRpcNodeAddresses(final Serializable userid) {
if (this.sncpNodeAddresses != null) {
tryAcquireSemaphore();
// depends on control dependency: [if], data = [none]
CompletableFuture<Collection<InetSocke... |
public class class_name {
public final String getClearDeletedMode() {
// m_clearDeletedMode will be null in initial display because constructor triggers this before member initialization
String result = m_clearDeletedMode;
if (result == null) {
result = MODE_CLEANDELETED_KEEP_RESTO... | public class class_name {
public final String getClearDeletedMode() {
// m_clearDeletedMode will be null in initial display because constructor triggers this before member initialization
String result = m_clearDeletedMode;
if (result == null) {
result = MODE_CLEANDELETED_KEEP_RESTO... |
public class class_name {
public void copyFrom(UnsafeRow row) {
// copyFrom is only available for UnsafeRow created from byte array.
assert (baseObject instanceof byte[]) && baseOffset == Platform.BYTE_ARRAY_OFFSET;
if (row.sizeInBytes > this.sizeInBytes) {
// resize the underlying byte[] if it's not... | public class class_name {
public void copyFrom(UnsafeRow row) {
// copyFrom is only available for UnsafeRow created from byte array.
assert (baseObject instanceof byte[]) && baseOffset == Platform.BYTE_ARRAY_OFFSET;
if (row.sizeInBytes > this.sizeInBytes) {
// resize the underlying byte[] if it's not... |
public class class_name {
public <T extends Throwable> JKExceptionHandlerInfo getHandler(final T t) {
JKExceptionHandlerInfo info = getHandler(t.getClass());
if (info != null) {
info.setException(t);
}
if (info == null && t.getCause() != null) {
info = getHandler(t.getCause());
}
return info;
} } | public class class_name {
public <T extends Throwable> JKExceptionHandlerInfo getHandler(final T t) {
JKExceptionHandlerInfo info = getHandler(t.getClass());
if (info != null) {
info.setException(t); // depends on control dependency: [if], data = [none]
}
if (info == null && t.getCause() != null) {
info ... |
public class class_name {
public static void close(SolrClient solrClient) {
Assert.notNull(solrClient, "SolrClient must not be null!");
try {
if (solrClient instanceof Closeable) {
solrClient.close();
} else {
Method shutdownMethod = ReflectionUtils.findMethod(solrClient.getClass(), "shutdown");
... | public class class_name {
public static void close(SolrClient solrClient) {
Assert.notNull(solrClient, "SolrClient must not be null!");
try {
if (solrClient instanceof Closeable) {
solrClient.close(); // depends on control dependency: [if], data = [none]
} else {
Method shutdownMethod = ReflectionU... |
public class class_name {
private void createClassLevelAccumulators(OnDemandStatsProducer<T> producer, Class producerClass) {
//several @Accumulators in accumulators holder
Accumulates accAnnotationHolder = AnnotationUtils.findAnnotation(producerClass, Accumulates.class);//(Accumulates) producerClass.g... | public class class_name {
private void createClassLevelAccumulators(OnDemandStatsProducer<T> producer, Class producerClass) {
//several @Accumulators in accumulators holder
Accumulates accAnnotationHolder = AnnotationUtils.findAnnotation(producerClass, Accumulates.class);//(Accumulates) producerClass.g... |
public class class_name {
public RequestedLocalProperties filterByNodesConstantSet(OptimizerNode node, int input) {
if (this.ordering != null) {
final FieldList involvedIndexes = this.ordering.getInvolvedIndexes();
for (int i = 0; i < involvedIndexes.size(); i++) {
if (!node.isFieldConstant(input, involved... | public class class_name {
public RequestedLocalProperties filterByNodesConstantSet(OptimizerNode node, int input) {
if (this.ordering != null) {
final FieldList involvedIndexes = this.ordering.getInvolvedIndexes();
for (int i = 0; i < involvedIndexes.size(); i++) {
if (!node.isFieldConstant(input, involved... |
public class class_name {
@Override
public CommerceNotificationTemplateUserSegmentRel remove(
Serializable primaryKey)
throws NoSuchNotificationTemplateUserSegmentRelException {
Session session = null;
try {
session = openSession();
CommerceNotificationTemplateUserSegmentRel commerceNotificationTempla... | public class class_name {
@Override
public CommerceNotificationTemplateUserSegmentRel remove(
Serializable primaryKey)
throws NoSuchNotificationTemplateUserSegmentRelException {
Session session = null;
try {
session = openSession();
CommerceNotificationTemplateUserSegmentRel commerceNotificationTempla... |
public class class_name {
public static byte[] toByteArray(long value) {
// Note that this code needs to stay compatible with GWT, which has known
// bugs when narrowing byte casts of long values occur.
byte[] result = new byte[8];
for (int i = 7; i >= 0; i--) {
result[i] = (byte) (value & 0xffL)... | public class class_name {
public static byte[] toByteArray(long value) {
// Note that this code needs to stay compatible with GWT, which has known
// bugs when narrowing byte casts of long values occur.
byte[] result = new byte[8];
for (int i = 7; i >= 0; i--) {
result[i] = (byte) (value & 0xffL)... |
public class class_name {
static public String format(Collection<?> collection, String property, String separator, boolean trim) {
StringBuilder sb = new StringBuilder();
if (collection != null){
for (Object o: collection){
Object p = null;
if (property == null){
p = o;
}else{
try ... | public class class_name {
static public String format(Collection<?> collection, String property, String separator, boolean trim) {
StringBuilder sb = new StringBuilder();
if (collection != null){
for (Object o: collection){
Object p = null;
if (property == null){
p = o;
// depends on control... |
public class class_name {
private static Prompt createPrompt(Resource<?> currentResource)
{
// [ currentdir]$
if (OperatingSystemUtils.isWindows())
{
List<TerminalCharacter> prompt = new LinkedList<>();
prompt.add(new TerminalCharacter('['));
for (char c : currentResourc... | public class class_name {
private static Prompt createPrompt(Resource<?> currentResource)
{
// [ currentdir]$
if (OperatingSystemUtils.isWindows())
{
List<TerminalCharacter> prompt = new LinkedList<>();
prompt.add(new TerminalCharacter('[')); // depends on control dependency: [if... |
public class class_name {
public Map<String, CmsPermissionSet> getReadPermissions() {
if (m_permissions == null) {
// create lazy map only on demand
m_permissions = CmsCollectionsGenericWrapper.createLazyMap(new CmsPermissionsLoaderTransformer());
}
return m_permissions... | public class class_name {
public Map<String, CmsPermissionSet> getReadPermissions() {
if (m_permissions == null) {
// create lazy map only on demand
m_permissions = CmsCollectionsGenericWrapper.createLazyMap(new CmsPermissionsLoaderTransformer()); // depends on control dependency: [if]... |
public class class_name {
int getSecondaryBefore(long p, int s) {
int index;
int previousSec, sec;
if(p == 0) {
index = (int)elements[IX_FIRST_SECONDARY_INDEX];
// Gap at the beginning of the secondary CE range.
previousSec = 0;
sec = (int)(elemen... | public class class_name {
int getSecondaryBefore(long p, int s) {
int index;
int previousSec, sec;
if(p == 0) {
index = (int)elements[IX_FIRST_SECONDARY_INDEX]; // depends on control dependency: [if], data = [none]
// Gap at the beginning of the secondary CE range.
... |
public class class_name {
@Override
void addRelation(int strength, CharSequence prefix, CharSequence str, CharSequence extension) {
String nfdPrefix;
if(prefix.length() == 0) {
nfdPrefix = "";
} else {
nfdPrefix = nfd.normalize(prefix);
}
String nfdSt... | public class class_name {
@Override
void addRelation(int strength, CharSequence prefix, CharSequence str, CharSequence extension) {
String nfdPrefix;
if(prefix.length() == 0) {
nfdPrefix = ""; // depends on control dependency: [if], data = [none]
} else {
nfdPrefix =... |
public class class_name {
public static Map getPropertyDescriptors(Class targetClass)
throws IntrospectionException, OgnlException
{
Map result;
if ((result = (Map) _propertyDescriptorCache.get(targetClass)) == null)
{
synchronized (_propertyDescriptorCache) {
... | public class class_name {
public static Map getPropertyDescriptors(Class targetClass)
throws IntrospectionException, OgnlException
{
Map result;
if ((result = (Map) _propertyDescriptorCache.get(targetClass)) == null)
{
synchronized (_propertyDescriptorCache) {
... |
public class class_name {
static public List<ICacheKeyGenerator> combine(List<ICacheKeyGenerator> a, List<ICacheKeyGenerator> b) {
if (a == null) {
return b;
} else if (b == null) {
return a;
}
if (a.size() != b.size()) {
throw new IllegalStateException();
}
ICacheKeyGenerator[] combined ... | public class class_name {
static public List<ICacheKeyGenerator> combine(List<ICacheKeyGenerator> a, List<ICacheKeyGenerator> b) {
if (a == null) {
return b;
// depends on control dependency: [if], data = [none]
} else if (b == null) {
return a;
// depends on control dependency: [if], data = [none]
}
... |
public class class_name {
void addOutput() {
if( output != null ) {
outputs.addLast( output );
}
output = state.pool.get();
} } | public class class_name {
void addOutput() {
if( output != null ) {
outputs.addLast( output ); // depends on control dependency: [if], data = [( output]
}
output = state.pool.get();
} } |
public class class_name {
public static Map<String, String> getLdapSettingsForApp(App app) {
Map<String, String> ldapSettings = new HashMap<>();
if (app != null) {
ldapSettings.put("security.ldap.server_url", "ldap://localhost:8389/");
ldapSettings.put("security.ldap.active_directory_domain", "");
ldapSet... | public class class_name {
public static Map<String, String> getLdapSettingsForApp(App app) {
Map<String, String> ldapSettings = new HashMap<>();
if (app != null) {
ldapSettings.put("security.ldap.server_url", "ldap://localhost:8389/");
ldapSettings.put("security.ldap.active_directory_domain", "");
ldapSet... |
public class class_name {
private void syncMeta(final TSMeta meta, final boolean overwrite) {
// storage *could* have a missing TSUID if something went pear shaped so
// only use the one that's configured. If the local is missing, we're foobar
if (meta.tsuid != null && !meta.tsuid.isEmpty()) {
tsuid ... | public class class_name {
private void syncMeta(final TSMeta meta, final boolean overwrite) {
// storage *could* have a missing TSUID if something went pear shaped so
// only use the one that's configured. If the local is missing, we're foobar
if (meta.tsuid != null && !meta.tsuid.isEmpty()) {
tsuid ... |
public class class_name {
private Collection<? extends java.security.cert.CRL>
parseX509orPKCS7CRL(InputStream is)
throws CRLException, IOException
{
Collection<X509CRLImpl> coll = new ArrayList<>();
byte[] data = readOneBlock(is);
if (data == null) {
return new ... | public class class_name {
private Collection<? extends java.security.cert.CRL>
parseX509orPKCS7CRL(InputStream is)
throws CRLException, IOException
{
Collection<X509CRLImpl> coll = new ArrayList<>();
byte[] data = readOneBlock(is);
if (data == null) {
return new ... |
public class class_name {
public ICompletableFuture<Map<K, Object>> submitToKeys(Set<K> keys, EntryProcessor entryProcessor) {
checkNotNull(keys, NULL_KEYS_ARE_NOT_ALLOWED);
if (keys.isEmpty()) {
return new SimpleCompletedFuture<>(Collections.emptyMap());
}
handleHazelcastIn... | public class class_name {
public ICompletableFuture<Map<K, Object>> submitToKeys(Set<K> keys, EntryProcessor entryProcessor) {
checkNotNull(keys, NULL_KEYS_ARE_NOT_ALLOWED);
if (keys.isEmpty()) {
return new SimpleCompletedFuture<>(Collections.emptyMap()); // depends on control dependency: [... |
public class class_name {
private void getAvailableChanges( final Map<String, String> changes) {
WorkflowSystem.OperationCompleted<DAT> task = stateChangeQueue.poll();
while (task != null && task.getNewState() != null) {
changes.putAll(task.getNewState().getState());
DAT result ... | public class class_name {
private void getAvailableChanges( final Map<String, String> changes) {
WorkflowSystem.OperationCompleted<DAT> task = stateChangeQueue.poll();
while (task != null && task.getNewState() != null) {
changes.putAll(task.getNewState().getState()); // depends on control d... |
public class class_name {
public boolean isEquivalent(final Plugin testPlugin) {
if ((testPlugin != null) && testPlugin instanceof SocketReceiver) {
SocketReceiver sReceiver = (SocketReceiver) testPlugin;
return (port == sReceiver.getPort() && super.isEquivalent(testPlugin));
}
return false;
... | public class class_name {
public boolean isEquivalent(final Plugin testPlugin) {
if ((testPlugin != null) && testPlugin instanceof SocketReceiver) {
SocketReceiver sReceiver = (SocketReceiver) testPlugin;
return (port == sReceiver.getPort() && super.isEquivalent(testPlugin)); // depends on control dep... |
public class class_name {
@Override
public String getEncodingFromLocale(Locale locale) {
if (null == locale) {
return null;
}
if (locale.equals(this.cachedLocale)) {
return this.cachedEncoding;
}
String encoding = localeMap.get(locale.toString());
... | public class class_name {
@Override
public String getEncodingFromLocale(Locale locale) {
if (null == locale) {
return null; // depends on control dependency: [if], data = [none]
}
if (locale.equals(this.cachedLocale)) {
return this.cachedEncoding; // depends on contr... |
public class class_name {
public static boolean isProperty(KeyValue kv) {
if (Bytes.equals(kv.getFamily(), PROP_COLUMN_FAMILY)) {
return true;
}
return false;
} } | public class class_name {
public static boolean isProperty(KeyValue kv) {
if (Bytes.equals(kv.getFamily(), PROP_COLUMN_FAMILY)) {
return true; // depends on control dependency: [if], data = [none]
}
return false;
} } |
public class class_name {
public static File[] getUserExtensionVersionFiles(File installDir) {
File[] versionFiles = null;
String userDirLoc = System.getenv(BootstrapConstants.ENV_WLP_USER_DIR);
File userDir = (userDirLoc != null) ? new File(userDirLoc) : ((installDir != null) ? new File(insta... | public class class_name {
public static File[] getUserExtensionVersionFiles(File installDir) {
File[] versionFiles = null;
String userDirLoc = System.getenv(BootstrapConstants.ENV_WLP_USER_DIR);
File userDir = (userDirLoc != null) ? new File(userDirLoc) : ((installDir != null) ? new File(insta... |
public class class_name {
List<MwDumpFile> findDumpsOnline(DumpContentType dumpContentType) {
List<String> dumpFileDates = findDumpDatesOnline(dumpContentType);
List<MwDumpFile> result = new ArrayList<>();
for (String dateStamp : dumpFileDates) {
if (dumpContentType == DumpContentType.DAILY) {
result.ad... | public class class_name {
List<MwDumpFile> findDumpsOnline(DumpContentType dumpContentType) {
List<String> dumpFileDates = findDumpDatesOnline(dumpContentType);
List<MwDumpFile> result = new ArrayList<>();
for (String dateStamp : dumpFileDates) {
if (dumpContentType == DumpContentType.DAILY) {
result.ad... |
public class class_name {
public void setDagEdges(java.util.Collection<CodeGenEdge> dagEdges) {
if (dagEdges == null) {
this.dagEdges = null;
return;
}
this.dagEdges = new java.util.ArrayList<CodeGenEdge>(dagEdges);
} } | public class class_name {
public void setDagEdges(java.util.Collection<CodeGenEdge> dagEdges) {
if (dagEdges == null) {
this.dagEdges = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
}
this.dagEd... |
public class class_name {
public void fatalErrorNotification(ManagedConnectionFactory managedConnectionFactory, MCWrapper mcWrapper, Object affinity) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(this, tc, "fatalErrorNotification");
}
requestingAcces... | public class class_name {
public void fatalErrorNotification(ManagedConnectionFactory managedConnectionFactory, MCWrapper mcWrapper, Object affinity) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(this, tc, "fatalErrorNotification"); // depends on control dependency:... |
public class class_name {
protected void copyGrammarOutput (final File sourceRoot,
final String packageName,
final File tempDirectory,
final String updatePattern) throws MojoExecutionException
{
try
{
... | public class class_name {
protected void copyGrammarOutput (final File sourceRoot,
final String packageName,
final File tempDirectory,
final String updatePattern) throws MojoExecutionException
{
try
{
... |
public class class_name {
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
lookAndFeelLabel = new javax.swing.JLabel();
lookAndFeelComboBox = new javax.swing.JComboBox();
// Look and Feel
String landfCurrent = (String)properties.get(ScreenUtil.LOO... | public class class_name {
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
lookAndFeelLabel = new javax.swing.JLabel();
lookAndFeelComboBox = new javax.swing.JComboBox();
// Look and Feel
String landfCurrent = (String)properties.get(ScreenUtil.LOO... |
public class class_name {
public static <T> T getAnnotation(final Class c, final Class<T> annotation) {
final List<T> found = getAnnotations(c, annotation);
if (found != null && !found.isEmpty()) {
return found.get(0);
} else {
return null;
}
} } | public class class_name {
public static <T> T getAnnotation(final Class c, final Class<T> annotation) {
final List<T> found = getAnnotations(c, annotation);
if (found != null && !found.isEmpty()) {
return found.get(0); // depends on control dependency: [if], data = [none]
} else {
... |
public class class_name {
public T remove() {
lock.lock();
try {
if(queue.isEmpty())
return null;
El<T> el=queue.poll();
count-=el.size;
not_full.signalAll();
return el.el;
}
finally {
lock.unlock()... | public class class_name {
public T remove() {
lock.lock();
try {
if(queue.isEmpty())
return null;
El<T> el=queue.poll();
count-=el.size; // depends on control dependency: [try], data = [none]
not_full.signalAll(); // depends on control de... |
public class class_name {
public double distance (Vector3 point) {
double distance = -Float.MAX_VALUE;
for (Plane plane : _planes) {
distance = Math.max(distance, plane.distance(point));
}
return distance;
} } | public class class_name {
public double distance (Vector3 point) {
double distance = -Float.MAX_VALUE;
for (Plane plane : _planes) {
distance = Math.max(distance, plane.distance(point)); // depends on control dependency: [for], data = [plane]
}
return distance;
} } |
public class class_name {
private static Constructor<?> getConstructor(final Class<?> genericClass, final Class<?>[] constructorParameterTypes) {
Constructor<?> constructor = null;
try {
constructor = genericClass.getConstructor(constructorParameterTypes);
} catch (final NoSuchMetho... | public class class_name {
private static Constructor<?> getConstructor(final Class<?> genericClass, final Class<?>[] constructorParameterTypes) {
Constructor<?> constructor = null;
try {
constructor = genericClass.getConstructor(constructorParameterTypes); // depends on control dependency: ... |
public class class_name {
public static void stop(Service service) {
if (service != null) {
Service.STATE state = service.getServiceState();
if (state == Service.STATE.STARTED) {
service.stop();
}
}
} } | public class class_name {
public static void stop(Service service) {
if (service != null) {
Service.STATE state = service.getServiceState();
if (state == Service.STATE.STARTED) {
service.stop(); // depends on control dependency: [if], data = [none]
}
}
} } |
public class class_name {
public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
String regex = this.getProperty(REGEX);
String server = req.getServerName();
if (regex != null)
if (server != null)
{
Stri... | public class class_name {
public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
String regex = this.getProperty(REGEX);
String server = req.getServerName();
if (regex != null)
if (server != null)
{
Stri... |
public class class_name {
public int doMove(int iRelPosition) throws DBException
{
// Note: actually, I should check if (iRelPos == FIRST) rec.moveFirst(),
// but, I use the same constants for First/Last as JDBC
if (this.getRecord().getDefaultOrder() != m_iLastOrder)
{ // Order w... | public class class_name {
public int doMove(int iRelPosition) throws DBException
{
// Note: actually, I should check if (iRelPos == FIRST) rec.moveFirst(),
// but, I use the same constants for First/Last as JDBC
if (this.getRecord().getDefaultOrder() != m_iLastOrder)
{ // Order w... |
public class class_name {
void lazyCopy(JSMessageData original) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
JmfTr.entry(this, tc, "lazyCopy", new Object[] { original });
synchronized (getMessageLockArtefact()) {
if (TraceComponent.isAnyTracingEnabled() &&... | public class class_name {
void lazyCopy(JSMessageData original) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
JmfTr.entry(this, tc, "lazyCopy", new Object[] { original });
synchronized (getMessageLockArtefact()) {
if (TraceComponent.isAnyTracingEnabled() &&... |
public class class_name {
public void scanControllers()
{
for (GVRCursorController controller : getCursorControllers())
{
if (!controllers.contains(controller))
{
controllers.add(controller);
}
if (controller.isConnected())
... | public class class_name {
public void scanControllers()
{
for (GVRCursorController controller : getCursorControllers())
{
if (!controllers.contains(controller))
{
controllers.add(controller); // depends on control dependency: [if], data = [none]
}... |
public class class_name {
public final int size() {
int overallSize = 0;
if (subSets != null) {
for (int i = 0; i < subSets.length; i++) {
overallSize = overallSize + subSets[i].size();
}
}
return overallSize;
} } | public class class_name {
public final int size() {
int overallSize = 0;
if (subSets != null) {
for (int i = 0; i < subSets.length; i++) {
overallSize = overallSize + subSets[i].size(); // depends on control dependency: [for], data = [i]
}
}
retur... |
public class class_name {
public static State jsonObjectToState(JsonObject jsonObject, String... excludeKeys) {
State state = new State();
List<String> excludeKeysList = excludeKeys == null ? Lists.<String>newArrayList() : Arrays.asList(excludeKeys);
for (Map.Entry<String, JsonElement> jsonObjectEntry : js... | public class class_name {
public static State jsonObjectToState(JsonObject jsonObject, String... excludeKeys) {
State state = new State();
List<String> excludeKeysList = excludeKeys == null ? Lists.<String>newArrayList() : Arrays.asList(excludeKeys);
for (Map.Entry<String, JsonElement> jsonObjectEntry : js... |
public class class_name {
private static ConfigurationModule addAll(final ConfigurationModule conf,
final OptionalParameter<String> param,
final File folder) {
ConfigurationModule result = conf;
final File[] files = folder.... | public class class_name {
private static ConfigurationModule addAll(final ConfigurationModule conf,
final OptionalParameter<String> param,
final File folder) {
ConfigurationModule result = conf;
final File[] files = folder.... |
public class class_name {
private void applyL1Reg(final double eta_t, Vec x)
{
//apply l1 regularization
if(lambda1 > 0)
{
l1U += eta_t*lambda1;//line 6: in Tsuruoka et al paper, figure 2
for(int k = 0; k < ws.length; k++)
{
final Vec w_k ... | public class class_name {
private void applyL1Reg(final double eta_t, Vec x)
{
//apply l1 regularization
if(lambda1 > 0)
{
l1U += eta_t*lambda1;//line 6: in Tsuruoka et al paper, figure 2 // depends on control dependency: [if], data = [none]
for(int k = 0; k < ws.len... |
public class class_name {
public static String arrayListToCSV(List<String> list) {
StringBuilder csv = new StringBuilder();
for (String str : list) {
csv.append(str);
csv.append(",");
}
int lastIndex = csv.length() - 1;
char last = csv.charAt(lastIndex);
... | public class class_name {
public static String arrayListToCSV(List<String> list) {
StringBuilder csv = new StringBuilder();
for (String str : list) {
csv.append(str); // depends on control dependency: [for], data = [str]
csv.append(","); // depends on control dependency: [for], ... |
public class class_name {
static void openURL(String url) {
try {
openURL(new URL(url));
} catch (MalformedURLException ex) {
Tools.showError(ex);
}
} } | public class class_name {
static void openURL(String url) {
try {
openURL(new URL(url)); // depends on control dependency: [try], data = [none]
} catch (MalformedURLException ex) {
Tools.showError(ex);
} // depends on control dependency: [catch], data = [none]
} } |
public class class_name {
public LabelAlphabet DefaultLabelAlphabet() {
IAlphabet alphabet = null;
if (!maps.containsKey(DefalutLabelName)) {
maps.put(DefalutLabelName, new LabelAlphabet());
alphabet = maps.get(DefalutLabelName);
}else {
alphabet = maps.get(DefalutLabelName);
if (!(alphabet in... | public class class_name {
public LabelAlphabet DefaultLabelAlphabet() {
IAlphabet alphabet = null;
if (!maps.containsKey(DefalutLabelName)) {
maps.put(DefalutLabelName, new LabelAlphabet());
// depends on control dependency: [if], data = [none]
alphabet = maps.get(DefalutLabelName);
// depends on contro... |
public class class_name {
public static Info inv( final Variable A , ManagerTempVariables manager) {
Info ret = new Info();
if( A instanceof VariableMatrix ) {
final VariableMatrix output = manager.createMatrix();
ret.output = output;
ret.op = new Operation("inv-m")... | public class class_name {
public static Info inv( final Variable A , ManagerTempVariables manager) {
Info ret = new Info();
if( A instanceof VariableMatrix ) {
final VariableMatrix output = manager.createMatrix();
ret.output = output; // depends on control dependency: [if], dat... |
public class class_name {
public static File createTempDirectory(String prefix) {
File temp = null;
try {
temp = File.createTempFile(prefix != null ? prefix : "temp", Long.toString(System.nanoTime()));
if (!(temp.delete())) {
throw new IOException("Could not delete temp file: "
+ temp.getAbsoluteP... | public class class_name {
public static File createTempDirectory(String prefix) {
File temp = null;
try {
temp = File.createTempFile(prefix != null ? prefix : "temp", Long.toString(System.nanoTime())); // depends on control dependency: [try], data = [none]
if (!(temp.delete())) {
throw new IOException... |
public class class_name {
public void setProperty(Property property) {
// mValues could be null if this is being constructed piecemeal. Just record the
// propertyName to be used later when setValues() is called if so.
if (mValues != null) {
PropertyValuesHolder valuesHolder = mValu... | public class class_name {
public void setProperty(Property property) {
// mValues could be null if this is being constructed piecemeal. Just record the
// propertyName to be used later when setValues() is called if so.
if (mValues != null) {
PropertyValuesHolder valuesHolder = mValu... |
public class class_name {
public static void pushMessages(String queueURL, List<String> messages) {
if (!StringUtils.isBlank(queueURL) && messages != null) {
// only allow strings - ie JSON
try {
int j = 0;
List<SendMessageBatchRequestEntry> msgs = new ArrayList<>(MAX_MESSAGES);
for (int i = 0; i <... | public class class_name {
public static void pushMessages(String queueURL, List<String> messages) {
if (!StringUtils.isBlank(queueURL) && messages != null) {
// only allow strings - ie JSON
try {
int j = 0;
List<SendMessageBatchRequestEntry> msgs = new ArrayList<>(MAX_MESSAGES);
for (int i = 0; i <... |
public class class_name {
public void toAssocRateVector(Term t, CrossTable table, AssociationRate assocRateFunction, boolean normalize) {
double assocRate;
for(Entry coterm:t.getContext().getEntries()) {
ContextData contextData = computeContextData(table, t, coterm.getCoTerm());
assocRate = assocRateFunction... | public class class_name {
public void toAssocRateVector(Term t, CrossTable table, AssociationRate assocRateFunction, boolean normalize) {
double assocRate;
for(Entry coterm:t.getContext().getEntries()) {
ContextData contextData = computeContextData(table, t, coterm.getCoTerm());
assocRate = assocRateFunction... |
public class class_name {
private StorageNode getStorageNode(String groupName) {
if (null == groupName) {
return trackerClient.getStoreStorage();
} else {
return trackerClient.getStoreStorage(groupName);
}
} } | public class class_name {
private StorageNode getStorageNode(String groupName) {
if (null == groupName) {
return trackerClient.getStoreStorage(); // depends on control dependency: [if], data = [none]
} else {
return trackerClient.getStoreStorage(groupName); // depends on control... |
public class class_name {
public static byte[] getAudio24(AudioFrame frame) {
BytePointer[] planes = frame.getPlanes();
SampleFormat format = frame.getAudioFormat().getSampleFormat();
int depth = getFormatDepth(format);
int length = planes[0].limit() / depth;
int channels = planes.length;
byte[] samples =... | public class class_name {
public static byte[] getAudio24(AudioFrame frame) {
BytePointer[] planes = frame.getPlanes();
SampleFormat format = frame.getAudioFormat().getSampleFormat();
int depth = getFormatDepth(format);
int length = planes[0].limit() / depth;
int channels = planes.length;
byte[] samples =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.