_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q16700 | ElementTreeView.activateChildren | train | @Override
public void activateChildren(boolean activate) {
if (activePane == null || !activePane.isVisible()) {
ElementBase active = getFirstVisibleChild();
setActivePane((ElementTreePane) active);
}
if (activePane != null) {
activePane.activate(a... | java | {
"resource": ""
} |
q16701 | ElementTreeView.setActivePane | train | protected void setActivePane(ElementTreePane pane) {
if (pane == activePane) {
return;
}
if (activePane != null) {
activePane.makeActivePane(false);
}
activePane = pane;
if (activePane != null) {
activePane.ma... | java | {
"resource": ""
} |
q16702 | AliasTypeRegistry.get | train | @Override
public AliasType get(String key) {
key = key.toUpperCase();
AliasType type = super.get(key);
if (type == null) {
register(type = new AliasType(key));
}
return type;
} | java | {
"resource": ""
} |
q16703 | AliasTypeRegistry.setApplicationContext | train | @Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (StringUtils.isEmpty(propertyFile)) {
return;
}
for (String pf : propertyFile.split("\\,")) {
loadAliases(applicationContext, pf);
}
if (fil... | java | {
"resource": ""
} |
q16704 | AliasTypeRegistry.loadAliases | train | private void loadAliases(ApplicationContext applicationContext, String propertyFile) {
if (propertyFile.isEmpty()) {
return;
}
Resource[] resources;
try {
resources = applicationContext.getResources(propertyFile);
} catch (IOException e) {
lo... | java | {
"resource": ""
} |
q16705 | AliasTypeRegistry.register | train | private void register(String key, String alias) {
String[] pcs = key.split(PREFIX_DELIM_REGEX, 2);
if (pcs.length != 2) {
throw new IllegalArgumentException("Illegal key value: " + key);
}
register(pcs[0], pcs[1], alias);
} | java | {
"resource": ""
} |
q16706 | ComparablePair.naturalOrder | train | public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>> Comparator<Pair<T1, T2>> naturalOrder() {
return new Comparator<Pair<T1,T2>>() {
@Override
public int compare(Pair<T1, T2> lhs, Pair<T1, T2> rhs) {
return compareTo(lhs, rhs);
}
};
... | java | {
"resource": ""
} |
q16707 | PHS398ResearchPlanBaseGenerator.getAppendixAttachedFileDataTypes | train | protected AttachedFileDataType[] getAppendixAttachedFileDataTypes() {
return pdDoc.getDevelopmentProposal().getNarratives().stream()
.filter(narrative -> narrative.getNarrativeType().getCode() != null && Integer.parseInt(narrative.getNarrativeType().getCode()) == APPENDIX)
.map(t... | java | {
"resource": ""
} |
q16708 | S2SAdobeFormAttachmentBaseGenerator.nodeToDom | train | public Document nodeToDom(org.w3c.dom.Node node) throws S2SException {
try {
javax.xml.transform.TransformerFactory tf = javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer xf = tf.newTransformer();
javax.xml.transform.dom.DOMResult dr = new ... | java | {
"resource": ""
} |
q16709 | S2SAdobeFormAttachmentBaseGenerator.stringToDom | train | public Document stringToDom(String xmlSource) throws S2SException {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.parse(new Input... | java | {
"resource": ""
} |
q16710 | S2SAdobeFormAttachmentBaseGenerator.docToString | train | public String docToString(Document node) throws S2SException {
try {
DOMSource domSource = new DOMSource(node);
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
TransformerFactory tf = TransformerFactory.newInstance();
... | java | {
"resource": ""
} |
q16711 | S2SAdobeFormAttachmentBaseGenerator.addSubAwdAttachments | train | protected void addSubAwdAttachments(BudgetSubAwardsContract budgetSubAwards) {
List<? extends BudgetSubAwardAttachmentContract> subAwardAttachments = budgetSubAwards.getBudgetSubAwardAttachments();
for (BudgetSubAwardAttachmentContract budgetSubAwardAttachment : subAwardAttachments) {
Attach... | java | {
"resource": ""
} |
q16712 | S2SAdobeFormAttachmentBaseGenerator.findBudgetSubawards | train | @SuppressWarnings("unchecked")
private List<BudgetSubAwardsContract> findBudgetSubawards(String namespace, BudgetContract budget,boolean checkNull) {
List<BudgetSubAwardsContract> budgetSubAwardsList = new ArrayList<>();
for (BudgetSubAwardsContract subAwards : budget.getBudgetSubAwards()) {
... | java | {
"resource": ""
} |
q16713 | PerformanceMetrics.createNew | train | public static PerformanceMetrics createNew(String action, String descriptor, String correlationId) {
return new PerformanceMetrics(KEY_GEN.getAndIncrement(), 0, action, null, descriptor, correlationId);
} | java | {
"resource": ""
} |
q16714 | PerformanceMetrics.getStartAction | train | public Action0 getStartAction() {
return new Action0() {
@Override
public void call() {
if (startTime == null) {
startTime = new Date().getTime();
}
}
};
} | java | {
"resource": ""
} |
q16715 | PathTools.createTempFolder | train | public static Path createTempFolder(String prefix) throws IOException {
Path parent = Paths.get(System.getProperty("java.io.tmpdir"));
if (!Files.isDirectory(parent)) {
throw new IOException("java.io.tmpdir points to a non-existing folder: " + parent);
}
Path ret = null;
int i = 0;
do {
ret = parent.r... | java | {
"resource": ""
} |
q16716 | PathTools.deleteRecursive | train | public static void deleteRecursive(Path start, boolean deleteStart) throws IOException {
Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
Files.delete(file);
return FileVisitResult.CONTINUE;
... | java | {
"resource": ""
} |
q16717 | MainController.afterInitialized | train | @Override
public void afterInitialized(BaseComponent comp) {
super.afterInitialized(comp);
propertyGrid = PropertyGrid.create(null, comp, true);
getPlugin().registerProperties(this, "provider", "group");
} | java | {
"resource": ""
} |
q16718 | MainController.setProvider | train | public void setProvider(String beanId) {
provider = getAppContext().getBean(beanId, ISettingsProvider.class);
providerBeanId = beanId;
init();
} | java | {
"resource": ""
} |
q16719 | MainController.init | train | private void init() {
if (provider != null) {
propertyGrid.setTarget(StringUtils.isEmpty(groupId) ? null : new Settings(groupId, provider));
}
} | java | {
"resource": ""
} |
q16720 | FixtureAnnotationClassScanner.addCollectionProviderFixtureType | train | private void addCollectionProviderFixtureType(Class<?> clazz, List<FixtureType> listFixtureType, Set<Method> methods) {
for (Method method : methods) {
if (Collection.class.isAssignableFrom(method.getReturnType())) {
FixtureType fixtureType = new FixtureType();
if (m... | java | {
"resource": ""
} |
q16721 | Command.unbind | train | public void unbind(BaseUIComponent component) {
if (componentBindings.remove(component)) {
keyEventListener.registerComponent(component, false);
CommandUtil.updateShortcuts(component, shortcutBindings, true);
setCommandTarget(component, null);
}
} | java | {
"resource": ""
} |
q16722 | Command.shortcutChanged | train | private void shortcutChanged(String shortcut, boolean unbind) {
Set<String> bindings = new HashSet<>();
bindings.add(shortcut);
for (BaseUIComponent component : componentBindings) {
CommandUtil.updateShortcuts(component, bindings, unbind);
}
} | java | {
"resource": ""
} |
q16723 | Command.setCommandTarget | train | private void setCommandTarget(BaseComponent component, BaseComponent commandTarget) {
if (commandTarget == null) {
commandTarget = (BaseComponent) component.removeAttribute(getTargetAttributeName());
if (commandTarget != null && commandTarget.hasAttribute(ATTR_DUMMY)) {
... | java | {
"resource": ""
} |
q16724 | Command.getCommandTarget | train | private BaseComponent getCommandTarget(BaseComponent component) {
BaseComponent commandTarget = (BaseComponent) component.getAttribute(getTargetAttributeName());
return commandTarget == null ? component : commandTarget;
} | java | {
"resource": ""
} |
q16725 | HelpModule.getLocalizedId | train | public static String getLocalizedId(String id, Locale locale) {
String locstr = locale == null ? "" : ("_" + locale.toString());
return id + locstr;
} | java | {
"resource": ""
} |
q16726 | GrantApplicationHash.computeAttachmentHash | train | public static String computeAttachmentHash(byte[] attachment) {
byte[] rawDigest = MESSAGE_DIGESTER.digest(attachment);
return Base64.encode(rawDigest);
} | java | {
"resource": ""
} |
q16727 | EventsModule.mapEventSources | train | @SuppressWarnings("unchecked")
@VisibleForTesting
Map<String, Class<? extends Service>> mapEventSources() throws IOException {
/* Obtains all classpath's top level classes */
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Set<ClassPath.ClassInfo> classes = Cla... | java | {
"resource": ""
} |
q16728 | JMSUtil.getClientId | train | public static String getClientId(Connection connection) {
String clientId = null;
try {
clientId = connection == null ? null : connection.getClientID();
} catch (JMSException e) {}
return clientId;
} | java | {
"resource": ""
} |
q16729 | JMSUtil.getMessageSelector | train | public static String getMessageSelector(String eventName, IPublisherInfo publisherInfo) {
StringBuilder sb = new StringBuilder(
"(JMSType='" + eventName + "' OR JMSType LIKE '" + eventName + ".%') AND (Recipients IS NULL");
if (publisherInfo != null) {
for (String se... | java | {
"resource": ""
} |
q16730 | JMSUtil.addRecipientSelector | train | private static void addRecipientSelector(String value, StringBuilder sb) {
if (value != null) {
sb.append(" OR Recipients LIKE '%,").append(value).append(",%'");
}
} | java | {
"resource": ""
} |
q16731 | JashingServer.getAggregationHandler | train | private HttpHandler getAggregationHandler() throws ServletException {
DeploymentInfo deploymentInfo = Servlets
.deployment()
.setClassLoader(JashingServer.class.getClassLoader())
.setContextPath("/")
.setDeploymentName("jashing")
.a... | java | {
"resource": ""
} |
q16732 | PrepareLibs.loadLibFiles | train | public static String[] loadLibFiles(String fileSuffix, String... libAbsoluteClassPaths) {
Set<String> failedDllPaths = new HashSet<String>();
for (String libAbsoluteClassPath : libAbsoluteClassPaths) {
String libraryName = libAbsoluteClassPath
.substring(libAbsoluteCl... | java | {
"resource": ""
} |
q16733 | RelatedClassMap.getCardinalities | train | public Cardinalities getCardinalities(Class<? extends ElementBase> sourceClass) {
Class<?> clazz = sourceClass;
Cardinalities cardinalities = null;
while (cardinalities == null && clazz != null) {
cardinalities = map.get(clazz);
clazz = clazz == ElementBase.class... | java | {
"resource": ""
} |
q16734 | RelatedClassMap.getOrCreateCardinalities | train | private Cardinalities getOrCreateCardinalities(Class<? extends ElementBase> sourceClass) {
Cardinalities cardinalities = map.get(sourceClass);
if (cardinalities == null) {
map.put(sourceClass, cardinalities = new Cardinalities());
}
return cardinalities;
... | java | {
"resource": ""
} |
q16735 | RelatedClassMap.addCardinality | train | public void addCardinality(Class<? extends ElementBase> sourceClass, Class<? extends ElementBase> targetClass,
int maxOccurrences) {
Cardinality cardinality = new Cardinality(sourceClass, targetClass, maxOccurrences);
getOrCreateCardinalities(sourceClass).addCardinality(ca... | java | {
"resource": ""
} |
q16736 | RelatedClassMap.getTotalCardinality | train | public int getTotalCardinality(Class<? extends ElementBase> sourceClass) {
Cardinalities cardinalities = getCardinalities(sourceClass);
return cardinalities == null ? 0 : cardinalities.total;
} | java | {
"resource": ""
} |
q16737 | RelatedClassMap.isRelated | train | public boolean isRelated(Class<? extends ElementBase> sourceClass, Class<? extends ElementBase> targetClass) {
return getCardinality(sourceClass, targetClass).maxOccurrences > 0;
} | java | {
"resource": ""
} |
q16738 | RelatedClassMap.getCardinality | train | public Cardinality getCardinality(Class<? extends ElementBase> sourceClass, Class<? extends ElementBase> targetClass) {
Cardinalities cardinalities = getCardinalities(sourceClass);
Cardinality cardinality = cardinalities == null ? null : cardinalities.getCardinality(targetClass);
return cardinal... | java | {
"resource": ""
} |
q16739 | AppFramework.setApplicationContext | train | @Override
public void setApplicationContext(ApplicationContext appContext) throws BeansException {
if (this.appContext != null) {
throw new ApplicationContextException("Attempt to reinitialize application context.");
}
this.appContext = appContext;
} | java | {
"resource": ""
} |
q16740 | AppFramework.unregisterObject | train | public synchronized boolean unregisterObject(Object object) {
int i = MiscUtil.indexOfInstance(registeredObjects, object);
if (i > -1) {
registeredObjects.remove(i);
for (IRegisterEvent onRegister : onRegisterList) {
onRegister.unregisterObje... | java | {
"resource": ""
} |
q16741 | AppFramework.findObject | train | public synchronized Object findObject(Class<?> clazz, Object previousInstance) {
int i = previousInstance == null ? -1 : MiscUtil.indexOfInstance(registeredObjects, previousInstance);
for (i++; i < registeredObjects.size(); i++) {
Object object = registeredObjects.get(i);
... | java | {
"resource": ""
} |
q16742 | AppFramework.postProcessAfterInitialization | train | @Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
registerObject(bean);
return bean;
} | java | {
"resource": ""
} |
q16743 | ElementLayout.afterInitialize | train | @Override
public void afterInitialize(boolean deserializing) throws Exception {
super.afterInitialize(deserializing);
if (linked) {
internalDeserialize(false);
}
initializing = false;
} | java | {
"resource": ""
} |
q16744 | ElementLayout.internalDeserialize | train | private void internalDeserialize(boolean forced) {
if (!forced && loaded) {
return;
}
lockDescendants(false);
removeChildren();
loaded = true;
try {
if (linked) {
checkForCircularReference();
}
... | java | {
"resource": ""
} |
q16745 | ElementLayout.checkForCircularReference | train | private void checkForCircularReference() {
ElementLayout layout = this;
while ((layout = layout.getAncestor(ElementLayout.class)) != null) {
if (layout.linked && layout.shared == shared && layout.layoutName.equals(layoutName)) {
CWFException.raise("Circular reference... | java | {
"resource": ""
} |
q16746 | ElementLayout.lockDescendants | train | private void lockDescendants(Iterable<ElementBase> children, boolean lock) {
for (ElementBase child : children) {
child.setLocked(lock);
lockDescendants(child.getChildren(), lock);
}
} | java | {
"resource": ""
} |
q16747 | ElementLayout.setLinked | train | public void setLinked(boolean linked) {
if (linked != this.linked) {
this.linked = linked;
if (!initializing) {
internalDeserialize(true);
getRoot().activate(true);
}
}
} | java | {
"resource": ""
} |
q16748 | Configs.getSelfConfigDecimal | train | public static BigDecimal getSelfConfigDecimal(String configAbsoluteClassPath, IConfigKey key) {
OneProperties configs = otherConfigs.get(configAbsoluteClassPath);
if (configs == null) {
addSelfConfigs(configAbsoluteClassPath, null);
configs = otherConfigs.get(configAbsoluteCl... | java | {
"resource": ""
} |
q16749 | Configs.isHavePathSelfConfig | train | public static boolean isHavePathSelfConfig(IConfigKeyWithPath key) {
String configAbsoluteClassPath = key.getConfigPath();
return isSelfConfig(configAbsoluteClassPath, key);
} | java | {
"resource": ""
} |
q16750 | Configs.modifySystemConfig | train | public static void modifySystemConfig(IConfigKey key, String value) throws IOException {
systemConfigs.modifyConfig(key, value);
} | java | {
"resource": ""
} |
q16751 | EventManager.hostSubscribe | train | private void hostSubscribe(String eventName, boolean subscribe) {
if (globalEventDispatcher != null) {
try {
globalEventDispatcher.subscribeRemoteEvent(eventName, subscribe);
} catch (Throwable e) {
log.error(
"Error " + (subscribe ? "s... | java | {
"resource": ""
} |
q16752 | AbstractQueueFactory.setDefaultObserver | train | public AbstractQueueFactory<T, ID, DATA> setDefaultObserver(
IQueueObserver<ID, DATA> defaultObserver) {
this.defaultObserver = defaultObserver;
return this;
} | java | {
"resource": ""
} |
q16753 | AbstractQueueFactory.initQueue | train | protected void initQueue(T queue, QueueSpec spec) throws Exception {
queue.setObserver(defaultObserver);
queue.init();
} | java | {
"resource": ""
} |
q16754 | AbstractQueueFactory.createAndInitQueue | train | protected T createAndInitQueue(QueueSpec spec) throws Exception {
T queue = createQueueInstance(spec);
queue.setQueueName(spec.name);
initQueue(queue, spec);
return queue;
} | java | {
"resource": ""
} |
q16755 | RRBudgetV1_0Generator.getBudgetYear1DataType | train | private BudgetYear1DataType getBudgetYear1DataType(
BudgetPeriodDto periodInfo) {
BudgetYear1DataType budgetYear = BudgetYear1DataType.Factory
.newInstance();
budgetYear.setBudgetPeriodStartDate(s2SDateTimeService
.convertDateToCalendar(periodInfo.getStartDate()));
budgetYear.setBudgetPeriodEndDate(s2... | java | {
"resource": ""
} |
q16756 | RRBudgetV1_0Generator.getBudgetSummary | train | private BudgetSummary getBudgetSummary(BudgetSummaryDto budgetSummaryData) {
BudgetSummary budgetSummary = BudgetSummary.Factory.newInstance();
// Set default values for mandatory fields
budgetSummary
.setCumulativeTotalFundsRequestedSeniorKeyPerson(BigDecimal.ZERO);
budgetSummary
.setCumulativeTotalFu... | java | {
"resource": ""
} |
q16757 | RRBudgetV1_0Generator.getCumulativeTravels | train | private CumulativeTravels getCumulativeTravels(
BudgetSummaryDto budgetSummaryData) {
CumulativeTravels cumulativeTravels = CumulativeTravels.Factory
.newInstance();
if (budgetSummaryData.getCumDomesticTravel() != null) {
cumulativeTravels
.setCumulativeDomesticTravelCosts(budgetSummaryData
.g... | java | {
"resource": ""
} |
q16758 | RRBudgetV1_0Generator.getOtherPersonnel | train | private OtherPersonnel getOtherPersonnel(BudgetPeriodDto periodInfo) {
OtherPersonnel otherPersonnel = OtherPersonnel.Factory.newInstance();
int OtherpersonalCount = 0;
List<OtherPersonnelDataType> otherPersonnelList = new ArrayList<>();
OtherPersonnelDataType otherPersonnelDataTypeArray[] = new OtherPersonnelD... | java | {
"resource": ""
} |
q16759 | RRBudgetV1_0Generator.getEquipment | train | private Equipment getEquipment(BudgetPeriodDto periodInfo) {
Equipment equipment = Equipment.Factory.newInstance();
NarrativeContract extraEquipmentNarr = null;
if (periodInfo != null && periodInfo.getEquipment() != null
&& periodInfo.getEquipment().size() > 0) {
// Evaluating Equipments.
List<Equipment... | java | {
"resource": ""
} |
q16760 | RRBudgetV1_0Generator.getTravel | train | private Travel getTravel(BudgetPeriodDto periodInfo) {
Travel travel = Travel.Factory.newInstance();
if (periodInfo != null) {
if (periodInfo.getDomesticTravelCost() != null) {
travel.setDomesticTravelCost(periodInfo.getDomesticTravelCost()
.bigDecimalValue());
}
if (periodInfo.getForeignTravelC... | java | {
"resource": ""
} |
q16761 | RRBudgetV1_0Generator.getParticipantTraineeSupportCosts | train | private ParticipantTraineeSupportCosts getParticipantTraineeSupportCosts(
BudgetPeriodDto periodInfo) {
ParticipantTraineeSupportCosts traineeSupportCosts = ParticipantTraineeSupportCosts.Factory
.newInstance();
if (periodInfo != null) {
traineeSupportCosts.setTuitionFeeHealthInsurance(periodInfo
.ge... | java | {
"resource": ""
} |
q16762 | XMLViewer.showXML | train | public static Window showXML(Document document, BaseUIComponent parent) {
Map<String, Object> args = Collections.singletonMap("document", document);
boolean modal = parent == null;
Window dialog = PopupDialog.show(XMLConstants.VIEW_DIALOG, args, modal, modal, modal, null);
if (p... | java | {
"resource": ""
} |
q16763 | XMLViewer.showCWF | train | public static Window showCWF(BaseComponent root, String... excludedProperties) {
Window window = showXML(CWF2XML.toDocument(root, excludedProperties));
window.setTitle("CWF Markup");
return window;
} | java | {
"resource": ""
} |
q16764 | FrameworkUtil.setAttribute | train | public static void setAttribute(String key, Object value) {
assertInitialized();
getAppFramework().setAttribute(key, value);
} | java | {
"resource": ""
} |
q16765 | PluginController.afterInitialized | train | @Override
public void afterInitialized(BaseComponent comp) {
super.afterInitialized(comp);
PluginContainer container = comp.getAncestor(PluginContainer.class, true);
plugin = (ElementPlugin) ElementUI.getAssociatedElement(container);
} | java | {
"resource": ""
} |
q16766 | PluginController.attachController | train | public void attachController(BaseComponent comp, IAutoWired controller) {
plugin.tryRegisterListener(controller, true);
comp.wireController(controller);
} | java | {
"resource": ""
} |
q16767 | PluginController.removeThread | train | @Override
protected IAbortable removeThread(IAbortable thread) {
super.removeThread(thread);
if (!hasActiveThreads()) {
showBusy(null);
}
return thread;
} | java | {
"resource": ""
} |
q16768 | ActionListener.bindActionListeners | train | public static void bindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
if (actionListeners != null) {
for (ActionListener actionListener : actionListeners) {
actionListener.bind(target);
}
}
} | java | {
"resource": ""
} |
q16769 | ActionListener.unbindActionListeners | train | public static void unbindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
if (actionListeners != null) {
for (ActionListener listener : actionListeners) {
listener.unbind(target);
}
}
} | java | {
"resource": ""
} |
q16770 | ActionListener.eventCallback | train | @Override
public void eventCallback(String eventName, Object eventData) {
for (IActionTarget target : new ArrayList<>(targets)) {
try {
target.doAction(action);
} catch (Throwable t) {
}
}
} | java | {
"resource": ""
} |
q16771 | ActionListener.bind | train | private void bind(IActionTarget target) {
if (targets.isEmpty()) {
getEventManager().subscribe(eventName, this);
}
targets.add(target);
} | java | {
"resource": ""
} |
q16772 | ActionListener.unbind | train | private void unbind(IActionTarget target) {
if (targets.remove(target) && targets.isEmpty()) {
getEventManager().unsubscribe(eventName, this);
}
} | java | {
"resource": ""
} |
q16773 | ConsumerService.getCallbacks | train | private synchronized LinkedHashSet<IMessageCallback> getCallbacks(String channel, boolean autoCreate, boolean clone) {
LinkedHashSet<IMessageCallback> result = callbacks.get(channel);
if (result == null && autoCreate) {
callbacks.put(channel, result = new LinkedHashSet<>());
... | java | {
"resource": ""
} |
q16774 | ConsumerService.onMessage | train | @Override
public void onMessage(String channel, Message message) {
if (MessageUtil.isMessageExcluded(message, RecipientType.CONSUMER, nodeId)) {
return;
}
if (updateDelivered(message)) {
LinkedHashSet<IMessageCallback> callbacks = getCallbacks(channel, false,... | java | {
"resource": ""
} |
q16775 | ConsumerService.updateDelivered | train | private boolean updateDelivered(Message message) {
if (consumers.size() <= 1) {
return true;
}
String pubid = (String) message.getMetadata("cwf.pub.event");
return deliveredMessageCache.putIfAbsent(pubid, "") == null;
} | java | {
"resource": ""
} |
q16776 | ConsumerService.dispatchMessages | train | protected void dispatchMessages(String channel, Message message, Set<IMessageCallback> callbacks) {
for (IMessageCallback callback : callbacks) {
try {
callback.onMessage(channel, message);
} catch (Exception e) {
}
}
} | java | {
"resource": ""
} |
q16777 | CaptionedFormController.updateStyle | train | private void updateStyle() {
CaptionStyle cs = captionStyle == null ? CaptionStyle.HIDDEN : captionStyle;
String background = null;
switch (cs) {
case FRAME:
break;
case TITLE:
break;
case LEFT... | java | {
"resource": ""
} |
q16778 | DefaultTaskSystem.getPath | train | static List<TaskGroupInformation> getPath(TaskGroupFactoryMakerService imf, TaskSystemInformation def, String locale) throws TaskSystemException {
Set<TaskGroupInformation> specs = imf.list(locale);
Map<String, List<TaskGroupInformation>> byInput = byInput(specs);
return getPathSpecifications(def.getInputType().... | java | {
"resource": ""
} |
q16779 | ElementToolbar.addToolbarComponent | train | public void addToolbarComponent(BaseComponent component, String action) {
BaseComponent ref = toolbar.getFirstChild();
if (component instanceof Toolbar) {
BaseComponent child;
while ((child = component.getFirstChild()) != null) {
toolbar.addC... | java | {
"resource": ""
} |
q16780 | BaseTransform.extractAttribute | train | protected String extractAttribute(String name, String line) {
int i = line.indexOf(name + "=\"");
i = i == -1 ? i : i + name.length() + 2;
int j = i == -1 ? -1 : line.indexOf("\"", i);
return j == -1 ? null : line.substring(i, j);
} | java | {
"resource": ""
} |
q16781 | BaseTransform.write | train | protected void write(OutputStream outputStream, String data, boolean terminate, int level) {
try {
if (data != null) {
if (level > 0) {
outputStream.write(StringUtils.repeat(" ", level).getBytes(CS_UTF8));
}
output... | java | {
"resource": ""
} |
q16782 | PopupSupport.closeAll | train | public synchronized void closeAll() {
for (Window window : windows) {
try {
window.removeEventListener("close", this);
window.destroy();
} catch (Throwable e) {
}
}
windows.clear();
resetPositio... | java | {
"resource": ""
} |
q16783 | PopupSupport.eventCallback | train | @SuppressWarnings("deprecation")
@Override
public void eventCallback(String eventName, Object eventData) {
try {
PopupData popupData = null;
if (eventData instanceof PopupData) {
popupData = (PopupData) eventData;
} else {
... | java | {
"resource": ""
} |
q16784 | PopupSupport.getPopupWindow | train | private synchronized Window getPopupWindow() throws Exception {
if (popupDefinition == null) {
popupDefinition = PageParser.getInstance().parse(RESOURCE_PREFIX + "popupWindow.fsp");
}
Window window = (Window) popupDefinition.materialize(null);
windows.add(window);
... | java | {
"resource": ""
} |
q16785 | BeanRegistry.postProcessAfterInitialization | train | @SuppressWarnings("unchecked")
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (clazz.isInstance(bean)) {
register((V) bean);
}
return bean;
} | java | {
"resource": ""
} |
q16786 | BeanRegistry.postProcessBeforeDestruction | train | @SuppressWarnings("unchecked")
@Override
public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException {
if (clazz.isInstance(bean)) {
unregister((V) bean);
}
} | java | {
"resource": ""
} |
q16787 | DateRangePicker.loadChoices | train | public void loadChoices(Iterable<String> choices) {
clear();
if (choices != null) {
for (String choice : choices) {
addChoice(choice, false);
}
}
checkSelection(true);
} | java | {
"resource": ""
} |
q16788 | DateRangePicker.addChoice | train | public Dateitem addChoice(DateRange range, boolean isCustom) {
Dateitem item;
if (isCustom) {
item = findMatchingItem(range);
if (item != null) {
return item;
}
}
item = new Dateitem();
item.setLab... | java | {
"resource": ""
} |
q16789 | DateRangePicker.findMatchingItem | train | public Dateitem findMatchingItem(DateRange range) {
for (BaseComponent item : getChildren()) {
if (range.equals(item.getData())) {
return (Dateitem) item;
}
}
return null;
} | java | {
"resource": ""
} |
q16790 | DateRangePicker.findMatchingItem | train | public Dateitem findMatchingItem(String label) {
for (BaseComponent child : getChildren()) {
Dateitem item = (Dateitem) child;
if (label.equalsIgnoreCase(item.getLabel())) {
return item;
}
}
return null;
} | java | {
"resource": ""
} |
q16791 | DateRangePicker.checkSelection | train | private void checkSelection(boolean suppressEvent) {
Dateitem selectedItem = getSelectedItem();
if (selectedItem == null) {
selectedItem = lastSelectedItem;
setSelectedItem(selectedItem);
} else if (selectedItem != customItem && lastSelectedItem != selectedItem) ... | java | {
"resource": ""
} |
q16792 | DateRangePicker.updateSelection | train | private void updateSelection() {
Dateitem selectedItem = getSelectedItem();
if (selectedItem == null) {
addStyle("color", "gray");
} else {
addStyle("color", "inherit");
}
setFocus(false);
} | java | {
"resource": ""
} |
q16793 | DateRangePicker.onChange | train | @EventHandler("change")
private void onChange(ChangeEvent event) {
// When the custom range item is selected, triggers the display of the date range dialog.
if (event.getRelatedTarget() == customItem) {
event.stopPropagation();
DateRangeDialog.show((range) -> {
... | java | {
"resource": ""
} |
q16794 | FrameworkBeanFactory.getAttribute | train | private String getAttribute(BeanDefinition beanDefinition, String attributeName) {
String value = null;
while (beanDefinition != null) {
value = (String) beanDefinition.getAttribute(attributeName);
if (value != null) {
break;
}
... | java | {
"resource": ""
} |
q16795 | PropertyUtil.getValue | train | public static String getValue(String propertyName, String instanceName) {
return getPropertyService().getValue(propertyName, instanceName);
} | java | {
"resource": ""
} |
q16796 | PropertyUtil.getValues | train | public static List<String> getValues(String propertyName, String instanceName) {
return getPropertyService().getValues(propertyName, instanceName);
} | java | {
"resource": ""
} |
q16797 | PropertyUtil.saveValue | train | public static void saveValue(String propertyName, String instanceName, boolean asGlobal, String value) {
getPropertyService().saveValue(propertyName, instanceName, asGlobal, value);
} | java | {
"resource": ""
} |
q16798 | PropertyUtil.saveValues | train | public static void saveValues(String propertyName, String instanceName, boolean asGlobal, List<String> value) {
getPropertyService().saveValues(propertyName, instanceName, asGlobal, value);
} | java | {
"resource": ""
} |
q16799 | PropertyUtil.getInstances | train | public static List<String> getInstances(String propertyName, boolean asGlobal) {
return getPropertyService().getInstances(propertyName, asGlobal);
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.