rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
this(mimeType, humanPresentableName, null); | mimeType = null; representationClass = null; humanPresentableName = null; | DataFlavor(String mimeType, String humanPresentableName) throws ClassNotFoundException{ this(mimeType, humanPresentableName, null);} |
return type; | return adjType; | public int getAdjustmentType () { return type; } |
return ("AdjustmentEvent[" + type + "," + value + ";" + super.paramString () + "]"); | String r; switch (id) { case ADJUSTMENT_VALUE_CHANGED: r = "ADJUSTMENT_VALUE_CHANGED"; break; default: r = "unknown id"; break; } r += ",adjType="; switch (adjType) { case BLOCK_DECREMENT: r += "BLOCK_DECREMENT"; break; case BLOCK_INCREMENT: r += "BLOCK_INCREMENT"; break; case TRACK: r += "TRACK"; break; case UNIT_DE... | public String paramString () { return ("AdjustmentEvent[" + type + "," + value + ";" + super.paramString () + "]"); } |
hide(); | setVisible(false); | public SelectionDialog() { super(); setTitle("Display Modes"); modes = getAvailableDisplayModes(); String[] strings = modesToString(modes); final JList modeList = new JList(strings); modeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); modeList.setSelectedIndex(0); ... |
hide(); | setVisible(false); | public void actionPerformed(ActionEvent e) { selectedIndex = modeList.getSelectedIndex(); done = true; synchronized(monitor) { monitor.notify(); } hide(); dispose(); } |
hide(); | setVisible(false); | public void actionPerformed(ActionEvent e) { selectedIndex = -1; done = true; synchronized(monitor) { monitor.notify(); } hide(); dispose(); } |
dialog.show(); | dialog.setVisible(true); | public static DisplayMode showSelectionDialog() { SelectionDialog dialog = new SelectionDialog(); dialog.show(); dialog.waitFor(); return dialog.selected(); } |
+ context().componentActionURL() + "\");"); | + AjaxUtils.ajaxComponentActionUrl(context()) + "\");"); | protected void addRequiredWebResources(WOResponse res) { addScriptResourceInHead(res, "jsonrpc.js"); NSMutableDictionary userInfo = AjaxUtils.mutableUserInfo(context().response()); String name = (String) valueForBinding("name"); String key = "JSONRPC_" + name; Object oldValue = us... |
JMenu fileMenu = new JMenu(FILE_MENU); | fileMenu = new JMenu(FILE_MENU); | public CSMART() { setTitle("CSMART"); // Setup the database parameters. dbConfig = Parameters.findParameter(DBUtils.DATABASE); dbName = Parameters.findParameter(DBUtils.USER); dbPassword = Parameters.findParameter(DBUtils.PASSWORD); // CSMART.inDBMode(true); JMenuBar menuBar = new JMenuB... |
fileMenu.addSeparator(); | public CSMART() { setTitle("CSMART"); // Setup the database parameters. dbConfig = Parameters.findParameter(DBUtils.DATABASE); dbName = Parameters.findParameter(DBUtils.USER); dbPassword = Parameters.findParameter(DBUtils.PASSWORD); // CSMART.inDBMode(true); JMenuBar menuBar = new JMenuB... | |
dbConfigMenuItem_actionPerformed(); } | organizer.selectExperimentFromDatabase(); } | public void actionPerformed(ActionEvent e) { dbConfigMenuItem_actionPerformed(); } |
runBuilder((ModifiableConfigurableComponent)components.get(0), false, true); | runBuilder((ModifiableConfigurableComponent)components.get(0), false); | public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP_MENU_ITEM)) { URL help = (URL)getClass().getResource(HELP_DOC); ... |
runExperimentBuilder(experiments[0], false, true); | runExperimentBuilder(experiments[0], false); | public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP_MENU_ITEM)) { URL help = (URL)getClass().getResource(HELP_DOC); ... |
dbConfig = dbConfigField.getText(); dbName = dbNameField.getText(); dbPassword = new String(dbPasswordField.getPassword()); dbConfigDialog.setVisible(false); } | organizer.selectRecipeFromDatabase(); } | public void actionPerformed(ActionEvent e) { dbConfig = dbConfigField.getText(); dbName = dbNameField.getText(); dbPassword = new String(dbPasswordField.getPassword()); dbConfigDialog.setVisible(false); } |
dbConfigDialog.setVisible(false); } | organizer.newRecipe(); } | public void actionPerformed(ActionEvent e) { dbConfigDialog.setVisible(false); } |
public void runBuilder(ModifiableConfigurableComponent cc, boolean alwaysNew, boolean openForEditing) { if (!cc.isEditable() && openForEditing) { | public void runBuilder(ModifiableConfigurableComponent cc, boolean alwaysNew) { if (!cc.isEditable()) { | public void runBuilder(ModifiableConfigurableComponent cc, boolean alwaysNew, boolean openForEditing) { if (!cc.isEditable() && openForEditing) { Object[] options = { "Edit", "View", "Copy", "Cancel" }; int result = JOptionPane.showOptionDialog(this, cc.getS... |
public void runExperimentBuilder(Experiment experiment, boolean alwaysNew, boolean openForEditing) { if (!experiment.isEditable() && openForEditing) { | public void runExperimentBuilder(Experiment experiment, boolean alwaysNew) { if (!experiment.isEditable()) { | public void runExperimentBuilder(Experiment experiment, boolean alwaysNew, boolean openForEditing) { if (!experiment.isEditable() && openForEditing) { Object[] options = { "Edit", "View", "Copy", "Cancel" }; int result = JOptionPane.showOptionDialog(this, ... |
runBuilder(comps[i], true, true); | runBuilder(comps[i], true); | private void runMultipleBuilders(ModifiableConfigurableComponent[] comps) { for (int i = 0; i < comps.length; i++) { String s = "Configuration Builder: " + comps[i].getShortName(); if (NamedFrame.getNamedFrame().getFrame(s) == null) runBuilder(comps[i], true, true); } } |
runExperimentBuilder(experiments[i], true, true); | runExperimentBuilder(experiments[i], true); | private void runMultipleExperimentBuilders(Experiment[] experiments) { for (int i = 0; i < experiments.length; i++) { String s = "Experiment Builder: " + experiments[i].getExperimentName(); if (NamedFrame.getNamedFrame().getFrame(s) == null) runExperimentBuilder(experiments[i], true, true); } } |
setPropertyClass(StringRange.class); | setPropertyClass(String.class); | public ComponentTypeProperty (ConfigurableComponent c, String name, Object value){ super(c, name, value); // Build up the set from the known values in ComponentData allComponents = new HashSet(); allComponents.add(new StringRange(ComponentData.SOCIETY)); allComponents.add(new StringRange(ComponentData.... |
log = CSMART.createLogger("org.cougaar.tools.csmart.experiment"); | createLogger(); | public ExperimentNode(String nodeName, Experiment experiment) { super(nodeName); this.experiment = experiment; addProperty("Experiment", experiment); addDefaultArgumentsToNode(nodeName); log = CSMART.createLogger("org.cougaar.tools.csmart.experiment"); } |
if (log.isDebugEnabled ()) { log.debug ("Black list qualifier: " + blackListQualifier () + " filtering: " + filteredAddresses); } | public NSArray filterEmailAddresses (NSArray emailAddresses) { NSMutableArray filteredAddresses = null; if ((emailAddresses != null) && (emailAddresses.count () > 0) && (this.hasWhiteList () || this.hasBlackList ())) { filteredAddresses = new NSMutableArray (emailAddre... | |
public void setValue(Object val); | void setValue(Object val); | public void setValue(Object val); |
if(log.isWarnEnabled()) { log.warn("Adding Parameter."); } | private static final void addPropertiesAsParameters(ComponentData cd, BaseComponent cp) { for (Iterator it = cp.getPropertyNames(); it.hasNext(); ) { ComponentName pname = (ComponentName) it.next(); Property prop = cp.getProperty(pname); if (pro... | |
addPropertiesAsParameters(ac, agent); | addBinders(ac, agent); addPlugins(ac, agent); | private static final void generateAgentComponentData(AgentComponent agent, ComponentData parent, ConfigurableComponent owner) { AgentComponentData ac = new AgentComponentData(); ac.setName(agent.getShortName()); ac.setClassName(ClusterImpl.class.getNa... |
if (s != null) urls.add(URLString + "/$" + s + "/"); | public static Vector getAgentURLs(String URLString) throws Exception { String urlSpec = URLString + "/" + ClientServletUtil.AGENT_PROVIDER_SERVLET; URL url = new URL(urlSpec); URLConnection connection = url.openConnection(); connection.setDoInput(true); connection.setDoOutput(true); InputStream is =... | |
if (communityName == null) { log.error("updateCommAtt has null commName for community " + communityId + " and column " + columnName + " in row: " + row); | if (columnName == null) { log.error("updateCommAtt has null columnName for community " + communityId + " and column " + column + " in row: " + row); | private void updateCommunityAttributeTable(Object value, int row, int column) { String columnName = getColumnName(column); String communityId = (String)getValueAt(row, 0); if (communityId == null) { log.error("updateCommAtt on column " + columnName + " has null commId. CommName=" + communityName + " in ... |
dbValue = dbValue.trim(); if (dbValue.equals("") || dbValue.equals("null")) { if (log.isInfoEnabled()) { log.info("updateCommAttribute: Empty value for Attribute_ID not allowed. Ignoring change."); } return; } | private void updateCommunityAttributeTable(Object value, int row, int column) { String columnName = getColumnName(column); String communityId = (String)getValueAt(row, 0); if (communityId == null) { log.error("updateCommAtt on column " + columnName + " has null commId. CommName=" + communityName + " in ... | |
dbValue = dbValue.trim(); if (dbValue.equals("") || dbValue.equals("null")) { if (log.isInfoEnabled()) { log.info("updateCommEntityAttribute: Empty value for Attribute_ID not allowed. Ignoring change."); } return; } | private void updateCommunityEntityAttributeTable(Object value, int row, int column) { String columnName = getColumnName(column); String entityId = (String)getValueAt(row, 0); if (entityId == null) { log.error("updateCommEntityAtt on column " + columnName + " has null entityId. CommName=" + communityName... | |
il.append( new ICONST( args.length ) ); | il.append( ClassFileUtils.getIntConst( args.length, cp ) ); | private static void generateClInit(ClassGen cg, ConstantPoolGen cp, java.util.HashMap methods){ //generates : /* static{ Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args ); .... |
il.append( new ICONST(j) ); | il.append( ClassFileUtils.getIntConst(j,cp) ); | private static void generateClInit(ClassGen cg, ConstantPoolGen cp, java.util.HashMap methods){ //generates : /* static{ Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args ); .... |
} if (objectType.equals(PropertyNames.ASSET_OBJECT)) { String isDirectObject = (String)node.getAttributeValue(PropertyNames.ASSET_IS_DIRECT_OBJECT); if (isDirectObject != null && isDirectObject.equals("true")) objectType = PropertyNames.DIRECT_OBJECT; | public void postFilter(CSMARTFrame frame, CSMARTGraph graph) { preFilter = false; if (!displayFilter()) return; // user cancelled or no agents selected, do nothing // get names of nodes to show, hide, and ignore Vector nodes = graph.vectorOfElements(GrappaConstants.NODE); Vector showNames = new Ve... | |
public void setListData(final Vector listData) | public void setListData(final Object[] listData) | public void setListData(final Vector listData) { setModel(new AbstractListModel() { public int getSize() { return listData.size(); } public Object getElementAt(int i) { return listData.elementAt(i); } }); } |
return listData.size(); | return listData.length; | public void setListData(final Vector listData) { setModel(new AbstractListModel() { public int getSize() { return listData.size(); } public Object getElementAt(int i) { return listData.elementAt(i); } }); } |
return listData.elementAt(i); | return listData[i]; | public void setListData(final Vector listData) { setModel(new AbstractListModel() { public int getSize() { return listData.size(); } public Object getElementAt(int i) { return listData.elementAt(i); } }); } |
propPriority = addPriorityProperty(PROP_PRIORITY, PROP_PRIORITY_DESC); | propPriority = addPriorityProperty(PROP_PRIORITY, PROP_PRIORITY_DFLT); | public void initProperties() { propName = addProperty(PROP_NAME, PROP_NAME_DFLT); propName.setToolTip(PROP_NAME_DESC); propType = addComponentTypeProperty(PROP_TYPE, PROP_TYPE_DFLT); propType.setToolTip(PROP_TYPE_DESC); propClass = addProperty(PROP_CLASS, PROP_CLASS_DFLT); propClass.setToolTip(PROP_... |
return ((ERXWOContext)context()).mutableUserInfo().objectForKey("formName") + ".target=_self;"; | return ((ERXMutableUserInfoHolderInterface)context()).mutableUserInfo().objectForKey("formName") + ".target=_self;"; | public String formTarget() { return ((ERXWOContext)context()).mutableUserInfo().objectForKey("formName") + ".target=_self;"; } |
Class entityClass = className.equals("EOGenericRecord") ? EOGenericRecord.class : Class.forName(className); ERXEntityClassDescription cd = newClassDescriptionForEntity(entity); EOClassDescription.registerClassDescription(cd, entityClass); _setClassDescriptionOnEntity(entity, cd); | entityClass = className.equals("EOGenericRecord") ? EOGenericRecord.class : Class.forName(className); | public void registerDescriptionForEntity(EOEntity entity) { try { String className = entity.className(); if (log.isDebugEnabled()) log.debug("Registering description for entity: " + entity.name() + " with class: " + className); Class ent... |
log.error("Invalid class name for entity: " + entity.name() + " exception: " + ex); | log.warn("Invalid class name for entity: " + entity.name() + " exception: " + ex + " using " + entityClass.getName() + " instead"); entity.setClassName("EOGenericRecord"); | public void registerDescriptionForEntity(EOEntity entity) { try { String className = entity.className(); if (log.isDebugEnabled()) log.debug("Registering description for entity: " + entity.name() + " with class: " + className); Class ent... |
ERXEntityClassDescription cd = newClassDescriptionForEntity(entity); EOClassDescription.registerClassDescription(cd, entityClass); _setClassDescriptionOnEntity(entity, cd); | public void registerDescriptionForEntity(EOEntity entity) { try { String className = entity.className(); if (log.isDebugEnabled()) log.debug("Registering description for entity: " + entity.name() + " with class: " + className); Class ent... | |
System.err.println( "PassTag#####doTag()" ); | public void doTag(XMLOutput output) throws Exception { System.err.println( "PassTag#####doTag()" ); throw new PassException(); } | |
return(getMaxDescent()); | return getDescent (); | getMaxDecent(){ return(getMaxDescent());} |
return(getDescent()); | return getMaxDecent (); | getMaxDescent(){ return(getDescent());} |
} for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; | private void prepareToCreateNodes() { for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; // set configuration file name nodeComponent.addProperty("ConfigurationFileName", nodeComponent.getShortName() + currentTrial); String ... | |
} else if (superclass.equals(Object.class)) { | } else if (superclass != null && superclass.equals(Object.class)) { | public void setSuperclass(Class superclass) { if (superclass != null && superclass.isInterface()) { setInterfaces(new Class[]{ superclass }); } else if (superclass.equals(Object.class)) { // affects choice of ClassLoader this.superclass = null; } else { ... |
CodeEmitter e = begin_static(); | private void emitMethods(Map groups, final Map indexes, final Set forcePublic) throws Exception { CodeEmitter e = begin_static(); for (int i = 0; i < callbackTypes.length; i++) { if (callbackTypes[i] != null) { declare_field(Constants.ACC_PRIVATE, getCallbackField(i), Type.ge... | |
} } Set seenGen = new HashSet(); CodeEmitter e = begin_static(); for (int i = 0; i < callbackTypes.length; i++) { if (callbackTypes[i] != null) { | private void emitMethods(Map groups, final Map indexes, final Set forcePublic) throws Exception { CodeEmitter e = begin_static(); for (int i = 0; i < callbackTypes.length; i++) { if (callbackTypes[i] != null) { declare_field(Constants.ACC_PRIVATE, getCallbackField(i), Type.ge... | |
final List fmethods = (List)groups.get(gen); CallbackGenerator.Context context = new CallbackGenerator.Context() { public Iterator getMethods() { return fmethods.iterator(); } public int getIndex(Method method) { return ((Integer)indexes.get(method)).intValue(); } public void emitCallback(CodeEmitter e, int index) { em... | if (!seenGen.contains(gen)) { seenGen.add(gen); final List fmethods = (List)groups.get(gen); CallbackGenerator.Context context = new CallbackGenerator.Context() { public Iterator getMethods() { return fmethods.iterator(); | private void emitMethods(Map groups, final Map indexes, final Set forcePublic) throws Exception { CodeEmitter e = begin_static(); for (int i = 0; i < callbackTypes.length; i++) { if (callbackTypes[i] != null) { declare_field(Constants.ACC_PRIVATE, getCallbackField(i), Type.ge... |
return modifiers; } public String getUniqueName(Method method) { return method.getName() + "_" + fmethods.indexOf(method); } }; gen.generate(this, context); gen.generateStatic(e, context); | public int getIndex(Method method) { return ((Integer)indexes.get(method)).intValue(); } public void emitCallback(CodeEmitter e, int index) { emitCurrentCallback(e, index); } public int getModifiers(Method method) { int modifiers = Constants.ACC_FINAL | (method.getModifiers() & ~Constants.ACC_ABSTRACT & ~Constants.ACC_... | private void emitMethods(Map groups, final Map indexes, final Set forcePublic) throws Exception { CodeEmitter e = begin_static(); for (int i = 0; i < callbackTypes.length; i++) { if (callbackTypes[i] != null) { declare_field(Constants.ACC_PRIVATE, getCallbackField(i), Type.ge... |
int modifiers = Constants.ACC_FINAL | (method.getModifiers() & ~Constants.ACC_ABSTRACT & ~Constants.ACC_NATIVE & ~Constants.ACC_SYNCHRONIZED); if (forcePublic.contains(MethodWrapper.create(method))) { modifiers = (modifiers & ~Constants.ACC_PROTECTED) | Constants.ACC_PUBLIC; | int modifiers = Constants.ACC_FINAL | (method.getModifiers() & ~Constants.ACC_ABSTRACT & ~Constants.ACC_NATIVE & ~Constants.ACC_SYNCHRONIZED); if (forcePublic.contains(MethodWrapper.create(method))) { modifiers = (modifiers & ~Constants.ACC_PROTECTED) | Constants.ACC_PUBLIC; } return modifiers; | public int getModifiers(Method method) { int modifiers = Constants.ACC_FINAL | (method.getModifiers() & ~Constants.ACC_ABSTRACT & ~Constants.ACC_NATIVE & ~Constants.ACC_SYNCHRONIZED); ... |
return modifiers; } | public int getModifiers(Method method) { int modifiers = Constants.ACC_FINAL | (method.getModifiers() & ~Constants.ACC_ABSTRACT & ~Constants.ACC_NATIVE & ~Constants.ACC_SYNCHRONIZED); ... | |
la.getProperty(ABCLocalAsset.PROP_DECAMOUNT).setValue(new Long(deplete / production)); | long newDeplete = ((deplete / production) > 100) ? 100 : (deplete / production); la.getProperty(ABCLocalAsset.PROP_DECAMOUNT).setValue(new Long(newDeplete)); | private String addProviderAgent(String name, int index, String[] supplies, int distance, int direction, String assetName, String[] roles, long deplete, long invChaos, long timeChaos, long avgTime, String[] allocRoles, String initializer) { Property p = null; ABCAgent agent = new ABCAgent(getFullN... |
ABCTaskFile(String name) { super(name); | ABCTaskFile() { this("Task File"); | ABCTaskFile(String name) { super(name); } |
propTaskCount = addProperty(PROP_TASKCOUNT, PROP_TASKCOUNT_DFLT); propTaskCount.addPropertyListener(new ConfigurableComponentPropertyAdapter() { public void propertyValueChanged(PropertyEvent e) { updateTaskCount((Long)e.getProperty().getValue()); } }); propTaskCount.setToolTip(PROP_TASKCOUNT_DESC); | public void initProperties() { } | |
ABCTask(String name) { super(name); | ABCTask() { this("Tasks"); | ABCTask(String name) { super(name); } |
ABCAllocationRule(String name) { super("Rule" + "-" + name); | ABCAllocationRule() { this("Alloc"); | ABCAllocationRule(String name) { super("Rule" + "-" + name); } |
societyComponent = experiment.getSocietyComponent(0); | societyComponent = experiment.getSocietyComponent(); | public CSMARTConsole(CSMART csmart, Experiment experiment) { this.csmart = csmart; this.experiment = experiment; console = this; experiment.setRunInProgress(true); currentTrial = -1; societyComponent = experiment.getSocietyComponent(0); desktop = new ConsoleDesktop(); setSocietyComponent(socie... |
NodeComponent[] nodes = experiment.getNodes(); | NodeComponent[] nodes = experiment.getNodeComponents(); | private void assignUnassignedAgents() { // get the nodes in the experiment // note that this reconciles node agents to society agents, // removing any agents that no longer exist NodeComponent[] nodes = experiment.getNodes(); if (nodes.length == 0) return; // no nodes to use // get all assigned... |
HostComponent[] hosts = experiment.getHosts(); | HostComponent[] hosts = experiment.getHostComponents(); | private void assignUnassignedAgents() { // get the nodes in the experiment // note that this reconciles node agents to society agents, // removing any agents that no longer exist NodeComponent[] nodes = experiment.getNodes(); if (nodes.length == 0) return; // no nodes to use // get all assigned... |
HostComponent[] hosts = experiment.getHosts(); | HostComponent[] hosts = experiment.getHostComponents(); | private String getOPlanAgentURL() { HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); for (int k = 0; k < agents.len... |
HostComponent[] hosts = experiment.getHosts(); | HostComponent[] hosts = experiment.getHostComponents(); | private void initRunButton() { HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); if (nodes != null && nodes.length > 0) { for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); if (... |
int nrecipes = experiment.getRecipeCount(); | int nrecipes = experiment.getRecipeComponentCount(); | private boolean isResultFile(String filename) { File thisFile = new java.io.File(filename); SocietyComponent societyComponent = experiment.getSocietyComponent(); if (societyComponent != null) { java.io.FileFilter fileFilter = societyComponent.getResultFileFilter(); if(fileFilter != null && fileFilt... |
RecipeComponent recipeComponent = experiment.getRecipe(i); | RecipeComponent recipeComponent = experiment.getRecipeComponent(i); | private boolean isResultFile(String filename) { File thisFile = new java.io.File(filename); SocietyComponent societyComponent = experiment.getSocietyComponent(); if (societyComponent != null) { java.io.FileFilter fileFilter = societyComponent.getResultFileFilter(); if(fileFilter != null && fileFilt... |
HostComponent[] hosts = experiment.getHosts(); | HostComponent[] hosts = experiment.getHostComponents(); | public RemoteProcess restartNode(NodeComponent nodeComponent) { boolean doRun = false; synchronized (runningNodes) { if (oldNodes.size() + runningNodes.size() == 1) doRun = true; } // end synchronized if (doRun) { runButton_actionPerformed(); return null; // it doesn't matter what we... |
HostComponent[] hosts = experiment.getHosts(); | HostComponent[] hosts = experiment.getHostComponents(); | private void runButton_actionPerformed() { destroyOldNodes(); // Get rid of any old stuff before creating the new userStoppedTrials = false; ArrayList nodesToUse = new ArrayList(); hostsToUse = new ArrayList(); // hosts that nodes are on HostComponent[] hosts = experiment.getHosts(); for (int i = 0;... |
HostComponent[] hosts = experiment.getHosts(); | HostComponent[] hosts = experiment.getHostComponents(); | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) ru... |
Double d = (Double) obj; | double d = ((Double) obj).value; | public boolean equals (Object obj) { if (!(obj instanceof Double)) return false; Double d = (Double) obj; return doubleToLongBits (value) == doubleToLongBits (d.doubleValue ()); } |
return doubleToLongBits (value) == doubleToLongBits (d.doubleValue ()); | return doubleToLongBits (value) == doubleToLongBits (d); | public boolean equals (Object obj) { if (!(obj instanceof Double)) return false; Double d = (Double) obj; return doubleToLongBits (value) == doubleToLongBits (d.doubleValue ()); } |
if (skipEquals) e.pop(); | private static void string_switch_hash(final CodeEmitter e, final String[] strings, final ObjectSwitchCallback callback, final boolean skipEquals) throws Exception { final Map buckets... | |
if (skipEquals) e.pop(); | public void processCase(int key, Label ignore_end) throws Exception { List bucket = (List)buckets.get(new Integer(key)); Label next = null; if (skipEquals && bucket.size() == 1) { callback.processCase((String)bucket.get(0), end); ... | |
if (filter != null && !filter.includeEventInDisplay(nodeEvent)) return; | public void handle(NodeServesClient nsc, NodeEvent nodeEvent) { final NodeEvent myNodeEvent = nodeEvent; // for swing utilities final int nodeEventType = nodeEvent.getType(); final String nodeEventDescription = getNodeEventDescription(nodeEvent); synchronized (logFileLock) { // write stdout/stderr/et... | |
if (filter != null && !filter.includeEventInDisplay(myNodeEvent)) return; | public void handle(NodeServesClient nsc, NodeEvent nodeEvent) { final NodeEvent myNodeEvent = nodeEvent; // for swing utilities final int nodeEventType = nodeEvent.getType(); final String nodeEventDescription = getNodeEventDescription(nodeEvent); synchronized (logFileLock) { // write stdout/stderr/et... | |
if (filter != null && !filter.includeEventInDisplay(myNodeEvent)) return; | public void run() { if (nodeEventType == NodeEvent.IDLE_UPDATE) handleIdleUpdate(idleTime, timestamp); else { updateStatus(myNodeEvent); doc.appendString(nodeEventDescription, style); } } | |
if (filter != null && !filter.includeEventInDisplay(nodeEvent)) continue; | public void handleAll(final NodeServesClient nsc, final java.util.List nodeEvents) { final int n = nodeEvents.size(); if (n <= 0) { return; } // write a description of the event to the log file synchronized (logFileLock) { try { int i = 0; do { NodeEvent nodeEvent = ... | |
doc.appendString(prevDescription, getNodeEventStyle(prevType)); | if (filter == null || filter.includeEventTypeInDisplay(prevType)) doc.appendString(prevDescription, getNodeEventStyle(prevType)); | public void handleAll(final NodeServesClient nsc, final java.util.List nodeEvents) { final int n = nodeEvents.size(); if (n <= 0) { return; } // write a description of the event to the log file synchronized (logFileLock) { try { int i = 0; do { NodeEvent nodeEvent = ... |
if (filter != null && !filter.includeEventInDisplay(nodeEvent)) continue; | public void run() { int prevType = -1; String prevDescription = ""; int nextEventIndex = -1; // get the first description which is not an idle update for (int i = 0; i < n; i++) { NodeEvent nodeEvent = (NodeEvent)nodeEvents.get(i); if (filter != null && !filter.includeEventInDisplay(nodeEvent)... | |
doc.appendString(prevDescription, getNodeEventStyle(prevType)); | if (filter == null || filter.includeEventTypeInDisplay(prevType)) doc.appendString(prevDescription, getNodeEventStyle(prevType)); | public void run() { int prevType = -1; String prevDescription = ""; int nextEventIndex = -1; // get the first description which is not an idle update for (int i = 0; i < n; i++) { NodeEvent nodeEvent = (NodeEvent)nodeEvents.get(i); if (filter != null && !filter.includeEventInDisplay(nodeEvent)... |
animator.stop(); System.exit(0); | new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start(); | public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); animator = new Animator(canvas); frame = new Frame(); frame.setLayout(new BorderLayout()); canvas.setSize(512, 512); frame.add(canvas, BorderLa... |
String currentPageConfiguration=(String)valueForBinding("_dynamicPage"); log.debug("currentPageConfiguration="+ currentPageConfiguration + ", _pageConfiguration="+ _pageConfiguration); if (_pageConfiguration!=null && currentPageConfiguration!=null && !_pageConfiguration.equals(currentPageConfiguration)) resetCaches(); ... | String currentPageConfiguration=(String)valueForBinding("_dynamicPage"); if (_pageConfiguration!=null && currentPageConfiguration!=null && !_pageConfiguration.equals(currentPageConfiguration)) { resetCaches(); } if (currentPageConfiguration!=null) _pageConfiguration=currentPageConfiguration; | public void maybeResetCaches() { String currentPageConfiguration=(String)valueForBinding("_dynamicPage"); log.debug("currentPageConfiguration="+ currentPageConfiguration + ", _pageConfiguration="+ _pageConfiguration); if (_pageConfiguration!=null && currentPageConfiguration!=null && ... |
D2WContext subContext = (D2WContext)valueForKey("subContext"); ERD2WUtilities.resetContextCache(subContext); subContext.setDynamicPage((String)valueForBinding("_dynamicPage")); | public void resetCaches() { //log.debug("Resetting caches"); //takeValueForKey(null,"_task"); // this will break in 5.0 :-) //takeValueForKey(null,"_entityName"); // Finalizing a context is a protected method, hence the utiltiy. //ERD2WUtilities.finalizeContext((D2WContext)valueFo... | |
Message.info("\t"+evicted[i]+" by "+evicted[i].getAllEvictingNodes()+" in "+Arrays.asList(evicted[i].getEvictedConfs())); | Collection allEvictingNodes = evicted[i].getAllEvictingNodes(); if (allEvictingNodes.isEmpty()) { Message.info("\t"+evicted[i]+" transitively in "+Arrays.asList(evicted[i].getEvictedConfs())); } else { Message.info("\t"+evicted[i]+" by "+allEvictingNodes+" in "+Arrays.asList(evicted[i].getEvictedConfs())); } | public void output(ResolveReport report, File destDir) { IvyNode[] evicted = report.getEvictedNodes(); if (evicted.length > 0) { Message.info("\t:: evicted modules:"); for (int i = 0; i < evicted.length; i++) { Message.info("\t"+evicted[i]+" by "+evicted[i].getAllE... |
String dest = IvyPatternHelper.substitute(destPattern, artifact); | ModuleRevisionId mrid = artifact.getModuleRevisionId(); if (isM2compatible()) { mrid = convertM2IdForResourceSearch(mrid); } String dest = IvyPatternHelper.substitute(destPattern, mrid.getOrganisation(), mrid.getName(), mrid.getRevision(), artifact.getName(), artifact.getType(), artifact.getExt()); | public void publish(Artifact artifact, File src, boolean overwrite) throws IOException { String destPattern; if ("ivy".equals(artifact.getType()) && !getIvyPatterns().isEmpty()) { destPattern = (String)getIvyPatterns().get(0); } else { destPattern = (String)getArtifactPa... |
if(log.isDebugEnabled()) { log.error(getAgentIdentifier().toString()+"/"+this+" caught "+e); e.printStackTrace(); | if(log.isErrorEnabled()) { log.error(getAgentIdentifier().toString()+"/"+this+" caught ", e); | protected final void cycle() { //boolean doExecute = false; // Synonymous with resetTransaction try { getBlackboardService().openTransaction();// super.openTransaction(); // FIXME!!! Replace this if block? // if (wasAwakened() || //getBlackboardService().haveCollectionsChanged())... |
if(log.isDebugEnabled()) { log.error(getAgentIdentifier().toString()+"/"+this+" caught "+e); e.printStackTrace(); | if(log.isErrorEnabled()) { log.error(getAgentIdentifier().toString()+"/"+this+" caught ", e); | protected final void prerun() { try { getBlackboardService().openTransaction(); // super.openTransaction(); setupSubscriptions(); } catch (Exception e) { synchronized (System.err) { if(log.isDebugEnabled()) { log.error(getAgentIdentifier().toString()+"/"+this+" caught "+... |
this opertation less costly. */ | this operation less costly. */ | public Pixmap(XImage image, Screen screen) { this(screen.getRootWindow(), image.getWidth(), image.getHeight(), image.getDepth()); /* FIXME: don't create a new GC all the time. This might actually not be as bad as initially believed. The GC cache of Xlib makes this opertation less costly. */ GC... |
+ "Could not get the properties for "+propertyURI; | + "Could not get the properties for "+propertyURI +"\n DispatcherStack: "+ e1; | public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, par); localRecycle(); try { this.dispatcherHelper = new DispatcherHelper(manag... |
+ "You have to set the \"type\" parameter in the sitemap!\n DispatcherStack: " + e1; | + "You have to set the \"type\" parameter in the sitemap!"; | public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, par); localRecycle(); try { this.dispatcherHelper = new DispatcherHelper(manag... |
if (dest != null) { while (dest.next != null) dest = dest.next; dest.next = e; } else buckets[idx] = e; | private void rehash() { HashEntry[] oldBuckets = buckets; int newcapacity = (buckets.length * 2) + 1; threshold = (int) (newcapacity * loadFactor); buckets = new HashEntry[newcapacity]; for (int i = oldBuckets.length - 1; i >= 0; i--) { HashEntry e = oldBuckets[i]; while (e != null)... | |
e.next = null; | e.next = buckets[idx]; buckets[idx] = e; | private void rehash() { HashEntry[] oldBuckets = buckets; int newcapacity = (buckets.length * 2) + 1; threshold = (int) (newcapacity * loadFactor); buckets = new HashEntry[newcapacity]; for (int i = oldBuckets.length - 1; i >= 0; i--) { HashEntry e = oldBuckets[i]; while (e != null)... |
for (int i = 0; i < nnnodes.length; i++) { if (! nNodesCopied.contains(nnodes[i])) { if (log.isDebugEnabled()) { log.debug("copy: Found node whose Agent mapping may not have been copied: " + nnodes[i]); } } } | public ModifiableComponent copy(String uniqueName) { if (log.isDebugEnabled()) { log.debug("Experiment copying " + getExperimentName() + " into new name " + uniqueName); } Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else ... | |
if (!Modifier.isStatic(mod) && !Modifier.isFinal(mod) && | if (!Modifier.isStatic(mod) && | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... |
for (int i = 0, size = methodList.size(); i < size; i++) { Method method = (Method)methodList.get(i); | for (int i = 0, j = 0, size = methodList.size(); j < size; j++) { Method method = (Method)methodList.get(j); if( Modifier.isFinal(method.getModifiers()) ){ continue; } | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... |
generateClInit(methodList); | generateClInit(list); | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... |
if (c1 instanceof NodeComponent || c2 instanceof NodeComponent || c1.getFullName().startsWith(new SimpleName("Combo")) || c2.getFullName().startsWith(new SimpleName("Combo"))) return c1.getShortName().compareTo(c2.getShortName()); else return c1.getFullName().compareTo(c2.getFullName()); | return c1.getShortName().compareTo(c2.getShortName()); | public int compare(Object o1, Object o2) { BaseComponent c1 = (BaseComponent) o1; BaseComponent c2 = (BaseComponent) o2; // In general, agent names from built in societies are complex // and those from the db are short - they just start with "Combo" // as components, but in runtime that is ... |
Set unassignedAgents = new TreeSet(baseComponentComparator); | Set unassignedAgents; if (experiment.isInDatabase()) unassignedAgents = new TreeSet(dbBaseComponentComparator); else unassignedAgents = new TreeSet(builtInBaseComponentComparator); | private void addUnassignedAgentsFromExperiment() { Set unassignedAgents = new TreeSet(baseComponentComparator); AgentComponent[] agents = experiment.getAgents(); NodeComponent[] nodes = experiment.getNodes(); unassignedAgents.addAll(Arrays.asList(agents)); for (int i = 0; i < nodes.length; i++) un... |
Set unassignedNodes = new TreeSet(baseComponentComparator); | Set unassignedNodes; if (experiment.isInDatabase()) unassignedNodes = new TreeSet(dbBaseComponentComparator); else unassignedNodes = new TreeSet(builtInBaseComponentComparator); | private void addUnassignedNodesFromExperiment() { Set unassignedNodes = new TreeSet(baseComponentComparator); HostComponent[] hosts = experiment.getHosts(); NodeComponent[] nodes = experiment.getNodes(); unassignedNodes.addAll(Arrays.asList(nodes)); for (int i = 0; i < hosts.length; i++) unassigne... |
edit.setId(parts[0]); | edit.setEid(parts[0]); | public boolean findUserByEmail(UserEdit edit, String email) { // lets not get messed up with spaces or cases String test = email.toLowerCase().trim(); // if the email ends with "umich.edu" (even if it's from somebody@krusty.si.umich.edu) // use the local part as a user id. if (!test.endsWith(m_domain)) return fal... |
log.error ("[E] " + test.toString() + " : " + t.getMessage()); | log.error ("[E] " + test.toString() + " : " + t.getMessage(), t); | public synchronized void addError(Test test, Throwable t) { log.error ("[E] " + test.toString() + " : " + t.getMessage()); } |
for (Iterator i = getProperties(); i.hasNext(); ) { Property p = (Property)i.next(); | for (Iterator i = getLocalPropertyNames(); i.hasNext(); ) { Property p = getProperty((CompositeName)i.next()); | private void installListeners() { addPropertiesListener(this); for (Iterator i = getProperties(); i.hasNext(); ) { Property p = (Property)i.next(); p.addPropertyListener(myPropertyListener); } } |
addedProperty.addPropertyListener(myPropertyListener); fireModification(); | public void propertyAdded(PropertyEvent e) { Property addedProperty = e.getProperty(); Property myProperty = getProperty(addedProperty.getName().last().toString()); if (myProperty != null) { setPropertyVisible(addedProperty, true); } addedProperty.addPropertyListener(myPropertyListener); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.