rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
organizer.renameFolder(); } | organizer.deleteSociety(); } | public void actionPerformed(ActionEvent e) { organizer.renameFolder(); } |
organizer.deleteSociety(); | organizer.renameSociety(); | public void actionPerformed(ActionEvent e) { organizer.deleteSociety(); } |
organizer.renameSociety(); } | organizer.selectRecipeFromDatabase(); } | public void actionPerformed(ActionEvent e) { organizer.renameSociety(); } |
organizer.selectRecipeFromDatabase(); } | organizer.newRecipe(); } | public void actionPerformed(ActionEvent e) { organizer.selectRecipeFromDatabase(); } |
organizer.newRecipe(); } | organizer.saveInDatabase(); } | public void actionPerformed(ActionEvent e) { organizer.newRecipe(); } |
organizer.startCommunityBuilder(); | organizer.startExperimentBuilder(); | public void actionPerformed(ActionEvent e) { organizer.startCommunityBuilder(); } |
Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingTaskEnd(organizer); } | experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } | public void run() { // a potentially long process Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingT... |
societyCopy.saveToDatabase(); | recipeCopy.saveToDatabase(); | public void run() { // Check the return value? societyCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } |
experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } | societyCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } | public void run() { experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } |
recipeCopy.saveToDatabase(); | exp.saveToDb(saveToDbConflictHandler); | public void run() { recipeCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } |
exp.saveToDb(saveToDbConflictHandler); | boolean success = sc.saveToDatabase(); | public void run() { exp.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } |
} | if (!success && organizer.log.isWarnEnabled()) { organizer.log.warn("Failed to save society " + sc.getSocietyName()); } else if (organizer.log.isDebugEnabled()) { organizer.log.debug("Saved society " + sc.getSocietyName()); } } | public void run() { exp.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } |
experiment.saveToDb(saveToDbConflictHandler); | if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (log.isDebugEnabled()) { log.debug("selectExptFromDB after cmtDialog.processResults with new name/id: " + cmtDialog.getExperimentName() + "/" + cmtDialog.getExperimentId() + " trialID: " + trialId + " and orig name: " + originalExperime... | public void run() { experiment.saveToDb(saveToDbConflictHandler); // save under new name GUIUtils.timeConsumingTaskEnd(organizer); } |
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (log.isDebugEnabled()) { log.debug("selectExptFromDB after cmtDialog.processResults with new name/id: " + cmtDialog.getExperimentName() + "/" + cmtDialog.getExperimentId() + " trialID: " + trialId + " and orig name: " + originalExperime... | Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingTaskEnd(organizer); } | public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (log.isDebugEnabled()) { log.debug("selectExptFromDB after cmtDialog.processResults with new name/id: " + cmtDialog.getExperimentName(... |
if (this.totalsOnly() != null) { | if (this.totalsOnly()) { | public NSDictionary attributeListDict() { if (this.totalsOnly() != null) { return this.model().flatAttributeListTotalDict(); } return this.model().flatAttributeDepthDict(); } |
public String showAsTable() { | public boolean showAsTable() { | public String showAsTable() { if (_showAsTable == null) { Object v = (Object)this.valueForBinding("showAsTable"); if (ERXValueUtilities.booleanValue(v)) { _showAsTable = "true"; }else { _showAsTable = "false"; } } return ... |
Object v = (Object)this.valueForBinding("showAsTable"); if (ERXValueUtilities.booleanValue(v)) { _showAsTable = "true"; }else { _showAsTable = "false"; } | _showAsTable = booleanValueForBinding("showAsTable"); | public String showAsTable() { if (_showAsTable == null) { Object v = (Object)this.valueForBinding("showAsTable"); if (ERXValueUtilities.booleanValue(v)) { _showAsTable = "true"; }else { _showAsTable = "false"; } } return ... |
return _showAsTable; | return _showAsTable.booleanValue(); | public String showAsTable() { if (_showAsTable == null) { Object v = (Object)this.valueForBinding("showAsTable"); if (ERXValueUtilities.booleanValue(v)) { _showAsTable = "true"; }else { _showAsTable = "false"; } } return ... |
public String showHeadings() { if (this.showSingleValue()) { return "false"; | public boolean showHeadings() { if (showSingleValue()) { return false; | public String showHeadings() { if (this.showSingleValue()) { return "false"; } if (_showHeadings == null) { Object v = (Object)this.valueForBinding("showHeadings"); if (ERXValueUtilities.booleanValue(v)) { _showHeadings = "true"; }else ... |
Object v = (Object)this.valueForBinding("showHeadings"); if (ERXValueUtilities.booleanValue(v)) { _showHeadings = "true"; }else { _showHeadings = "false"; } | _showHeadings = booleanValueForBinding("showHeadings"); | public String showHeadings() { if (this.showSingleValue()) { return "false"; } if (_showHeadings == null) { Object v = (Object)this.valueForBinding("showHeadings"); if (ERXValueUtilities.booleanValue(v)) { _showHeadings = "true"; }else ... |
return _showHeadings; | return _showHeadings.booleanValue(); | public String showHeadings() { if (this.showSingleValue()) { return "false"; } if (_showHeadings == null) { Object v = (Object)this.valueForBinding("showHeadings"); if (ERXValueUtilities.booleanValue(v)) { _showHeadings = "true"; }else ... |
if ("true".equals(showHeadings())) { return true; } return false; | return showHeadings(); | public boolean showHeadingsForTotalsOrTable() { if ("true".equals(showHeadings())) { return true; } return false; } |
if (this.showRecordTable() && !this.showAsTable().equals("true")) { | if (this.showRecordTable() && !this.showAsTable()) { | public boolean showRecordTableAsCells() { if (this.showRecordTable() && !this.showAsTable().equals("true")) { return true; } return false; } |
if (this.showRecordTable() && this.showAsTable().equals("true")) { | if (this.showRecordTable() && this.showAsTable()) { | public boolean showRecordTableAsTable() { if (this.showRecordTable() && this.showAsTable().equals("true")) { return true; } return false; } |
if (this.showTotalsOnly() && !this.showAsTable().equals("true")) { | if (this.showTotalsOnly() && !this.showAsTable()) { | public boolean showTotalsOnlyAsCells() { if (this.showTotalsOnly() && !this.showAsTable().equals("true")) { return true; } return false; } |
if (this.showTotalsOnly() && this.showAsTable().equals("true")) { | if (this.showTotalsOnly() && this.showAsTable()) { | public boolean showTotalsOnlyAsTable() { if (this.showTotalsOnly() && this.showAsTable().equals("true")) { return true; } return false; } |
public String totalsOnly() { if (this.showTotalsOnly()) { return "true"; } return "false"; | public boolean totalsOnly() { return showTotalsOnly(); | public String totalsOnly() { if (this.showTotalsOnly()) { return "true"; } return "false"; } |
if (isPrimitive(type) || isArray(type)) { | if (isArray(type)) { | public static String emulateClassGetName(Type type) { if (isPrimitive(type) || isArray(type)) { return type.getDescriptor().replace('/', '.'); } else { return type.getClassName(); } } |
return type.getClassName(); | return getClassName(type); | public static String emulateClassGetName(Type type) { if (isPrimitive(type) || isArray(type)) { return type.getDescriptor().replace('/', '.'); } else { return type.getClassName(); } } |
forrestPropertiesStringURI = projectHome + SystemUtils.FILE_SEPARATOR + "forrest.properties"; filteringProperties = loadAntPropertiesFromURI(filteringProperties, forrestPropertiesStringURI); String defaultForrestPropertiesStringURI = contextHome + SystemUtils.FILE_SEPARATOR + "default-forrest.properties"; filteringPr... | public void initialize() throws Exception { // add all homes important to forrest to the properties setHomes(); loadSystemProperties(filteringProperties); // NOTE: the first values set get precedence, as in AntProperties String forrestPropertiesStringURI; try { /... | |
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; tree.setSelectionPath(selPath); DefaultMutableTreeNode popupNode = (DefaultMutableTreeNode) selPath.getLastPathComponent(); Object o = popupNode.getUserObject(); if (o instanceof SocietyComponent) { } else if (o instanceof Rec... | TreePath[] selectionPaths = tree.getSelectionPaths(); if (selectionPaths == null) return; boolean haveRecipes = false; for (int i = 0; i < selectionPaths.length; i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) selectionPaths[i].getLastPathComponent(); if (node.getUserObject() instanceof RecipeComponent) h... | private void doPopup(MouseEvent e) { TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at tree.setSelectionPath(selPath); DefaultMutableTreeNode popupNode = (DefaultMutableTreeNode) selPath.get... |
} else if (o instanceof Experiment) { popupMenu.show(tree, e.getX(), e.getY()); } else if (popupNode == societies) { societiesMenu.show(tree, e.getX(), e.getY()); } else if (popupNode == recipes) { recipesMenu.show(tree, e.getX(), e.getY()); } | private void doPopup(MouseEvent e) { TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at tree.setSelectionPath(selPath); DefaultMutableTreeNode popupNode = (DefaultMutableTreeNode) selPath.get... | |
private static int getStackSize(Class[] classes) { int size = 0; for (int i = 0; i < classes.length; i++) { size += getStackSize(classes[i]); } return size; | private static int getStackSize(Class clazz) { return getType(clazz).getSize(); | private static int getStackSize(Class[] classes) { int size = 0; for (int i = 0; i < classes.length; i++) { size += getStackSize(classes[i]); } return size; } |
abstract public void setDebug(boolean debug); | public void setDebug(boolean debug) { this.debug = debug; } | abstract public void setDebug(boolean debug); |
.readDOM("cocoon: | .readDOM(propertyURI, this.manager); | private void contractImplHelper(Document _contractImpl) throws Exception, TransformerFactoryConfigurationError, TransformerConfigurationException, IllegalArgumentException { NodeList template = _contractImpl .getElementsByTagName(CONTRACT_IMPL_ROOT_ELEMENT); if (te... |
public boolean shouldCollectValidationExceptions() { return ERXUtilities.booleanValue(d2wContext().valueForKey(Keys.shouldCollectValidationExceptions)); } | public boolean shouldCollectValidationExceptions() { return ERXValueUtilities.booleanValue(d2wContext().valueForKey(Keys.shouldCollectValidationExceptions)); } | public boolean shouldCollectValidationExceptions() { return ERXUtilities.booleanValue(d2wContext().valueForKey(Keys.shouldCollectValidationExceptions)); } |
public boolean shouldPropagateExceptions() { return ERXUtilities.booleanValue(d2wContext().valueForKey(Keys.shouldPropagateExceptions)); } | public boolean shouldPropagateExceptions() { return ERXValueUtilities.booleanValue(d2wContext().valueForKey(Keys.shouldPropagateExceptions)); } | public boolean shouldPropagateExceptions() { return ERXUtilities.booleanValue(d2wContext().valueForKey(Keys.shouldPropagateExceptions)); } |
if(idx < 0) { idx = stream.toLowerCase().indexOf(tag.toLowerCase()); } | private void insertInResponseBeforeTag(WOResponse res, String content, String tag) { String stream = res.contentString(); int idx = stream.indexOf(tag); if(idx >= 0) { String pre = stream.substring(0,idx); String post = stream.substring(idx, stream.length()); re... | |
if( r == null ) | if( r == null || r.destinationEntity() != leftEntity ) { | public String assembleJoinClause(String leftName, String rightName, int semantic) { if (disableOuterJoins == true) { return super.assembleJoinClause(leftName, rightName, semantic); } StringBuffer sb = new... |
} | public String assembleJoinClause(String leftName, String rightName, int semantic) { if (disableOuterJoins == true) { return super.assembleJoinClause(leftName, rightName, semantic); } StringBuffer sb = new... | |
log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.binder"); | createLogger(); | public MessageReleaseSchedulerImpl( double samplesPerSecond, double inMessagesPerSecond, double outMessagesPerSecond) { long t = (int)(1000.0 / samplesPerSecond); if (t < MIN_SLEEP_MILLIS) { t = MIN_SLEEP_MILLIS; } this.sleepMS = t; this.inQ = new ObjectReleaseQueue(inMessagesPerSec... |
if (Modifier.isAbstract(method.getModifiers())) { | if (delegating) { load_this(); getfield(DELEGATE_FIELD); load_args(); invoke(method); } else if (Modifier.isAbstract(method.getModifiers())) { | private void generateAccessMethod(Method method, String accessName) { begin_method(Modifier.FINAL, method.getReturnType(), accessName, method.getParameterTypes(), method.getExceptionTypes()); if (Modifier.isAbstract(method... |
if (delegating) { getfield(DELEGATE_FIELD); load_args(); invoke(method); } else { load_args(); super_invoke(method); } | load_args(); super_invoke(method); | private void generateAccessMethod(Method method, String accessName) { begin_method(Modifier.FINAL, method.getReturnType(), accessName, method.getParameterTypes(), method.getExceptionTypes()); if (Modifier.isAbstract(method... |
boolean result=false; | boolean result=true; | public static boolean arraysAreIdenticalSets(NSArray a1, NSArray a2) { boolean result=false; for (Enumeration e=a1.objectEnumerator();e.hasMoreElements();) { Object i=e.nextElement(); if (!a2.containsObject(i)) { result=false; break; } } if... |
String actionUrl = context.componentActionURL(); | String actionUrl = AjaxUtils.ajaxComponentActionUrl(context); | public String onClick(WOContext context) { StringBuffer sb = new StringBuffer(); String onClickBefore = (String)valueForBinding("onClickBefore", context.component()); if (onClickBefore != null) { sb.append("if ("); sb.append(onClickBefore); sb.append(") {"); } NSDictionary options = createAjaxOptions(context.compo... |
if (log.isDebugEnabled()) { | if (log.isInfoEnabled()) { | private boolean checkProviders() { if (log.isDebugEnabled()) { log.info("Num providers: " + numProviders + " metricsProviders.size(): " + metricsProviders.size()); } return (metricsProviders.size() >= numProviders); } |
if(log.isDebugEnabled()) { | if(log.isErrorEnabled()) { | private Alarm wakeAfterRealTime(long delayTime) { if (delayTime<=0) { if(log.isDebugEnabled()) { log.error("\nwakeAfterRealTime("+delayTime+") is in the past!"); } Thread.dumpStack(); delayTime=1000; } long absTime = System.currentTimeMillis()+delayTime; PluginAlarm pa = new Pl... |
Thread.dumpStack(); | private Alarm wakeAfterRealTime(long delayTime) { if (delayTime<=0) { if(log.isDebugEnabled()) { log.error("\nwakeAfterRealTime("+delayTime+") is in the past!"); } Thread.dumpStack(); delayTime=1000; } long absTime = System.currentTimeMillis()+delayTime; PluginAlarm pa = new Pl... | |
this.wreplace = wreplace; | public EnhancerGenerator(Class type, Class[] interfaces, Method wreplace, CallbackFilter filter, Callbacks callbacks) { setSuperclass(type); this.interfaces = interfaces; this.wreplac... | |
boolean declaresWriteReplace = false; | protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept... | |
int ctype = (filter == null) ? Callbacks.INTERCEPT : filter.accept(method); | int ctype = filter.accept(method); | protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept... |
if (method.getName().equals("writeReplace") && method.getParameterTypes().length == 0) { declaresWriteReplace = true; } | protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept... | |
if (!declaresWriteReplace) { generateWriteReplace(); } | protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept... | |
generateConstructors(constructors); generateMethods(generators, group, forcePublic); generateLegacyFactory(); | declare_field(PRIVATE_FINAL_STATIC, Map.class, CONSTRUCTOR_PROXY_MAP); declare_field(Modifier.PRIVATE, Boolean.TYPE, CONSTRUCTED_FIELD); generateConstructors(constructors); CallbackGenerator.Context[] contexts = createContexts(generators, group, forcePublic); generateMethods(generators, contexts); generateStatic(const... | protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept... |
generateStatic(constructors, generators, group); | protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept... | |
declare_field(Modifier.PRIVATE, Boolean.TYPE, CONSTRUCTED_FIELD); | private void generateConstructors(List constructors) throws NoSuchMethodException { declare_field(Modifier.PRIVATE, Boolean.TYPE, CONSTRUCTED_FIELD); for (Iterator i = constructors.iterator(); i.hasNext();) { Constructor constructor = (Constructor)i.next(); begin_constructor(cons... | |
begin_method(CALLBACK_NEW_INSTANCE); | begin_method(NEW_INSTANCE); | private void generateFactory() throws Exception { int[] keys = getCallbackKeys(); // Factory.callback(int) begin_method(GET_CALLBACK); load_this(); load_arg(0); process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key, Label end) thr... |
declare_field(PRIVATE_FINAL_STATIC, Map.class, CONSTRUCTOR_PROXY_MAP); begin_method(CALLBACK_MULTIARG_NEW_INSTANCE); | begin_method(MULTIARG_NEW_INSTANCE); | private void generateFactory() throws Exception { int[] keys = getCallbackKeys(); // Factory.callback(int) begin_method(GET_CALLBACK); load_this(); load_arg(0); process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key, Label end) thr... |
checkcast(Callbacks.getType(key)); | public void processCase(int key, Label end) throws Exception { putfield(getCallbackField(key)); goTo(end); } | |
private void generateMethods(CallbackGenerator[] generators, List[] methods, final Set forcePublic) throws Exception { | private void generateMethods(CallbackGenerator[] generators, CallbackGenerator.Context[] contexts) throws Exception { | private void generateMethods(CallbackGenerator[] generators, List[] methods, final Set forcePublic) throws Exception { for (int i = 0; i <= Callbacks.MAX_VALUE; i++) { final int type = i; if (generators[type] != null) { generators[type].generate(this, methods[i], new Call... |
final int type = i; if (generators[type] != null) { generators[type].generate(this, methods[i], new CallbackGenerator.Context() { public void emitCallback() { generateCurrentCallback(type); } public int getModifiers(Method method) { int modifiers = getDefaultModifiers(method); if (forcePublic.contains(MethodWrapper.cre... | if (generators[i] != null) { generators[i].generate(this, contexts[i]); | private void generateMethods(CallbackGenerator[] generators, List[] methods, final Set forcePublic) throws Exception { for (int i = 0; i <= Callbacks.MAX_VALUE; i++) { final int type = i; if (generators[type] != null) { generators[type].generate(this, methods[i], new Call... |
private void generateStatic(List constructors, CallbackGenerator[] generators, List[] methods) throws Exception { | private void generateStatic(List constructors, CallbackGenerator[] generators, CallbackGenerator.Context[] contexts) throws Exception { | private void generateStatic(List constructors, CallbackGenerator[] generators, List[] methods) throws Exception { begin_static(); new_instance(HashMap.class); dup(); invoke_constructor(HashMap.class); dup(); putfield(CONSTRUCTOR_PROXY_MAP); Local map = make_local();... |
generators[i].generateStatic(this, methods[i]); | generators[i].generateStatic(this, contexts[i]); | private void generateStatic(List constructors, CallbackGenerator[] generators, List[] methods) throws Exception { begin_static(); new_instance(HashMap.class); dup(); invoke_constructor(HashMap.class); dup(); putfield(CONSTRUCTOR_PROXY_MAP); Local map = make_local();... |
if (results == null && ERXAjaxApplication.shouldNotStorePage(context)) { WOResponse response = context.response(); ERXAjaxApplication.cleanUpHeaders(response); results = response; | if (ERXAjaxApplication.shouldNotStorePage(context)) { if (results == context.page()) { NSLog.out.appendln("ERXAjaxApplication.invokeAction: An Ajax response return context.page(), which is almost certainly an error."); results = null; } if (results == null) { WOResponse response = context.response(); ERXAjaxApplication... | public WOActionResults invokeAction(WORequest request, WOContext context) { WOActionResults results = super.invokeAction(request, context); // MS: This is to support AjaxUpdateContainer. if (results == null && ERXAjaxApplication.shouldNotStorePage(context)) { WOResponse response = conte... |
PopulateDb pdb = new PopulateDb("CMS_", exp.getExperimentID(), exp.getTrialID()); | PopulateDb pdb = new PopulateDb("CSM_", exp.getExperimentID(), exp.getTrialID()); | public DBConfigWriter(List components, NodeComponent[] nodesToWrite, Experiment exp) throws SQLException, IOException { this.nodesToWrite = nodesToWrite; this.components = components; theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(exp.getExperimentName())... |
setMenuBar(((Frame) awtComponent).getMenuBar()); | void create () { // Create a normal decorated window. create (GDK_WINDOW_TYPE_HINT_NORMAL, true); } | |
if (bar == null) setMenuBarPeer (null); else setMenuBarPeer ((MenuBarPeer) bar.getPeer ()); | if (bar == null && menuBar != null) { removeMenuBarPeer(menuBar); menuBar = null; insets.top -= menuBarHeight; menuBarHeight = 0; awtComponent.doLayout(); } else if (bar != null) { if (menuBar != null) removeMenuBarPeer(menuBar); menuBar = (MenuBarPeer) ((MenuBar) bar).getPeer(); setMenuBarPeer(menuBar); } | public void setMenuBar (MenuBar bar) { if (bar == null) setMenuBarPeer (null); else setMenuBarPeer ((MenuBarPeer) bar.getPeer ()); } |
GdkGraphics2D (GtkComponentPeer component) | GdkGraphics2D (GdkGraphics2D g) | GdkGraphics2D (GtkComponentPeer component) { this.component = component; int rgb[] = initState (component); setColor (new Color (rgb[0], rgb[1], rgb[2])); setBackground (new Color (rgb[3], rgb[4], rgb[5])); setPaint (getColor()); setFont (new Font("SansSerif", Font.PLAIN, 12)); setTransform (new... |
this.component = component; int rgb[] = initState (component); | paint = g.paint; stroke = g.stroke; hints = g.hints; | GdkGraphics2D (GtkComponentPeer component) { this.component = component; int rgb[] = initState (component); setColor (new Color (rgb[0], rgb[1], rgb[2])); setBackground (new Color (rgb[3], rgb[4], rgb[5])); setPaint (getColor()); setFont (new Font("SansSerif", Font.PLAIN, 12)); setTransform (new... |
setColor (new Color (rgb[0], rgb[1], rgb[2])); setBackground (new Color (rgb[3], rgb[4], rgb[5])); setPaint (getColor()); setFont (new Font("SansSerif", Font.PLAIN, 12)); setTransform (new AffineTransform ()); setStroke (new BasicStroke ()); setRenderingHints (getDefaultHints()); | if (g.fg.getAlpha() != -1) fg = new Color (g.fg.getRed (), g.fg.getGreen (), g.fg.getBlue (), g.fg.getAlpha ()); else fg = new Color (g.fg.getRGB ()); | GdkGraphics2D (GtkComponentPeer component) { this.component = component; int rgb[] = initState (component); setColor (new Color (rgb[0], rgb[1], rgb[2])); setBackground (new Color (rgb[3], rgb[4], rgb[5])); setPaint (getColor()); setFont (new Font("SansSerif", Font.PLAIN, 12)); setTransform (new... |
stateStack = new Stack (); | if (g.bg.getAlpha() != -1) bg = new Color(g.bg.getRed (), g.bg.getGreen (), g.bg.getBlue (), g.bg.getAlpha ()); else bg = new Color (g.bg.getRGB ()); if (g.clip == null) clip = null; else clip = new Rectangle (g.getClipBounds ()); if (g.transform == null) transform = new AffineTransform (); else transform = new Affin... | GdkGraphics2D (GtkComponentPeer component) { this.component = component; int rgb[] = initState (component); setColor (new Color (rgb[0], rgb[1], rgb[2])); setBackground (new Color (rgb[3], rgb[4], rgb[5])); setPaint (getColor()); setFont (new Font("SansSerif", Font.PLAIN, 12)); setTransform (new... |
System.out.println("exception occured: " + x); | System.out.println("exception occurred: " + x); | public Thread_Wait() { System.out.println("creating thread"); Thread t = new Thread(this); t.start(); try { Thread.sleep(100); } catch (Exception x) { System.out.println("exception occured: " + x); } synchronized (this) { System.out.println("notifying other thread"... |
System.out.println("exception occured: " + x); | System.out.println("exception occurred: " + x); | public void run() { System.out.println ("new thread running"); synchronized (this) { try { wait(); } catch (Exception x) { System.out.println("exception occured: " + x); } } System.out.println ("thread notified okay"); } |
DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot(); if (target == root) { for (int i = 0, n = root.getChildCount(); i < n; i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) root.getChildAt(i); Object o = node.getUserObject(); if (SOCIETIES.equals(o) && flavor == societyFlavor || RECIPES.... | data = t.getTransferData(flavors[0]); | public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action == DnDConstants.ACTION_NONE) return DnDConstants.AC... |
log.error("Exception", e); | log.error("Exception adding dropped element:", e); return DnDConstants.ACTION_NONE; | public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action == DnDConstants.ACTION_NONE) return DnDConstants.AC... |
action = DnDConstants.ACTION_NONE; | public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action == DnDConstants.ACTION_NONE) return DnDConstants.AC... | |
if (data == null) { if(log.isErrorEnabled()) { log.error("Attempting to add null dropped element"); } return DnDConstants.ACTION_NONE; } if (data instanceof DMTNArray) { DMTNArray nodes = (DMTNArray) data; for (int i = 0; i < nodes.nodes.length; i++) addElement(nodes.nodes[i].getUserObject(), flavor, target, before); }... | public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action == DnDConstants.ACTION_NONE) return DnDConstants.AC... | |
public Agent (String name, float lat, float lon) { super(name, lat, lon); this.cid = new ClusterIdentifier(name); | public Agent (ClusterIdentifier cid) { super(cid.toString()); this.cid = cid; | public Agent (String name, float lat, float lon) { super(name, lat, lon); this.cid = new ClusterIdentifier(name); } |
public NamedLocationImpl (String name) { if (name.indexOf('|') == -1) { this.setName(name); } else { this.setName(name.substring(0, name.indexOf('|'))); name = name.substring(name.indexOf('|') + 1); String lat = name.substring(0, name.indexOf('|')); String lon = name.substring(name.indexOf('|') + 1); float flat = 0.... | public NamedLocationImpl() {} | public NamedLocationImpl (String name) { if (name.indexOf('|') == -1) { //System.err.println("setting name to full thing: " + name); this.setName(name); } else { this.setName(name.substring(0, name.indexOf('|'))); //System.err.println("Found composite name, set it to " + this.name); nam... |
public CMTSociety(List ids) { super("Combo"); assemblyID = ids; | public CMTSociety(String name, List assemblyID) { super(name); this.assemblyID = assemblyID; | public CMTSociety(List ids) { super("Combo"); assemblyID = ids; } |
createLogger(); | init(); | public Experiment(String name, SocietyComponent societyComponent, RecipeComponent[] recipes) { this(name); createLogger(); setSocietyComponent(societyComponent); if(societyComponent instanceof SocietyFileComponent) { // Will use PopulateDb without CMT assembly fromFile = true; } setR... |
setRecipes(recipes); setDefaultNodeArguments(); | setRecipeComponents(recipes); if(log.isDebugEnabled()) { log.debug("Experiment: " + name); } | public Experiment(String name, SocietyComponent societyComponent, RecipeComponent[] recipes) { this(name); createLogger(); setSocietyComponent(societyComponent); if(societyComponent instanceof SocietyFileComponent) { // Will use PopulateDb without CMT assembly fromFile = true; } setR... |
public void addComponent(ModifiableComponent comp) { if (comp instanceof SocietyComponent) addSocietyComponent((SocietyComponent)comp); else if (comp instanceof RecipeComponent) addRecipe((RecipeComponent)comp); | public void addComponent(ModifiableComponent comp) throws IllegalArgumentException { if (comp instanceof SocietyComponent) { try { addSocietyComponent((SocietyComponent)comp); } catch (IllegalArgumentException e) { if(log.isErrorEnabled()) { log.error("SocietyComponent already set"); } } } else if (comp instanceof Reci... | public void addComponent(ModifiableComponent comp) { if (comp instanceof SocietyComponent) addSocietyComponent((SocietyComponent)comp); else if (comp instanceof RecipeComponent) addRecipe((RecipeComponent)comp); } |
public HostComponent addHost(String name) { ExperimentHost result = new ExperimentHost(name); hosts.add(result); result.addModificationListener(this); fireModification(); return result; | public HostComponent addHost(String name) throws IllegalArgumentException { if(hostExists(name)) { throw new IllegalArgumentException("Host Already Exists in Society"); } else { return addHostComponent(new ExperimentHost(name)); } | public HostComponent addHost(String name) { // FIXME! This allows 2 Hosts with the same name! ExperimentHost result = new ExperimentHost(name); hosts.add(result); result.addModificationListener(this); fireModification(); return result; } |
public NodeComponent addNode(String name) { ExperimentNode result = new ExperimentNode(name, this); addNodeComponent(result); return result; | public NodeComponent addNode(String name) throws IllegalArgumentException { if(!nodeExists(name)) { ExperimentNode result = new ExperimentNode(name, this); addNodeComponent(result); return result; } else { throw new IllegalArgumentException("Node already exists"); } | public NodeComponent addNode(String name) { // FIXME! This allows 2 Nodes with the same name. Of itself, that's // OK, but on the same Host, that would be bad, and in general // its confusing. ExperimentNode result = new ExperimentNode(name, this); addNodeComponent(result); return result; } |
NodeComponent[] nodesToWrite = getNodes(); | NodeComponent[] nodesToWrite = getNodeComponents(); | private void addNodes() { NodeComponent[] nodesToWrite = getNodes(); for (int i = 0; i < nodesToWrite.length; i++) { ComponentData nc = new GenericComponentData(); nc.setType(ComponentData.NODE); nc.setName(nodesToWrite[i].getShortName()); nc.setClassName("org.cougaar.core.node.Node"); // le... |
nc.setParent(theWholeSoc); | nc.setParent(completeSociety); | private void addNodes() { NodeComponent[] nodesToWrite = getNodes(); for (int i = 0; i < nodesToWrite.length; i++) { ComponentData nc = new GenericComponentData(); nc.setType(ComponentData.NODE); nc.setName(nodesToWrite[i].getShortName()); nc.setClassName("org.cougaar.core.node.Node"); // le... |
theWholeSoc.addChild(nc); | completeSociety.addChild(nc); | private void addNodes() { NodeComponent[] nodesToWrite = getNodes(); for (int i = 0; i < nodesToWrite.length; i++) { ComponentData nc = new GenericComponentData(); nc.setType(ComponentData.NODE); nc.setName(nodesToWrite[i].getShortName()); nc.setClassName("org.cougaar.core.node.Node"); // le... |
public void addSocietyComponent(SocietyComponent sc) { if (society == null) { setSocietyComponent (sc); | public void addSocietyComponent(SocietyComponent sc) throws IllegalArgumentException { if (this.societyComponent == null) { setSocietyComponent(sc); | public void addSocietyComponent(SocietyComponent sc) { if (society == null) { setSocietyComponent (sc); } else { throw new IllegalArgumentException("Already have a society in experiment " + this); } } |
throw new IllegalArgumentException("Already have a society in experiment " + this); | throw new IllegalArgumentException("Already have a societyComponent in experiment " + this); | public void addSocietyComponent(SocietyComponent sc) { if (society == null) { setSocietyComponent (sc); } else { throw new IllegalArgumentException("Already have a society in experiment " + this); } } |
for (int i = 0; i < getComponentCount(); i++) { ModifiableComponent mc = getComponent(i); | ModifiableComponent society = getSocietyComponent(); ModifiableComponent copiedSocietyComponent = null; copiedSocietyComponent = society.copy("Society for " + uniqueName); if (copiedSocietyComponent != null) experimentCopy.addComponent(copiedSocietyComponent); for (int i = 0; i < getRecipeComponentCount(); i++) { Mod... | public ModifiableComponent copy(String uniqueName) { Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName); Properties newProps = experimentCopy.getDefaultNodeArguments(); newProps.c... |
if (mc instanceof SocietyComponent) { copiedComponent = mc.copy("Society for " + uniqueName); } else if (mc instanceof RecipeComponent) { copiedComponent = mc.copy("Recipe for " + uniqueName); } | copiedComponent = mc.copy("Recipe for " + uniqueName); | public ModifiableComponent copy(String uniqueName) { Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName); Properties newProps = experimentCopy.getDefaultNodeArguments(); newProps.c... |
HostComponent[] hosts = getHosts(); | HostComponent[] hosts = getHostComponents(); | public ModifiableComponent copy(String uniqueName) { Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName); Properties newProps = experimentCopy.getDefaultNodeArguments(); newProps.c... |
NodeComponent[] nodes = getNodes(); | NodeComponent[] nodes = getNodeComponents(); | public ModifiableComponent copy(String uniqueName) { Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName); Properties newProps = experimentCopy.getDefaultNodeArguments(); newProps.c... |
ExperimentINIWriter cw = null; if (DBUtils.dbMode) { saveToDb(); if (theWholeSoc == null) return; cw = new ExperimentINIWriter(theWholeSoc); } else cw = new ExperimentINIWriter(getComponents(), getNodes(), this); | generateCompleteSociety(); List components = getComponents(); for (int i = 0, n = components.size(); i < n; i++) { BaseComponent soc = (BaseComponent) components.get(i); soc.modifyComponentData(completeSociety); } ExperimentINIWriter cw = new ExperimentINIWriter(completeSociety); | public void dumpINIFiles() { ExperimentINIWriter cw = null; if (DBUtils.dbMode) { saveToDb(); if (theWholeSoc == null) return; cw = new ExperimentINIWriter(theWholeSoc); } else cw = new ExperimentINIWriter(getComponents(), getNodes(), this); File resultDir = getResultDirectory()... |
if (society != null) society.setRunning(false); | if (societyComponent != null) societyComponent.setRunning(false); | public void experimentStopped() { // Tell the Societies in the experiment they are no longer running? if (society != null) society.setRunning(false); } |
if (society != null) { AgentComponent[] sags = society.getAgents(); | if (societyComponent != null) { AgentComponent[] sags = societyComponent.getAgents(); | private List getAgentsInSociety() { List agents = new ArrayList(); if (society != null) { AgentComponent[] sags = society.getAgents(); if (sags != null && sags.length > 0) agents.addAll(Arrays.asList(sags)); } return agents; } |
for (int i = 0; i < getComponentCount(); i++) { comps.add(getComponent(i)); | for (int i = 0; i < getRecipeComponentCount(); i++) { comps.add(getRecipeComponent(i)); | private List getComponents() { List comps = new ArrayList(); for (int i = 0; i < getComponentCount(); i++) { comps.add(getComponent(i)); } return comps; } |
comps.add(getSocietyComponent()); | private List getComponents() { List comps = new ArrayList(); for (int i = 0; i < getComponentCount(); i++) { comps.add(getComponent(i)); } return comps; } | |
public SocietyComponent getSocietyComponent(int i) { if (i != 0) { throw new IllegalArgumentException("Asked for society " + i + " when only 1, index 0, allowed"); } return society; | public SocietyComponent getSocietyComponent() { return this.societyComponent; | public SocietyComponent getSocietyComponent(int i) { if (i != 0) { throw new IllegalArgumentException("Asked for society " + i + " when only 1, index 0, allowed"); } return society; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.