rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
currentPutField = null; | private void callWriteMethod(Object obj, ObjectStreamClass osc) throws IOException { Class klass = osc.forClass(); try { Class classArgs[] = {ObjectOutputStream.class}; Method m = getMethod(klass, "writeObject", classArgs); Object args[] = {this}; m.invoke(obj, args); } catch (NoSuchMethodExce... | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private boolean getBooleanField(Object obj, Class klass, String field_name) throws IOException { try { Field f = getField(klass, field_name); boolean b = f.getBoolean(obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private byte getByteField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); byte b = f.getByte (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private char getCharField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); char b = f.getChar (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private double getDoubleField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); double b = f.getDouble (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
throws java.lang.NoSuchFieldException | throws java.io.InvalidClassException | private static Field getField (Class klass, String name) throws java.lang.NoSuchFieldException { final Field f = klass.getDeclaredField(name); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { f.setAccessible(true); return null; } }); return f; } |
final Field f = klass.getDeclaredField(name); AccessController.doPrivileged(new PrivilegedAction() | try | private static Field getField (Class klass, String name) throws java.lang.NoSuchFieldException { final Field f = klass.getDeclaredField(name); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { f.setAccessible(true); return null; } }); return f; } |
public Object run() { f.setAccessible(true); return null; } }); return f; | final Field f = klass.getDeclaredField(name); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { f.setAccessible(true); return null; } }); return f; } catch (java.lang.NoSuchFieldException e) { throw new InvalidClassException ("no field called " + name + " in class " + klass.getName()); } | private static Field getField (Class klass, String name) throws java.lang.NoSuchFieldException { final Field f = klass.getDeclaredField(name); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { f.setAccessible(true); return null; } }); return f; } |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private float getFloatField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); float b = f.getFloat (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private int getIntField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); int b = f.getInt (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private long getLongField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); long b = f.getLong (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
} catch (IOException e) { throw e; | private Object getObjectField (Object obj, Class klass, String field_name, String type_code) throws IOException { try { Field f = getField (klass, field_name); Object o = f.get (obj); // FIXME: We should check the type_code here return o; } catch (Exception e) { throw new IOException (); ... | |
catch (IllegalArgumentException _) { throw new InvalidClassException ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { throw e; } | private short getShortField (Object obj, Class klass, String field_name) throws IOException { try { Field f = getField (klass, field_name); short b = f.getShort (obj); return b; } catch (Exception _) { throw new IOException("Unexpected exception " + _); } } | |
("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); | ("Only one of writeFields and defaultWriteObject may be called, and it may only be called once"); | private void markFieldsWritten() throws IOException { if (currentObject == null || currentObjectStreamClass == null) throw new NotActiveException ("defaultWriteObject called by non-active class and/or object"); if (fieldsAlreadyWritten) throw new IOException ("Only one of putFields and defaultWriteOb... |
if (currentPutField == null) | if (currentPutField != null) return currentPutField; currentPutField = new PutField() | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; | private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, boolean value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } | private ObjectStreamField getField (String name) { ObjectStreamField field = currentObjectStreamClass.getField(name); if (field == null) throw new IllegalArgumentException("no such serializable field " + name); return field; } public void put(String name, boolean value) { ObjectStreamField field = getField(name); | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, byte value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'B'); prim_field_data[field.getOffset ()] = value; } | checkType(field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, char value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'C'); int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } | public void put(String name, byte value) { ObjectStreamField field = getField(name); | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, double value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'D'); int off = field.getOffset (); long l_value = Double.doubleToLongBits (value); prim_field_data[off++] = (byte)(l_value >>> 52); prim_field_data[off++] = (byte)(l_value >>> 48); prim_f... | checkType(field, 'B'); prim_field_data[field.getOffset()] = value; } | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, float value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'F'); int off = field.getOffset (); int i_value = Float.floatToIntBits (value); prim_field_data[off++] = (byte)(i_value >>> 24); prim_field_data[off++] = (byte)(i_value >>> 16); prim_field_... | public void put(String name, char value) { ObjectStreamField field = getField(name); | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, int value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'I'); int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 24); prim_field_data[off++] = (byte)(value >>> 16); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data... | checkType(field, 'C'); int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, long value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'J'); int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 52); prim_field_data[off++] = (byte)(value >>> 48); prim_field_data[off++] = (byte)(value >>> 40); prim_field_da... | public void put(String name, double value) { ObjectStreamField field = getField (name); | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, short value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'S'); int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } | checkType(field, 'D'); int off = field.getOffset(); long l_value = Double.doubleToLongBits (value); prim_field_data[off++] = (byte)(l_value >>> 52); prim_field_data[off++] = (byte)(l_value >>> 48); prim_field_data[off++] = (byte)(l_value >>> 40); prim_field_data[off++] = (byte)(l_value >>> 32); prim_field_data[off++] =... | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, Object value) { ObjectStreamField field = currentObjectStreamClass.getField (name); if (field == null) throw new IllegalArgumentException (); if (value != null && ! field.getType ().isAssignableFrom (value.getClass ())) throw new IllegalArgumentException (); objs[field.getOffset ()] = valu... | public void put(String name, float value) { ObjectStreamField field = getField(name); | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void write (ObjectOutput out) throws IOException { boolean oldmode = setBlockDataMode (false); out.write (prim_field_data); for (int i = 0; i < objs.length; ++ i) out.writeObject (objs[i]); setBlockDataMode (oldmode); } | checkType(field, 'F'); int off = field.getOffset(); int i_value = Float.floatToIntBits(value); prim_field_data[off++] = (byte)(i_value >>> 24); prim_field_data[off++] = (byte)(i_value >>> 16); prim_field_data[off++] = (byte)(i_value >>> 8); prim_field_data[off] = (byte)i_value; } | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
private void checkType (ObjectStreamField field, char type) throws IllegalArgumentException { if (TypeSignature.getEncodingOfClass(field.getType ()).charAt(0) != type) throw new IllegalArgumentException (); } }; } | public void put(String name, int value) { ObjectStreamField field = getField(name); checkType(field, 'I'); int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 24); prim_field_data[off++] = (byte)(value >>> 16); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } publi... | public PutField putFields() throws IOException { if (currentPutField == null) { currentPutField = new PutField () { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs = new Object[currentObjectStreamClass.objectFieldCount]; publi... |
public void put (String name, boolean value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } | public void put(String name, boolean value) { ObjectStreamField field = getField(name); checkType(field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } | public void put (String name, boolean value) { ObjectStreamField field = currentObjectStreamClass.getField (name); checkType (field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } |
currentPutField = null; | public void writeFields() throws IOException { if (currentPutField == null) throw new NotActiveException("writeFields can only be called after putFields has been called"); // putFields may be called more than once, but not writeFields. markFieldsWritten(); currentPutField.write(this); currentPutF... | |
sb.append((char) ('0' + hours / 10)).append((char) ('0' + hours % 10)); sb.append(':'); sb.append((char) ('0' + minutes / 10)).append((char) ('0' + minutes % 10)); | if (minutes != 0 || hours != 0) { sb.append(offset >= 0 ? '+' : '-'); sb.append((char) ('0' + hours / 10)); sb.append((char) ('0' + hours % 10)); sb.append(':'); sb.append((char) ('0' + minutes / 10)); sb.append((char) ('0' + minutes % 10)); } | private String getDefaultDisplayName(boolean dst) { int offset = getRawOffset(); if (dst && this instanceof SimpleTimeZone) { // ugly, but this is a design failure of the API: // getDisplayName takes a dst parameter even though // TimeZone knows nothing about daylight saving offsets. offset += ((SimpleTim... |
public WOComponent showEditingContext() { WOComponent nextPage = pageWithName("ERXEditingContextInspector"); nextPage.takeValueForKey(editingContext(), "object"); return nextPage; | protected WOComponent showEditingContext(EOEditingContext ec) { WOComponent nextPage = pageWithName("ERXEditingContextInspector"); nextPage.takeValueForKey(ec, "object"); nextPage.takeValueForKey(this, "debugPageProvider"); return nextPage; | public WOComponent showEditingContext() { WOComponent nextPage = pageWithName("ERXEditingContextInspector"); nextPage.takeValueForKey(editingContext(), "object"); return nextPage; } |
(ERJavaMail.sharedInstance ().defaultXMailerHeader () != null)) | (ERJavaMail.sharedInstance ().defaultXMailerHeader () != null)) { | protected void finishMessagePreparation () throws MessagingException { DataHandler messageDataHandler = messageDataHandler = this.prepareMail (); // Add all the attachements to the javamail message if (this.attachments ().count () > 0) { // Create a Multipart that will hold the prepa... |
} | protected void finishMessagePreparation () throws MessagingException { DataHandler messageDataHandler = messageDataHandler = this.prepareMail (); // Add all the attachements to the javamail message if (this.attachments ().count () > 0) { // Create a Multipart that will hold the prepa... | |
String encoded = null; try { encoded = MimeUtility.encodeText (subject, charset(), !charset().equals(DefaultCharset) ? "B" : null); } catch (Exception e) { encoded = subject; } this.mimeMessage ().setSubject (encoded); | this.mimeMessage ().setSubject (ERMailUtils.encodeString (subject, this.charset ())); | public void setSubject (String subject) throws MessagingException { String encoded = null; try { encoded = MimeUtility.encodeText (subject, charset(), !charset().equals(DefaultCharset) ? "B" : null); } catch (Exception e) { encoded = subject; } this.mimeMessa... |
return (f.isDirectory() || (f.isFile()) && | return (f.isDirectory() || (f.isFile()) && f.canRead() && | public void importHNA(Component parent) { File resultDir = getResultDirectory(); String path = "."; if (resultDir != null) path = resultDir.getAbsolutePath(); JFileChooser chooser = new JFileChooser(path); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); chooser.setFileFilter(n... |
if (file != null && (! file.canRead() || file.isDirectory())) file = null; | public void importHNA(Component parent) { File resultDir = getResultDirectory(); String path = "."; if (resultDir != null) path = resultDir.getAbsolutePath(); JFileChooser chooser = new JFileChooser(path); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); chooser.setFileFilter(n... | |
return (f.isDirectory() || (f.isFile()) && | return (f.isDirectory() || (f.isFile()) && f.canRead() && | public boolean accept (File f) { return (f.isDirectory() || (f.isFile()) && (f.getName().endsWith("xml") || f.getName().endsWith("XML"))); } |
defaultNodeArguments.put(TRANSPORT_ASPECTS, TRANSPORT_ASPECTS_DFLT); | private void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(Collections.singleton(EXPERIMENT_ID)); createObserver(); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); // By default we clear any existing persistence deltas when we // start a run. default... | |
if(societyComponent instanceof SocietyFileComponent) { fromFile = true; } setRecipeComponents(recipes); if(log.isDebugEnabled()) { log.debug("Experiment: " + name); } | if (recipes != null) setRecipeComponents(recipes); | public Experiment(String name, SocietyComponent societyComponent, RecipeComponent[] recipes) { this(name); init(); setSocietyComponent(societyComponent); if(societyComponent instanceof SocietyFileComponent) { // Will use PopulateDb without CMT assembly fromFile = true; } setRecipeCom... |
if(fromFile) { | SocietyComponent sc = getSocietyComponent(); if (sc instanceof SocietyFileComponent || sc instanceof SocietyUIComponent) { | public void saveToDb(DBConflictHandler ch) { if (!modified) { if (log.isDebugEnabled()) log.debug("Save to database not needed; experiment not modified"); return; } try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean comp... |
defaultNodeArguments.setReadOnlyProperty(EXPERIMENT_ID, getTrialID()); | if (getTrialID() != null) defaultNodeArguments.setReadOnlyProperty(EXPERIMENT_ID, getTrialID()); | private void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(Collections.singleton(EXPERIMENT_ID)); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); defaultNodeArguments.put(TIMEZONE, TIMEZONE_DFLT); defaultNodeArguments.put(AGENT_STARTTIME, AGENT_STARTTIME_D... |
getProject().addReference("ivy.resolved.report", report); | public void execute() throws BuildException { Ivy ivy = getIvyInstance(); try { if (_file == null) { _file = new File(getProject().getBaseDir(), getProperty(ivy, "ivy.dep.file")); } _conf = getProperty(_conf, ivy, "ivy.configurations"); _revis... | |
newSociety(popupNode); | newSociety(); | public void actionPerformed(ActionEvent e) { newSociety(popupNode); } |
copyExperimentInNode(popupNode); | deleteExperiment(); | public void actionPerformed(ActionEvent e) { copyExperimentInNode(popupNode); } |
deleteExperiment(popupNode); | renameExperiment(); | public void actionPerformed(ActionEvent e) { deleteExperiment(popupNode); } |
renameExperiment(popupNode); | startBuilder(); | public void actionPerformed(ActionEvent e) { renameExperiment(popupNode); } |
startBuilder(popupNode, e.getActionCommand().equals("Configure")); | startExperimentBuilder(); | public void actionPerformed(ActionEvent e) { startBuilder(popupNode, e.getActionCommand().equals("Configure")); } |
startExperimentBuilder(popupNode, true); | startConsole(); | public void actionPerformed(ActionEvent e) { startExperimentBuilder(popupNode, true); } |
startConsole(popupNode); | copySocietyInNode(); | public void actionPerformed(ActionEvent e) { startConsole(popupNode); } |
copySocietyInNode(popupNode); | deleteSociety(); | public void actionPerformed(ActionEvent e) { copySocietyInNode(popupNode); } |
deleteSociety(popupNode); | renameSociety(); | public void actionPerformed(ActionEvent e) { deleteSociety(popupNode); } |
renameSociety(popupNode); | startExperimentBuilder(); | public void actionPerformed(ActionEvent e) { renameSociety(popupNode); } |
startExperimentBuilder(popupNode, true); | copyComponentInNode(); | public void actionPerformed(ActionEvent e) { startExperimentBuilder(popupNode, true); } |
newFolder(popupNode); | newFolder(); | public void actionPerformed(ActionEvent e) { newFolder(popupNode); } |
copyComponentInNode(popupNode); | deleteComponent(); | public void actionPerformed(ActionEvent e) { copyComponentInNode(popupNode); } |
deleteComponent(popupNode); | renameComponent(); | public void actionPerformed(ActionEvent e) { deleteComponent(popupNode); } |
renameComponent(popupNode); } | selectRecipeFromDatabase(); } | public void actionPerformed(ActionEvent e) { renameComponent(popupNode); } |
GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("SelectRecipe") { public void run() { selectRecipeFromDatabase(popupNode); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { System.out.println("Runtime exception creating recipe: " + re); re.printStackTrace(); GUIUtils.ti... | newRecipe(); } | public void actionPerformed(ActionEvent e) { GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("SelectRecipe") { public void run() { selectRecipeFromDatabase(popupNode); GUIUtils.timeConsumingTaskEnd(organizer); } ... |
newRecipe(popupNode); | startExperimentBuilder(); | public void actionPerformed(ActionEvent e) { newRecipe(popupNode); } |
startBuilder(popupNode, e.getActionCommand().equals("Configure")); | copyRecipeInNode(); | public void actionPerformed(ActionEvent e) { startBuilder(popupNode, e.getActionCommand().equals("Configure")); } |
startExperimentBuilder(popupNode, true); | deleteRecipe(); | public void actionPerformed(ActionEvent e) { startExperimentBuilder(popupNode, true); } |
copyRecipeInNode(popupNode); | renameRecipe(); | public void actionPerformed(ActionEvent e) { copyRecipeInNode(popupNode); } |
deleteRecipe(popupNode); | saveRecipe(); | public void actionPerformed(ActionEvent e) { deleteRecipe(popupNode); } |
renameRecipe(popupNode); | DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())); newSociety(); | public void actionPerformed(ActionEvent e) { renameRecipe(popupNode); } |
saveRecipe(popupNode); | DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())); newRecipe(); | public void actionPerformed(ActionEvent e) { saveRecipe(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newSociety(popupNode); | DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())); newFolder(); | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newSociety(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newRecipe(popupNode); | deleteFolder(); | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newRecipe(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode); | renameFolder(); | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode); } |
GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("DeleteExperiment") { public void run() { deleteExperimentFromDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { System.out.println("Runtime exception deleting experiment: " + re); re.printStackTrace(); GUIUtils... | deleteExperimentFromDatabase(); | public void actionPerformed(ActionEvent e) { GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("DeleteExperiment") { public void run() { deleteExperimentFromDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } }.start();... |
experiment.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } | synchronized (root) { while (true) { try { long now = System.currentTimeMillis(); if (updateNeeded && now > nextUpdate) { save(workspaceFileName); updateNeeded = false; root.notifyAll(); } else if (updateNeeded) { long delay = nextUpdate - now; if (delay > 0) { root.wait(delay); } } else { root.wait(); } } catch (Inter... | public void run() { experiment.saveToDb(saveToDbConflictHandler); // save under new name GUIUtils.timeConsumingTaskEnd(organizer); } |
selectExperimentFromDatabase(popupNode); } | newExperiment(); } | public void actionPerformed(ActionEvent e) {// GUIUtils.timeConsumingTaskStart(organizer);// try {// new Thread("SelectExperiment") {// public void run() { selectExperimentFromDatabase(popupNode);// GUIUtils.timeConsumingTaskEnd(orga... |
newExperiment(popupNode); | startExperimentBuilder(); | public void actionPerformed(ActionEvent e) { newExperiment(popupNode); } |
startExperimentBuilder(popupNode, e.getActionCommand().equals("Configure")); | startConsole(); | public void actionPerformed(ActionEvent e) { startExperimentBuilder(popupNode, e.getActionCommand().equals("Configure")); } |
startConsole(popupNode); | copyExperimentInNode(); | public void actionPerformed(ActionEvent e) { startConsole(popupNode); } |
DefaultMutableTreeNode newNode = newExperiment(root); | workspace.setSelectionPath(new TreePath(root.getPath())); DefaultMutableTreeNode newNode = newExperiment(); | public void addExperiment() { DefaultMutableTreeNode newNode = newExperiment(root); } |
DefaultMutableTreeNode newNode = newSociety(root); | workspace.setSelectionPath(new TreePath(root.getPath())); DefaultMutableTreeNode newNode = newSociety(); | public void addSociety() { DefaultMutableTreeNode newNode = newSociety(root); } |
for (int i = 0; i < componentAction.length; i++) { String s = (String)componentAction[i].getValue(Action.NAME); if (s.equals("View")) componentAction[i].putValue(Action.NAME, "Configure"); | for (int i = 0; i < componentAction.length; i++) | private void configureComponentMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < componentAction.length; i++) { String s = (String)componentAction[i].getValue(Action.NAME); if (s.equals("View")) componentAction[i].putValue(Action.NAME, "Configure"); componentAction[i].setEnabled(true); }... |
} | private void configureComponentMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < componentAction.length; i++) { String s = (String)componentAction[i].getValue(Action.NAME); if (s.equals("View")) componentAction[i].putValue(Action.NAME, "Configure"); componentAction[i].setEnabled(true); }... | |
if (s.equals("New Experiment") || | if (s.equals("Build Experiment") || | private void configureComponentMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < componentAction.length; i++) { String s = (String)componentAction[i].getValue(Action.NAME); if (s.equals("View")) componentAction[i].putValue(Action.NAME, "Configure"); componentAction[i].setEnabled(true); }... |
else if (s.equals("Configure")) componentAction[i].putValue(Action.NAME, "View"); | private void configureComponentMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < componentAction.length; i++) { String s = (String)componentAction[i].getValue(Action.NAME); if (s.equals("View")) componentAction[i].putValue(Action.NAME, "Configure"); componentAction[i].setEnabled(true); }... | |
for (int i = 0; i < experimentAction.length; i++) { String s = (String)experimentAction[i].getValue(Action.NAME); if (s.equals("View")) experimentAction[i].putValue(Action.NAME, "Configure"); | for (int i = 0; i < experimentAction.length; i++) | private void configureExperimentMenu(Experiment experiment) { boolean isEditable = experiment.isEditable(); if (isEditable) { for (int i = 0; i < experimentAction.length; i++) { String s = (String)experimentAction[i].getValue(Action.NAME); if (s.equals("View")) experimentAction[i].putValue(Action.NAME, "... |
} | private void configureExperimentMenu(Experiment experiment) { boolean isEditable = experiment.isEditable(); if (isEditable) { for (int i = 0; i < experimentAction.length; i++) { String s = (String)experimentAction[i].getValue(Action.NAME); if (s.equals("View")) experimentAction[i].putValue(Action.NAME, "... | |
if (s.equals("Rename")) | if (s.equals("Rename")) { | private void configureExperimentMenu(Experiment experiment) { boolean isEditable = experiment.isEditable(); if (isEditable) { for (int i = 0; i < experimentAction.length; i++) { String s = (String)experimentAction[i].getValue(Action.NAME); if (s.equals("View")) experimentAction[i].putValue(Action.NAME, "... |
else if (s.equals("Configure")) experimentAction[i].putValue(Action.NAME, "View"); | break; } | private void configureExperimentMenu(Experiment experiment) { boolean isEditable = experiment.isEditable(); if (isEditable) { for (int i = 0; i < experimentAction.length; i++) { String s = (String)experimentAction[i].getValue(Action.NAME); if (s.equals("View")) experimentAction[i].putValue(Action.NAME, "... |
for (int i = 0; i < recipeAction.length; i++) { String s = (String)recipeAction[i].getValue(Action.NAME); if (s.equals("View")) recipeAction[i].putValue(Action.NAME, "Configure"); | for (int i = 0; i < recipeAction.length; i++) | private void configureRecipeMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < recipeAction.length; i++) { String s = (String)recipeAction[i].getValue(Action.NAME); if (s.equals("View")) recipeAction[i].putValue(Action.NAME, "Configure"); recipeAction[i].setEnabled(true); } } else { ... |
} | private void configureRecipeMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < recipeAction.length; i++) { String s = (String)recipeAction[i].getValue(Action.NAME); if (s.equals("View")) recipeAction[i].putValue(Action.NAME, "Configure"); recipeAction[i].setEnabled(true); } } else { ... | |
if (s.equals("New Experiment") || | if (s.equals("Build Experiment") || | private void configureRecipeMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < recipeAction.length; i++) { String s = (String)recipeAction[i].getValue(Action.NAME); if (s.equals("View")) recipeAction[i].putValue(Action.NAME, "Configure"); recipeAction[i].setEnabled(true); } } else { ... |
else if (s.equals("Configure")) recipeAction[i].putValue(Action.NAME, "View"); | private void configureRecipeMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < recipeAction.length; i++) { String s = (String)recipeAction[i].getValue(Action.NAME); if (s.equals("View")) recipeAction[i].putValue(Action.NAME, "Configure"); recipeAction[i].setEnabled(true); } } else { ... | |
for (int i = 0; i < societyAction.length; i++) { String s = (String)societyAction[i].getValue(Action.NAME); if (s.equals("View")) societyAction[i].putValue(Action.NAME, "Configure"); | for (int i = 0; i < societyAction.length; i++) | private void configureSocietyMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < societyAction.length; i++) { String s = (String)societyAction[i].getValue(Action.NAME); if (s.equals("View")) societyAction[i].putValue(Action.NAME, "Configure"); societyAction[i].setEnabled(true); } } els... |
} | private void configureSocietyMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < societyAction.length; i++) { String s = (String)societyAction[i].getValue(Action.NAME); if (s.equals("View")) societyAction[i].putValue(Action.NAME, "Configure"); societyAction[i].setEnabled(true); } } els... | |
if (s.equals("New Experiment") || | if (s.equals("Build Experiment") || | private void configureSocietyMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < societyAction.length; i++) { String s = (String)societyAction[i].getValue(Action.NAME); if (s.equals("View")) societyAction[i].putValue(Action.NAME, "Configure"); societyAction[i].setEnabled(true); } } els... |
else if (s.equals("Configure")) societyAction[i].putValue(Action.NAME, "View"); | private void configureSocietyMenu(boolean isEditable) { if (isEditable) { for (int i = 0; i < societyAction.length; i++) { String s = (String)societyAction[i].getValue(Action.NAME); if (s.equals("View")) societyAction[i].putValue(Action.NAME, "Configure"); societyAction[i].setEnabled(true); } } els... | |
private void copyComponentInNode(DefaultMutableTreeNode node) { | private void copyComponentInNode() { DefaultMutableTreeNode node = getSelectedNode(); | private void copyComponentInNode(DefaultMutableTreeNode node) { copyComponent((ModifiableConfigurableComponent)node.getUserObject(), node.getParent()); } |
private void copyExperimentInNode(DefaultMutableTreeNode node) { | private void copyExperimentInNode() { DefaultMutableTreeNode node = getSelectedNode(); | private void copyExperimentInNode(DefaultMutableTreeNode node) { copyExperiment((Experiment)node.getUserObject(), node.getParent()); } |
private void copyRecipeInNode(DefaultMutableTreeNode node) { | private void copyRecipeInNode() { DefaultMutableTreeNode node = getSelectedNode(); | private void copyRecipeInNode(DefaultMutableTreeNode node) { copyRecipe((RecipeComponent)node.getUserObject(), node.getParent()); } |
private void copySocietyInNode(DefaultMutableTreeNode node) { | private void copySocietyInNode() { DefaultMutableTreeNode node = getSelectedNode(); | private void copySocietyInNode(DefaultMutableTreeNode node) { copySociety((SocietyComponent)node.getUserObject(), node.getParent()); } |
if (recipes.size() != 0) { Iterator metIter = recipes.iterator(); while (metIter.hasNext()) { DbRecipe dbRecipe = (DbRecipe) metIter.next(); RecipeComponent mc = createRecipeComponent(dbRecipe.name, dbRecipe.cls); setRecipeComponentProperties(dbRecipe, mc); AgentComponent[] recagents = mc.getAgents(); if (recagents != ... | private void createCMTExperiment(DefaultMutableTreeNode node, String originalExperimentName, String experimentName, String experimentId, String trialId) {// private void createCMT... | |
if (recipes.size() != 0) { Iterator metIter = recipes.iterator(); while (metIter.hasNext()) { DbRecipe dbRecipe = (DbRecipe) metIter.next(); RecipeComponent mc = createRecipeComponent(dbRecipe.name, dbRecipe.cls); setRecipeComponentProperties(dbRecipe, mc); AgentComponent[] recagents = mc.getAgents(); if (recagents != ... | private void createCMTExperiment(DefaultMutableTreeNode node, String originalExperimentName, String experimentName, String experimentId, String trialId) {// private void createCMT... | |
private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); | private void deleteComponent() { DefaultMutableTreeNode node = getSelectedNode(); ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); | private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof Experiment) deleteExperiment(node); else if... |
deleteSociety(node); | deleteSociety(); | private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof Experiment) deleteExperiment(node); else if... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.