rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
log_.info("Opened port : " + serialPort_); | log_.debug("Opened port : " + serialPort_); | public void open() throws IOException { try { serialPort_ = openSerialPort(portName_); log_.info("Opened port : " + serialPort_); } catch (PortInUseException piuEx) { log_.error("Failed to open serial port", piuEx); throw (IOException) new IOExcep... |
log_.info("setSerialPortParams failed", e); | log_.warn("setSerialPortParams failed", e); | public void open() throws IOException { try { serialPort_ = openSerialPort(portName_); log_.info("Opened port : " + serialPort_); } catch (PortInUseException piuEx) { log_.error("Failed to open serial port", piuEx); throw (IOException) new IOExcep... |
log_.info("setFlowControlMode failed", e); | log_.warn("setFlowControlMode failed", e); | public void open() throws IOException { try { serialPort_ = openSerialPort(portName_); log_.info("Opened port : " + serialPort_); } catch (PortInUseException piuEx) { log_.error("Failed to open serial port", piuEx); throw (IOException) new IOExcep... |
public void invoke(MethodInfo method) { | public void invoke(MethodInfo method, Type virtualType) { | public void invoke(MethodInfo method) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInt... |
invoke_virtual(type, sig); | invoke_virtual(virtualType, sig); | public void invoke(MethodInfo method) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInt... |
log = CSMART.createLogger("org.cougaar.tools.csmart.society"); | createLogger(); | public SocietyBase(String name){ super(name); log = CSMART.createLogger("org.cougaar.tools.csmart.society"); } |
public IQ(Element element) { super(element); | public IQ(String ID) { super(docFactory.createDocument().addElement("iq")); setID(ID); | public IQ(Element element) { super(element); } |
throw new SocketException("DatagramSocket.getSoTimeout - not yet implemented"); | Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return ((Integer)timeout).intValue(); else return 0; | public synchronized int getSoTimeout() throws SocketException { // FIXME: TODO - DatagramSocket.getSoTimeout throw new SocketException("DatagramSocket.getSoTimeout - not yet implemented"); } |
throw new SocketException("DatagramSocket.setSoTimeout - not yet implemented"); | if (timeout < 0) throw new IllegalArgumentException("Invalid timeout: " + timeout); impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); | public synchronized void setSoTimeout(int timeout) throws SocketException { // FIXME: TODO - DatagramSocket.setSoTimeout throw new SocketException("DatagramSocket.setSoTimeout - not yet implemented"); } |
invokeBody( output ); | final String processName = this.name; | public void doTag(XMLOutput output) throws Exception { if ( this.name == null ) { throw new MissingAttributeException( "name" ); } invokeBody( output ); final Process process = getProcess( this.name ); if ( process == null ) { throw new Jelly... |
final Process process = getProcess( this.name ); if ( process == null ) { throw new JellyException( "No such process \"" + this.name + "\"" ); } Context blissedContext = (Context) getContext().getVariable( "blissed.context" ); if ( blissedContext == null ) { throw new JellyException( "No blissed Context" ); } proce... | state.setActivity( new Activity() { public void perform(Context context) throws ActivityException { try { getProcess().accept( context ); } catch (Exception e) { throw new ActivityException( e ); } } } ); | public void doTag(XMLOutput output) throws Exception { if ( this.name == null ) { throw new MissingAttributeException( "name" ); } invokeBody( output ); final Process process = getProcess( this.name ); if ( process == null ) { throw new Jelly... |
if (searchVerb.equals("") || searchVerb.equals(" ")) searchVerb = null; | public void setupSubscriptions() { // Is this necessary? // This asset, in this plugin, is only used to be the place // control tasks are allocated to Asset prototype = theLDMF.createPrototype(AbstractAsset.class, "Statistics"); dummyAsset = theLDMF.createInstance(prototype); publishAdd(dummyAsset)... | |
public void degradeReleaseRate( | void degradeReleaseRate( | public void degradeReleaseRate( double factor, long duration); |
return(actionCommand); | if (actionCommand == null) return label; else return actionCommand; | getActionCommand(){ return(actionCommand);} |
if( log.isDebugEnabled() ) log.debug( "Checking transitions from " + currentState.getName() ); | public boolean checkTransitions( ProcessContext context ) throws ActivityException, InvalidMotionException { boolean transitioned = false; OUTTER: while( true ) { State currentState = context.getCurrentState(); if( currentState == null ) ... | |
if( log.isDebugEnabled() ) log.debug( "Performed activity for " + state.getName() ); | protected void enterState( State state, ProcessContext context ) throws ActivityException, InvalidMotionException { Location location = context.getLocation(); location.enterState( state ); Activity activity = state.getActivity(); if( activity == nu... | |
if( log.isDebugEnabled() ) log.debug( "Exited state " + state.getName() ); | protected void exitState( State state, ProcessContext context ) throws InvalidMotionException { Location location = context.getLocation(); location.exitState( state ); } | |
if( log.isDebugEnabled() ) log.debug( "Finished process " + process.getName() ); | protected void finishProcess( Process process, ProcessContext context ) throws InvalidMotionException { Location location = context.getLocation(); location.finishProcess( process ); } | |
if( log.isDebugEnabled() ) log.debug( "Followed transition " + transition.getOrigin().getName() + " -> " + transition.getDestination().getName() ); | protected void followTransition( ProcessContext context, Transition transition ) throws ActivityException, InvalidMotionException { State destination = transition.getDestination(); State origin = transition.getOrigin(); Location location = context.g... | |
this ); | this, "org.codehaus.blissed.ProcessEngine[" + i + "]" ); | public synchronized void start() { if( this.threads != null ) { return; } this.shouldRun = true; this.threads = new ThreadGroup( "org.codehaus.blissed.ProcessEngine" ); Thread thread = null; for( int i = 0; i < this.numThreads; ++i ) { ... |
public GeneralPath(Shape s) | public GeneralPath() | public GeneralPath(Shape s) { types = new byte[INIT_SIZE >> 1]; points = new float[INIT_SIZE]; PathIterator pi = s.getPathIterator(null); setWindingRule(pi.getWindingRule()); append(pi, false); } |
types = new byte[INIT_SIZE >> 1]; points = new float[INIT_SIZE]; PathIterator pi = s.getPathIterator(null); setWindingRule(pi.getWindingRule()); append(pi, false); | this(WIND_NON_ZERO, INIT_SIZE); | public GeneralPath(Shape s) { types = new byte[INIT_SIZE >> 1]; points = new float[INIT_SIZE]; PathIterator pi = s.getPathIterator(null); setWindingRule(pi.getWindingRule()); append(pi, false); } |
return new TestSuite(new TestEnhancerTransform().transform()); | try { return new TestSuite(new TestEnhancerTransform().transform()); } catch (Error e) { e.printStackTrace(System.err); throw e; } | public static Test suite() throws Exception{ return new TestSuite(new TestEnhancerTransform().transform()); } |
public AbstractTransformTest(String s) { super(s); | public AbstractTransformTest() { super(null); | public AbstractTransformTest(String s) { super(s); } |
public Class transform()throws Exception{ ClassLoader loader = new TransformingClassLoader( AbstractTransformTest.class.getClassLoader(), new ClassFilter(){ public boolean accept(String name){ return ! name.startsWith("java") && ! name.startsWith("junit") && ! name.endsWith("Exclude"); } }, getTransformer() ); try ... | public Class transform() throws Exception { ClassLoader loader = new TransformingClassLoader(AbstractTransformTest.class.getClassLoader(), new ClassFilter(){ public boolean accept(String name){ return !(name.startsWith("java") || name.startsWith("junit") || name.endsWith("Exclude")); } }, getTransformer()); try { retur... | public Class transform()throws Exception{ ClassLoader loader = new TransformingClassLoader( AbstractTransformTest.class.getClassLoader(), new ClassFilter(){ public boolean accept(String name){ return ! name.startsWith("java") && ... |
out.flush(); | flush(); } catch (InterruptedIOException iioe) { Thread.currentThread().interrupt(); | public void write (int oneByte) { try { out.write(oneByte); if (auto_flush && oneByte == '\n') out.flush(); } catch (IOException e) { setError (); } } |
if (evictionData.getSelected() != null) { for (Iterator iter = evictionData.getSelected().iterator(); iter.hasNext();) { IvyNode selected = (IvyNode)iter.next(); if (selected.isEvicted(node.getRootModuleConf())) { selected.markSelected(node.getRootModuleConf()); if (debugConflictResolution()) { Message.debug("selecting... | private boolean checkConflictSolved(IvyNode node, IvyNode parent) { if (parent.getResolvedRevisions(node.getModuleId(), node.getRootModuleConf()).contains(node.getResolvedId())) { // resolve conflict has already be done with node with the same id // => job already done, we just have to ... | |
EvictionData evictionData = node.getEvictionDataInRoot(node.getRootModuleConf(), parent); if (evictionData == null) { if (debugConflictResolution()) { Message.debug(node+" was previously selected in root module conf "+node.getRootModuleConf()); } node.markSelected(node.getRootModuleConf()); if (debugConflictResolution... | private boolean checkConflictSolved(IvyNode node, IvyNode parent) { if (parent.getResolvedRevisions(node.getModuleId(), node.getRootModuleConf()).contains(node.getResolvedId())) { // resolve conflict has already be done with node with the same id // => job already done, we just have to ... | |
for (Iterator iter = ed.getSelected().iterator(); iter.hasNext();) { IvyNode selected = (IvyNode)iter.next(); fetchDependencies(selected, conf, true); | if (ed.getSelected() != null) { for (Iterator iter = ed.getSelected().iterator(); iter.hasNext();) { IvyNode selected = (IvyNode)iter.next(); fetchDependencies(selected, conf, true); } | private void fetchDependencies(IvyNode node, String conf, boolean shouldBePublic) { long start = System.currentTimeMillis(); if (debugConflictResolution()) { Message.debug(node.getId()+" => resolving dependencies in "+conf); } resolveConflict(node, node.getParent()); ... |
if (getIvy() != null && matcher instanceof IvyAware) { ((IvyAware) matcher).setIvy(getIvy()); } | public void add(VersionMatcher matcher) { _matchers.add(0, matcher); } | |
_displayGroup = new ERXDisplayGroup() { public Object fetch() { if(log.isDebugEnabled()) { log.debug("Fetching: " + toString(), new RuntimeException("Dummy for Stacktrace")); } Object result; if (dataSource() instanceof EODatabaseDataSource) { EODatabaseDataSource ds = (EODatabaseDataSource) dataSource(); NSArray... | _displayGroup = new ERXDisplayGroup(); | protected void createDisplayGroup() { boolean useBatchingDisplayGroup = ERXValueUtilities.booleanValue(d2wContext().valueForKey("useBatchingDisplayGroup")); if(useBatchingDisplayGroup) { _displayGroup = new ERXBatchingDisplayGroup(); } else { _displayGroup = new ERXDisplay... |
if (_context == null) return this; | public NSKeyValueCoding context() { if (_context == null) _context = ERXValidationFactory.defaultFactory().contextForException(this); return _context; } | |
public Dialog (Frame owner, String title, boolean modal) | public Dialog (Dialog owner) | public Dialog (Frame owner, String title, boolean modal) { super (owner); this.modal = modal; this.title = title; setLayout (new BorderLayout ()); } |
super (owner); this.modal = modal; this.title = title; setLayout (new BorderLayout ()); | this (owner, "", false); | public Dialog (Frame owner, String title, boolean modal) { super (owner); this.modal = modal; this.title = title; setLayout (new BorderLayout ()); } |
return !organizer.isInUse(recipe) && | return !organizer.isComponentInUse(recipe) && | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (isNodeInExperiment(organizer)) { if (action.equals(DUPLICATE_ACTION) || action.equals(DELETE... |
action.equals(BUILD_ACTION)) return !organizer.isInUse(society) && | action.equals(BUILD_ACTION) || action.equals(RUN_ACTION)) return !organizer.isComponentInUse(society) && | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (isNodeInExperiment(organizer)) { if (action.equals(DUPLICATE_ACTION) || action.equals(B... |
+ "&ref_id=" +IliasRefId | private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ... | |
core.reset(); | public final String LMSInitialize (String s) { core.reset(); String rv = core.LMSInitialize(s); IliasInitialize (); say ("LMSInitialize("+s+")="+rv); return rv; } | |
say ("LMSInitialize("+s+")="+rv); | public final String LMSInitialize (String s) { core.reset(); String rv = core.LMSInitialize(s); IliasInitialize (); say ("LMSInitialize("+s+")="+rv); return rv; } | |
nFillBits = 7 - (nUdhBits % 7); | if ( (nUdhBits % 7) > 0 ) { nFillBits = 7 - (nUdhBits % 7); } | private static byte[] encodeSeptetPdu(SmsPdu thePdu, SmsAddress theDestination, SmsAddress theSender) throws SmsException { SmsUserData userData = thePdu.getUserData(); byte[] ud = userData.getData(); byte[] udh = thePdu.getUserDataHeaders(); int nUdSeptets = userData.getLength... |
Enumeration enum = loader.getProjects().elements(); while (enum.hasMoreElements()) { printer.addProject((VizProject) enum.nextElement()); | Enumeration enumList = loader.getProjects().elements(); while (enumList.hasMoreElements()) { printer.addProject((VizProject) enumList.nextElement()); | protected void loadProjects() throws BuildException { Enumeration enum = loader.getProjects().elements(); while (enum.hasMoreElements()) { printer.addProject((VizProject) enum.nextElement()); } |
} | protected void loadProjects() throws BuildException { Enumeration enum = loader.getProjects().elements(); while (enum.hasMoreElements()) { printer.addProject((VizProject) enum.nextElement()); } | |
String clsName = pkgPrefix.nextToken() + "." + protocol + ".Handler"; | String clsName = (pkgPrefix.nextToken() + "." + protocol + ".Handler"); | getURLStreamHandler (String protocol) { URLStreamHandler ph = null; // First, see if a protocol handler is in our cache. if (cache_handlers) { if ((ph = (URLStreamHandler) ph_cache.get (protocol)) != null) return ph; } // If a non-default factory has been set, use it to find t... |
if (ch == null) return getInputStream(); | if (ch != null) return ch.getContent(this); | public Object getContent() throws IOException { if (!connected) connect(); // FIXME: Doc indicates that other criteria should be applied as // heuristics to determine the true content type, e.g. see // guessContentTypeFromName() and guessContentTypeFromStream methods // as well as FileNameMap cl... |
return ch.getContent(this); | return getInputStream(); | public Object getContent() throws IOException { if (!connected) connect(); // FIXME: Doc indicates that other criteria should be applied as // heuristics to determine the true content type, e.g. see // guessContentTypeFromName() and guessContentTypeFromStream methods // as well as FileNameMap cl... |
sc = helper.createSociety(file.getName(), name, SocietyFileComponent.class); | sc = helper.createSociety(file.getPath(), name, SocietyFileComponent.class); | private SocietyComponent newSocietyComponent() { // display file chooser to allow user to select file that defines society JFileChooser chooser = new JFileChooser(SocietyFinder.getInstance().getPath()); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); File file = null; SocietyCom... |
awtComponent.invalidate (); | setBoundsCallback ((Window) awtComponent, x - insets.left, y - insets.top, width + insets.left + insets.right, height + insets.top + insets.bottom); setSize (width + (insets.left - left) + (insets.right - right), height + (insets.top - top) + (insets.bottom - bottom)); insets.top = top; insets.left = left; insets.b... | protected void postConfigureEvent (int x, int y, int width, int height, int top, int left, int bottom, int right) { /* If our borders change (which often happens when we opaque resize), we need to make sure that a new layout will happen, since Sun forgets to handle this case. */ i... |
insets.top = top; insets.left = left; insets.bottom = bottom; insets.right = right; | else { int frame_x = x - insets.left; int frame_y = y - insets.top; int frame_width = width + insets.left + insets.right; int frame_height = height + insets.top + insets.bottom; | protected void postConfigureEvent (int x, int y, int width, int height, int top, int left, int bottom, int right) { /* If our borders change (which often happens when we opaque resize), we need to make sure that a new layout will happen, since Sun forgets to handle this case. */ i... |
awtComponent.setBounds (x, y, width, height); awtComponent.validate (); | if (frame_x != awtComponent.getX() || frame_y != awtComponent.getY() || frame_width != awtComponent.getWidth() || frame_height != awtComponent.getHeight()) { setBoundsCallback ((Window) awtComponent, frame_x, frame_y, frame_width, frame_height); if (frame_width != awtComponent.getWidth() || frame_height != awtComponen... | protected void postConfigureEvent (int x, int y, int width, int height, int top, int left, int bottom, int right) { /* If our borders change (which often happens when we opaque resize), we need to make sure that a new layout will happen, since Sun forgets to handle this case. */ i... |
setSize (awtComponent.getWidth() - insets.left - insets.right, awtComponent.getHeight() - insets.top - insets.bottom); | public void setResizable (boolean resizable) { set ("allow_shrink", resizable); set ("allow_grow", resizable); } | |
e.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception: ", e); } | static String getNextId(String queryName, String prefix) { DecimalFormat format = new DecimalFormat(prefix + "0000"); Map substitutions = new HashMap(); substitutions.put(":max_id_pattern", prefix + "____"); String id = format.format(1); // Default Logger qLog = CSMART.createLogger("queries"); try {... |
log.error("sqlListFromQuery: "+dbQuery); e.printStackTrace(); | log.error("sqlListFromQuery: "+dbQuery, e); | static String sqlListFromQuery (String query, Map substitutions) { Logger qLog = CSMART.createLogger("queries"); Logger log = CSMART.createLogger("org.cougaar.tools.csmart.core.db.CMT"); if (qLog.isDebugEnabled()){ qLog.debug("\nsqlListFromQuery "+query); } String dbQuery = DBUtils.getQuery(query,... |
ConflictHandler ch) | DBConflictHandler ch) | public PopulateDb(String cmtType, String hnaType, String csmiType, String experimentName, String exptId, String trialId, boolean createNew, ConflictHandler ch) throws SQLException, IOException { super(); if (cmtType == null) thro... |
ConflictHandler.STANDARD_CHOICES, ConflictHandler.STANDARD_CHOICES[ConflictHandler.KEEP])) | DBConflictHandler.STANDARD_CHOICES, DBConflictHandler.STANDARD_CHOICES[DBConflictHandler.KEEP])) | private boolean isOverwrite(Object msg) { if (overwriteAll) return true; if (keepAll) return false; if (conflictHandler == null) return false; switch (conflictHandler.handleConflict(msg, ConflictHandler.STANDARD_CHOICES, ... |
case ConflictHandler.KEEP: | case DBConflictHandler.KEEP: | private boolean isOverwrite(Object msg) { if (overwriteAll) return true; if (keepAll) return false; if (conflictHandler == null) return false; switch (conflictHandler.handleConflict(msg, ConflictHandler.STANDARD_CHOICES, ... |
case ConflictHandler.OVERWRITE: | case DBConflictHandler.OVERWRITE: | private boolean isOverwrite(Object msg) { if (overwriteAll) return true; if (keepAll) return false; if (conflictHandler == null) return false; switch (conflictHandler.handleConflict(msg, ConflictHandler.STANDARD_CHOICES, ... |
case ConflictHandler.KEEP_ALL: | case DBConflictHandler.KEEP_ALL: | private boolean isOverwrite(Object msg) { if (overwriteAll) return true; if (keepAll) return false; if (conflictHandler == null) return false; switch (conflictHandler.handleConflict(msg, ConflictHandler.STANDARD_CHOICES, ... |
case ConflictHandler.OVERWRITE_ALL: | case DBConflictHandler.OVERWRITE_ALL: | private boolean isOverwrite(Object msg) { if (overwriteAll) return true; if (keepAll) return false; if (conflictHandler == null) return false; switch (conflictHandler.handleConflict(msg, ConflictHandler.STANDARD_CHOICES, ... |
return new ULPlanFilter(communityToAgents, showObjectTypes, hideObjectTypes, ignoreObjectTypes); | return new ULPlanFilter(communityToAgents, (Vector)showObjectTypes.clone(), (Vector)hideObjectTypes.clone(), (Vector)ignoreObjectTypes.clone()); | public ULPlanFilter copy() { return new ULPlanFilter(communityToAgents, showObjectTypes, hideObjectTypes, ignoreObjectTypes); } |
log.debug("Setting the JDBC connection to read only"); | if (log.isDebugEnabled()) log.debug("Setting the JDBC connection "+aConnection+" to read only, current state:"+ " isReadOnly="+aConnection.isReadOnly()+ ", isolation level="+aConnection.getTransactionIsolation()); aConnection.commit(); | public void _configureReadOnly(Connection aConnection) throws SQLException { log.debug("Setting the JDBC connection to read only"); aConnection.createStatement().executeUpdate(_readOnlySessionProperties()); } |
aConnection.commit(); | public void _configureReadOnly(Connection aConnection) throws SQLException { log.debug("Setting the JDBC connection to read only"); aConnection.createStatement().executeUpdate(_readOnlySessionProperties()); } | |
log.debug("Setting the JDBC connection to read/write"); | if (log.isDebugEnabled()) log.debug("Setting the JDBC connection "+aConnection+" to read / write, current state:"+ " isReadOnly="+aConnection.isReadOnly()+ ", isolation level="+aConnection.getTransactionIsolation()); aConnection.commit(); | public void _configureReadWrite(Connection aConnection) throws SQLException { log.debug("Setting the JDBC connection to read/write"); aConnection.createStatement().executeUpdate(_readWriteSessionProperties()); } |
aConnection.commit(); | public void _configureReadWrite(Connection aConnection) throws SQLException { log.debug("Setting the JDBC connection to read/write"); aConnection.createStatement().executeUpdate(_readWriteSessionProperties()); } | |
if (_readOnlySessionProperties() != null && _readWriteSessionProperties() != null) { | if (_readOnlySessionProperties().length() > 0 && _readWriteSessionProperties().length() > 0) { | public void setReadWriteForConnectionInDatabaseContext(boolean isReadWrite, EODatabaseContext dbc) { if (_readOnlySessionProperties() != null && _readWriteSessionProperties() != null) { log.debug("ReadOnly and ReadWrite Transactions enabled, trying to change"); try { Conn... |
if (xmlFile != null && !CommunityDbUtils.importCommunityXML(xmlFile, experiment.getCommAsbID())) { if (log.isInfoEnabled()) { log.info("crtExpFromFile got no Community XML data out of " + xmlFile.getAbsolutePath()); } } | private void importCommunities() { // Add in community info for this society JFileChooser chooser = new JFileChooser(SocietyFinder.getInstance().getPath()); chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); chooser.setDialogTitle("Select the communities.xml file to import"); // Allow selecti... | |
_pageLevelKeys = new NSMutableArray(new Object[] {"pageWrapperName", "displayPropertyKeys"}); | _pageLevelKeys = new NSMutableArray(new Object[] {"pageWrapperName", "displayPropertyKeys", "pageName"}); | public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { _pageConfiguration = pageConfigurationName; _context = ERD2WContext.newContext(); _context.setDynamicPage(_pageConfiguration); _context.setTask(_context.task()); _context.setEnti... |
if(componentKeys == null) { _componentLevelKeys = new NSMutableArray(new Object[] {"componentName", "customComponentName", "displayNameForProperty", "propertyKey"}); } else { | NSArray keys = new NSMutableArray(new Object[] {"componentName", "customComponentName", "displayNameForProperty", "propertyKey"}); _componentLevelKeys = new NSMutableArray(); if(componentKeys != null) { | public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { _pageConfiguration = pageConfigurationName; _context = ERD2WContext.newContext(); _context.setDynamicPage(_pageConfiguration); _context.setTask(_context.task()); _context.setEnti... |
if (front == null || back == null) | if (frontCaps == null || backCaps == null) | public BufferCapabilities(ImageCapabilities frontCaps, ImageCapabilities backCaps, FlipContents flipContents) { if (front == null || back == null) throw new IllegalArgumentException(); this.front = front; this.back = back; this.flip = flip; } |
this.front = front; this.back = back; this.flip = flip; | this.front = frontCaps; this.back = backCaps; this.flip = flipContents; | public BufferCapabilities(ImageCapabilities frontCaps, ImageCapabilities backCaps, FlipContents flipContents) { if (front == null || back == null) throw new IllegalArgumentException(); this.front = front; this.back = back; this.flip = flip; } |
newChild.addProperty(propName.substring(name.lastIndexOf(".")+1), prop.getValue()); | newChild.addProperty(prop.getName().last().toString(), prop.getValue()); | public ModifiableComponent copy(String name) { ComponentData cdata = getComponentData(); cdata.setName(name); RecipeComponent component = new ComponentCollectionRecipe(cdata, null); component.initProperties(); ((ComponentCollectionRecipe)component).modified = this.modified; ((ComponentCollectionReci... |
Permissions perms = new Permissions(); perms.add(allPermission); return perms; | return allPermissions; | public PermissionCollection getPermissions(CodeSource codesource) { Permissions perms = new Permissions(); perms.add(allPermission); return perms; } |
int month = (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31); int day = (6 + (dayOfYear * 5 + 3) % (31 + 30 + 31 + 30 + 31)) / 5; | int month = isSet[MONTH] ? fields[MONTH] : (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31); int day = isSet[DAY_OF_MONTH] ? fields[DAY_OF_MONTH] : (6 + (dayOfYear * 5 + 3) % (31 + 30 + 31 + 30 + 31)) / 5; | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (era == BC) year = 1 - year; int[] daysOfYear = getDayOfYear(year); int hour = 0; if (isSet[HOUR_OF_DAY]) hour = fields[HOUR_OF_DAY]; else if (isSet[HOU... |
if (primaryKey() != null) { | if (rawPrimaryKey() != null) { NSArray primaryKeyAttributeNames=primaryKeyAttributeNames(); if (primaryKeyAttributeNames.count()>1) throw new RuntimeException("primaryKeyDictionary does not support compound primary keys"); | public NSDictionary primaryKeyDictionary(boolean inTransaction) { if (!inTransaction && _primaryKeyDictionary == null) { if (primaryKey() != null) { //FIXME: Should be getting primaryKey name from the entity of the enterprise object. _primaryKeyDictionary = new NSDict... |
_primaryKeyDictionary = new NSDictionary(primaryKey(), "id"); | _primaryKeyDictionary = new NSDictionary(rawPrimaryKey(), primaryKeyAttributeNames.lastObject()); | public NSDictionary primaryKeyDictionary(boolean inTransaction) { if (!inTransaction && _primaryKeyDictionary == null) { if (primaryKey() != null) { //FIXME: Should be getting primaryKey name from the entity of the enterprise object. _primaryKeyDictionary = new NSDict... |
result = ERXExtensions.rawPrimaryKeyFromPrimaryKeyAndEO(pk, this); | NSArray primaryKeyAttributeNames=primaryKeyAttributeNames(); if (primaryKeyAttributeNames.count()>1) throw new RuntimeException("rawPrimaryKeyInTransaction does not support compound primary keys"); result=pk.objectForKey(primaryKeyAttributeNames.lastObject()); | public Object rawPrimaryKeyInTransaction() { Object result = rawPrimaryKey(); if (result == null) { NSDictionary pk = primaryKeyDictionary(false); if (cat.isDebugEnabled()) cat.debug("pk: " + pk); // FIXME: What the heck is this?!?! result = ERXExtensions.ra... |
Object value = WOOgnl.factory().getValue(keyPath(), component); | Object value = null; try { value = WOOgnl.factory().getValue(keyPath(), component); } catch(NullPointerException ex) { System.err.println("NullPointerException in WOOgnlAssociation with keyPath '" + keyPath() + "'"); } | public Object valueInComponent(WOComponent component) { WOAssociation.Event event = _markStartOfEventIfNeeded("valueForKeyPath", keyPath(), component); Object value = WOOgnl.factory().getValue(keyPath(), component); if(event != null) EOEventCenter.markEndOfEvent(event); ... |
assert("Test isValueSet()", tst.isValueSet()); | assertTrue("Test isValueSet()", tst.isValueSet()); | public void testValueSet() { tst.setValue(new Integer(34)); assert("Test isValueSet()", tst.isValueSet()); } public void testToolTip() { tst.setToolTip("Tool Tip"); assertEquals("Test getToolTip()", "Tool Tip", tst.getToolTip()); } |
public void testToolTip() { tst.setToolTip("Tool Tip"); assertEquals("Test getToolTip()", "Tool Tip", tst.getToolTip()); } | public void testValueSet() { tst.setValue(new Integer(34)); assert("Test isValueSet()", tst.isValueSet()); } public void testToolTip() { tst.setToolTip("Tool Tip"); assertEquals("Test getToolTip()", "Tool Tip", tst.getToolTip()); } | |
new ConsoleNodeOutputFilter(filterValues, isAllSelected); | new ConsoleNodeOutputFilter(console, filterValues, isAllSelected); | private void filter_actionPerformed() { boolean[] filterValues = null; boolean isAllSelected = true; ConsoleNodeOutputFilter currentFilter = listener.getFilter(); if (currentFilter != null) { filterValues = currentFilter.getValues(); isAllSelected = currentFilter.isAllSelected(); } Console... |
short result = bb.getShort ((position () >> 1) + offset); | short result = bb.getShort ((position () << 1) + offset); | public short get () { short result = bb.getShort ((position () >> 1) + offset); position (position () + 1); return result; } |
bb.putShort ((position () >> 1) + offset, value); | bb.putShort ((position () << 1) + offset, value); position (position () + 1); | public ShortBuffer put (short value) { bb.putShort ((position () >> 1) + offset, value); return this; } |
public abstract short get (); | public ShortBuffer get (short[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; } | public abstract short get (); |
public abstract ShortBuffer put (short b); | public ShortBuffer put (ShortBuffer src) { if (src == this) throw new IllegalArgumentException (); if (src.remaining () > remaining ()) throw new BufferOverflowException (); if (src.remaining () > 0) { short[] toPut = new short [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; } | public abstract ShortBuffer put (short b); |
if(result == null) { | if (result == null && !ERXAjaxApplication.isAjaxSubmit(worequest)) { | public WOActionResults invokeAction(WORequest worequest, WOContext context) { boolean wasFormSubmitted = context._wasFormSubmitted(); boolean wasInForm = _enterFormInContext(context); boolean wasMultipleSubmitForm = context._isMultipleSubmitForm(); context._setActionInvoked(false); context._setIsMultiple... |
return "Event.paramString() not implemented"; | return "id=" + id + ",x=" + x + ",y=" + y + "target=" + target; | protected String paramString () { return "Event.paramString() not implemented"; } |
String r = getClass() + "[id=" + id + ",x=" + x + ",y=" + y + "target=" + ((target == null) ? "null" : target) + "]"; return r; | return getClass().getName() + "[" + paramString() + "]"; | public String toString() { String r = getClass() + "[id=" + id + ",x=" + x + ",y=" + y + "target=" + ((target == null) ? "null" : target) + "]"; return r; } |
canBlur |= ERXWOText.class.isAssignableFrom(clazz); canBlur |= ERXWOTextField.class.isAssignableFrom(clazz); | public boolean currentItemCanBlur() { Class clazz = classForCurrentItem(); boolean canBlur = WOText.class.isAssignableFrom(clazz); canBlur |= WOTextField.class.isAssignableFrom(clazz); return canBlur; } | |
if (deletedObject.getCommunityName() == null) return; | public void removeNode(DefaultMutableTreeNode node) { // remove from previous community CommunityTreeObject deletedObject = (CommunityTreeObject)node.getUserObject(); String entityName = deletedObject.toString(); String communityName = (String)communities.remove(entityName); if (communityName == n... | |
addedObject.setCommunityName(communityName); | public void treeNodesInserted(TreeModelEvent e) { Object[] addedNodes = e.getChildren(); // first, take remove action for (int i = 0; i < addedNodes.length; i++) removeNode((DefaultMutableTreeNode)addedNodes[i]); // get parent of added nodes DefaultMutableTreeNode node = (DefaultMutableTreeNo... | |
addTrialRecipe(rc, 0); | addTrialRecipe(rc, order); order++; | public void setModRecipes(List recipes) throws SQLException, IOException { // dbp.setDebug(true); int order = 0; for (Iterator i = recipes.iterator(); i.hasNext(); ) { RecipeComponent rc = (RecipeComponent) i.next(); addTrialRecipe(rc, 0); } } |
_readOnlySessionProperties = System.getProperty("er.extensions.ERXDatabaseContextDelegate.readOnlySessionProperties"); | _readOnlySessionProperties = ERXProperties.stringForKeyWithDefault("er.extensions.ERXDatabaseContextDelegate.readOnlySessionProperties",""); | public String _readOnlySessionProperties() { if (_readOnlySessionProperties == null) { _readOnlySessionProperties = System.getProperty("er.extensions.ERXDatabaseContextDelegate.readOnlySessionProperties"); } return _readOnlySessionProperties; } |
_readWriteSessionProperties = System.getProperty("er.extensions.ERXDatabaseContextDelegate.readWriteSessionProperties"); | _readWriteSessionProperties = ERXProperties.stringForKeyWithDefault("er.extensions.ERXDatabaseContextDelegate.readWriteSessionProperties",""); | public String _readWriteSessionProperties() { if (_readWriteSessionProperties == null) { _readWriteSessionProperties = System.getProperty("er.extensions.ERXDatabaseContextDelegate.readWriteSessionProperties"); } return _readWriteSessionProperties; } |
experiment.addRecipe(mc); | experiment.addRecipeComponent(mc); | public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get... |
NodeComponent[] nodeComponents = experiment.getNodes(); HostComponent[] hostComponents = experiment.getHosts(); | NodeComponent[] nodeComponents = experiment.getNodeComponents(); HostComponent[] hostComponents = experiment.getHostComponents(); | private void mapNodesToHosts(Experiment experiment, String assemblyMatch ) { NodeComponent[] nodeComponents = experiment.getNodes(); HostComponent[] hostComponents = experiment.getHosts(); String query = null; try { Connection conn = DBUtils.getConnection(); Map substitutions = new Has... |
while (count > 0) | while (count > 0 || converter.havePendingBytes()) | private void writeChars(char[] buf, int offset, int count) throws IOException { while (count > 0) { converter.setOutput(work_bytes, 0); int converted = converter.write(buf, offset, count); offset += converted; count -= converted; out.write(work_bytes, 0, converter.count); } } |
public void addToBothSidesOfRequirements(er.bugtracker.Requirement object) { | public void addToBothSidesOfRequirements(Requirement object) { | public void addToBothSidesOfRequirements(er.bugtracker.Requirement object) { addObjectToBothSidesOfRelationshipWithKey(object, "requirements"); } |
public void addToRequirements(er.bugtracker.Requirement object) { | public void addToRequirements(Requirement object) { | public void addToRequirements(er.bugtracker.Requirement object) { NSMutableArray array = (NSMutableArray)requirements(); willChange(); array.addObject(object); } |
public void removeFromBothSidesOfRequirements(er.bugtracker.Requirement object) { | public void removeFromBothSidesOfRequirements(Requirement object) { | public void removeFromBothSidesOfRequirements(er.bugtracker.Requirement object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "requirements"); } |
public void removeFromRequirements(er.bugtracker.Requirement object) { | public void removeFromRequirements(Requirement object) { | public void removeFromRequirements(er.bugtracker.Requirement object) { NSMutableArray array = (NSMutableArray)requirements(); willChange(); array.removeObject(object); } |
if (! url.getHost().equals("")) | String host = url.getHost(); if ((host != null) && (! host.equals(""))) | protected URLConnection openConnection(URL url) throws IOException { // If a hostname is set, then we need to switch protocols to ftp // in order to transfer this from the remote host. if (! url.getHost().equals("")) { // Reset the protocol (and implicitly the handler) for this URL. // Then have the UR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.