rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
animator.stop(); System.exit(0); | new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start(); | public static void main(String[] args) { Frame frame = new Frame("Gear Demo"); GLJPanel drawable = GLDrawableFactory.getFactory().createGLJPanel(new GLCapabilities()); // Use debug pipeline // drawable.setGL(new DebugGL(drawable.getGL())); System.err.println("DRAWABLE GL IS: " + drawable.getGL().get... |
if (propData.getName().equals("ClusterIdentifier")) { if (log.isWarnEnabled()) { log.warn("ClusterIdentifier obsolete. Replacing with MessageAddress."); } propData.setName("MessageAddress"); propData.setType("MessageAddress"); } | 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)... | |
log.error("Exception closing log file: " + e); | log.error("Exception closing log file: ", e); | public void closeLogFile() { synchronized (logFileLock) { try { logFile.close(); } catch (Exception e) { if(log.isErrorEnabled()) { log.error("Exception closing log file: " + e); } } } } |
log.error(e.toString()); | log.error("Excetpion", e); | public void fillFromLogFile() { synchronized (logFileLock) { try { logFile.close(); doc.fillFromLogFile(logFileName); logFile = new BufferedWriter(new FileWriter(logFileName, true)); } catch (Exception e) { if(log.isErrorEnabled()) { log.error(e.toString()); } ... |
log.error("Exception writing to log file: " + e); | log.error("Exception writing to log file: ", e); | public void handle(NodeServesClient nsc, NodeEvent nodeEvent) { final NodeEvent myNodeEvent = nodeEvent; // for swing utilities final int nodeEventType = nodeEvent.getType(); final String nodeEventDescription = getNodeEventDescription(nodeEvent); synchronized (logFileLock) { // write stdout/stderr/et... |
log.error("Exception writing to log file: " + e); | log.error("Exception writing to log file: ", e); | public void handleAll(final NodeServesClient nsc, final java.util.List nodeEvents) { final int n = nodeEvents.size(); if (n <= 0) { return; } // write a description of the event to the log file synchronized (logFileLock) { try { int i = 0; do { NodeEvent nodeEvent = ... |
protected Object handleGetObject (String key) | public Object handleGetObject (String key) | protected Object handleGetObject (String key) { return properties.getProperty(key); } |
getFields(name,desc); | if(!Modifier.isStatic(access)){ getFields(name,desc); | public void visitField(int access, String name, String desc, Object value) { getFields(name,desc); if( filter.acceptRead( Type.getType("L" + className + ";").getClassName(), name)){ addReadMethod(name, desc); } if( filter.acceptW... |
} | public void visitField(int access, String name, String desc, Object value) { getFields(name,desc); if( filter.acceptRead( Type.getType("L" + className + ";").getClassName(), name)){ addReadMethod(name, desc); } if( filter.acceptW... | |
if (peer != null) { peer = Toolkit.getDefaultToolkit ().createPopupMenu (this); } super.addNotify (); | public void addNotify() { // FIXME } | |
if (! origin.isShowing () ) { return; } addNotify (); Event e = new Event (origin, 0, 0, x, y, 0, 0); PopupMenuPeer p = (PopupMenuPeer) peer; p.show (e); | public void show(Component origin, int x, int y) { // FIXME } | |
src.put (toPut); | put (toPut); | public IntBuffer put (IntBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining ()); if (src.remaining () > 0) { int[] toPut = new int [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; } |
PersistenceCapable pc = (PersistenceCapable)obj; pc.setPersistenceManager("Manager"); | public static void makePersistent(Object obj){ System.out.println( "makePersistent " + obj.getClass() + " " + Arrays.asList(obj.getClass().getInterfaces()) ); InterceptFieldEnabled t = (InterceptFieldEnabled)obj; t.setInterceptFieldCallback( new StateManager()); FieldProvider provider ... | |
parseDepsConfs(_defaultConfMapping, _defaultConfMappingDescriptor, false); | parseDepsConfs(_defaultConfMapping, _defaultConfMappingDescriptor, false, false); | protected DependencyDescriptor getDefaultConfMappingDescriptor() { if (_defaultConfMappingDescriptor == null) { _defaultConfMappingDescriptor = new DefaultDependencyDescriptor(ModuleRevisionId.newInstance("", "", ""), false); parseDepsConfs(_defaultConfMapping, _defaultC... |
return false; | return webObjectsVersionAsDouble() >= 5.22d; | public static boolean webObjectsVersionIs522OrHigher() { String webObjectsVersion = webObjectsVersion(); if("5.2".equals(webObjectsVersion)) { String sourceVersion = sourceVersionString(); if("9260000".equals(sourceVersion)) { return true; } } ... |
return super.paramString (); | String r; switch (id) { case WINDOW_ACTIVATED: r = "WINDOW_ACTIVATED"; break; case WINDOW_CLOSED: r = "WINDOW_CLOSED"; break; case WINDOW_CLOSING: r = "WINDOW_CLOSING"; break; case WINDOW_DEACTIVATED: r = "WINDOW_DEACTIVATED"; break; case WINDOW_DEICONIFIED: r = "WINDOW_DEICONIFIED"; break; case WINDOW_ICONIFIED: r = "... | public String paramString () { return super.paramString (); } |
for(Enumeration enum = entities.keys(); enum.hasMoreElements();) | for(Enumeration en = entities.keys(); en.hasMoreElements();) | private static boolean importCommunityEntity(Hashtable communities, String assemblyID) { Map substitutions = new HashMap(); Connection conn = null; boolean ret = true; try{ conn = DBUtils.getConnection(selectQFILE); Statement st = conn.createStatement(); for(Enumeration enums = communities... |
String ename = (String)enum.nextElement(); | String ename = (String)en.nextElement(); | private static boolean importCommunityEntity(Hashtable communities, String assemblyID) { Map substitutions = new HashMap(); Connection conn = null; boolean ret = true; try{ conn = DBUtils.getConnection(selectQFILE); Statement st = conn.createStatement(); for(Enumeration enums = communities... |
log.error("try to import community entities.", e.fillInStackTrace()); ret = false; } finally { if (conn != null) { try { conn.close(); } catch (SQLException e) {} } } return ret; } | private static boolean importCommunityEntity(Hashtable communities, String assemblyID) { Map substitutions = new HashMap(); Connection conn = null; boolean ret = true; try{ conn = DBUtils.getConnection(selectQFILE); Statement st = conn.createStatement(); for(Enumeration enums = communities... | |
SourceUtil.toSAX(super.resolver.resolveURI("zip: | SourceUtil.toSAX(super.resolver.resolveURI("zip:" + this.inputSource.getURI() + "!/meta.xml"), | public void generate() throws IOException, SAXException, ProcessingException { try { if (getLogger().isDebugEnabled()) { getLogger().debug("Source " + super.source + " resolved to " + this.inputSource.getURI()); } this.contentHandler.startDocument(); ... |
SourceUtil.toSAX(super.resolver.resolveURI("zip: | SourceUtil.toSAX(super.resolver.resolveURI("zip:" + this.inputSource.getURI() + "!/styles.xml"), | public void generate() throws IOException, SAXException, ProcessingException { try { if (getLogger().isDebugEnabled()) { getLogger().debug("Source " + super.source + " resolved to " + this.inputSource.getURI()); } this.contentHandler.startDocument(); ... |
SourceUtil.toSAX(super.resolver.resolveURI("zip: | SourceUtil.toSAX(super.resolver.resolveURI("zip:" + this.inputSource.getURI() + "!/content.xml"), | public void generate() throws IOException, SAXException, ProcessingException { try { if (getLogger().isDebugEnabled()) { getLogger().debug("Source " + super.source + " resolved to " + this.inputSource.getURI()); } this.contentHandler.startDocument(); ... |
{ String prop_name = (bundleName.replace('.', '/') + ".properties"); System.out.println ("trying '" + prop_name + "' for '" + bundleName); InputStream i = ClassLoader.getSystemResourceAsStream (prop_name); if (i != null) { try { | InputStream i = ClassLoader.getSystemResourceAsStream (bundleName.replace ('.', '/') + ".properties"); if (i != null) { try { | private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; ResourceBundle needs_parent = null, r, result = null; while (true) { try { rbc = Class.forName(bundleName); r = null; try { r = (ResourceBundle) rbc.newInstance(... |
} } | } | private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; ResourceBundle needs_parent = null, r, result = null; while (true) { try { rbc = Class.forName(bundleName); r = null; try { r = (ResourceBundle) rbc.newInstance(... |
public AbstractSourceDocument read(final Location location) { | public AbstractSourceDocument read(AbstractXmlApplicationContext context, final Location location) { | public AbstractSourceDocument read(final Location location) { DefaultSourceDocument doc = null; final URI psudeoURI = location.getSourceURI(); final String ssp = psudeoURI.getSchemeSpecificPart(); URI uri; try { uri = new URI(ssp); location.setSourceURI(uri); doc = (DefaultSourceDocument) super.read(locatio... |
doc = (DefaultSourceDocument) super.read(location); doc .setType("org.apache.forrest.example.affiliateProductCatalogue.TradeDoublerProductFeed"); | IReader reader; reader = (IReader) context.getBean(uri.getScheme()); doc = (DefaultSourceDocument) reader.read(context, location); if (doc != null) { doc .setType("org.apache.forrest.example.affiliateProductCatalogue.TradeDoublerProductFeed"); } | public AbstractSourceDocument read(final Location location) { DefaultSourceDocument doc = null; final URI psudeoURI = location.getSourceURI(); final String ssp = psudeoURI.getSchemeSpecificPart(); URI uri; try { uri = new URI(ssp); location.setSourceURI(uri); doc = (DefaultSourceDocument) super.read(locatio... |
e.printStackTrace(); } catch (MalformedURLException e) { | public AbstractSourceDocument read(final Location location) { DefaultSourceDocument doc = null; final URI psudeoURI = location.getSourceURI(); final String ssp = psudeoURI.getSchemeSpecificPart(); URI uri; try { uri = new URI(ssp); location.setSourceURI(uri); doc = (DefaultSourceDocument) super.read(locatio... | |
return current < 2; | return current >= 2; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... |
if (current == 0) | int result; switch (current) | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... |
if (at != null) at.transform(coords, 0, coords, 0, 2); return SEG_QUADTO; | result = SEG_QUADTO; break; default: throw new NoSuchElementException("quad iterator out of bounds"); | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... |
throw new NoSuchElementException("quad iterator out of bounds"); | if (at != null) at.transform(coords, 0, coords, 0, 2); return result; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... |
if (current == 0) | int result; switch (current) | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... |
if (at != null) at.transform(coords, 0, coords, 0, 2); return SEG_QUADTO; | result = SEG_QUADTO; break; default: throw new NoSuchElementException("quad iterator out of bounds"); | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... |
throw new NoSuchElementException("quad iterator out of bounds"); | if (at != null) at.transform(coords, 0, coords, 0, 2); return result; | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... |
public String radioBoxGroupName(){ return ("YesNoGroup_"+d2wContext().propertyKey()); | public String radioBoxGroupName() { return _groupName; | public String radioBoxGroupName(){ return ("YesNoGroup_"+d2wContext().propertyKey()); } |
while (root.getParent() != null) { | Collection path = new HashSet(); path.add(root); while (root.getParent() != null && !root.isRoot()) { if (path.contains(root.getParent())) { return root; } | public static IvyNode getRoot(IvyNode parent) { IvyNode root = parent; while (root.getParent() != null) { root = root.getParent(); } return root; } |
path.add(root); | public static IvyNode getRoot(IvyNode parent) { IvyNode root = parent; while (root.getParent() != null) { root = root.getParent(); } return root; } | |
_problem = new RuntimeException("configuration(s) not found in "+this+": "+confs[i]+". It was required from "+getParent()+" "+getParentConf()); | if (!conf.equals(confs[i])) { _problem = new RuntimeException("configuration(s) not found in "+this+": "+conf+". Missing configuration: "+confs[i]+". It was required from "+getParent()+" "+getParentConf()); } else { _problem = new RuntimeException("configuration(s) not found in "+this+": "+confs[i]+". It was required f... | private boolean handleConfiguration(boolean loaded, String conf, boolean shouldBePublic) { String[] confs = getRealConfs(conf); if (_md != null) { for (int i = 0; i < confs.length; i++) { Configuration c = _md.getConfiguration(confs[i]); if (c == null) { ... |
_fetchedConfigurations.addAll(Arrays.asList(confs)); | _fetchedConfigurations.add(conf); | private boolean handleConfiguration(boolean loaded, String conf, boolean shouldBePublic) { String[] confs = getRealConfs(conf); if (_md != null) { for (int i = 0; i < confs.length; i++) { Configuration c = _md.getConfiguration(confs[i]); if (c == null) { ... |
EODataSource ds = new EODatabaseDataSource(ERXExtensions.newEditingContext(), "Movie"); | EODataSource ds = new EODatabaseDataSource(ERXEC.newEditingContext(), "Movie"); | public WOComponent listAllMovies() { ListPageInterface lpi = (ListPageInterface)D2W.factory().pageForConfigurationNamed("ListAllMovies", this); EODataSource ds = new EODatabaseDataSource(ERXExtensions.newEditingC... |
final ServiceSelector selectors = (ServiceSelector) super.m_manager.lookup(Selector.ROLE + "Selector"); | final ServiceSelector selectors = (ServiceSelector) super.m_manager.lookup(Action.ROLE + "Selector"); | public void build(Configuration configuration) throws ConfigurationException { super.build(configuration); // get the selector m_type = configuration.getAttribute("type",m_ln.getDefaultAction()); try { final ServiceSelector selectors = (ServiceSelector) super.m... |
else if (children[i].getName().equals("act")) { node = new ActNode(this, super.m_manager); } | public void build(final Configuration configuration) throws ConfigurationException { super.build(configuration); // get the base attribute String base = configuration.getAttribute("base", null); if (base != null) { try { m_baseLocation = VariableResolverFactor... | |
if (children[i].getClassName().equals(MetricsPlugIn_name)) | if (children[i].getName().equals(MetricsPlugIn_name)) | private void addCollectorCD(ComponentData data) { //Only add this if its not there already ComponentData[] children = data.getChildren(); for (int i = 0; i < data.childCount(); i++) { if (children[i].getClassName().equals(MetricsPlugIn_name)) return; } GenericComponentData plugin = new GenericComp... |
plugin.setName("MetricPlugin"); plugin.setClassName(MetricsPlugIn_name); | plugin.setName(MetricsPlugIn_name); | private void addCollectorCD(ComponentData data) { //Only add this if its not there already ComponentData[] children = data.getChildren(); for (int i = 0; i < data.childCount(); i++) { if (children[i].getClassName().equals(MetricsPlugIn_name)) return; } GenericComponentData plugin = new GenericComp... |
for (int i = 0; i < data.childCount(); i++) { | for (int i = 0; i < children.length; i++) { | public ComponentData addComponentData(ComponentData data) { // The Basic Metric needs to add its plugin to each Agent in the society. // Plus, it should pick one agent in the society, and add the initializer to that agent // plus, it needs one of the args to the initializer to be the total number of agents i... |
if (children[i].getClassName().equals(MetricsInitializerPlugIn_name)) | if (children[i].getName().equals(MetricsInitializerPlugIn_name)) | private ComponentData findInitializer(ComponentData data) { // Find the plugin with the Metrics initializer plugin ComponentData[] children = data.getChildren(); for (int i = 0; i < data.childCount(); i++) { if (children[i].getClassName().equals(MetricsInitializerPlugIn_name)) return children[i]; } ... |
jif.setSize(300, 300); | jif.setSize(660, 400); | private void setSocietyComponent(SocietyComponent cc) { remoteHostRegistry = RemoteHostRegistry.getInstance(); runningNodes = new Hashtable(); oldNodes = new ArrayList(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fil... |
&& startTimeMode == zone.startTimeMode | public synchronized boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) o; if (zone.hashCode() != hashCode() || !getID().equals(zone.getID()) || rawOffset != zone.rawOffset || useDaylight != zone.useDayl... | |
&& endTime == zone.endTime && endTimeMode == zone.endTimeMode); | && endTime == zone.endTime); | public synchronized boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) o; if (zone.hashCode() != hashCode() || !getID().equals(zone.getID()) || rawOffset != zone.rawOffset || useDaylight != zone.useDayl... |
int daysInMonth = getDaysInMonth(month, 1); if (day < 1 || day > daysInMonth) throw new IllegalArgumentException("day out of range"); if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) throw new IllegalArgumentException("dayOfWeek out of range"); if (month < Calendar.JANUARY || month > Calendar.DECEMBER)... | public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { int daysInMonth = getDaysInMonth(month, 1); if (day < 1 || day > daysInMonth) throw new IllegalArgumentException("day out of range"); if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) t... | |
&& startTimeMode == zone.startTimeMode | public boolean hasSameRules(TimeZone other) { if (this == other) return true; if (!(other instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) other; if (zone.hashCode() != hashCode() || rawOffset != zone.rawOffset || useDaylight != zone.useDaylight) return fals... | |
&& endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime && endTimeMode == zone.endTimeMode); | && endDayOfWeek == zone.endDayOfWeek && endTime == zone.endTime); | public boolean hasSameRules(TimeZone other) { if (this == other) return true; if (!(other instanceof SimpleTimeZone)) return false; SimpleTimeZone zone = (SimpleTimeZone) other; if (zone.hashCode() != hashCode() || rawOffset != zone.rawOffset || useDaylight != zone.useDaylight) return fals... |
day = Math.abs(day) - 6; | day -= 6; | private boolean isBefore(int calYear, int calMonth, int calDayOfMonth, int calDayOfWeek, int calMillis, int mode, int month, int day, int dayOfWeek, int millis) { // This method is called by Calendar, so we mustn't use that class. // We have to do all calculations by hand. // check the months... |
startTimeMode = WALL_TIME; endTimeMode = WALL_TIME; serialVersionOnStream = 2; | serialVersionOnStream = 1; | private void readObject(java.io.ObjectInputStream input) throws java.io.IOException, ClassNotFoundException { input.defaultReadObject(); if (serialVersionOnStream == 0) { // initialize the new fields to default values. dstSavings = 60 * 60 * 1000; endMode = DOW_IN_MONTH_MODE; startMode = DOW_IN_MONTH_M... |
this.endDay = day; | this.endDay = Math.abs(day); | public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; this.endDay = day; this.endDayOfWeek = Math.abs(dayOfWeek); if (this.endTimeMode == WALL_TIME) this.endTime = time; else if (this.endTimeMode == STANDAR... |
this.startDay = day; | this.startDay = Math.abs(day); | public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; this.startDay = day; this.startDayOfWeek = Math.abs(dayOfWeek); if (this.startTimeMode == WALL_TIME || this.startTimeMode == STANDARD_TIME) this.star... |
+ ",startTimeMode=" + startTimeMode | public String toString() { // the test for useDaylight is an incompatibility to jdk1.2, but // I think this shouldn't hurt. return getClass().getName() + "[" + "id=" + getID() + ",offset=" + rawOffset + ",dstSavings=" + dstSavings + ",useDaylight=" + useDaylight + (useDaylight ? ",... | |
+ ",endTime=" + endTime + ",endTimeMode=" + endTimeMode : "") + "]"; | + ",endTime=" + endTime : "") + "]"; | public String toString() { // the test for useDaylight is an incompatibility to jdk1.2, but // I think this shouldn't hurt. return getClass().getName() + "[" + "id=" + getID() + ",offset=" + rawOffset + ",dstSavings=" + dstSavings + ",useDaylight=" + useDaylight + (useDaylight ? ",... |
addToTree(communityTree.addNode(null, communityName, "Community", null), | removeAllChildren(communityTree); DefaultMutableTreeNode root = (DefaultMutableTreeNode)communityTree.getModel().getRoot(); addToTree(communityTree.addNode(root, communityName, "Community", null), | private void displayCommunityInformation() {// if (log.isDebugEnabled()) {// log.debug("displayCommunityInformation called");// } String communityName = selectCommunityToDisplay(); if (communityName == null) return; if (communityName.equals("All")) { putAllCommunitiesInTree(); re... |
addToTree(communityTree.addNode((DefaultMutableTreeNode)communityTree.getModel().getRoot(), communityName, "Community", null), | addToTree(communityTree.addNode(root, communityName, "Community", null), | private void putAllCommunitiesInTree() { ArrayList communityNames = CommunityDBUtils.getCommunitiesForExperiment(experiment.getCommAsbID()); if (communityNames == null || communityNames.size() == 0) return; communityTree.getModel().removeTreeModelListener(treeModelListener); for (Iterator iter = comm... |
aboutPanel.add(new JLabel("Notify Conditions Found:"), | aboutPanel.add(new JLabel("Notifications:"), | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St... |
aboutPanel.add(new JLabel("Log File Name:"), | aboutPanel.add(new JLabel("Log File:"), | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St... |
aboutPanel.add(new JLabel(logFileName), | aboutPanel.add(new JTextField(logFileName), | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St... |
aboutPanel.add(new JLabel("Host Description:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); aboutPanel.add(new JLabel((String)getPropertyValue((ConfigurableComponent)host, "Description")), new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,... | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St... | |
aboutPanel.add(new JLabel("Command Line Arguments:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); aboutPanel.add(new JLabel((String)getPropertyValue((ConfigurableComponent)node, "CmdLineArgs")), new GridBagConstraints(x, y++, 1, 1, 1.0... | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St... | |
"About " + node.getShortName(), | "Information: " + node.getShortName() + " (" + hostName + ")", | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St... |
nodeComponent.setArguments(properties); | private boolean createNode(NodeComponent nodeComponent, String hostName) { String nodeName = nodeComponent.getShortName(); // create an unique node name to circumvent server problems String uniqueNodeName = nodeName; // get arguments from NodeComponent and pass them to ApplicationServer // note that th... | |
assert("Test isInRange()", lr.isInRange(new Long(8))); assert("Test isInRange()", lr.isInRange(new Long(1))); assert("Test isInRange()", !lr.isInRange(new Float(5.2))); assert("Test isInRange()", !lr.isInRange(new Float(10.1))); assert("Test isInRange()", !lr.isInRange(new String("Hello"))); | assertTrue("Test isInRange()", lr.isInRange(new Long(8))); assertTrue("Test isInRange()", lr.isInRange(new Long(1))); assertTrue("Test isInRange()", !lr.isInRange(new Float(5.2))); assertTrue("Test isInRange()", !lr.isInRange(new Float(10.1))); assertTrue("Test isInRange()", !lr.isInRange(new String("Hello"))); | public void testIsInRange() { assert("Test isInRange()", lr.isInRange(new Long(8))); assert("Test isInRange()", lr.isInRange(new Long(1))); assert("Test isInRange()", !lr.isInRange(new Float(5.2))); assert("Test isInRange()", !lr.isInRange(new Float(10.1))); assert("Test isInRange()", !lr.isInRange(new... |
public void testToString() { String expect = new String(minimum + ":" + maximum); assertEquals("Test toString()", expect, lr.toString()); } | public void testIsInRange() { assert("Test isInRange()", lr.isInRange(new Long(8))); assert("Test isInRange()", lr.isInRange(new Long(1))); assert("Test isInRange()", !lr.isInRange(new Float(5.2))); assert("Test isInRange()", !lr.isInRange(new Float(10.1))); assert("Test isInRange()", !lr.isInRange(new... | |
checkIfReadOnly(); backing_buffer [position ()] = value; position (position () + 1); | if (readOnly) throw new ReadOnlyBufferException(); if (pos >= limit) throw new BufferOverflowException(); backing_buffer [(pos++) + array_offset] = value; | public CharBuffer put (char value) { checkIfReadOnly(); backing_buffer [position ()] = value; position (position () + 1); return this; } |
if (! doInput) throw new ProtocolException("Can't open InputStream if doInput is false"); | public InputStream getInputStream() throws IOException { if (!connected) connect(); if (bufferedIn == null) bufferedIn = new BufferedInputStream(sock.getInputStream()); return bufferedIn; } | |
if (! doOutput) throw new ProtocolException("Can't open OutputStream if doOutput is false"); | public OutputStream getOutputStream() throws IOException { if (!connected) connect(); return sock.getOutputStream(); } | |
remoteAddress = null; remotePort = -1; | public void close() { impl.close(); } | |
return null; | if (!isConnected ()) return null; return remoteAddress; | public InetAddress getInetAddress() { // FIXME: return null; } |
SecurityManager s = System.getSecurityManager(); | public InetAddress getLocalAddress() { SecurityManager s = System.getSecurityManager(); // FIXME: JCL p. 510 says this should call checkConnect. But what // string should be used as the hostname? Maybe this is just a side // effect of calling InetAddress.getLocalHost. // // And is getOption with ... | |
return impl.localPort; | if (!isConnected ()) return -1; return remotePort; | public int getPort() { return impl.localPort; } |
if(epf instanceof ERDErrorPageInterface) { ((ERDErrorPageInterface)epf).setException(e); } | public WOComponent nextPage(WOComponent sender) { WOComponent result=nextPage; if (eo.editingContext()!=null) { // save was clicked EOEditingContext ec=er.extensions.ERXExtensions.newEditingContext(); for (Enumeration ob=list.objectEnumerator(); ob.hasMoreElem... | |
log.debug("Can't use this set of locations because one is required: " + loc.toString()); | private List<Location> resolveSourceLocations(final URI requestURI) throws LocationmapException, MalformedURLException, ProcessingException { final List<List<Location>> possibleLocs = this.locationMap .get(requestURI); if (possibleLocs == null || possibleLocs.size() == 0) throw new LocationmapException( ... | |
InputStream is = p.getInputStream(); if (is!=null) input = ERXFileUtilities.stringFromInputStream(is); is = p.getErrorStream(); if (is!=null) error = ERXFileUtilities.stringFromInputStream(is); if (log.isDebugEnabled()) { log.debug("input = "+input); log.debug("error = "+error); | if (p != null) { InputStream is = p.getInputStream(); if (is!=null) input = ERXFileUtilities.stringFromInputStream(is); is = p.getErrorStream(); if (is!=null) error = ERXFileUtilities.stringFromInputStream(is); if (log.isDebugEnabled()) { log.debug("input = "+input); log.debug("error = "+error); } freeProcessResources... | public final static Result executeCommandLineCommandWithEnvVarsInWorkingDir(String command, String[] envp, File dir) throws IOException { Runtime rt = Runtime.getRuntime(); Process p = null; StringBuffer response = new StringBuffer(); String input = ""; String error = ""; t... |
freeProcessResources(p); | public final static Result executeCommandLineCommandWithEnvVarsInWorkingDir(String command, String[] envp, File dir) throws IOException { Runtime rt = Runtime.getRuntime(); Process p = null; StringBuffer response = new StringBuffer(); String input = ""; String error = ""; t... | |
public static String stringFromInputStream(InputStream in) throws IOException { return new String(bytesFromInputStream(in)); | public static String stringFromInputStream(InputStream in, String encoding) throws IOException { return new String(bytesFromInputStream(in), encoding); | public static String stringFromInputStream(InputStream in) throws IOException { return new String(bytesFromInputStream(in)); } |
Object loadObject(String className) throws Exception; | Object loadObject() throws Exception; | Object loadObject(String className) throws Exception; |
String fieldName = METHOD_FIELD_PREFIX + i; | String fieldName = getFieldName(method, i); String accessName = getAccessName(method, i); | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... |
String accessName = ACCESS_PREFIX + i; | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... | |
String fieldName = METHOD_FIELD_PREFIX + i; | String fieldName = getFieldName(method, i); | private void generateClInit(List methodList) throws NoSuchMethodException { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thi... |
String accessName = ACCESS_PREFIX + i; | String accessName = getAccessName(method, i); | private void generateClInit(List methodList) throws NoSuchMethodException { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thi... |
String assetFile = filename.substring(0, filename.indexOf('.')); | String assetFile = filename.substring(0, filename.lastIndexOf('.')); | protected void addAssetData() { String assetFile = filename.substring(0, filename.indexOf('.')); assetFile = assetFile + "-prototype-ini.dat"; if (log.isDebugEnabled()) { log.debug("Trying asset file " + assetFile); } // Check to see if the file exists before we do anything! if(SocietyFinder.ge... |
hostConfigurationBuilder.save(); | save(); | public void actionPerformed(ActionEvent e) { hostConfigurationBuilder.save(); } |
propertyBuilder = new UnboundPropertyBuilder(experiment); | propertyBuilder = new UnboundPropertyBuilder(experiment, this); | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.experiment = experiment; isEditable = experiment.isEditable(); isRunnable = experiment.isRunnable(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; ... |
new HostConfigurationBuilder(experiment, csmart); | new HostConfigurationBuilder(experiment, this); | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.experiment = experiment; isEditable = experiment.isEditable(); isRunnable = experiment.isRunnable(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; ... |
hostConfigurationBuilder.exit(); | private void exit() { // before exiting, restore experiment's and society's editability // FIXME Restore on society!!!! if (isEditable) experiment.setEditable(isEditable); if (isRunnable) experiment.setRunnable(isRunnable); // If the experiment now has a society and is otherwise runnable, sa... | |
saveSilently(); | public void reinit(Experiment newExperiment) { // restore editable flag on previous experiment if (isEditable) experiment.setEditable(isEditable); if (isRunnable) experiment.setRunnable(isRunnable); experiment = newExperiment; isEditable = newExperiment.isEditable(); isRunnable = newExper... | |
return (Mixin)super.create(KEY_FACTORY.newInstance(style, classes, route)); | return (Mixin)super.create(KEY_FACTORY.newInstance(style, ReflectUtils.getNames( classes ), route)); | public Mixin create() { if (classes == null && delegates == null) { throw new IllegalStateException("Either classes or delegates must be set"); } switch (style) { case STYLE_INTERFACES: if (classes == null) { Route r = ... |
public Object newInstance(int style, Class[] classes, int[] route); | public Object newInstance(int style, String[] classes, int[] route); | public Object newInstance(int style, Class[] classes, int[] route); |
e.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception", e); } | public void setValue(Property prop, Object newValue) { // treat empty string as null, delete previous experiment values if (newValue instanceof String && ((String)newValue).length() == 0) { bindings.put(prop.getName(), null); prop.setExperimentValues(null); // notify table model listeners fi... |
public void testBadURI() { | public void testBadURI() throws Exception { | public void testBadURI() { String vfsURI = "smb1:/goobeldygook"; VfsResource res = new VfsResource(vfsURI, helper.fsManager); if (res == null) { fail("Unexpected null value on VFS URI: " + vfsURI); } if (res.exists()) { fail("Resource is marked as existing and it should not: " + vfsURI); } if (! res... |
public void testListFileChildren() { | public void testListFileChildren() throws Exception { | public void testListFileChildren() { Iterator testSet = helper.createVFSUriSet(VfsTestHelper.TEST_IVY_XML).iterator(); while (testSet.hasNext()) { VfsURI vfsURI = (VfsURI) testSet.next(); VfsResource res = new VfsResource(vfsURI.toString(), helper.fsManager); List results = res.getChildren(); if (results.siz... |
public void testListImaginary() throws URISyntaxException { | public void testListImaginary() throws Exception { | public void testListImaginary() throws URISyntaxException { Iterator testSet = helper.createVFSUriSet("idontexistzzxx").iterator(); while (testSet.hasNext()) { VfsURI vfsURI = (VfsURI) testSet.next(); VfsResource res = new VfsResource(vfsURI.toString(), helper.fsManager); List results = res.getChildren(); if... |
log = CSMART.createLogger(this.getClass().getName()); | public void setupSubscriptions() { log = CSMART.createLogger(this.getClass().getName()); List pv = getParameters() != null ? new ArrayList(getParameters()) : null; int pvSize = ((pv != null) ? pv.size() : 0); if (pvSize > 0) { createLocalAssets((String)pv.get(0)); } } | |
String anEntityName = _localSourceEntityName(); EOModelGroup aModelGroup = EOModelGroup.defaultGroup(); EOEntity anEntity = aModelGroup.entityNamed(anEntityName); | String anEntityName = (String)valueForBinding("destinationEntityName"); EOEntity destinationEntity = null; | protected EODataSource _localDataSource() { if (null==dataSource()) { setDataSource((EODataSource)valueForBinding("dataSource")); if (dataSource() == null) { String anEntityName = _localSourceEntityName(); // FIXME (msanchez, 08/00, 2520053): use modelGroup... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.