rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return (getPreferredSize (rows)); | int dims[] = new int[2]; getSize (rows, dims); return new Dimension (dims[0], dims[1]); | public Dimension preferredSize (int rows) { return (getPreferredSize (rows)); } |
initProperties(); | super.initProperties(); | public void initProperties() { initProperties(); Property p = addProperty(PROP_CLASSNAME, new String(cdata.getClassName())); p.setToolTip(PROP_CLASSNAME_DESC); addComponent(ComponentData.AGENTBINDER, "Binders"); addComponent(ComponentData.PLUGIN, "Plugins"); addComponents(); addAssetData(); } |
if (type.equalsIgnoreCase("Node.AgentManager.Agent")) type = ComponentData.AGENT; else if (type.equalsIgnoreCase("Node.AgentManager.Binder")) type = ComponentData.NODEBINDER; else if (type.equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Binder")) type = ComponentData.AGENTBINDER; else if (type.equalsIgnoreCase(... | public void setComponentType(String type) { if (type == null || type.equals("") || type.equals(this.getComponentType())) return; Property p = getProperty(PROP_TYPE); if (p != null) { p.setValue(type); fireModification(); } } | |
protected String displayString() { | public String displayString() { | protected String displayString() { return ERXExtensions.friendlyEOArrayDisplayForKey((NSArray)valueForBinding("list"), (String)valueForBinding("attribute"), (String)valueForBinding("nullArrayDispla... |
(((value >> (bytes_todo * 6)) & 0xC0) | 0x80); | (((value >> (bytes_todo * 6)) & 0x3F) | 0x80); | public int write (char[] inbuffer, int inpos, int inlength) { int start_pos = inpos; int avail = buf.length - count; for (;;) { if (inlength == 0 || avail == 0) break; // The algororith is made more complicated because we want to write // at least one byte in the output buffer, if there is room for /... |
NSDictionary groupedOps = ERXArrayUtilities.arrayGroupedByKeyPath(adaptorOps, "adaptorOperator"); | public NSArray databaseContextWillPerformAdaptorOperations(EODatabaseContext dbCtxt, NSArray adaptorOps, EOAdaptorChannel adChannel) { NSMutableArray result = new NSMutableArray(); Integer insertKey = ERXConstant.integerForInt(EODatabaseOperation.AdaptorInsertOperator); NSArray insertOps = (NSArray) g... | |
if (isDual()) { | if (isDual() && mr != null) { | private ResolvedModuleRevision resolvedRevision(ResolvedModuleRevision mr) { if (isDual()) { return new ResolvedModuleRevisionProxy(mr, this); } else { return mr; } } |
int n = experiment.getSocietyComponentCount(); for (int i = 0; i < n; i++) { SocietyComponent societyComponent = experiment.getSocietyComponent(i); | SocietyComponent societyComponent = experiment.getSocietyComponent(); if (societyComponent != null) { | private boolean isResultFile(String filename) { File thisFile = new java.io.File(filename); int n = experiment.getSocietyComponentCount(); for (int i = 0; i < n; i++) { SocietyComponent societyComponent = experiment.getSocietyComponent(i); java.io.FileFilter fileFilter = societyComponent.getResultF... |
if (fileFilter == null) continue; if(fileFilter.accept(thisFile)) | if(fileFilter != null && fileFilter.accept(thisFile)) | private boolean isResultFile(String filename) { File thisFile = new java.io.File(filename); int n = experiment.getSocietyComponentCount(); for (int i = 0; i < n; i++) { SocietyComponent societyComponent = experiment.getSocietyComponent(i); java.io.FileFilter fileFilter = societyComponent.getResultF... |
int nSocieties = experiment.getSocietyComponentCount(); | private void stopButton_actionPerformed(ActionEvent e) { stopButton.setSelected(true); // indicate stopping stopButton.setEnabled(false); // disable until experiment stops int nSocieties = experiment.getSocietyComponentCount(); boolean isSelfTerminating = true; for (int i = 0; i < nSocieties; i++) { ... | |
for (int i = 0; i < nSocieties; i++) { SocietyComponent society = experiment.getSocietyComponent(i); if (!society.isSelfTerminating()) { isSelfTerminating = false; break; } | SocietyComponent society = experiment.getSocietyComponent(); if (society != null && !society.isSelfTerminating()) { isSelfTerminating = false; | private void stopButton_actionPerformed(ActionEvent e) { stopButton.setSelected(true); // indicate stopping stopButton.setEnabled(false); // disable until experiment stops int nSocieties = experiment.getSocietyComponentCount(); boolean isSelfTerminating = true; for (int i = 0; i < nSocieties; i++) { ... |
int nSocieties = experiment.getSocietyComponentCount(); for (int i = 0; i < nSocieties; i++) experiment.getSocietyComponent(i).setRunning(isRunning); | experiment.getSocietyComponent().setRunning(isRunning); | private void updateExperimentControls(Experiment experiment, boolean isRunning) { if (!isRunning) { experiment.experimentStopped(); csmart.setRunningExperiment(null); } else csmart.setRunningExperiment(experiment); // update societies int nSocieties = experiment.getSocietyComponentCount... |
if(log.isWarnEnabled()) { log.warn("ULCommunityTableModel: attribute not found: " + name); } | private void addAttribute(String name) { Attribute a = node.getLocalAttribute(name); if (a == null) { if(log.isWarnEnabled()) { log.warn("ULCommunityTableModel: attribute not found: " + name); } return; } names.addElement(name); values.addElement(a.getValue()); } | |
public boolean isEditable(); | boolean isEditable(); | public boolean isEditable(); |
public void setEditable(boolean editable); | void setEditable(boolean editable); | public void setEditable(boolean editable); |
if (Proxy.class.isAssignableFrom(getSuperclass())) { | if (isProxy()) { | private void generateAroundMethod(Method method, String fieldName, String accessName, boolean forcePublic) { int modifiers = getDefaultModifiers(method); if (forcePublic) { modifiers = (modifiers & ~Modifier.PROTECTED) | Modifier.PUBLIC; } begin_method(method, modifiers); ... |
if(log.isDebugEnabled()) { | if(log.isWarnEnabled()) { | public CSMARTGraph newGraphFromSelection() { if (graph == null) { if(log.isDebugEnabled()) { log.warn("WARNING: graph is null"); } return null; } // create a copy of the original graph, both nodes and edges CSMARTGraph subgraph = new CSMARTGraph(graph, "Selected Nodes"); // clear se... |
if(log.isDebugEnabled()) { | if(log.isWarnEnabled()) { | public void scrollToSelected() { Node node = getSelectedNode(); if (node == null) { if(log.isDebugEnabled()) { log.warn("no selected node"); } return; } Rectangle r = getSelectedNode().getGrappaNexus().getBounds(); double[] pts = new double[] { r.getX(), r.getY(), r.getX()... |
if (isShowing()) update(); | public void reinit(Experiment newExperiment) { // restore editable flag on previous experiment if (isEditable) experiment.setEditable(isEditable); if (isRunnable) experiment.setRunnable(isRunnable); experiment = newExperiment; isEditable = newExperiment.isEditable(); isRunnable = newExperi... | |
if (contentType == null || contentType == "") | if (contentType == null || contentType.equals("")) | private ContentHandler setContentHandler(String contentType) { ContentHandler handler; // No content type so just handle it as the default. if (contentType == null || contentType == "") return null; // See if a handler has been cached for this content type. // For efficiency, if a content type ha... |
this.threaded = true; | public SpawnProcessTag() { this.threaded = true; } | |
if ( threaded ) { Thread thread = new Thread() { public void run() | Thread thread = new Thread() { public void run() { try | public void doTag(XMLOutput output) throws Exception { if ( this.name == null ) { throw new MissingAttributeException( "name" ); } invokeBody( output ); final Process process = getProcess( this.name ); if ( process == null ) { throw new Jelly... |
try { accept( process, context ); } catch (InvalidMotionException e) { e.printStackTrace(); } catch (ActivityException e) { e.printStackTrace(); } catch (Exception e) { } | accept( process, context ); | public void doTag(XMLOutput output) throws Exception { if ( this.name == null ) { throw new MissingAttributeException( "name" ); } invokeBody( output ); final Process process = getProcess( this.name ); if ( process == null ) { throw new Jelly... |
}; thread.start(); } else { accept( process, context ); } | catch (InvalidMotionException e) { e.printStackTrace(); } catch (ActivityException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } }; thread.start(); | public void doTag(XMLOutput output) throws Exception { if ( this.name == null ) { throw new MissingAttributeException( "name" ); } invokeBody( output ); final Process process = getProcess( this.name ); if ( process == null ) { throw new Jelly... |
try { accept( process, context ); } catch (InvalidMotionException e) { e.printStackTrace(); } catch (ActivityException e) { e.printStackTrace(); } catch (Exception e) { } | accept( process, context ); | public void run() { try { accept( process, context ); } catch (InvalidMotionException e) { ... |
catch (InvalidMotionException e) { e.printStackTrace(); } catch (ActivityException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } | public void run() { try { accept( process, context ); } catch (InvalidMotionException e) { ... | |
return System.getProperty("user.dir") + separatorChar + path; | else if (separatorChar == '\\' && path.length () > 0 && path.charAt (0) == '\\') { return System.getProperty ("user.dir").substring (0, 2) + path; } else return System.getProperty ("user.dir") + separatorChar + path; | public String getAbsolutePath () { if (isAbsolute ()) return path; return System.getProperty("user.dir") + separatorChar + path; } |
return new URL ("file: + (isDirectory() ? "/" : "")); | if (separatorChar == '\\') return new URL ("file:/" + getAbsolutePath ().replace ('\\', '/') + (isDirectory() ? "/" : "")); else return new URL ("file:" + getAbsolutePath () + (isDirectory() ? "/" : "")); | public URL toURL () throws MalformedURLException { return new URL ("file://" + getAbsolutePath () + (isDirectory() ? "/" : "")); } |
log.error("Got no AgentAssetData from which to initialize! Perhaps retry with the directory you are loading from on your org.couaar.config.path?"); | log.error("Got no AgentAssetData from which to initialize! Perhaps retry with the directory you are loading from on your org.cougaar.config.path?"); | public void initProperties() { // strip off extension if it exists int index = filename.lastIndexOf('.'); if (index != -1) filename = filename.substring(0, index); // Since there are two possible types of asset files, we // need to determine which parser to use. // We will determine this by lo... |
static boolean isVisible(java.lang.reflect.Method m , | static boolean isVisible(java.lang.reflect.Member m , | static boolean isVisible(java.lang.reflect.Method m , String packageName )throws Throwable{ int mod = m.getModifiers(); if( java.lang.reflect.Modifier.isPrivate( mod )){ return false; } if( java.lang.reflect.Modifier.isProtected( ... |
return checkImage(image, image.getWidth(observer), image.getHeight(observer), observer); | return checkImage(image, -1, -1, observer); | public int checkImage(Image image, ImageObserver observer) { return checkImage(image, image.getWidth(observer), image.getHeight(observer), observer); } |
if (minSize == null) minSize = (peer != null ? peer.getMinimumSize() : new Dimension(width, height)); return minSize; | return minimumSize(); | public Dimension getMinimumSize() { if (minSize == null) minSize = (peer != null ? peer.getMinimumSize() : new Dimension(width, height)); return minSize; } |
if (prefSize == null) if (peer == null) return new Dimension(width, height); else prefSize = peer.getPreferredSize(); return prefSize; | return preferredSize(); | public Dimension getPreferredSize() { if (prefSize == null) if (peer == null) return new Dimension(width, height); else prefSize = peer.getPreferredSize(); return prefSize; } |
return getMinimumSize(); | if (minSize == null) minSize = (peer != null ? peer.getMinimumSize() : new Dimension(width, height)); return minSize; | public Dimension minimumSize() { return getMinimumSize(); } |
return getPreferredSize(); | if (prefSize == null) if (peer == null) return new Dimension(width, height); else prefSize = peer.getPreferredSize(); return prefSize; | public Dimension preferredSize() { return getPreferredSize(); } |
log.error("Exception reading properties file: " + e); | log.error("Exception reading properties file: ", e); | private void readPropertiesFromFile() { String dirName = "."; try { dirName = System.getProperty("org.cougaar.install.path"); } catch (RuntimeException e) { // just use default } if (dirName == null) dirName = "."; JFileChooser chooser = new JFileChooser(dirName); int result = choo... |
if (log.isDebugEnabled()) { | if (log.isErrorEnabled()) { | public void execute() { if(log.isDebugEnabled()) { String msg = "execute: " + this; log.debug(msg); } long currentTime = currentTimeMillis(); Enumeration addedRWEs = rweSub.getAddedList(); while(addedRWEs.hasMoreElements()) { RealWorldEvent rwe = (RealWorldEvent)addedRWEs.nextElement(); ... |
if(log.isDebugEnabled()) { | if(log.isErrorEnabled()) { | private void parseParameters() { Vector pv = getParameters() != null ? new Vector(getParameters()) : null; if (pv == null) { throw new RuntimeException("TranducerPlugIn expects parameters, got none"); } String fileName = (String)pv.elementAt(0); if (fileName == null) { throw new RuntimeExcept... |
if (log.isDebugEnabled()) { log.error("parseParameters: " + this + " failed to read input data."); | if (log.isErrorEnabled()) { log.error("parseParameters: " + this + " failed to read input data.", e); | private void parseParameters() { Vector pv = getParameters() != null ? new Vector(getParameters()) : null; if (pv == null) { throw new RuntimeException("TranducerPlugIn expects parameters, got none"); } String fileName = (String)pv.elementAt(0); if (fileName == null) { throw new RuntimeExcept... |
if (log.isDebugEnabled()) { | if (log.isErrorEnabled()) { | private Agent processInputLine(String line) { Vector words = org.cougaar.util.StringUtility.parseCSV(line); if (words.size() < 3) { // error -- need at least 3 words on the line! // log something if (log.isDebugEnabled()) { log.error("processInputLine: " + this + " got Agent description missing e... |
return node.getDescriptor().getConfigurationsNames(); | return node.getDescriptor().getPublicConfigurationsNames(); | private String[] resolveSpecialConfigurations(String[] dependencyConfigurations, IvyNode node) { if (dependencyConfigurations.length == 1 && "*".equals(dependencyConfigurations[0]) && node != null && node.isLoaded()) { return node.getDescriptor().getCo... |
switch (c) { case '!': throw new ParseException ("Modifier '!' is not yet supported by Classpath", i+base_offset); case '<': type = CollationSorter.GREATERP; break; case ';': type = CollationSorter.GREATERS; break; case ',': type = CollationSorter.GREATERT; break; case '=': type = CollationSorter.EQUAL; break; case '\'... | switch (c) { case '!': | private int subParseString(boolean stop_on_reset, ArrayList v, int base_offset, String rules) throws ParseException { boolean ignoreChars = (base_offset == 0); int operator = -1; StringBuffer sb = new StringBuffer(); boolean doubleQuote = false; boolean eatingChars = false; boolean nextIs... |
("comparison list has not yet been started. You may only use" + "(<,;=&)", i+base_offset); nextIsModifier = true; type = CollationSorter.INVERSE_SECONDARY; break; case '&': type = CollationSorter.RESET; if (stop_on_reset) break main_parse_loop; break; default: if (operator < 0) throw new ParseException ("operator miss... | ("Modifier '!' is not yet supported by Classpath", i + base_offset); case '<': type = CollationSorter.GREATERP; break; case ';': type = CollationSorter.GREATERS; break; case ',': type = CollationSorter.GREATERT; break; case '=': type = CollationSorter.EQUAL; break; case '\'': eatingChars = !eatingChars; doubleQuote = t... | private int subParseString(boolean stop_on_reset, ArrayList v, int base_offset, String rules) throws ParseException { boolean ignoreChars = (base_offset == 0); int operator = -1; StringBuffer sb = new StringBuffer(); boolean doubleQuote = false; boolean eatingChars = false; boolean nextIs... |
log.error("Illegal parameter: "+name+"="+value); | log.error("Illegal parameter: "+name+"="+value, e); | public static void setParams(String name, String value) { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.servlet"); if (name.equals(PropertyNames.PLAN_OBJECTS_TO_IGNORE)) { try { StringTokenizer st = new StringTokenizer(value, ","); while (st.hasMoreToke... |
boolean bool = false; Object booleanBinding = valueForBinding(binding); if (booleanBinding == null) { bool = !super.hasBinding(binding); } else if (booleanBinding instanceof Integer) { bool = ((Integer)booleanBinding).intValue() == 1; } else if (booleanBinding instanceof String && ((String)booleanBinding).equals("YES"... | return booleanValueForBinding(binding); | public boolean booleanForBinding(String binding) { boolean bool = false; Object booleanBinding = valueForBinding(binding); if (booleanBinding == null) { // Need this because binding NO to a binding results in the component having a binding but the value being null. Go figure. ... |
throw new RuntimeException("HasBinding being used in a subclass of CustomEditComponent that synchronizesVariablesWithBindings == true"); | throw new IllegalStateException("HasBinding being used in an object of class " + getClass().getName() + " that synchronizesVariablesWithBindings == true"); | public boolean hasBinding(String binding) { // FIXME: Turn this check off in production if (synchronizesVariablesWithBindings()) { throw new RuntimeException("HasBinding being used in a subclass of CustomEditComponent that synchronizesVariablesWithBindings == true"); } return... |
return (valueForBinding(binding) != null); | return (super.hasBinding(binding) || valueForBinding(binding) != null); | public boolean hasBinding(String binding) { // FIXME: Turn this check off in production if (synchronizesVariablesWithBindings()) { throw new RuntimeException("HasBinding being used in a subclass of CustomEditComponent that synchronizesVariablesWithBindings == true"); } return... |
return booleanForBinding(binding) ? ERDCustomComponent.TRUE : ERDCustomComponent.FALSE; | return booleanValueForBinding(binding) ? ERDCustomComponent.TRUE : ERDCustomComponent.FALSE; | public Integer integerBooleanForBinding(String binding) { return booleanForBinding(binding) ? ERDCustomComponent.TRUE : ERDCustomComponent.FALSE; } |
return (String)(_key == null && !synchronizesVariablesWithBindings() ? super.valueForBinding("key") : _key); | if(!synchronizesVariablesWithBindings()) { if (key==null) { key=(String)super.valueForBinding(Keys.key); } } if (key==null && d2wContext() != null) { key=(String)d2wContext().valueForKey(Keys.propertyKey); } return key; | public String key() { return (String)(_key == null && !synchronizesVariablesWithBindings() ? super.valueForBinding("key") : _key); } |
value = super.valueForBinding(binding); } else if (parent() instanceof ERDCustomEditComponent || parent() instanceof ERD2WCustomComponentWithArgs) { value = parent().valueForBinding(binding); | log.debug("super.hasBinding(binding) == true"); value = originalValueForBinding(binding); } else if(d2wContextFromBindings() != null) { log.debug("has d2wContext == true"); value = d2wContextValueForBinding(binding); } else { value = parentValueForBinding(binding); } if (value == null && binding != null && extraBinding... | public Object valueForBinding(String binding) { Object value=null; if (super.hasBinding(binding)) { value = super.valueForBinding(binding); } else if (parent() instanceof ERDCustomEditComponent || parent() instanceof ERD2WCustomComponentWithArgs) { // this will eventually ... |
GUIUtils.timeConsumingTaskStart(csmart); | private void saveToDatabase() { if (configComponent instanceof SocietyComponent) { final PropertyBuilder propertyBuilder = this; GUIUtils.timeConsumingTaskStart(this); GUIUtils.timeConsumingTaskStart(csmart); try { new Thread("SaveSociety") { public void run() { boolean success... | |
GUIUtils.timeConsumingTaskEnd(csmart); | private void saveToDatabase() { if (configComponent instanceof SocietyComponent) { final PropertyBuilder propertyBuilder = this; GUIUtils.timeConsumingTaskStart(this); GUIUtils.timeConsumingTaskStart(csmart); try { new Thread("SaveSociety") { public void run() { boolean success... | |
GUIUtils.timeConsumingTaskEnd(csmart); | public void run() { boolean success = ((SocietyComponent)configComponent).saveToDatabase(); GUIUtils.timeConsumingTaskEnd(propertyBuilder); GUIUtils.timeConsumingTaskEnd(csmart); if (!success && propertyBuilder.log.isWarnEnabled()) { propertyBuilder.log.warn("Failed to save society " + con... | |
if (_key != null && !_key.equals(key)) { | Object value = qualifier.value(); if ((_key != null && !_key.equals(key)) || (value != null && ( (value instanceof ERXConstant.NumberConstant) || (value instanceof Number && !value.getClass().getName().startsWith("java.")) ))) { | public void visitKeyValueQualifier(EOKeyValueQualifier qualifier) { if (_canBeRepresentedAsInSet) { if (qualifier.selector() == EOQualifier.QualifierOperatorEqual) { String key = qualifier.key(); if (_key != null && !_key.equals(key)) { _canBeRepresentedAsInSet = false; } else { _key = ... |
private boolean checkDescriptorConsistency(ModuleRevisionId mrid, ModuleDescriptor md, ResolvedResource ivyRef) { | private void checkDescriptorConsistency(ModuleRevisionId mrid, ModuleDescriptor md, ResolvedResource ivyRef) throws ParseException { | private boolean checkDescriptorConsistency(ModuleRevisionId mrid, ModuleDescriptor md, ResolvedResource ivyRef) { boolean ok = true; if (!mrid.getOrganisation().equals(md.getModuleRevisionId().getOrganisation())) { Message.error("\t"+getName()+": bad organisation found in "+ivyRef.getResour... |
if (ivyRef.getRevision() != null && !ivyRef.getRevision().startsWith("working@") && md.getModuleRevisionId().getRevision() != null && | if (ivyRef.getRevision() != null && !ivyRef.getRevision().startsWith("working@") && | private boolean checkDescriptorConsistency(ModuleRevisionId mrid, ModuleDescriptor md, ResolvedResource ivyRef) { boolean ok = true; if (!mrid.getOrganisation().equals(md.getModuleRevisionId().getOrganisation())) { Message.error("\t"+getName()+": bad organisation found in "+ivyRef.getResour... |
Message.verbose("\t"+getName()+": inconsistent module descriptor file found for "+mrid+" rejecting"); | throw new ParseException("inconsistent module descriptor file found for "+mrid, 0); | private boolean checkDescriptorConsistency(ModuleRevisionId mrid, ModuleDescriptor md, ResolvedResource ivyRef) { boolean ok = true; if (!mrid.getOrganisation().equals(md.getModuleRevisionId().getOrganisation())) { Message.error("\t"+getName()+": bad organisation found in "+ivyRef.getResour... |
return ok; | private boolean checkDescriptorConsistency(ModuleRevisionId mrid, ModuleDescriptor md, ResolvedResource ivyRef) { boolean ok = true; if (!mrid.getOrganisation().equals(md.getModuleRevisionId().getOrganisation())) { Message.error("\t"+getName()+": bad organisation found in "+ivyRef.getResour... | |
if (!checkDescriptorConsistency(mrid, md, ivyRef)) { return null; } if (!checkDescriptorConsistency(systemDd.getDependencyRevisionId(), systemMd, ivyRef)) { return null; } | checkDescriptorConsistency(mrid, md, ivyRef); checkDescriptorConsistency(systemDd.getDependencyRevisionId(), systemMd, ivyRef); | public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { DependencyDescriptor systemDd = dd; dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDa... |
CallbackFilter filter = new CallbackFilter() { public int accept(Member member) { return Callbacks.LAZY_LOAD; } }; Callbacks callbacks = new Callbacks(); callbacks.set(Callbacks.LAZY_LOAD, loader); Object obj = Enhancer.enhance(Object.class, null, callbacks, null, null, filter); | Object obj = Enhancer.enhance(Object.class, loader); | public void testLazyLoader() { LazyLoader loader = new LazyLoader() { public Object loadObject() { System.err.println("loading object"); return "foo"; } }; CallbackFilter filter = new CallbackFilter() { publi... |
EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName); | EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); | public static NSArray decodeEnterpriseObjectsFromFormValues(EOEditingContext ec, NSDictionary values) { if(log.isDebugEnabled()) log.debug("values = "+values); NSMutableArray encoded = new NSMutableArray(); NSArray temp = (NSArray)values.objectForKey("sep"); String separator = temp != nu... |
EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)ec.rootObjectStore()).entityNamed(entityName); | EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); | public NSArray enterpriseObjectsForEntityNamedFromFormValues(EOEditingContext ec, String entityName, NSDictionary formValues) { NSDictionary groups = groupedEnterpriseObjectsFromFormValues(ec, formValues); EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)ec.... |
words[d_len-1] |= -1 << (32 - count); | words[d_len-1] |= -2 << (31 - count); | private void setShiftRight(BigInteger x, int count) { if (x.words == null) set(count < 32 ? x.ival >> count : x.ival < 0 ? -1 : 0); else if (count == 0) set(x); else { boolean neg = x.isNegative(); int word_count = count >> 5; count &= 31; int d_len = x.ival - word_count; if (d_len <= 0) se... |
+"&status=" + core.sysGet ("cmi.core.lesson_status") +"&totime=" + core.sysGet ("cmi.core.total_time") | private final void IliasFinish () { if (!isLaunched) return; IliasLaunchContent ( "../scorm_presentation.php?cmd=view" +"&ref_id=" + IliasRefId ); isLaunched = false; } | |
if (sco_id == null) return; | public final void IliasLaunchSco (String sco_id) { if (sco_id == null) return; if (isLaunched && sco_id.equals(IliasScoId)) { say ("SCO " +sco_id +" is already running."); return; } IliasScoCmi.clear(); say ("Launching sco " +sco_id); if (isLaunched) say ("Sco "+IliasScoId +" will be unloaded."); isLaunched... | |
core.reset(); | public final String LMSFinish (String s) { String rv = core.LMSFinish(s); say ("LMSFinish("+s+")="+rv); if (rv.equals("false")) return rv; IliasFinish(); return rv; } | |
databaseResults = new NSArray(); | public WOResponse loginCheck() { // Initialize your component here if (login==null || password == null) { System.out.println("both login or password must be specified"); return null; } NSDictionary loginBindings = new NSDictionary(new Object[] {login,passwo... | |
WOResponse responseToModify = pageToReturn.generateResponse(); return this.modifyResponse(responseToModify); | if (pageToReturn!=null) { WOResponse responseToModify = pageToReturn.generateResponse(); return this.modifyResponse(responseToModify); } else return null; | public WOResponse loginCheck() { // Initialize your component here if (login==null || password == null) { System.out.println("both login or password must be specified"); return null; } NSDictionary loginBindings = new NSDictionary(new Object[] {login,passwo... |
invisButton = new JToggleButton("Invisible"); | private JPanel createNodePanel(String description) { // create panel which contains description panel, status button panel, and tabbed panes JPanel panel = new JPanel(new GridBagLayout()); // descriptionPanel contains society name, control buttons JPanel descriptionPanel = createHorizontalPanel(true); ... | |
runningState = new ButtonGroup(); runningState.add(runButton); runningState.add(stopButton); runningState.add(invisButton); | private JPanel createNodePanel(String description) { // create panel which contains description panel, status button panel, and tabbed panes JPanel panel = new JPanel(new GridBagLayout()); // descriptionPanel contains society name, control buttons JPanel descriptionPanel = createHorizontalPanel(true); ... | |
if (e instanceof ActionEvent) { NamedFrame.getNamedFrame().removeFrame(this); } else { if (log.isDebugEnabled()) { log.debug("Not doing a removeFrame: event was " + e); } } | private void exit(AWTEvent e) { if (log.isDebugEnabled()) { log.debug("In exitMenuItem_actionPerformed"); } if (model.haveAttached()) { ExitConsole ec = new ExitConsole(); if (ec.reallyExit()) { if (ec.getResult().equals(ec.SOCIETY_DETACH)) { model.detachFromSociety(); }... | |
dispose(); System.exit(0); | private void exit(AWTEvent e) { if (log.isDebugEnabled()) { log.debug("In exitMenuItem_actionPerformed"); } if (model.haveAttached()) { ExitConsole ec = new ExitConsole(); if (ec.reallyExit()) { if (ec.getResult().equals(ec.SOCIETY_DETACH)) { model.detachFromSociety(); }... | |
if(!model.isRunning()) { invisButton.getModel().setPressed(true); } | public void update(Observable o, Object arg) { if (arg.equals(CSMARTConsoleModel.TOGGLE_RUNNING_STATE)) { if(!model.isRunning()) { invisButton.getModel().setPressed(true); } if (runButton.getModel().isEnabled() && !stopButton.getModel().isEnabled()) { stopButton.getModel().set... | |
desktop.add((NodeView)arg, ""); | desktop.addNodeFrame((NodeView)arg, ""); | public void update(Observable o, Object arg) { if (arg.equals(CSMARTConsoleModel.TOGGLE_RUNNING_STATE)) { if(!model.isRunning()) { invisButton.getModel().setPressed(true); } if (runButton.getModel().isEnabled() && !stopButton.getModel().isEnabled()) { stopButton.getModel().set... |
NodeServesClient nsc = communitySupport.createNode(hostName, port, regName, nodeName, properties, args, listener, filter, configWriter); | HostServesClient hsc = communitySupport.getHost(hostName, port); NodeServesClient nsc = hsc.createNode(nodeName, properties, args, listener, filter, configWriter); | private boolean createNode(NodeComponent nodeComponent, String nodeName, String hostName, ConfigurationWriter configWriter) { DefaultStyledDocument doc = new DefaultStyledDocument(); JTextPane pane = new JTextPane(doc); JScrollPane stdoutPane = new JScrollPane(pane); // create a status butto... |
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.viewer"); | createLog(); | public CSMART() { setTitle("CSMART"); log = CSMART.createLogger("org.cougaar.tools.csmart.ui.viewer"); // Write initial CSMART info to the log file if (log.isInfoEnabled()) { log.info(writeDebug()); } resultDir = initResultDir(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBa... |
if(haveItemId == false) { String uic = aad.getUIC(); aad.addPropertyGroup(setItemIdentificationPG(uic, uic.substring(uic.indexOf("/")+1), "")); } | public AgentAssetData parsePrototypeFile(String cId) { clusterId = cId; String dataItem = ""; int newVal; String filename = getFileName(); BufferedReader input = null; Reader fileStream = null; AgentAssetData aad = new AgentAssetData(null); if(log.isDebugEnabled()) { log.debug("Setting IN... | |
} if(propertyName.indexOf("ItemIdentification") != -1) { haveItemId = true; | protected int setPropertyForAsset(String prop, int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { String propertyName = prop.substring(1, prop.length()-1).trim(); if(log.isDebugEnabled()) { log.debug("Creating PropGroupData: " + propertyName)... | |
ByteBuffer a = (ByteBuffer) obj; | ByteBuffer other = (ByteBuffer) obj; | public int compareTo (Object obj) { ByteBuffer a = (ByteBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) | int num = Math.min(remaining(), other.remaining()); int pos_this = position(); int pos_other = other.position(); for (int count = 0; count < num; count++) | public int compareTo (Object obj) { ByteBuffer a = (ByteBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
return 1; | byte a = get(pos_this++); byte b = other.get(pos_other++); if (a == b) continue; if (a < b) return -1; return 1; | public int compareTo (Object obj) { ByteBuffer a = (ByteBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) { int t = (int) (get (i1) - a.get (i2)); if (t != 0) { return (int) t; } } return 0; | return remaining() - other.remaining(); | public int compareTo (Object obj) { ByteBuffer a = (ByteBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
if (doPopup) return false; DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode)organizer.getSelectedNode(); return isActionAllowedOnFolder(action, organizer, rootNode); | return false; | public static boolean isActionAllowed(String action, Organizer organizer, boolean doPopup) { // If nothing is selected, some things are still legitimate if (organizer.getSelectedNode() == null) { if (action.equals(DELETE_EXPERIME... |
boolean actionAllowed = false; while (nodes.hasMoreElements()) { DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode)nodes.nextElement(); Object o = nextNode.getUserObject(); if (o instanceof String) actionAllowed = isActionAllowedOnFolder(action, organizer, nextNode); else if (o instanceof Experiment) actionAllo... | private static boolean isActionAllowedOnFolder(String action, Organizer organizer, DefaultMutableTreeNode node) { if (action.equals(NEW_EXPERIMENT_ACTION) || action.equals(NEW_RECIPE_ACTION) || action.equa... | |
return (FieldInfo)fieldInfo.get(name); | FieldInfo field = (FieldInfo)fieldInfo.get(name); if (field == null) { throw new IllegalArgumentException("Field " + name + " is not declared"); } return field; | private FieldInfo getFieldInfo(String name) { return (FieldInfo)fieldInfo.get(name); } |
_hasToUpdate = alwaysRefetchList(); | _hasToUpdate = _hasToUpdate ? true : alwaysRefetchList(); | protected void setupPhase() { WODisplayGroup dg=displayGroup(); if (dg!=null) { NSArray sortOrderings = dg.sortOrderings(); EODataSource ds = dataSource(); if (!_hasBeenInitialized) { log.debug("Initializing display group"); String fetchspecName = (String)d2wCont... |
Class[] types = typer.getParameterTypes(bucket.get(0)); | private static void member_helper_size(final CodeEmitter e, List members, final ObjectSwitchCallback callback, final ParameterTyper typer, final Lab... | |
Class[] types = typer.getParameterTypes(bucket.get(0)); | public void processCase(int key, Label dontUseEnd) throws Exception { List bucket = (List)buckets.get(new Integer(key)); Class[] types = typer.getParameterTypes(bucket.get(0)); member_helper_type(e, bucket, callback, typer, def, end, new TinyBitSet()); ... | |
public static void not_equals(CodeEmitter e, Type type, Label notEquals) { not_equals(e, type, notEquals, null); | public static void not_equals(final CodeEmitter e, Type type, final Label notEquals, final Customizer customizer) { (new ProcessArrayCallback() { public void processElement(Type type) { not_equals_helper(e, type, notEquals, customizer, this); } }).processElement(type); | public static void not_equals(CodeEmitter e, Type type, Label notEquals) { not_equals(e, type, notEquals, null); } |
ReflectOps.constructor_switch(e, constructors, new ObjectSwitchCallback() { | ComplexOps.constructor_switch(e, constructors, new ObjectSwitchCallback() { | private void emitNewInstanceMultiarg(Constructor[] constructors) { final CodeEmitter e = begin_method(Constants.ACC_PUBLIC, MULTIARG_NEW_INSTANCE, null); Label skipSetCallbacks = e.make_label(); e.load_arg(2); e.invoke_static_this(SET_THREAD_CALLBACKS); e.new_instance_this(); ... |
log = CSMART.createLogger(getClass().getName()); | private Browser() { super(BROWSER_TITLE); scroll.setViewport(new JViewport() { public void scrollRectToVisible(Rectangle r) { Dimension extent = getExtentSize(); r = new Rectangle(r.x, r.y, r.width, extent.height); super.scrollRectToVisible(r); } }); scroll.setViewportView(text); getContentPane... | |
ioe.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception", ioe); } | public void setURL(URL url) { try { text.setPage(url); toFront(); } catch (IOException ioe) { ioe.printStackTrace(); } } |
String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) { | if ("T".equals(eoattribute.valueType())) { | public boolean mustUseBindVariableForAttribute(EOAttribute eoattribute) { String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) { return false; } else { return true; } } |
String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) { | if ("T".equals(eoattribute.valueType())) { | public boolean shouldUseBindVariableForAttribute(EOAttribute eoattribute) { String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) { return false; } else { return true; } } |
String timestampString = "'"+timestampFormatter.format(t); Timestamp ts = new Timestamp(t.getTime()); String nanoString = ts.getNanos() + ""; nanoString = nanoString.substring(0, 3); timestampString += "." + nanoString + "'"; | String timestampString = "'"+timestampFormatter.format(t) + "'"; | public String sqlStringForValue(Object v, String kp) { String result = super.sqlStringForValue(v,kp); if(v != null && v != NSKeyValueCoding.NullValue) { EOAttribute attribute; int lastDotIdx = kp.lastIndexOf("."); if (lastDotIdx == -1) { attribute = enti... |
if (displayGroup() instanceof ERXBatchingDisplayGroup) { return ((ERXBatchingDisplayGroup)displayGroup()).rowCount(); } else { return displayGroup().allObjects().count(); } | return displayGroup().allObjects().count(); | public int objectCount() { if (displayGroup() instanceof ERXBatchingDisplayGroup) { return ((ERXBatchingDisplayGroup)displayGroup()).rowCount(); } else { return displayGroup().allObjects().count(); } } |
if(displayNameForProperty == null) displayNameForProperty = (String)d2wContext().valueForKey("displayNameForProperty"); return displayNameForProperty; | if(_displayNameForProperty == null) { _displayNameForProperty = (String)d2wContext().valueForKey("displayNameForProperty"); } return _displayNameForProperty; | public String displayNameForProperty() { if(displayNameForProperty == null) displayNameForProperty = (String)d2wContext().valueForKey("displayNameForProperty"); return displayNameForProperty; } |
displayNameForProperty = null; | _displayNameForProperty = null; _contextDictionary = null; | public void reset() { super.reset(); displayNameForProperty = null; } |
Message.uninit(); | public void buildFinished(BuildEvent event) { Message.uninit(); } | |
if (stackDepth==0) { Message.uninit(); } stackDepth--; | public void taskFinished(BuildEvent event) { } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.