rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
Readline.load(ReadlineLibrary.byName(args[1]));
libName = args[1];
public static void main(String[] args) { String line; // Readline.setThrowExceptionOnUnsupportedMethod(true); if (args.length > 1) Readline.load(ReadlineLibrary.byName(args[1])); else Readline.load(ReadlineLibrary.GnuReadline); System.out.println("initializing Readline..."); ...
Readline.load(ReadlineLibrary.GnuReadline);
libName = "GnuReadline";
public static void main(String[] args) { String line; // Readline.setThrowExceptionOnUnsupportedMethod(true); if (args.length > 1) Readline.load(ReadlineLibrary.byName(args[1])); else Readline.load(ReadlineLibrary.GnuReadline); System.out.println("initializing Readline..."); ...
System.out.println("initializing Readline...");
Readline.load(ReadlineLibrary.byName(libName)); System.out.println("initializing " + libName);
public static void main(String[] args) { String line; // Readline.setThrowExceptionOnUnsupportedMethod(true); if (args.length > 1) Readline.load(ReadlineLibrary.byName(args[1])); else Readline.load(ReadlineLibrary.GnuReadline); System.out.println("initializing Readline..."); ...
System.err.println("Could not query libarary version");
System.err.println("Could not query library version");
public static void main(String[] args) { String line; // Readline.setThrowExceptionOnUnsupportedMethod(true); if (args.length > 1) Readline.load(ReadlineLibrary.byName(args[1])); else Readline.load(ReadlineLibrary.GnuReadline); System.out.println("initializing Readline..."); ...
pgData.setType("String"); pgData.setValue(this.getShortName());
pgData.setType("ClusterIdentifier"); pgData.setValue(propName.getValue().toString());
private PropGroupData createClusterPG() { PropGroupData pgd = new PropGroupData(PropGroupData.CLUSTER); if(log.isDebugEnabled()) { log.debug("Creating ClusterPG"); } PGPropData pgData = new PGPropData(); pgData.setName("ClusterIdentifier"); pgData.setType("String"); pgData.setValue(this....
propType.setValue("UTC/" + propName.getValue().toString());
private PropGroupData createTypeIdentificationPG() { PropGroupData pgd = new PropGroupData(PropGroupData.TYPE_IDENTIFICATION); if(log.isDebugEnabled()) { log.debug("Creating TypeIDPG"); } // Add Type Identification PGPropData pgData = new PGPropData(); pgData.setName("TypeIdentification"); ...
propName.addPropertyListener(new ConfigurableComponentPropertyAdapter() { public void propertyValueChanged(PropertyEvent e) { updateAgent((String)e.getProperty().getValue()); } });
public void initProperties() { propName = addProperty(PROP_NAME, PROP_NAME_DFLT); propName.addPropertyListener(new ConfigurableComponentPropertyAdapter() { public void propertyValueChanged(PropertyEvent e) { updateAgent((String)e.getProperty().getValue()); } }); propName.setToolTi...
updateAgent((String)e.getProperty().getValue());
updateRelationCount((Integer)e.getProperty().getValue());
public void propertyValueChanged(PropertyEvent e) { updateAgent((String)e.getProperty().getValue()); }
newSocietyMenuItem = new JMenuItem("New Society"); newSocietyMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { organizer.newSociety(); } });
public CSMART() { setTitle("CSMART"); createLog(); // Write initial CSMART info to the log file if (log.isShoutEnabled()) { log.shout(writeDebug()); } resultDir = initResultDir(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); // set-up file menu which includes ...
fileMenu.add(newSocietyMenuItem);
public CSMART() { setTitle("CSMART"); createLog(); // Write initial CSMART info to the log file if (log.isShoutEnabled()) { log.shout(writeDebug()); } resultDir = initResultDir(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); // set-up file menu which includes ...
saveToDatabaseMenuItem = new JMenuItem(ActionUtil.SAVE_TO_DATABASE_ACTION); saveToDatabaseMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { organizer.saveComponent(); } }); fileMenu.add(saveToDatabaseMenuItem);
public CSMART() { setTitle("CSMART"); createLog(); // Write initial CSMART info to the log file if (log.isShoutEnabled()) { log.shout(writeDebug()); } resultDir = initResultDir(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); // set-up file menu which includes ...
Class[] paramClasses = { CSMART.class, ModifiableComponent.class }; Object[] params = new Object[2];
Class[] paramClasses = { CSMART.class, ModifiableComponent.class, Experiment.class }; Object[] params = new Object[3];
public void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called Class[] paramClasses = { CSMART.class, ModifiableComponent.class }; Object[] params = new Object[2]; params[0] = this; if (cc instanceof Experiment) { ...
Experiment experiment = (Experiment)cc;
experiment = (Experiment)cc;
public void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called Class[] paramClasses = { CSMART.class, ModifiableComponent.class }; Object[] params = new Object[2]; params[0] = this; if (cc instanceof Experiment) { ...
params[2] = experiment;
public void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called Class[] paramClasses = { CSMART.class, ModifiableComponent.class }; Object[] params = new Object[2]; params[0] = this; if (cc instanceof Experiment) { ...
organizer.removeChildren(experiment);
private void runExperimentBuilderWorker(Experiment experiment, boolean alwaysNew) { Class[] paramClasses = { CSMART.class, Experiment.class }; Object[] params = new Object[2]; params[0] = this; params[1] = experiment; createTool(EXPERIMENT_BUILDER, ExperimentBui...
ret_val = processResoultion (s, assignNewHandle (s));
ret_val = processResolution (s, assignNewHandle (s));
public final Object readObject () throws ClassNotFoundException, IOException { if (this.useSubclassMethod) return readObjectOverride (); boolean was_deserializing; Object ret_val; was_deserializing = this.isDeserializing; if (! was_deserializing) setBlockDataMode (false); this.isDeseriali...
ret_val = processResoultion (array, handle);
ret_val = processResolution (array, handle);
public final Object readObject () throws ClassNotFoundException, IOException { if (this.useSubclassMethod) return readObjectOverride (); boolean was_deserializing; Object ret_val; was_deserializing = this.isDeserializing; if (! was_deserializing) setBlockDataMode (false); this.isDeseriali...
ret_val = processResoultion (obj, handle);
ret_val = processResolution (obj, handle);
public final Object readObject () throws ClassNotFoundException, IOException { if (this.useSubclassMethod) return readObjectOverride (); boolean was_deserializing; Object ret_val; was_deserializing = this.isDeserializing; if (! was_deserializing) setBlockDataMode (false); this.isDeseriali...
JTable argTable = new JTable(new DefaultTableModel(data, columnNames));
JTable argTable = new JTable(new DefaultTableModel(data, columnNames)) { public boolean isCellEditable(int row, int column) { return false; } };
public void displayAbout() { ArrayList agentNames = (ArrayList)console.getNodePropertyValue(nodeName, "AgentNames"); // If got no Agent Names, that probably means // we have no configuration info for the Node, // so we won't display that portion of // the info window if (agentNames != null) {...
if (result == JOptionPane.CANCEL_OPTION)
if (result != JOptionPane.OK_OPTION)
private void notify_actionPerformed() { JPanel notifyPanel = new JPanel(new GridBagLayout()); int x = 0; int y = 0; notifyPanel.add(new JLabel("Search string:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, ...
boolean held = Thread.currentThread().holdsLock(lock); System.out.println(held);
Thread this_thread = Thread.currentThread(); System.out.println(this_thread.holdsLock(lock));
public void check() { boolean held = Thread.currentThread().holdsLock(lock); System.out.println(held); }
public static Border createEmptyBorder() { return null; }
public static Border createEmptyBorder () { return new EmptyBorder (0, 0, 0, 0); }
public static Border createEmptyBorder() { /* Creates an empty border that takes up no space. (The width of the top, bottom, left, and right sides are all zero.) Returns: the Border objectcreateEmptyBorder */ return null; }
log.debug("*** compiling:" + commandLine());
for (int i = 0; i < commandArray().length; i++) { log.debug("*** compiling:" + commandArray()[i]); }
public boolean compile() throws IllegalArgumentException { Process jikesProcess=null; log.debug("*** compiling:" + commandLine()); try { jikesProcess = Runtime.getRuntime().exec(commandArray()); jikesProcess.waitFor(); if (jikesProcess.exitValue() ...
File classFile = findClassFile(name); if (classFile == null) { throw new ClassNotFoundException(name); } Class newClass; try { FileInputStream in = new FileInputStream(classFile); int length = in.available(); if (length == 0) { throw new ClassNotFoundException(name); } byte buffer[] = new byte[length]; in.read(buffer);...
boolean contains = false; Enumeration e = classFiles.objectEnumerator(); while (e.hasMoreElements()) { CacheEntry ce = (CacheEntry)e.nextElement(); if (ce.classNameWithPackage().equals(name)) { contains = true; break; } } if (contains) { byte buffer[] = null; Class newClass; File classFile = findClassFile(name); if (c...
protected Class findClass(String name) throws ClassNotFoundException { File classFile = findClassFile(name); if (classFile == null) { throw new ClassNotFoundException(name); } Class newClass; try { FileInputStream in = new File...
classLoaderLog.debug("CompilerClassLoader.findClassFile:" + name);
classLoaderLog.debug("CompilerClassLoader.findClassFile:" + name + " found");
public File findClassFile(String name) { String fileName = name.replace('.', File.separatorChar) + ".class"; File f = new File( _destinationPath + File.separatorChar + fileName); if (f.exists() && f.isFile() && f.canRead()) { classLoaderLog.debug("CompilerClassLoa...
classLoaderLog.debug("CompilerClassLoader.findClassFile:" + _destinationPath + File.separatorChar + fileName + " NOT found");
public File findClassFile(String name) { String fileName = name.replace('.', File.separatorChar) + ".class"; File f = new File( _destinationPath + File.separatorChar + fileName); if (f.exists() && f.isFile() && f.canRead()) { classLoaderLog.debug("CompilerClassLoa...
log.debug("classFiles="+classFiles);
void checkAndCompileAllClasses() { CacheEntry cacheEntry; Enumeration e = _filesToWatch.objectEnumerator(); NSMutableArray filesToCompile = new NSMutableArray(); while(e.hasMoreElements()) { cacheEntry = (CacheEntry)e.nextElement(); if(cacheEntry.needsRefresh()) { ...
_classPath = System.getProperty("java.class.path");
_classPath = System.getProperty("com.webobjects.classpath"); if ( _classPath != null && _classPath.length() > 0) { if (System.getProperty("java.class.path") != null && System.getProperty("java.class.path").length() > 0) { System.setProperty("java.class.path", _classPath + ":" + System.getProperty("java.class.path")); }...
public void initialize() { if(WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disabled"); _filesToWatch = new NSMutableDictionary(); return; } if(!ERXUtilities.booleanValueWithDefault(System.getProp...
if(_classPath.indexOf(".woa") < 0) { log.info("Sorry, can't find the .woa wrapper of this application. There is no support for the CompilerProxy in servlet deployment"); return;
if(_classPath.indexOf(".woa") == -1) { log.info("Sorry, can't find the .woa wrapper of this application. There is no support for the CompilerProxy in servlet deployment, will try to get it via NSBundle."); log.info("java.class.path="+_classPath);
public void initialize() { if(WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disabled"); _filesToWatch = new NSMutableDictionary(); return; } if(!ERXUtilities.booleanValueWithDefault(System.getProp...
_destinationPath = _classPath.substring(0,_classPath.indexOf(".woa")) + ".woa/Contents/Resources/Java/";
NSBundle b = NSBundle.mainBundle(); String path = b.resourcePath(); if (path.indexOf(".woa") == -1) { log.info("Sorry, can't find the .woa wrapper of this application. There is no support for the CompilerProxy in servlet deployment."); log.info("mainBundle.resourcePath="+path); } _destinationPath = path.substring(0, ...
public void initialize() { if(WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disabled"); _filesToWatch = new NSMutableDictionary(); return; } if(!ERXUtilities.booleanValueWithDefault(System.getProp...
if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); }
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
String roleName = ""; String itemId = ""; String typeId = ""; String otherClusterId = ""; long start = getDefaultStartTime(); long end = getDefaultEndTime();
String type = ""; String supportedCluster = ""; String role = "";
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
roleName = tokens.sval.trim(); if(log.isDebugEnabled()) { log.debug("fillRelationships: roleName = " + roleName); }
type = tokens.sval.trim();
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
otherClusterId = tokens.sval.trim(); if(log.isDebugEnabled()) { log.debug("fillRelationships: otherClusterId = " + otherClusterId); }
supportedCluster = tokens.sval.trim();
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
typeId = tokens.sval.trim(); if(log.isDebugEnabled()) { log.debug("fillRelationships: typeId = " + typeId); } break; case 3: itemId = tokens.sval.trim(); if(log.isDebugEnabled()) { log.debug("fillRelationships: itemId = " + itemId); } break; case 4: if (!tokens.sval.equals("")) { try { start = parseDate(tokens.sval);...
role = tokens.sval.trim();
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
if(type.equalsIgnoreCase("Superior")) { role = "Subordinate"; }
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
rd.setType(roleName); rd.setTypeId(otherClusterId); rd.setRole(typeId); rd.setStartTime(start); rd.setEndTime(end);
rd.setType(type); rd.setRole(role); rd.setSupported(supportedCluster); if(log.isDebugEnabled()) { log.debug("New Relationship: type: \"" + type + "\" Role: \"" + role + "\" Supported: \"" + supportedCluster + "\""); }
protected int fillRelationships(int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { if(log.isDebugEnabled()) { log.debug("Entering fillRelationships"); } RelationshipData rd = null; newVal = tokens.nextToken(); while ((newVal != StreamToken...
if(log.isDebugEnabled()) { log.debug("MultiVal"); }
private Object getValue(Object arg) { if(arg instanceof Collection) { if(log.isDebugEnabled()) { log.debug("MultiVal"); } Iterator iter = ((Collection)arg).iterator(); PGPropMultiVal multi = new PGPropMultiVal(); while(iter.hasNext()) { multi.addValue((String)iter.next()); ...
if(log.isDebugEnabled()) { log.debug("Collection Size: " + c.size()); }
protected Object parseArgs(String type, String arg) { int i; type = type.trim(); arg = arg.trim(); if ((i = type.indexOf("<")) >= 0) { int j = type.lastIndexOf(">"); String ctype = type.substring(0, i).trim(); String etype = type.substring(i + 1, j).trim(); Collection c = null; if...
if(log.isDebugEnabled()) { log.debug("Parsing Relationship"); }
public AgentAssetData parsePrototypeFile(String cId) { clusterId = cId; String dataItem = ""; int newVal; String filename = getFileName(); BufferedReader input = null; Reader fileStream = null; AgentAssetData aad = new AgentAssetData(null); try { fileStream = new InputStreamReader...
if(log.isDebugEnabled()) { log.debug("Parsing Item ["); }
public AgentAssetData parsePrototypeFile(String cId) { clusterId = cId; String dataItem = ""; int newVal; String filename = getFileName(); BufferedReader input = null; Reader fileStream = null; AgentAssetData aad = new AgentAssetData(null); try { fileStream = new InputStreamReader...
if(log.isDebugEnabled()) { log.debug("Entering setAssignmentForOrganization"); }
protected int setAssignmentPG(int newVal, StreamTokenizer tokens, AgentAssetData aad) { if(log.isDebugEnabled()) { log.debug("Entering setAssignmentForOrganization"); } PropGroupData pgData = new PropGroupData(PropGroupData.ASSIGNMENT); P...
if(log.isDebugEnabled()) { log.debug("Added CommunityPG"); }
private PropGroupData setCommunityPG() { if(log.isDebugEnabled()) { log.debug("Added CommunityPG"); } PropGroupData pgData = new PropGroupData(PropGroupData.COMMUNITY); PGPropData propData = new PGPropData(); propData.setName("TimeSpan"); propData.setType("TimeSpan"); propData.setValue(""); ...
if(log.isDebugEnabled()) { log.debug("Name: " + propData.getName()); }
protected int setPropertyForAsset(String prop, int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { String propertyName = prop.substring(1, prop.length()-1).trim(); if(log.isDebugEnabled()) { log.debug("Creating PropGroupData: " + propertyName)...
if(log.isDebugEnabled()) { log.debug(propertyName + " Type: " + propData.getType()); }
protected int setPropertyForAsset(String prop, int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { String propertyName = prop.substring(1, prop.length()-1).trim(); if(log.isDebugEnabled()) { log.debug("Creating PropGroupData: " + propertyName)...
if(log.isDebugEnabled()) { log.debug(propertyName + " Subtype: " + subType); }
protected int setPropertyForAsset(String prop, int newVal, StreamTokenizer tokens, AgentAssetData aad) throws IOException { String propertyName = prop.substring(1, prop.length()-1).trim(); if(log.isDebugEnabled()) { log.debug("Creating PropGroupData: " + propertyName)...
if(log.isDebugEnabled()) { log.debug("Added TypeIdentification"); }
private PropGroupData setTypeIdentificationPG() { if(log.isDebugEnabled()) { log.debug("Added TypeIdentification"); } PropGroupData pgData = new PropGroupData(PropGroupData.TYPE_IDENTIFICATION); PGPropData propData = new PGPropData(); propData.setName("TypeIdentification"); propData.setType("St...
new SocietyComponent[] {sc},
sc,
public void startConsole() { DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimen...
new SocietyComponent[] {sc},
sc,
public void startExperimentBuilder() { Experiment experiment = null; DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); if (o instanceof RecipeComponent || o instanceof SocietyComponent) { if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyCompone...
new SocietyComponent[0],
null,
public void startExperimentBuilder() { Experiment experiment = null; DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); if (o instanceof RecipeComponent || o instanceof SocietyComponent) { if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyCompone...
pg.setName(getName(prop)); pg.setType(getType(prop));
if(oldPG != null) { pg.setName(oldPG.getName()); pg.setType(oldPG.getType()); pg.setSubType(oldPG.getSubType()); } else { pg.setName(getName(prop)); pg.setType(getType(prop)); }
public PropGroupData getPropGroupData() { PropGroupData pgData = new PropGroupData(this.getShortName()); for(int i=0; i < propProperties.length; i++) { Property prop = propProperties[i]; PGPropData pg = new PGPropData(); pg.setName(getName(prop)); pg.setType(getTy...
String name = data.getName() + " (" + data.getType() + ")";
String name; if(data.getSubType() == null || data.getSubType().equals("")) { name = data.getName() + " (" + data.getType() + ")"; } else { name = data.getName() + " ("+ data.getSubType() + ")"; }
public void initProperties() { propProperties = new Property[pgd.getPropertyCount()]; Iterator iter = pgd.getPropertiesIterator(); int i=0; while(iter.hasNext()) { PGPropData data = (PGPropData)iter.next(); // Compose Name of Name and Type. String name = data.getName() + " (" + data.getTy...
keys = new LinkedList ();
{ keys = new LinkedList (); }
private void add (SelectionKey key) { if (keys == null) keys = new LinkedList (); keys.add (key); }
if (isClosed()) throw new SocketException("socket is closed");
public InetAddress getInterface() throws SocketException { return (InetAddress) impl.getOption(SocketOptions.IP_MULTICAST_IF); }
if (isClosed()) throw new SocketException("socket is closed");
public boolean getLoopbackMode() throws SocketException { Object obj = impl.getOption (SocketOptions.IP_MULTICAST_LOOP); if (obj instanceof Boolean) return ((Boolean) obj).booleanValue (); else throw new SocketException ("Unexpected type"); }
if (impl == null) throw new SocketException ( "MulticastSocket: Cant access socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public NetworkInterface getNetworkInterface() throws SocketException { if (impl == null) throw new SocketException ( "MulticastSocket: Cant access socket implementation"); InetAddress address = (InetAddress) impl.getOption (SocketOptions.IP_MULTICAST_IF); NetworkInterface netIf = NetworkI...
if (isClosed()) throw new SocketException("socket is closed");
public byte getTTL() throws IOException { // Use getTTL here rather than getTimeToLive in case we're using an impl // other than the default PlainDatagramSocketImpl and it doesn't have // getTimeToLive yet. return impl.getTTL(); }
if (isClosed()) throw new SocketException("socket is closed");
public int getTimeToLive() throws IOException { return impl.getTimeToLive(); }
if (isClosed()) throw new SocketException("socket is closed");
public void joinGroup(InetAddress mcastaddr) throws IOException { if (! mcastaddr.isMulticastAddress()) throw new IOException("Not a Multicast address"); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkMulticast(mcastaddr); impl.join(mcastaddr); }
if (isClosed()) throw new SocketException("socket is closed");
public void leaveGroup(InetAddress mcastaddr) throws IOException { if (! mcastaddr.isMulticastAddress()) throw new IOException("Not a Multicast address"); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkMulticast(mcastaddr); impl.leave(mcastaddr); }
if (isClosed()) throw new SocketException("socket is closed");
public synchronized void send(DatagramPacket p, byte ttl) throws IOException { SecurityManager s = System.getSecurityManager(); if (s != null) { InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkPermission (new SocketPermission (add...
if (isClosed()) throw new SocketException("socket is closed");
public void setInterface(InetAddress addr) throws SocketException { impl.setOption(SocketOptions.IP_MULTICAST_IF, addr); }
if (impl == null) throw new SocketException ( "MulticastSocket: Cant access socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public void setLoopbackMode(boolean disable) throws SocketException { if (impl == null) throw new SocketException ( "MulticastSocket: Cant access socket implementation"); impl.setOption (SocketOptions.IP_MULTICAST_LOOP, new Boolean (disable)); }
if (impl == null) throw new SocketException ( "MulticastSocket: Cant access socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public void setNetworkInterface(NetworkInterface netIf) throws SocketException { if (impl == null) throw new SocketException ( "MulticastSocket: Cant access socket implementation"); Enumeration e = netIf.getInetAddresses (); if (!e.hasMoreElements ()) throw new SocketException ("Multicas...
if (isClosed()) throw new SocketException("socket is closed");
public void setTTL(byte ttl) throws IOException { // Use setTTL here rather than setTimeToLive in case we're using an impl // other than the default PlainDatagramSocketImpl and it doesn't have // setTimeToLive yet. impl.setTTL(ttl); }
if (isClosed()) throw new SocketException("socket is closed");
public void setTimeToLive(int ttl) throws IOException { if (ttl <= 0 || ttl > 255) throw new IllegalArgumentException("Invalid ttl: " + ttl); impl.setTimeToLive(ttl); }
if(ds instanceof EODatabaseDataSource) { ((EODatabaseDataSource)ds).setFetchSpecificationByName(fetchspecName); }
if(ds instanceof EODatabaseDataSource) { EOFetchSpecification fs = ((EODatabaseDataSource)ds).entity().fetchSpecificationNamed(fetchspecName); if(fs != null) { fs = (EOFetchSpecification) fs.clone(); } ((EODatabaseDataSource)ds).setFetchSpecification(fs); }
protected void setupPhase() { WODisplayGroup dg=displayGroup(); if (dg!=null) { NSArray sortOrderings = dg.sortOrderings(); EODataSource ds = dataSource(); if (!_hasBeenInitialized) { log.debug("Initializing display group"); String fetchspecName = (String)d2wCont...
info("---------------- WARNINGS");
info(":::: WARNINGS");
public static void sumupProblems() { if (_problems.size() > 0) { info("\n:: problems summary ::"); if (_warns.size() > 0) { info("---------------- WARNINGS"); for (Iterator iter = _warns.iterator(); iter.hasNext();) { String msg = (String) iter.next(...
_impl.log("\t"+msg+"\n", MSG_WARN);
if (_impl != null) { _impl.log("\t"+msg+"\n", MSG_WARN); } else { System.err.println(msg); }
public static void sumupProblems() { if (_problems.size() > 0) { info("\n:: problems summary ::"); if (_warns.size() > 0) { info("---------------- WARNINGS"); for (Iterator iter = _warns.iterator(); iter.hasNext();) { String msg = (String) iter.next(...
info("---------------- ERRORS");
info(":::: ERRORS");
public static void sumupProblems() { if (_problems.size() > 0) { info("\n:: problems summary ::"); if (_warns.size() > 0) { info("---------------- WARNINGS"); for (Iterator iter = _warns.iterator(); iter.hasNext();) { String msg = (String) iter.next(...
_impl.log("\t"+msg+"\n", MSG_ERR);
if (_impl != null) { _impl.log("\t"+msg+"\n", MSG_ERR); } else { System.err.println(msg); }
public static void sumupProblems() { if (_problems.size() > 0) { info("\n:: problems summary ::"); if (_warns.size() > 0) { info("---------------- WARNINGS"); for (Iterator iter = _warns.iterator(); iter.hasNext();) { String msg = (String) iter.next(...
info("\t--- USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS ---");
info("\n:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS");
public static void sumupProblems() { if (_problems.size() > 0) { info("\n:: problems summary ::"); if (_warns.size() > 0) { info("---------------- WARNINGS"); for (Iterator iter = _warns.iterator(); iter.hasNext();) { String msg = (String) iter.next(...
long bitcount = bytecount * 8;
long bitcount = bytecount << 3;
public byte[] engineDigest () { long bitcount = bytecount * 8; engineUpdate ((byte)0x80); // 10000000 in binary; the start of the padding // add the rest of the padding to fill this block out, but leave 8 // bytes to put in the original bytecount while ((int)bytecount % 64 != 56) engineUpdate ((b...
while ((int)bytecount % 64 != 56)
while ((bytecount & 0x3f) != 56)
public byte[] engineDigest () { long bitcount = bytecount * 8; engineUpdate ((byte)0x80); // 10000000 in binary; the start of the padding // add the rest of the padding to fill this block out, but leave 8 // bytes to put in the original bytecount while ((int)bytecount % 64 != 56) engineUpdate ((b...
int i = (int)bytecount % 64; int shift = (3 - i % 4) * 8;
int i = ((int)bytecount) & 0x3f; int shift = (3 - i % 4) << 3;
public void engineUpdate (byte b) { int i = (int)bytecount % 64; int shift = (3 - i % 4) * 8; int idx = i / 4; // if you could index ints, this would be: W[idx][shift/8] = b W[idx] = (W[idx] & ~(0xff << shift)) | ((b & 0xff) << shift); // if we've filled up a block, then process it if ((++ bytec...
W[idx] = (W[idx] & ~(0xff << shift)) | ((b & 0xff) << shift);
i = (int)b; W[idx] = (W[idx] & ~(0xff << shift)) | ((i & 0xff) << shift);
public void engineUpdate (byte b) { int i = (int)bytecount % 64; int shift = (3 - i % 4) * 8; int idx = i / 4; // if you could index ints, this would be: W[idx][shift/8] = b W[idx] = (W[idx] & ~(0xff << shift)) | ((b & 0xff) << shift); // if we've filled up a block, then process it if ((++ bytec...
if ((++ bytecount) % 64 == 0)
if (((++bytecount) & 0x3f) == 0)
public void engineUpdate (byte b) { int i = (int)bytecount % 64; int shift = (3 - i % 4) * 8; int idx = i / 4; // if you could index ints, this would be: W[idx][shift/8] = b W[idx] = (W[idx] & ~(0xff << shift)) | ((b & 0xff) << shift); // if we've filled up a block, then process it if ((++ bytec...
byte opcode[] = { datagram[0], datagram[1], datagram[2], datagram[3] };
byte opcode[] = { datagram[3], datagram[2], datagram[1], datagram[0] };
public static int getFileIndex(byte [] datagram) { byte opcode[] = { datagram[0], datagram[1], datagram[2], datagram[3] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return bb.getInt(); }
byte opcode[] = { datagram[header_size-2], datagram[header_size-1] };
byte opcode[] = { datagram[header_size-1], datagram[header_size-2] };
public static short getOpcode(byte [] datagram) { byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return bb.getShort(); }
byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return (bb.getShort() == Opcode.DOWNLOAD);
return Opcode.isDownload(getOpcode(datagram));
public static boolean isDownloadDatagram(byte [] datagram) { byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return (bb.getShort() == Opcode.DOWNLOAD); }
byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return (bb.getShort() == Opcode.HELLO);
return Opcode.isHello(getOpcode(datagram));
public static boolean isHelloDatagram(byte [] datagram) { byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return (bb.getShort() == Opcode.HELLO); }
byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return (bb.getShort() == Opcode.IMAGE);
return Opcode.isImage(getOpcode(datagram));
public static boolean isImageDatagram(byte [] datagram) { byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return (bb.getShort() == Opcode.IMAGE); }
byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode).order(ByteOrder.LITTLE_ENDIAN); return Opcode.isNego(bb.getShort());
return Opcode.isNego(getOpcode(datagram));
public static boolean isNegoDatagram(byte [] datagram) { byte opcode[] = { datagram[header_size-2], datagram[header_size-1] }; ByteBuffer bb = ByteBuffer.wrap(opcode).order(ByteOrder.LITTLE_ENDIAN); return Opcode.isNego(bb.getShort()); }
Collection objectsFromPSP = CSMARTUL.getObjectsFromPSP(PSP_METRICS);
Collection objectsFromPSP = CSMARTUL.getObjectsFromServlet(PSP_METRICS);
public void refresh() { Collection objectsFromPSP = CSMARTUL.getObjectsFromPSP(PSP_METRICS); if (objectsFromPSP == null) return; System.out.println("Received metrics: " + objectsFromPSP.size()); ArrayList names = new ArrayList(); ArrayList data = new ArrayList(); Iterator iter = objectsFromPSP....
if (experimentBuilder == null) isEditable = false;
public HostConfigurationBuilder(Experiment experiment, ExperimentBuilder experimentBuilder) { createLogger(); this.experiment = experiment; this.experimentBuilder = experimentBuilder; hostConfigurationBuilder = this; // for inner class dialogs isEditable = experiment.i...
hostHostMenu.show(hostTree, e.getX(), e.getY());
if (hostTree.isEditable()) hostHostMenu.show(hostTree, e.getX(), e.getY()); else viewOnlyMenu.show(hostTree, e.getX(), e.getY());
private void displayHostTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
hostNodeMenu.show(hostTree, e.getX(), e.getY());
if (hostTree.isEditable()) hostNodeMenu.show(hostTree, e.getX(), e.getY()); else viewOnlyMenu.show(hostTree, e.getX(), e.getY());
private void displayHostTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
if (selected.isRoot()) hostRootMenu.show(hostTree, e.getX(), e.getY()); else if (selected.isHost()) {
if (selected.isRoot()) { if (hostTree.isEditable()) hostRootMenu.show(hostTree, e.getX(), e.getY()); else viewOnlyMenu.show(hostTree, e.getX(), e.getY()); } else if (selected.isHost()) {
private void displayHostTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
nodeNodeMenu.show(nodeTree, e.getX(), e.getY());
if (nodeTree.isEditable()) nodeNodeMenu.show(nodeTree, e.getX(), e.getY()); else viewOnlyMenu.show(nodeTree, e.getX(), e.getY());
private void displayNodeTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = nodeTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
if (selected.isRoot()) nodeRootMenu.show(nodeTree, e.getX(), e.getY()); else if (selected.isNode()) {
if (selected.isRoot()) { if (nodeTree.isEditable()) nodeRootMenu.show(nodeTree, e.getX(), e.getY()); else viewOnlyMenu.show(nodeTree, e.getX(), e.getY()); } else if (selected.isNode()) {
private void displayNodeTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = nodeTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
if (!hostTree.isEditable()) return; if (e.isPopupTrigger()) displayHostTreeMenu(e);
if (e.isPopupTrigger()) displayHostTreeMenu(e);
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable...
if (!nodeTree.isEditable()) return; if (e.isPopupTrigger()) displayNodeTreeMenu(e);
if (e.isPopupTrigger()) displayNodeTreeMenu(e);
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable...
setNodeDescription(nodeTree);
createUnassignedNode();
public void actionPerformed(ActionEvent e) { setNodeDescription(nodeTree); }
setNodeCommandLine((DefaultMutableTreeNode)nodeTree.getLastSelectedPathComponent());
setNodeDescription(nodeTree);
public void actionPerformed(ActionEvent e) { setNodeCommandLine((DefaultMutableTreeNode)nodeTree.getLastSelectedPathComponent()); }
setGlobalCommandLine();
setNodeCommandLine((DefaultMutableTreeNode)nodeTree.getLastSelectedPathComponent());
public void actionPerformed(ActionEvent e) { setGlobalCommandLine(); }
deleteNodesFromTree(nodeTree);
setGlobalCommandLine();
public void actionPerformed(ActionEvent e) { deleteNodesFromTree(nodeTree); }
experiment.getDefaultNodeArguments(), false);
experiment.getDefaultNodeArguments(), false, true);
public void setGlobalCommandLine() { experiment.updateNameServerHostName(); // Be sure this is up-do-date NodeArgumentDialog dialog = new NodeArgumentDialog("Global Command Line", experiment.getDefaultNodeArguments(), false); dialog.setVisible(true); if (dialog.getValue()...
if( (access & Constants.ACC_STATIC) == 0 ){
if( !TypeUtils.isStatic(access) ){
protected Emitter getEmitter(ClassVisitor cv) { return new Emitter(cv) { public void begin_class(int access, String className, Type superType, Type[] interfaces, String sourceFile) { if (!TypeUtils.isAbstract(access)) { interfaces = TypeUtils.add(interfaces, FIELD...
if( (access & Constants.ACC_STATIC) == 0 ){
if( !TypeUtils.isStatic(access) ){
public void declare_field(int access, String name, Type type, Object value) { super.declare_field(access, name, type, value); if( (access & Constants.ACC_STATIC) == 0 ){ fields.put(name, type); } }
String fieldName = getFieldName(typeName);
String fieldName = "CGLIB$load_class$" + escapeType(typeName);
private static void load_class_helper(CodeEmitter e, final Type type) { if (e.isStaticHook()) { // have to fall back on non-optimized load e.push(TypeUtils.emulateClassGetName(type)); e.invoke_static(Constants.TYPE_CLASS, FOR_NAME); } else { ClassEmitter ce ...