rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Object[] values = { new ComboItem("Scalability", ScalabilityXSociety.class), new ComboItem("ABC", ABCSociety.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Society Type", "Select Society", JOptionPane.QUESTION_MESSAGE, null, values, "ScalabilityX"); if (answer instanceof ComboItem) { ComboItem item... | Object[] values = { new ComboItem("Scalability", ScalabilityXSociety.class), new ComboItem("ABC", ABCSociety.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Society Type", "Select Society", JOptionPane.QUESTION_MESSAGE, null, values, "ScalabilityX"); if (answer instanceof ComboItem) { ComboItem item... | private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) { Object[] values = { new ComboItem("Scalability", ScalabilityXSociety.class), new ComboItem("ABC", ABCSociety.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Society Type", ... |
return null; } | private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) { Object[] values = { new ComboItem("Scalability", ScalabilityXSociety.class), new ComboItem("ABC", ABCSociety.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Society Type", ... | |
PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (Enumeration e = root.depthFirstEnumeration(); e.hasMoreElements(); ) ... | PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (Enumeration e = root.depthFirstEnumeration(); e.hasMoreElements(); ) ... | private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { ... |
if (root == null) root = new DefaultMutableTreeNode(); String rootName = f.getName(); int extpos = rootName.lastIndexOf('.'); if (extpos >= 0) rootName = rootName.substring(0, extpos); root.setUserObject(rootName); model = createModel(this, root); Class[] noTypes = new Class[0]; try { societyNames.init(getLeaves(Socie... | } } catch (Exception e) { System.out.println("Organizer: can't read file: " + f); } finally { ois.close(); } } if (root == null) root = new DefaultMutableTreeNode(); String rootName = f.getName(); int extpos = rootName.lastIndexOf('.'); if (extpos >= 0) rootName = rootName.substring(0, extpos); root.setUserObject(rootN... | private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { ... |
} | private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { ... | |
JFrame frame = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, workspace); if (frame == null) return; String oldTitle = frame.getTitle(); if (oldTitle == null) { oldTitle = FRAME_TITLE; } else { int colon = oldTitle.indexOf(':'); if (colon >= 0) oldTitle = oldTitle.substring(0, colon).trim(); } if (doc == null... | JFrame frame = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, workspace); if (frame == null) return; String oldTitle = frame.getTitle(); if (oldTitle == null) { oldTitle = FRAME_TITLE; } else { int colon = oldTitle.indexOf(':'); if (colon >= 0) oldTitle = oldTitle.substring(0, colon).trim(); | private void setFrameTitleDocument(String doc) { JFrame frame = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, workspace); if (frame == null) return; String oldTitle = frame.getTitle(); if (oldTitle == null) { oldTitle = FRAME_TITLE; } else { ... |
if (doc == null) frame.setTitle(oldTitle); else frame.setTitle(oldTitle + ":" + doc); } | private void setFrameTitleDocument(String doc) { JFrame frame = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, workspace); if (frame == null) return; String oldTitle = frame.getTitle(); if (oldTitle == null) { oldTitle = FRAME_TITLE; } else { ... | |
csmart.runBuilder((SocietyComponent) node.getUserObject(), false, | csmart.runBuilder((ModifiableConfigurableComponent) node.getUserObject(), false, | private void startBuilder(DefaultMutableTreeNode node, boolean openForEditing) { csmart.runBuilder((SocietyComponent) node.getUserObject(), false, openForEditing); } |
Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimentNames.generateName(name); experiment = new Experiment(name, new SocietyComponent[] {sc}, new ImpactCompon... | Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimentNames.generateName(name); experiment = new Experiment(name, new SocietyComponent[] {sc}, new ImpactCompon... | private void startConsole(DefaultMutableTreeNode node) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = ... |
csmart.runConsole(experiment); } | private void startConsole(DefaultMutableTreeNode node) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = ... | |
boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getSocietyName(); experiment = new Experiment(experimentNames.generateName(name), new SocietyComponent[] {sc}, new Impac... | boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getSocietyName(); experiment = new Experiment(experimentNames.generateName(name), new SocietyComponent[] {sc}, new Impac... | private void startExperimentBuilder(DefaultMutableTreeNode node, boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getS... |
if (o instanceof Experiment) { } else { if (o instanceof String) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(experiment); model.insertNodeInto(newNode, node, 0); workspace.setSelection(newNode); } else { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(experiment, false); DefaultMutable... | private void startExperimentBuilder(DefaultMutableTreeNode node, boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getS... | |
synchronized (root) { nextUpdate = System.currentTimeMillis() + UPDATE_DELAY; updateNeeded = true; root.notify(); } | synchronized (root) { nextUpdate = System.currentTimeMillis() + UPDATE_DELAY; updateNeeded = true; root.notify(); | private void update() { synchronized (root) { nextUpdate = System.currentTimeMillis() + UPDATE_DELAY; updateNeeded = true; root.notify(); } } |
} | private void update() { synchronized (root) { nextUpdate = System.currentTimeMillis() + UPDATE_DELAY; updateNeeded = true; root.notify(); } } | |
componentsByDomain.put(subdomain, externalComponent); components.put(component, externalComponent); | componentsByDomain.remove(subdomain); components.remove(component); | public void addComponent(String subdomain, Component component) throws ComponentException { if (componentsByDomain.containsKey(subdomain)) { if (componentsByDomain.get(subdomain).getComponent() == component) { // Do nothing since the component has already been registered ... |
Object[] actionClassAndName = null; | Object[] actionClassAndName = getRequestActionClassAndNameForPath(getRequestHandlerPathForRequest(request)); | public WOResponse handleRequest(WORequest request) { WOResponse response = null; String actionName = null; Class actionClass = null; boolean shouldCacheResult = false; if (ERXWOResponseCache.sharedInstance().isEnabled()) { try { // Caching... |
if (actionClass.isAssignableFrom(ERXWOResponseCache.Cacheable.class)) { | if (ERXWOResponseCache.Cacheable.class.isAssignableFrom(actionClass)) { | public WOResponse handleRequest(WORequest request) { WOResponse response = null; String actionName = null; Class actionClass = null; boolean shouldCacheResult = false; if (ERXWOResponseCache.sharedInstance().isEnabled()) { try { // Caching... |
actionName, request); | actionName, request); shouldCacheResult = (response == null); | public WOResponse handleRequest(WORequest request) { WOResponse response = null; String actionName = null; Class actionClass = null; boolean shouldCacheResult = false; if (ERXWOResponseCache.sharedInstance().isEnabled()) { try { // Caching... |
log.info("Caught exception checking for cache. Leaving it up to the regular exception handler to cache. Request: " + request + " exception: " + e); actionName = null; actionClass = null; shouldCacheResult = true; | log.error("Caught exception checking for cache. Leaving it up to the regular exception handler to cache. Request: " + request, e); | public WOResponse handleRequest(WORequest request) { WOResponse response = null; String actionName = null; Class actionClass = null; boolean shouldCacheResult = false; if (ERXWOResponseCache.sharedInstance().isEnabled()) { try { // Caching... |
if (shouldCacheResult && actionName != null && actionClass != null) { | if (shouldCacheResult) { | public WOResponse handleRequest(WORequest request) { WOResponse response = null; String actionName = null; Class actionClass = null; boolean shouldCacheResult = false; if (ERXWOResponseCache.sharedInstance().isEnabled()) { try { // Caching... |
log.error("Caught exception when caching response. Request: " + request + " exception: " + e); | log.error("Caught exception when caching response. Request: " + request, e); | public WOResponse handleRequest(WORequest request) { WOResponse response = null; String actionName = null; Class actionClass = null; boolean shouldCacheResult = false; if (ERXWOResponseCache.sharedInstance().isEnabled()) { try { // Caching... |
_editing = false; setValueForBinding(Boolean.FALSE, "editing"); | setEditing(false); | public WOActionResults cancel() { WOActionResults results = (WOActionResults) valueForBinding("cancelAction"); _editing = false; setValueForBinding(Boolean.FALSE, "editing"); // ignore results return null; } |
_editing = false; setValueForBinding(Boolean.FALSE, "editing"); | setEditing(false); | public WOActionResults save() { // check to see if we can save before firing the action (for permissions) boolean canSave = canSave(); if (canSave) { if (hasBinding("saveAction")) { WOActionResults results = (WOActionResults) valueForBinding("saveAction"); canSave = canSave(); } // check to see if we ca... |
if (canSetValueForBinding("editing")) { setValueForBinding(Boolean.valueOf(editing), "editing"); } | public void setEditing(boolean editing) { _editing = editing; } | |
_editing = true; setValueForBinding(Boolean.TRUE, "editing"); | setEditing(true); | public WOActionResults startEditing() { if (canEdit()) { _editing = true; setValueForBinding(Boolean.TRUE, "editing"); WOActionResults results = (WOActionResults) valueForBinding("editAction"); } // ignore results return null; } |
if (leaf.getType() != LeafComponentData.FILE) { | if (!leaf.getType().equals(LeafComponentData.FILE)) { | private void writeLeafData(File configDir, ComponentData me) throws IOException { if (me.leafCount() < 1) return; LeafComponentData[] leaves = me.getLeafComponents(); for (int i = 0; i < me.leafCount(); i++) { LeafComponentData leaf = leaves[i]; if (leaf == null) continue; if (leaf.getTyp... |
System.out.println("Config file: " + configFileName); | private void writeNodeFile(File configDir, ComponentData nc) throws IOException { Object[] parameters = nc.getParameters(); String configFileName = (String)parameters[0] + ".ini"; System.out.println("Config file: " + configFileName); PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, conf... | |
System.out.println("Print writer is: " + writer); | private void writeNodeFile(File configDir, ComponentData nc) throws IOException { Object[] parameters = nc.getParameters(); String configFileName = (String)parameters[0] + ".ini"; System.out.println("Config file: " + configFileName); PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, conf... | |
Object userData = data; boolean allowsChildren = false; if (data instanceof DefaultMutableTreeNode) { userData = ((DefaultMutableTreeNode)data).getUserObject(); if (userData instanceof String || userData instanceof Experiment) allowsChildren = true; | if (data == null) { if(log.isErrorEnabled()) { log.error("Attempting to add null dropped element"); } 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 action; // do ... |
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(userData, allowsChildren); int ix = target.getChildCount(); if (before != null) { ix = model.getIndexOfChild(target, before); } if(log.isDebugEnabled()) { log.debug("Insert into " + target + " at " + ix + " before " + before); } model.insertNodeInto(newNode, ... | if (data instanceof DMTNArray) { DMTNArray nodes = (DMTNArray) data; for (int i = 0; i < nodes.nodes.length; i++) addElement(nodes.nodes[i], target, before); } else addElement(data, target, before); return action; | public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action == DnDConstants.ACTION_NONE) return action; // do ... |
} else if (o instanceof DMTNArray) { return new MyArrayTransferable((DMTNArray)o); | public Transferable makeDraggableObject(Object o) { Transferable tran = null; if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; return new MyTransferable(node); } throw new IllegalArgumentException("Not a DefaultMutableTreeNode"); } | |
throw new IllegalArgumentException("value may not be less then 0"); | throw new IllegalArgumentException("value may not be less than 0"); | public PagesPerMinuteColor(int value) { super(value); if (value < 0) throw new IllegalArgumentException("value may not be less then 0"); } |
if (lastEO!=null && propertyKey.indexOf(".")!=-1) { | if (lastEO!=null && propertyKey.indexOf(".")!=-1 && propertyKey.indexOf("@") == 0) { | public Object smartAttribute(D2WContext c) { EOAttribute result=null; String propertyKey=c.propertyKey(); Object rawObject=c.valueForKey("object"); if (rawObject!=null && rawObject instanceof EOEnterpriseObject && propertyKey!=null) { EOEnterpriseObject object=(EOEnterpriseObj... |
if (propertyKey.indexOf(".")!=-1) { | if (propertyKey.indexOf(".")!=-1 && propertyKey.indexOf("@") == 0) { | public Object smartRelationship(D2WContext c) { Object result = null; Object rawObject=c.valueForKey("object"); String propertyKey=c.propertyKey(); if(propertyKey != null) { if (rawObject!=null && rawObject instanceof EOEnterpriseObject) { EOEnterpriseObject obj... |
"Component is in use; delete anyway?", | "Component has been or is being used; delete anyway?", | private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof ImpactComponent) deleteImpact(node); else i... |
"Society is in use; delete anyway?", | "Society has been or is being; delete anyway?", | private void deleteSociety(DefaultMutableTreeNode node) { SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society is in use; delete anyway?", "Society Not Editable", JOptionPane.YES_NO_OPTION... |
csmart.runExperimentBuilder(experiment, false, true); | csmart.runExperimentBuilder(experiment, false, openForEditing); | private void startExperimentBuilder(DefaultMutableTreeNode node, boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getSocietyName(); ex... |
boolean refresh = ERXValueUtilities.booleanValueWithDefault(context.valueForKey("refreshRefetchedObjects"), false); fs.setRefreshesRefetchedObjects(refresh); | protected void prepareListPage(D2WContext context, ListPageInterface lpi, String entityName) { EOEditingContext ec = session().defaultEditingContext(); EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); EODataSource ds = relationshipArrayFromRequest(ec, entity.classDescriptionF... | |
if (log.isDebugEnabled()) { log.debug("Copying society " + this.getSocietyName() + " with assembly " + getAssemblyId() + " into new name " + name); } | public ModifiableComponent copy(String name) { ModifiableComponent societyCopy; if (filenames != null) societyCopy = new SocietyFileComponent(name, filenames); else societyCopy = new SocietyFileComponent(singleFilename, name); societyCopy.initProperties(); // copy the assembly ID - the one ... | |
log.debug("will terminate, sessionId is "+sessionID()); | if (_observer != null) { NSNotificationCenter.defaultCenter().removeObserver(_observer); _observer = null; } if (_browser != null) { ERXBrowserFactory.factory().releaseBrowser(_browser); _browser = null; } if(log.isDebugEnabled()) { log.debug("Will terminate, sessionId is "+sessionID()); } | public void terminate() { // WOFIX: 5.1.2 // work around a bug in WO 5.1.2 where the sessions EC will keep a lock on the SEC// defaultEditingContext().setSharedEditingContext(null);// if (_observer != null) // NSNotificationCenter.defaultCenter().removeObserver(_observer);// ... |
public void setTarget(ClusterIdentifier agent); | void setTarget(ClusterIdentifier agent); | public void setTarget(ClusterIdentifier agent); |
System.out.println("Selecting all..."); consoleTextPane.setCaretPosition(0); consoleTextPane.moveCaretPosition(consoleTextPane.getDocument().getLength()); System.out.println("Done Selecting all..."); | consoleTextPane.requestFocus(); consoleTextPane.selectAll(); | private void selectAll_actionPerformed() { System.out.println("Selecting all..."); consoleTextPane.setCaretPosition(0); consoleTextPane.moveCaretPosition(consoleTextPane.getDocument().getLength()); System.out.println("Done Selecting all..."); } |
assertEquals("[ org9 | mod9.1 | NONE ]->[ org9 | mod9.2 | 2.+ ]->[ org9 | mod9.1 | 2.+ ]", ex.getMessage()); | assertEquals("[ org8 | mod8.5 | NONE ]->[ org8 | mod8.6 | 2.+ ]->[ org8 | mod8.5 | 2.+ ]", ex.getMessage()); | public void testCircular2() throws Exception { // mod 9.1 (no revision) depends on mod9.2, which depends on mod9.1 2.+ ResolveReport report = _ivy.resolve(new File("test/repositories/circular/ivy.xml").toURL(), null, new String[] {"*"}, _cache, null, true); assertFalse(repor... |
return new EOEditingContext(parent == null ? EOEditingContext.defaultParentObjectStore() : parent); } | return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : parent); } | protected EOEditingContext _createEditingContext(EOObjectStore parent) { return new EOEditingContext(parent == null ? EOEditingContext.defaultParentObjectStore() : parent); } |
if (log.isDebugEnabled()) { log.debug("Setting default delegate on editing context: " + ec + " allows validation: " + validation); | if (log.isDebugEnabled()) { log.debug("Setting default delegate on editing context: " + ec + " allows validation: " + validation); } if (ec != null) { if (validation) { ec.setDelegate(defaultEditingContextDelegate()); } else { ec.setDelegate(defaultNoValidationDelegate()); } } else { log.warn("Attempting to set a defau... | public void setDefaultDelegateOnEditingContext(EOEditingContext ec, boolean validation) { if (log.isDebugEnabled()) { log.debug("Setting default delegate on editing context: " + ec + " allows validation: " + validation); } if (ec != null) ... |
if (ec != null) { if (validation) { ec.setDelegate(defaultEditingContextDelegate()); } else { ec.setDelegate(defaultNoValidationDelegate()); } } else { log.warn("Attempting to set a default delegate on a null ec!"); } } | public void setDefaultDelegateOnEditingContext(EOEditingContext ec, boolean validation) { if (log.isDebugEnabled()) { log.debug("Setting default delegate on editing context: " + ec + " allows validation: " + validation); } if (ec != null) ... | |
defaultEditingContextDelegate = delegate; } | defaultEditingContextDelegate = delegate; if (log.isDebugEnabled()) { log.debug("setting defaultEditingContextDelegate to "+delegate); } } | public void setDefaultEditingContextDelegate(Object delegate) { defaultEditingContextDelegate = delegate; } |
lockCount++; | if (!_autoLocked && lockLogger.isDebugEnabled()) { lockLogger.debug("locked "+this); } | public void lock() { super.lock(); lockCount++; } |
if (lockCount == 0) { log.warn("called saveChanges without a lock"); | boolean unlock = false; if (lockCount == 0 && automaticLockUnlock()) { unlock = true; lock(); if (!_autoLocked) lockLogger.warn("called method saveChanges without a lock, ec="+this); if (!_autoLocked && lockLogger.isDebugEnabled()) { lockLogger.debug(ERXUtilities.stackTrace()); } | public void saveChanges() { if (lockCount == 0) { log.warn("called saveChanges without a lock"); } super.saveChanges(); } |
super.saveChanges(); | try { super.saveChanges(); } finally { if (unlock) { unlock(); } } | public void saveChanges() { if (lockCount == 0) { log.warn("called saveChanges without a lock"); } super.saveChanges(); } |
if (!_autoLocked && lockLogger.isDebugEnabled()) { lockLogger.debug("unlocked "+this); } | public void unlock() { super.unlock(); lockCount--; } | |
super(relationship.getItem()); | super(relationship.getSupported()); | public RelationshipBase (RelationshipData relationship, int index){ super(relationship.getItem()); createLogger(); this.relationship = relationship; } |
Block block = e.begin_block(); | public FastClassEmitter(ClassVisitor v, String className, Class type) { super(v); begin_class(Constants.ACC_PUBLIC, className, FAST_CLASS, null, Constants.SOURCE_FILE); // constructor CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_CLASS, null); e.load_this(); e.... | |
block.end(); ComplexOps.wrap_checked_exception(block, INVOCATION_TARGET_EXCEPTION); | public FastClassEmitter(ClassVisitor v, String className, Class type) { super(v); begin_class(Constants.ACC_PUBLIC, className, FAST_CLASS, null, Constants.SOURCE_FILE); // constructor CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_CLASS, null); e.load_this(); e.... | |
block = e.begin_block(); | public FastClassEmitter(ClassVisitor v, String className, Class type) { super(v); begin_class(Constants.ACC_PUBLIC, className, FAST_CLASS, null, Constants.SOURCE_FILE); // constructor CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_CLASS, null); e.load_this(); e.... | |
e.throw_exception(ILLEGAL_ARGUMENT_EXCEPTION, "Cannot find matching method/constructor"); | e.goTo(illegalArg); | private static void invokeSwitchHelper(final CodeEmitter e, final Object[] members, final int arg) { e.process_switch(getIntRange(members.length), new ProcessSwitchCallback() { public void processCase(int key, Label end) { Member member = (Member)members[key]; Signatu... |
block.end(); ComplexOps.wrap_throwable(block, INVOCATION_TARGET_EXCEPTION); e.mark(illegalArg); e.throw_exception(ILLEGAL_ARGUMENT_EXCEPTION, "Cannot find matching method/constructor"); | private static void invokeSwitchHelper(final CodeEmitter e, final Object[] members, final int arg) { e.process_switch(getIntRange(members.length), new ProcessSwitchCallback() { public void processCase(int key, Label end) { Member member = (Member)members[key]; Signatu... | |
e.throw_exception(ILLEGAL_ARGUMENT_EXCEPTION, "Cannot find matching method/constructor"); | e.goTo(illegalArg); | public void processDefault() { e.throw_exception(ILLEGAL_ARGUMENT_EXCEPTION, "Cannot find matching method/constructor"); } |
public boolean isRunning(); | boolean isRunning(); | public boolean isRunning(); |
public boolean isSelfTerminating(); | boolean isSelfTerminating(); | public boolean isSelfTerminating(); |
public void setRunning(boolean isRunning); | void setRunning(boolean isRunning); | public void setRunning(boolean isRunning); |
System.out.println("Agent: " + data.getName()); | public ComponentData addComponentData(ComponentData data) { System.out.println("Agent: " + data.getName()); StringBuffer assemblyMatch = null; String name = data.getName(); int dotPos = name.lastIndexOf('.'); if (dotPos >= 0) { name = name.substring(dotPos + 1); } substitutions.put(":agent_n... | |
plugin.setName(pluginClassName); | plugin.setName(pluginClassName); plugin.setAlibID(rs.getString(2)); | public ComponentData addComponentData(ComponentData data) { System.out.println("Agent: " + data.getName()); StringBuffer assemblyMatch = null; String name = data.getName(); int dotPos = name.lastIndexOf('.'); if (dotPos >= 0) { name = name.substring(dotPos + 1); } substitutions.put(":agent_n... |
System.out.println("Done"); | public ComponentData addComponentData(ComponentData data) { System.out.println("Agent: " + data.getName()); StringBuffer assemblyMatch = null; String name = data.getName(); int dotPos = name.lastIndexOf('.'); if (dotPos >= 0) { name = name.substring(dotPos + 1); } substitutions.put(":agent_n... | |
propComponentID = addProperty(PROP_COMPONENT_ID, componentID, new ConfigurableComponentPropertyAdapter() { public void PropertyValueChanged(PropertyEvent e) { } }); | public void initProperties() { String componentID = new String(""); String componentCategory = new String(""); StringBuffer assemblyMatch = null; try { initDBProperties(); assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = assemblyID.iterator(); bool... | |
propCategory = addProperty(PROP_COMPONENT_CATEGORY, componentCategory, new ConfigurableComponentPropertyAdapter() { public void PropertyValueChanged(PropertyEvent e) { } }); | public void initProperties() { String componentID = new String(""); String componentCategory = new String(""); StringBuffer assemblyMatch = null; try { initDBProperties(); assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = assemblyID.iterator(); bool... | |
else if (theData instanceof Impact) | else if (theData instanceof ImpactComponent) | public MyTransferable(DefaultMutableTreeNode aNode) { theData = aNode.getUserObject(); if (theData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}... |
else if (theData instanceof ModifiableConfigurableComponent) flavors = new DataFlavor[] {componentFlavor}; | public MyTransferable(DefaultMutableTreeNode aNode) { theData = aNode.getUserObject(); if (theData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}... | |
|| cflavor.equals(experimentFlavor)) | || cflavor.equals(experimentFlavor) || cflavor.equals(componentFlavor)) | public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject(); // Can only drop on folders (or the root) if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { ... |
Class f = Enhancer.enhanceClass(ArgInit.class, null, null, (MethodFilter)null ); | Class f = Enhancer.enhanceClass(ArgInit.class, null, null, new SimpleFilter(Callbacks.INTERCEPT)); | public void testArgInit() throws Throwable{ Class f = Enhancer.enhanceClass(ArgInit.class, null, null, (MethodFilter)null ); ArgInit a = (ArgInit)ReflectUtils.newInstance(f, new Class[]{ String.class }, ... |
((Factory)a).interceptor(TEST_INTERCEPTOR); | ((Factory)a).setCallback(Callbacks.INTERCEPT, TEST_INTERCEPTOR); | public void testArgInit() throws Throwable{ Class f = Enhancer.enhanceClass(ArgInit.class, null, null, (MethodFilter)null ); ArgInit a = (ArgInit)ReflectUtils.newInstance(f, new Class[]{ String.class }, ... |
TEST_INTERCEPTOR); | callbacks); | public void testArgInit() throws Throwable{ Class f = Enhancer.enhanceClass(ArgInit.class, null, null, (MethodFilter)null ); ArgInit a = (ArgInit)ReflectUtils.newInstance(f, new Class[]{ String.class }, ... |
((Factory)a).newInstance( new Class[]{ String.class, String.class }, new Object[]{"test"}, TEST_INTERCEPTOR ); | ((Factory)a).newInstance(new Class[]{ String.class, String.class }, new Object[]{"test"}, callbacks); | public void testArgInit() throws Throwable{ Class f = Enhancer.enhanceClass(ArgInit.class, null, null, (MethodFilter)null ); ArgInit a = (ArgInit)ReflectUtils.newInstance(f, new Class[]{ String.class }, ... |
Enhancer.getMethodInterceptor(ser) instanceof TestInterceptor ); | ((Factory)ser).getCallback(Callbacks.INTERCEPT) instanceof TestInterceptor ); | public void testSerializable() throws Throwable { String testValue = "test"; Source source = (Source)Enhancer.enhance( Source.class, new Class []{} , new TestInterceptor(testValue), this.getClass().getClassLoader(), Enhancer.InternalReplace.class.ge... |
TestInterceptor interceptor = (TestInterceptor)Enhancer.getMethodInterceptor(ser); | TestInterceptor interceptor = (TestInterceptor)((Factory)ser).getCallback(Callbacks.INTERCEPT); | public void testSerializable() throws Throwable { String testValue = "test"; Source source = (Source)Enhancer.enhance( Source.class, new Class []{} , new TestInterceptor(testValue), this.getClass().getClassLoader(), Enhancer.InternalReplace.class.ge... |
assertTrue(((Factory)sig).interceptor() == TEST_INTERCEPTOR); | assertTrue(((Factory)sig).getCallback(Callbacks.INTERCEPT) == TEST_INTERCEPTOR); | public void testSignature() throws Throwable { Signature sig = (Signature)Enhancer.enhance(Signature.class, TEST_INTERCEPTOR); assertTrue(((Factory)sig).interceptor() == TEST_INTERCEPTOR); assertTrue(sig.interceptor() == 42); } |
if (primaryQueryKey() != null && displayGroup () != null && displayGroup().queryMatch()!=null ) displayGroup().queryMatch().setObjectForKey(newValue,primaryQueryKey()); | if (primaryQueryKey() != null && displayGroup () != null && displayGroup().queryMatch()!=null ) { if(newValue != null) { displayGroup().queryMatch().setObjectForKey(newValue,primaryQueryKey()); } else { displayGroup().queryMatch().removeObjectForKey(primaryQueryKey()); } } | public void setDisplayGroupQueryMatchValue (Object newValue) { if (primaryQueryKey() != null && displayGroup () != null && displayGroup().queryMatch()!=null ) displayGroup().queryMatch().setObjectForKey(newValue,primaryQueryKey()); } |
if (secondaryQueryKey() != null && displayGroup () != null && displayGroup().queryMatch()!=null ) displayGroup().queryMatch().setObjectForKey(newValue,secondaryQueryKey()); | if (secondaryQueryKey() != null && displayGroup () != null && displayGroup().queryMatch()!=null ) { if(newValue != null) { displayGroup().queryMatch().setObjectForKey(newValue,secondaryQueryKey()); } else { displayGroup().queryMatch().removeObjectForKey(secondaryQueryKey()); } } | public void setSecondaryDisplayGroupQueryMatchValue (Object newValue) { if (secondaryQueryKey() != null && displayGroup () != null && displayGroup().queryMatch()!=null ) displayGroup().queryMatch().setObjectForKey(newValue,secondaryQueryKey()); } |
bufferSize = DefaultStyledDocument.BUFFER_SIZE_DEFAULT; | bufferSize = DefaultStyledDocument.BUFFER_SIZE_DEFAULT * 4; | public ConsoleStyledDocument() { bufferSize = DefaultStyledDocument.BUFFER_SIZE_DEFAULT; minRemoveSize = (int)(bufferSize * .2); } |
} catch (BadLocationException ble) { System.out.println("Bad location exception: " + ble); | doc.fillFromLogFile(logFile); System.out.println(doc.getText(0, doc.getLength())); System.out.println("Final document"); logFile.seek(logFile.length()); logFile.writeChars("12345"); doc.appendString("12345", a); System.out.println(doc.getText(0, doc.getLength())); logFile.close(); } catch (Exception e) { System.out.pri... | public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); AttributeSet a = new javax.swing.text.SimpleAttributeSet(); // with MAX_CHARACTER = 5 this prints: // abc, abcde, fghij, vwxyz doc.setBufferSize(5); try { doc.appendString("abc", a); System.ou... |
NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, component); | NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, component, associations()); | protected NSDictionary createAjaxOptions(WOComponent component) { NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("onComplete", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new AjaxOption("onSuccess", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new ... |
return ! name.startsWith("java") && ! name.startsWith("junit") && ! name.endsWith("Exclude"); } | return !(name.startsWith("java") || name.startsWith("junit") || name.endsWith("Exclude")); } | public boolean accept(String name){ return ! name.startsWith("java") && ! name.startsWith("junit") && ! name.endsWith("Exclude"); } |
String assemblyMatch = DBUtils.getListMatch(assemblyID, "CMT"); | String assemblyMatch = DBUtils.getListMatch(assemblyID); | public ComponentData addComponentData(ComponentData data) { // The incoming data is an agent String name = data.getName(); int dotPos = name.lastIndexOf('.'); if (dotPos >= 0) { name = name.substring(dotPos + 1); } String assemblyMatch = DBUtils.getListMatch(assemblyID, "CMT"); if (assemblyM... |
String assemblyMatch = DBUtils.getListMatch(assemblyID, "CMT"); | String assemblyMatch = DBUtils.getListMatch(assemblyID); | private void addPlugins() { ContainerBase container = new ContainerBase("Plugins"); container.initProperties(); addChild(container); String assemblyMatch = DBUtils.getListMatch(assemblyID, "CMT"); if (assemblyMatch != null) { substitutions.put(":assemblyMatch", assemblyMatch); substitutions.p... |
RecipeComponent component = new ComplexRecipeBase(cdata, null); | RecipeComponent component = null; try { Constructor cons = this.getClass().getConstructor(constructorParams); component = (RecipeComponent)cons.newInstance(new Object[] {cdata, null}); } catch (Exception e) { if (log.isErrorEnabled()) log.error("copy: Failed to create a copy of class " + this.getClass(), e); return nu... | public ModifiableComponent copy(String name) { ComponentData cdata = getComponentData(); cdata.setName(name); RecipeComponent component = new ComplexRecipeBase(cdata, null); component.initProperties(); ((ComplexRecipeBase)component).modified = this.modified; ((ComplexRecipeBase)component).oldAss... |
((ComplexRecipeBase)component).modified = this.modified; | public ModifiableComponent copy(String name) { ComponentData cdata = getComponentData(); cdata.setName(name); RecipeComponent component = new ComplexRecipeBase(cdata, null); component.initProperties(); ((ComplexRecipeBase)component).modified = this.modified; ((ComplexRecipeBase)component).oldAss... | |
if (initName != getRecipeName()) { | for (int i = 0; i < getChildCount(); i++) { Property propName = ((ConfigurableComponent)getChild(i)).getProperty(AgentDBComponent.PROP_AGENT_NAME); if (propName != null) { propName.addPropertyListener(new ConfigurableComponentPropertyAdapter() { public void propertyValueChanged(PropertyEvent e) { String newVal = (Strin... | public void initProperties() { if (cdata != null) { initFromCData(); assemblyId = null; } else if (assemblyId != null) { initFromDatabase(); } propAssemblyId = addProperty(ASSEMBLY_PROP, ((assemblyId != null) ? assemblyId : "")); propAssemblyId.setVisible(false); if (initName != getRe... |
if (! foundit) { if (log.isWarnEnabled()) log.warn("Unable to find component " + component + " to set override target query on: " + propName); } | private void initTargetsFromDb() { if(log.isDebugEnabled()) { log.debug("In initTargetsFromDb"); } Map substitutions = new HashMap(); if (recipeId != null) { substitutions.put(":recipe_id", recipeId); try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createState... | |
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); | GLCanvas canvas = new GLCanvas(); | public static void main(String[] args) { Frame frame = new Frame(); GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); frame.setUndecorated(true); frame.add(canvas); frame.setSize(1, 1); frame.setVisible(true); } |
_parentComponent = _currentComponent.parent(); _childTemplate = _currentComponent._childTemplate(); _keyAssociations = _currentComponent._keyAssociations; | public AjaxState(IAjaxElement element, WOComponent currentComponent, String currentElementID) { _element = element; _currentComponent = currentComponent; _currentElementID = currentElementID; } | |
ajaxState._currentComponent._setParent(ajaxState._parentComponent, ajaxState._keyAssociations, ajaxState._childTemplate); | public WOResponse generateResponse() { if (_delayedElements != null) { Enumeration delayedElementsEnum = _delayedElements.objectEnumerator(); while (delayedElementsEnum.hasMoreElements()) { AjaxState ajaxState = (AjaxState)delayedElementsEnum.nextElement(); _context._setCurrentComponent(ajaxState._currentCo... | |
extraBindings = super.valueForBinding("extraBindings"); return (NSDictionary)extraBindings; | extraBindings = (NSDictionary)super.valueForBinding("extraBindings"); return extraBindings; | public NSDictionary extraBindings() { if (extraBindings == null && !synchronizesVariablesWithBindings()) extraBindings = super.valueForBinding("extraBindings"); return (NSDictionary)extraBindings; } |
case SmsConstants.ALPHABET_8BIT: | case SmsConstants.DCS_DEFAULT_8BIT: | public void send(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); String requestString; String ud; String udh; if (theDestination.getTypeOfNumber() ... |
case SmsConstants.ALPHABET_UCS2: | case SmsConstants.DCS_DEFAULT_UCS2: | public void send(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); String requestString; String ud; String udh; if (theDestination.getTypeOfNumber() ... |
case SmsConstants.ALPHABET_GSM: | case SmsConstants.DCS_DEFAULT_7BIT: | public void send(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); String requestString; String ud; String udh; if (theDestination.getTypeOfNumber() ... |
udh = SmsPduUtil.bytesToHexString(thePdu.getUserDataHeaders()); | udhData = thePdu.getUserDataHeaders(); udh = SmsPduUtil.bytesToHexString(new byte[] {(byte) (udhData.length & 0xff)}); udh += SmsPduUtil.bytesToHexString(udhData); | public void send(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); String requestString; String ud; String udh; if (theDestination.getTypeOfNumber() ... |
case SmsConstants.ALPHABET_GSM: String msg = SmsPduUtil.readSeptets(thePdu.getUserData(), thePdu.getUserDataLength()); msg = URLEncoder.encode(msg); udh = SmsPduUtil.bytesToHexString(thePdu.getUserDataHeaders()); requestString = MessageFormat.format( "http: new Object[] { mySessionId, theDestination.getAddress(), theSe... | case SmsConstants.DCS_DEFAULT_7BIT: throw new SmsException("Clickatell API cannot send 7 bit encoded messages with UDH"); | public void send(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); String requestString; String ud; String udh; if (theDestination.getTypeOfNumber() ... |
System.err.println(requestString); | public void send(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); String requestString; String ud; String udh; if (theDestination.getTypeOfNumber() ... | |
ComponentData parent = data.getParent(); if (parent != null) { substitutions.put(":parent_component_alib_id:", sqlQuote(getComponentAlibId(parent))); } else { substitutions.remove(":parent_component_alib_id:"); } | private void addComponentDataSubstitutions(ComponentData data) { substitutions.put(":component_name:", sqlQuote(data.getName())); substitutions.put(":component_lib_id:", getComponentLibId(data)); substitutions.put(":component_alib_id:", sqlQuote(getComponentAlibId(data))); substitutions.... | |
System.out.println("Result = " + result); | public String getComponentAlibId(ComponentData data) { if (data == null) return null; String result = data.getAlibID(); if (result == null) { String componentType = data.getType(); if (componentType.equals(ComponentData.PLUGIN)) { String agentName = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.