rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
File outFile = new File("c:\\tmp\\" + doc.getPath()); | File outFile = new File("build\\" + doc.getPath()); | private static void outputDocument(AbstractOutputDocument doc, URI uri) throws IOException { System.out.println("\n Resulting document for request " + uri + " is:\n"); System.out.println(doc.getContentAsString()); File outFile = new File("c:\\tmp\\" + doc.getPath()); FileWriter writer = new FileWriter(outFile... |
public Controller() throws URISyntaxException, SAXException, IOException { this("src/locationmap.xml", "src/forrestContext.xml"); | public Controller(final String locationmapPath, final String contextPath) throws URISyntaxException, SAXException, IOException { final File file = new File(contextPath); if (file.exists()) { log.info("Using Spring Context definition in " + contextPath); this.context = new FileSystemXmlApplicationContext(file .getAbsolu... | public Controller() throws URISyntaxException, SAXException, IOException { this("src/locationmap.xml", "src/forrestContext.xml"); } |
} if (cls != null && obj != null && !cls.isAssignableFrom(obj.getClass())) { throw new IllegalArgumentException("Class must be same class or superclass of delegate"); | private static Object enhanceHelper(boolean delegating, Object obj,Class cls, Class[] interfaces, MethodInterceptor ih, ClassLoader loader,Method wreplace, MethodFilter filter) { if (ih == nul... | |
if (loader == null) { loader = defaultLoader; } | Object key = keyFactory.newInstance(cls, interfaces, wreplace, ih.getClass(), delegating); | private static Object enhanceHelper(boolean delegating, Object obj,Class cls, Class[] interfaces, MethodInterceptor ih, ClassLoader loader,Method wreplace, MethodFilter filter) { if (ih == nul... |
Map factories = (Map)cache.get(loader); if (factories == null) { cache.put(loader, factories = new HashMap()); | if (loader == null) { loader = defaultLoader; | private static Object enhanceHelper(boolean delegating, Object obj,Class cls, Class[] interfaces, MethodInterceptor ih, ClassLoader loader,Method wreplace, MethodFilter filter) { if (ih == nul... |
Object key = keyFactory.newInstance(cls, interfaces, wreplace, ih.getClass(), delegating); factory = (Factory)factories.get(key); | factory = (Factory)cache.get(loader, key); | private static Object enhanceHelper(boolean delegating, Object obj,Class cls, Class[] interfaces, MethodInterceptor ih, ClassLoader loader,Method wreplace, MethodFilter filter) { if (ih == nul... |
ih, loader, wreplace, delegating, filter ).define(); try { Class mi = Class.forName(methodInterceptorName, true, loader); if (delegating) { factory = (Factory)result.getConstructor(new Class[]{ mi, Constants.TYPE_OBJECT }) .newInstance(new Object[]{ null, null }); } else { factory = (Factory)result.getConstructor(new C... | ih, loader, wreplace, delegating, filter).define(); Class[] types = delegating ? new Class[]{ mi, Constants.TYPE_OBJECT } : new Class[]{ mi }; factory = (Factory)FactoryCache.newInstance(result, types, new Object[delegating ? 2 : 1]); cache.put(loader, key, factory); | private static Object enhanceHelper(boolean delegating, Object obj,Class cls, Class[] interfaces, MethodInterceptor ih, ClassLoader loader,Method wreplace, MethodFilter filter) { if (ih == nul... |
src.put (toPut); | put (toPut); | public CharBuffer put (CharBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining()); if (src.remaining () > 0) { char[] toPut = new char [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; } |
if (log.isErrorEnabled()) { log.error("Saving recipe " + rc.getRecipeName() + " under ID " + recipeId + " couldn't find property " + pname + ". Will continue.", new Throwable()); } continue; | prop = rc.getInvisibleProperty(pname); if (prop == null) { if (log.isErrorEnabled()) { log.error("Saving recipe " + rc.getRecipeName() + " under ID " + recipeId + " couldn't find property " + pname + ". Will continue.", new Throwable()); } continue; } | private String insertLibRecipe(RecipeComponent rc, String recipeId) throws SQLException { try { if (recipeId != null) removeLibRecipeNamed(rc.getRecipeName()); else recipeId = getNextId("queryMaxRecipeId", "RECIPE-"); substitutions.put(":recipe_id:", recipeId); substitutions.put(":java_clas... |
eo = ERXUtilities.createEO(entity.name(), ec); | eo = ERXEOControlUtilities.createAndInsertObject(ec, entity.name()); | private EOEnterpriseObject _newObjectWithEntity(EOEntity entity, EOEditingContext ec) { if (entity.isReadOnly()) { throw new IllegalArgumentException(" You can't create a new instance of " + entity.name() + ". It is a read-only entity. It is marked read-only in the model."); } if (e... |
getDefaultIvyUserDir(); getDefaultCache(); | public void configure(File configurationFile) throws ParseException, IOException { Message.info(":: configuring :: file = "+configurationFile); long start = System.currentTimeMillis(); setConfigurationVariables(configurationFile); try { new XmlIvyConfigurationParser(th... | |
if (c == null) { Message.warn("unknown configuration '"+conf+"' in "+node.getResolvedId()+": ignoring"); if (node.getParent() != null) { Message.warn("it was asked from "+node.getParent().getResolvedId()); } return; } | private void doFetchDependencies(IvyNode node, String conf) { Configuration c = node.getConfiguration(conf); // we handle the case where the asked configuration extends others: // we have to first fetch the extended configurations String[] extendedConfs = c.getExtends(); if (exten... | |
_defaultUserDir = new File(System.getProperty("user.home"), ".ivy"); | setDefaultIvyUserDir(new File(System.getProperty("user.home"), ".ivy")); | public File getDefaultIvyUserDir() { if (_defaultUserDir==null) { _defaultUserDir = new File(System.getProperty("user.home"), ".ivy"); Message.verbose("no default ivy user dir defined: set to "+_defaultUserDir); } return _defaultUserDir; } |
plugin.setName("MetricInitializerPlugin"); | plugin.setName(MetricsInitializerPlugIn_name); | private void addInitPICD(ComponentData data) { GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName("MetricInitializerPlugin"); plugin.setClassName(MetricsInitializerPlugIn_name); plugin.addParameter(new Integer(numAgents)); // numProviders p... |
_md = new DefaultModuleDescriptor(_parser, _res); | protected void setResource(Resource res) { _md = new DefaultModuleDescriptor(_parser, _res); _res = res; // used for log and date only _md.setLastModified(getLastModified()); } | |
_md = new DefaultModuleDescriptor(_parser, res); | protected void setResource(Resource res) { _md = new DefaultModuleDescriptor(_parser, _res); _res = res; // used for log and date only _md.setLastModified(getLastModified()); } | |
log.error("Could not find: " + filename); | log.error("Could not find: " + filename, e); | public static String getPath(String filename) { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.util.Util"); ConfigFinder configFinder = ConfigFinder.getInstance(); File file = configFinder.locateFile(filename); String path = null; try { path = file.getCanonicalPath(); } catch (Ex... |
float result = bb.getFloat ((position () >> 2) + offset); | float result = bb.getFloat ((position () << 2) + offset); | public float get () { float result = bb.getFloat ((position () >> 2) + offset); position (position () + 1); return result; } |
bb.putFloat ((position () >> 2) + offset, value); | bb.putFloat ((position () << 2) + offset, value); position (position () + 1); | public FloatBuffer put (float value) { bb.putFloat ((position () >> 2) + offset, value); return this; } |
public abstract float get (); | public FloatBuffer get (float[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; } | public abstract float get (); |
WOActionResults result; result = template.invokeAction(worequest, wocontext); | WOActionResults result = template.invokeAction(worequest, wocontext); | public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOComponent component = wocontext.component(); WOElement template = template(component); wocontext._setCurrentComponent(component.parent()); WOActionResults result; result = template.invokeAction(woreq... |
gidString += attribute.name() + ": \'" + expression.formatValueForAttribute(value, attribute) + "\'" | String stringValue = expression.formatValueForAttribute(value, attribute); if("NULL".equals(stringValue)) { stringValue = "" + value; } gidString += attribute.name() + ": \'" + stringValue + "\'" | public boolean databaseContextFailedToFetchObject(EODatabaseContext context, Object object, EOGlobalID gid) { if (object!=null) { EOEditingContext ec = ((EOEnterpriseObject)object).editingContext(); // we need to refault the object before raising, otherwise, if the caller traps ... |
super.dispatchEventImpl(e); | dispatchEventImpl(AWTEvent e){ super.dispatchEventImpl(e); if (e.id <= ActionEvent.ACTION_LAST && e.id >= ActionEvent.ACTION_FIRST && (action_listeners != null || (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0)) processEvent(e);} | |
else super.dispatchEventImpl(e); | dispatchEventImpl(AWTEvent e){ super.dispatchEventImpl(e); if (e.id <= ActionEvent.ACTION_LAST && e.id >= ActionEvent.ACTION_FIRST && (action_listeners != null || (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0)) processEvent(e);} | |
this.log = support.getLog(); | public CommunityProvider(SimpleServletSupport support) { this.support = support; } | |
glut.glutSolidTorus(gl, 0.25f, 0.5f, 40, 20); | glut.glutSolidTeapot(gl, 0.8f); | public void init(GLDrawable drawable) { // init() might get called more than once if the GLCanvas is // added and removed, but we only want to install the DebugGL // pipeline once // if (!(drawable.getGL() instanceof DebugGL)) { // drawable.setGL(new DebugGL(drawable.getGL())); ... |
new TransformingClassGenerator(new ClassReaderGenerator(getClassReader(file), true), t).generateClass(w); | new TransformingClassGenerator(new ClassReaderGenerator(getClassReader(file), skipDebug()), t).generateClass(w); | protected void processFile(File file) throws Exception { ClassWriter w = new DebuggingClassWriter(true); String name = ClassNameReader.getClassName(getClassReader(file)); ClassTransformer t = getClassTransformer(name); if (t != null) { new TransformingClassGenerator(new ClassR... |
Message.info("\t"+new String(sep)); | Message.rawinfo("\t"+new String(sep)); | public void output(ResolveReport report, File destDir) { IvyNode[] evicted = report.getEvictedNodes(); if (evicted.length > 0) { Message.info("\t:: evicted modules:"); for (int i = 0; i < evicted.length; i++) { Collection allEvictingNodes = evicted[i].getAllEvictin... |
Message.info(line.toString()); | Message.rawinfo(line.toString()); | public void output(ResolveReport report, File destDir) { IvyNode[] evicted = report.getEvictedNodes(); if (evicted.length > 0) { Message.info("\t:: evicted modules:"); for (int i = 0; i < evicted.length; i++) { Collection allEvictingNodes = evicted[i].getAllEvictin... |
Message.info(line.toString()); Message.info("\t"+new String(sep)); | Message.rawinfo(line.toString()); Message.rawinfo("\t"+new String(sep)); | public void output(ResolveReport report, File destDir) { IvyNode[] evicted = report.getEvictedNodes(); if (evicted.length > 0) { Message.info("\t:: evicted modules:"); for (int i = 0; i < evicted.length; i++) { Collection allEvictingNodes = evicted[i].getAllEvictin... |
return ERXUtilities.localInstanceOfObject(editingContext(), eo); | return ERXEOControlUtilities.localInstanceOfObject(editingContext(), eo); | public EOEnterpriseObject localInstanceOf(EOEnterpriseObject eo) { return ERXUtilities.localInstanceOfObject(editingContext(), eo); } |
return ERXUtilities.localInstancesOfObjects(editingContext(), eos); | return ERXEOControlUtilities.localInstancesOfObjects(editingContext(), eos); | public NSArray localInstancesOf(NSArray eos) { return ERXUtilities.localInstancesOfObjects(editingContext(), eos); } |
objectToRemove.editingContext().deleteObject(objectToRemove); | try { objectToRemove.editingContext().deleteObject(objectToRemove); objectToRemove.validateForDelete(); } catch (NSValidation.ValidationException ex) { validationFailedWithException(ex, objectToRemove, key()); object().editingContext().revert(); } | public void deleteObject(EOEnterpriseObject objectToRemove) { removeObject(objectToRemove); if(objectToRemove.editingContext() != null) { objectToRemove.editingContext().deleteObject(objectToRemove); } } |
find_it (); System.out.println ("Ok"); | try { find_it (); } catch (Throwable _) { System.out.println ("Ok"); } | public static void main (String[] args) { find_it (); // If find_it() causes a crash, we won't be running this next line. System.out.println ("Ok"); } |
if (peer != null) peer.setBackground(background); | public void setBackground(Color c) { if (peer != null) peer.setBackground(c); this.background = c; if (peer != null) peer.setBackground(background); } | |
if (peer != null) peer.setEnabled(b); | public void setEnabled(boolean b) { this.enabled = b; } | |
if (peer != null) peer.setForeground(foreground); | public void setForeground(Color c) { if (peer != null) peer.setForeground(c); this.foreground = c; if (peer != null) peer.setForeground(foreground); } | |
modified = false; fireModification(new ModificationEvent(this, RECIPE_SAVED)); | public void initProperties() { super.initProperties(); propTargetComponent = addRecipeQueryProperty(PROP_TARGET_COMPONENT_QUERY, PROP_TARGET_COMPONENT_QUERY_DFLT); propTargetComponent.setToolTip(PROP_TARGET_COMPONENT_QUERY_DESC); } | |
ConfigurableComponent child = (ConfigurableComponent)getChild(i); | ComponentBase child = (ComponentBase)getChild(i); | public boolean saveToDatabase() { for(int i=0; i < getChildCount(); i ++) { ConfigurableComponent child = (ConfigurableComponent)getChild(i); if(child.getProperty(PROP_TARGET_COMPONENT_QUERY) != null) { addProperty(("$$CP=" + child.getProperty(PROP_TARGET_COMPONENT_QUERY).getName()), child.getProp... |
addProperty(("$$CP=" + child.getProperty(PROP_TARGET_COMPONENT_QUERY).getName()), child.getProperty(PROP_TARGET_COMPONENT_QUERY).getValue()); | addProperty(("$$CP=" + child.getComponentClassName() + "-" + i), child.getProperty(PROP_TARGET_COMPONENT_QUERY).getValue()); | public boolean saveToDatabase() { for(int i=0; i < getChildCount(); i ++) { ConfigurableComponent child = (ConfigurableComponent)getChild(i); if(child.getProperty(PROP_TARGET_COMPONENT_QUERY) != null) { addProperty(("$$CP=" + child.getProperty(PROP_TARGET_COMPONENT_QUERY).getName()), child.getProp... |
return super.saveToDatabase(); | boolean retVal = super.saveToDatabase(); Iterator iter = getProperties(); while(iter.hasNext()) { Property p = (Property)iter.next(); if(p.getName().last().toString().startsWith("$$CP")) { removeProperty(p); } } return retVal; | public boolean saveToDatabase() { for(int i=0; i < getChildCount(); i ++) { ConfigurableComponent child = (ConfigurableComponent)getChild(i); if(child.getProperty(PROP_TARGET_COMPONENT_QUERY) != null) { addProperty(("$$CP=" + child.getProperty(PROP_TARGET_COMPONENT_QUERY).getName()), child.getProp... |
if (badStartPattern != null && ! val.startsWith(badStartPattern)) | if (badStartPattern != null && val.startsWith(badStartPattern)) continue; if (val.equals("")) | public static String getListMatch(List listItems, String badStartPattern) { StringBuffer assemblyMatch = null; if (listItems != null && listItems.size() != 0) { assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = listItems.iterator(); boolean first = true; ... |
return assemblyMatch.toString(); | if (first) { return "is null"; } else { return assemblyMatch.toString(); } | public static String getListMatch(List listItems, String badStartPattern) { StringBuffer assemblyMatch = null; if (listItems != null && listItems.size() != 0) { assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = listItems.iterator(); boolean first = true; ... |
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); | GLCanvas canvas = new GLCanvas(); | public static void main(String[] args) { Frame frame = new Frame("ExaminerViewer Test"); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); frame.setLayout(new BorderLayout()); GLCanvas canvas = GLDrawableFactory.... |
ERXCompilerProxy.defaultProxy().setClassForName(ERXWOFileUpload.class, "WOFileUpload"); | public void installPatches() { if(contextClassName().equals("WOContext")) setContextClassName("er.extensions.ERXWOContext"); ERXCompilerProxy.defaultProxy().setClassForName(ERXWOForm.class, "WOForm"); ERXCompilerProxy.defaultProxy().setClassForName(ERXWOFileUpload.class, "WOFileUploa... | |
byte[] data = new byte [1]; data [0] = (byte) (oneByte & 0xff); write (data, 0, 1); | flush(); try { out.write (oneByte & 0xff); if (auto_flush && (oneByte == '\n')) flush (); } catch (IOException e) { setError (); } | public void write (int oneByte) { byte[] data = new byte [1]; data [0] = (byte) (oneByte & 0xff); write (data, 0, 1); } |
bool = new Integer(ERXUtilities.booleanValue(bool) ? 1 : 0); | bool = new Integer(ERXValueUtilities.booleanValue(bool) ? 1 : 0); | public Integer yesNoBoolean() { Object bool = object().valueForKeyPath(propertyKey()); bool = new Integer(ERXUtilities.booleanValue(bool) ? 1 : 0); return (Integer)bool; } |
return ERXUtilities.booleanValue(c.valueForKeyPath((String)booleanConditions.objectForKey("conditionKey"))) ? | return ERXValueUtilities.booleanValue(c.valueForKeyPath((String)booleanConditions.objectForKey("conditionKey"))) ? | public Object fireNow(D2WContext c) { NSDictionary booleanConditions = (NSDictionary)value(); if (log.isDebugEnabled()) log.debug("Resolving delayed fire for boolean conditions: " + booleanConditions); return ERXUtilities.booleanValue(c.valueForKeyPath((String)booleanConditions.objec... |
plugin.setName("org.cougaar.domain.mlm.plugin.organization.OrgDataPlugIn"); | plugin.setName("org.cougaar.mlm.plugin.organization.OrgDataPlugIn"); | public ComponentData addComponentData(ComponentData data) { if (this.getShortName().equals(data.getName())) { // Add the planserver plugin. GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName(planServer_name); plugin.... |
plugin.setClassName("org.cougaar.domain.mlm.plugin.organization.OrgDataPlugIn"); | plugin.setClassName("org.cougaar.mlm.plugin.organization.OrgDataPlugIn"); | public ComponentData addComponentData(ComponentData data) { if (this.getShortName().equals(data.getName())) { // Add the planserver plugin. GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName(planServer_name); plugin.... |
plugin.setName("org.cougaar.domain.mlm.plugin.organization.OrgReportPlugIn"); | plugin.setName("org.cougaar.mlm.plugin.organization.OrgReportPlugIn"); | public ComponentData addComponentData(ComponentData data) { if (this.getShortName().equals(data.getName())) { // Add the planserver plugin. GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName(planServer_name); plugin.... |
plugin.setClassName("org.cougaar.domain.mlm.plugin.organization.OrgReportPlugIn"); | plugin.setClassName("org.cougaar.mlm.plugin.organization.OrgReportPlugIn"); | public ComponentData addComponentData(ComponentData data) { if (this.getShortName().equals(data.getName())) { // Add the planserver plugin. GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName(planServer_name); plugin.... |
private static String getFieldName(int index) { return "CGLIB$MI$METHOD_" + index; | protected String getFieldName(Context context, Method method) { return "CGLIB$$METHOD_" + context.getUniqueName(method); | private static String getFieldName(int index) { return "CGLIB$MI$METHOD_" + index; } |
results.addObject( createExpression( entity, "DROP TABLE " + entity.externalName() ) ); | PostgresqlExpression result = new PostgresqlExpression(entity); String tableName = result.sqlStringForSchemaObjectName(entity.externalName()); result.setStatement("DROP TABLE " + tableName); results.addObject(result); | public NSArray dropTableStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; results = new NSMutableArray(); count = entityGroup.count(); for ( i = 0 ; i < count ; i++ ) { entity = (EOEntity)entityGroup... |
String tableName = expression.entity().externalName(); NSArray columNames = ( (NSArray) relationship.sourceAttributes().valueForKey( "columnName" ) ); String indexName = relationship.entity().externalName() + "_" + ( (NSArray) relationship.sourceAttributes().valueForKey( "columnName" ) ).componentsJoinedByString( "_" )... | String tableName = expression.sqlStringForSchemaObjectName(expression.entity().externalName()); NSArray columnNames = ( (NSArray) relationship.sourceAttributes().valueForKey( "columnName" ) ); StringBuffer sbColumnNames = new StringBuffer(); for(int j = 0; j < columnNames.count(); j++) { sbColumnNames.append(( j == 0 ?... | public NSArray foreignKeyConstraintStatementsForRelationship(EORelationship relationship) { NSArray superResults; NSMutableArray results; int count; int i; EOSQLExpression expression; results = new NSMutableArray(); superResults = super.foreignKeyConstraintStatements... |
tableName +"( "+ columNames.componentsJoinedByString( ", " ) +" )" ) ); | tableName +"( "+ sbColumnNames.toString() +" )" ) ); | public NSArray foreignKeyConstraintStatementsForRelationship(EORelationship relationship) { NSArray superResults; NSMutableArray results; int count; int i; EOSQLExpression expression; results = new NSMutableArray(); superResults = super.foreignKeyConstraintStatements... |
statement.append(entity.externalName()); | statement.append(tableName); | public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; int priKeyAttributeCount; int j; results = new NSMutable... |
statement.append(entity.externalName()); statement.append("_PK PRIMARY KEY ("); | statement.append(constraintName); statement.append(" PRIMARY KEY ("); | public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; int priKeyAttributeCount; int j; results = new NSMutable... |
statement.append(priKeyAttribute.columnName()); | String attributeName = result.sqlStringForAttribute(priKeyAttribute); statement.append(attributeName); | public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; int priKeyAttributeCount; int j; results = new NSMutable... |
results.addObject(createExpression(entity, statement.toString())); | result.setStatement(statement.toString()); results.addObject(result); | public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; int priKeyAttributeCount; int j; results = new NSMutable... |
+ "', (SELECT MAX(" + priKeyAttribute.columnName() + ") FROM " + entity.externalName() + "))"; | + "', (SELECT MAX(" + attributeName + ") FROM " + tableName + "))"; | public NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; String sequenceName; results = new NSMutableArray(); count ... |
sql = "ALTER TABLE "+ entity.externalName() +" ALTER COLUMN "+ priKeyAttribute.columnName() +" SET DEFAULT nextval( '"+ sequenceName+ "' )" ; | sql = "ALTER TABLE "+ tableName +" ALTER COLUMN "+ attributeName +" SET DEFAULT nextval( '"+ sequenceName+ "' )" ; | public NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; String sequenceName; results = new NSMutableArray(); count ... |
_actionUrl = context.componentActionURL(); | _actionUrl = AjaxUtils.ajaxComponentActionUrl(context); | public void appendToResponse(WOResponse response, WOContext context) { _dragResizeContainerID = (String) valueForBinding("id", AjaxUtils.toSafeElementID(context().elementID()) + "_DragResizeContainer"); _actionUrl = context.componentActionURL(); super.appendToResponse(response, context); } |
_nonSelectedTabClass = ""; | _nonSelectedTabClass = "nonSelectedTab"; | public Object nonSelectedTabClass() { if (_nonSelectedTabClass==null) { if (hasBinding("nonSelectedTabClass")) { _nonSelectedTabClass = (String)valueForBinding("nonSelectedTabClass"); } else { _nonSelectedTabClass = ""; } } return _... |
return "document."+formName+".submit(); return false;"; | return "document."+formName+".action=this.href; document."+formName+".submit(); return false;"; | public Object submitString() { String formName = ERXWOForm.formName(context(), "EditForm"); return "document."+formName+".submit(); return false;"; } |
_tabClass = ""; | _tabClass = "tab"; | public Object tabClass() { if (_tabClass==null) { if (hasBinding("tabClass")) { _tabClass = (String)valueForBinding("tabClass"); } else { _tabClass = ""; } } return _tabClass; } |
if (file != null || !file.exists()) | if (file != null) { | public void registerLastModifiedDateForFile(File file) { if (file != null || !file.exists()) _lastModifiedByFilePath.setObjectForKey(new Long(file.lastModified()), file.getAbsolutePath()); } |
} | public void registerLastModifiedDateForFile(File file) { if (file != null || !file.exists()) _lastModifiedByFilePath.setObjectForKey(new Long(file.lastModified()), file.getAbsolutePath()); } | |
if (obj == null) | if (obj == null) { | protected WOActionResults handleRequest(WORequest worequest, WOContext wocontext) { WOResponse result = AjaxUtils.createResponse(wocontext); WOComponent wocomponent = wocontext.component(); Object obj = valueForBinding("action", wocomponent); if (obj == null) obj = wocontext.page(); String onClick... |
if (empty) { if (i > 0) sbuf.append("::"); } else | if (i > 0) | public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 ... |
if (x != 0 || i >= 14) sbuf.append(Integer.toHexString(x)); | sbuf.append(Integer.toHexString(x)); | public String getHostAddress() { StringBuffer sbuf = new StringBuffer(40); for (int i = 0; i < 16; i += 2) { int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF); boolean empty = sbuf.length() == 0; if (empty) { if (i > 0) sbuf.append("::"); } else sbuf.append(':'); if (x != 0 ... |
(String)ComboDialog.showDialog(this, "Plugin", new Vector(sortedNames)); | (String)ComboDialog.showDialog(this, "Select Plugin or Enter New Name", new Vector(sortedNames)); | private void addPlugin() { // get plugins from all existing agents Enumeration components = componentToNode.keys(); ArrayList pluginNames = new ArrayList(); ArrayList pluginClasses = new ArrayList(); while (components.hasMoreElements()) { Object o = components.nextElement(); if (o instanceof ... |
} else if (throwable instanceof com.webobjects.eocontrol._private.TokenMgrError) { shouldQuit = false; | public void handlePotentiallyFatalException(Exception exception) { Throwable throwable = null; if (exception instanceof InvocationTargetException) { throwable = ((InvocationTargetException)exception).getTargetException(); } else if (exception instanceof NSForwardException ) { ... | |
peer = (ComponentPeer) getToolkit ().createWindow (this); | peer = getToolkit ().createWindow (this); | public void addNotify() { if (peer == null) // FIXME: This cast should NOT be required. ??? Compiler bug ??? peer = (ComponentPeer) getToolkit ().createWindow (this); super.addNotify (); } |
log.error("Exception writing to log file: ", e); | log.error("Exception writing to Node log file " + logFileName + ": ", e); | private void handleAll(java.util.List nodeEvents) { 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 = (NodeEvent)nodeEvents.get(i); if (logFil... |
return sb.toString(); | String str = sb.toString(); if (rule == null && ("$"+ruleType+"0").equals(str)) { return null; } return str; | private String applyTypeRule(String rule, String type, String ruleType, Matcher m) { if (m == null) { return rule; } String res = rule == null ? "$"+ruleType+"0" : rule; for (int i = 0; i < TYPES.length; i++) { if (TYPES[i].equals(type)) { ... |
return _entityContext.valueForKey("readOnly")==D2WModel.One || e.isReadOnly() || D2WUtils.readOnlyEntityNames(_entityContext).containsObject(e.name()); | return ERXValueUtilities.booleanValue(_entityContext.valueForKey("readOnly")) || e.isReadOnly() || D2WUtils.readOnlyEntityNames(_entityContext).containsObject(e.name()); | public boolean isEntityReadOnly(EOEntity e) { return _entityContext.valueForKey("readOnly")==D2WModel.One || e.isReadOnly() || D2WUtils.readOnlyEntityNames(_entityContext).containsObject(e.name()); } |
EOEnterpriseObject aNewEO=(EOEnterpriseObject)aClassDesc.createInstanceWithEditingContext(peerContext, null); peerContext.insertObject(aNewEO); | peerContext.lock(); | public WOComponent newObjectAction() { WOComponent nextPage=null; EOEntity entity=EOModelGroup.defaultGroup().entityNamed(_manipulatedEntityName); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); if (isEntityReadOnly(entity)) { ErrorPageInterface api=D2W.fa... |
EOEnterpriseObject localUser=EOUtilities.localInstanceOfObject(aNewEO.editingContext(), ((Session)session()).getUser()); aNewEO.addObjectToBothSidesOfRelationshipWithKey(localUser,"owner"); }else if (_manipulatedEntityName.equals("Bug")) { epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",sess... | EOEnterpriseObject localUser=EOUtilities.localInstanceOfObject(aNewEO.editingContext(), ((Session)session()).getUser()); aNewEO.addObjectToBothSidesOfRelationshipWithKey(localUser,"owner"); } else if (_manipulatedEntityName.equals("Bug")) { epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",ses... | public WOComponent newObjectAction() { WOComponent nextPage=null; EOEntity entity=EOModelGroup.defaultGroup().entityNamed(_manipulatedEntityName); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); if (isEntityReadOnly(entity)) { ErrorPageInterface api=D2W.fa... |
epi.setObject(aNewEO); epi.setNextPage(context().page()); nextPage=(WOComponent)epi; | } epi.setObject(aNewEO); epi.setNextPage(context().page()); nextPage=(WOComponent)epi; | public WOComponent newObjectAction() { WOComponent nextPage=null; EOEntity entity=EOModelGroup.defaultGroup().entityNamed(_manipulatedEntityName); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); if (isEntityReadOnly(entity)) { ErrorPageInterface api=D2W.fa... |
} finally { peerContext.unlock(); | public WOComponent newObjectAction() { WOComponent nextPage=null; EOEntity entity=EOModelGroup.defaultGroup().entityNamed(_manipulatedEntityName); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); if (isEntityReadOnly(entity)) { ErrorPageInterface api=D2W.fa... | |
nop("null_interceptor"); load_this(); load_args(); super_invoke(method); return_value(); | private void generateAroundMethod(Method method, String fieldName, String accessName, boolean forcePublic) { int modifiers = getDefaultModifiers(method); if (forcePublic) { modifiers = (modifiers & ~Modifier.PROTECTED) | Modifier.PUBLIC; } begin_method(method, modifiers); ... | |
Class[] argTypes = (Class[])constructorTypes.get(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); ... | |
push(argTypes); | push(types); | 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); ... |
constructorTypes = new ArrayList(constructorList.size()); | private void generateConstructors() throws NoSuchMethodException { constructorTypes = new ArrayList(constructorList.size()); for (Iterator i = constructorList.iterator(); i.hasNext();) { Constructor constructor = (Constructor)i.next(); Class[] types = constructor.getParameterType... | |
Class[] types = constructor.getParameterTypes(); List typeList = new ArrayList(types.length + 2); typeList.addAll(Arrays.asList(types)); typeList.add(MethodInterceptor.class); if (delegating) { typeList.add(Object.class); } Class[] argTypes = (Class[])typeList.toArray(new Class[typeList.size()]); constructorTypes.add(a... | begin_constructor(constructor); | private void generateConstructors() throws NoSuchMethodException { constructorTypes = new ArrayList(constructorList.size()); for (Iterator i = constructorList.iterator(); i.hasNext();) { Constructor constructor = (Constructor)i.next(); Class[] types = constructor.getParameterType... |
dup(); load_arg(types.length); putfield(INTERCEPTOR_FIELD); if (delegating) { dup(); load_arg(types.length + 1); checkcast(getSuperclass()); putfield(DELEGATE_FIELD); } load_args(0, types.length); | load_args(); | private void generateConstructors() throws NoSuchMethodException { constructorTypes = new ArrayList(constructorList.size()); for (Iterator i = constructorList.iterator(); i.hasNext();) { Constructor constructor = (Constructor)i.next(); Class[] types = constructor.getParameterType... |
generateFactoryMethod(DELEGATE_NEW_INSTANCE); | generateFactoryHelper(DELEGATE_NEW_INSTANCE); | private void generateFactory() { begin_method(GET_INTERCEPTOR); load_this(); getfield(INTERCEPTOR_FIELD); return_value(); end_method(); if (delegating) { throwWrongType(NORMAL_NEW_INSTANCE); throwWrongType(MULTIARG_NEW_INSTANCE); generateFac... |
generateFactoryMethod(NORMAL_NEW_INSTANCE); | generateFactoryHelper(NORMAL_NEW_INSTANCE); | private void generateFactory() { begin_method(GET_INTERCEPTOR); load_this(); getfield(INTERCEPTOR_FIELD); return_value(); end_method(); if (delegating) { throwWrongType(NORMAL_NEW_INSTANCE); throwWrongType(MULTIARG_NEW_INSTANCE); generateFac... |
invoke(PROXY_NEW_INSTANCE); | putfield(INTERCEPTOR_FIELD); | private void generateMultiArgFactory() { declare_field(PRIVATE_FINAL_STATIC, Map.class, CONSTRUCTOR_PROXY_MAP); begin_method(MULTIARG_NEW_INSTANCE); getfield(CONSTRUCTOR_PROXY_MAP); load_arg(0);// Class[] types invoke(NEW_CLASS_KEY);//key invoke(MethodConstants.MAP_GET);//... |
if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXGCPassword"))) { | if (canPerformActionWithPasswordKey("er.extensions.ERXGCPassword")) { | public WOComponent forceGCAction() { ERXStringHolder result=(ERXStringHolder)pageWithName("ERXStringHolder"); if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXGCPassword"))) { ... |
if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXLog4JPassword"))) { | if (canPerformActionWithPasswordKey("er.extensions.ERXLog4JPassword")) { | public WOComponent log4jAction() { WOComponent result=null; if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXLog4JPassword"))) { result=pageWithName("ERXLog4JConfiguration"... |
if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXRemoteShellPassword"))) { | if (canPerformActionWithPasswordKey("er.extensions.ERXRemoteShellPassword")) { | public WOComponent remoteShellAction() { WOComponent result=null; if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXRemoteShellPassword"))) { result=pageWithName("ERXRemo... |
if (ERXStringUtilities.stringIsNullOrEmpty(System.getProperty("er.extensions.ERXDirectAction.ChangeSystemPropertyPassword"))) { return null; } String key = request().stringFormValueForKey("key"); String value = request().stringFormValueForKey("value"); String password = request().stringFormValueForKey("password"); if ... | WOResponse r = null; if (canPerformActionWithPasswordKey("er.extensions.ERXDirectAction.ChangeSystemPropertyPassword")) { String key = request().stringFormValueForKey("key"); String value = request().stringFormValueForKey("value"); r = new WOResponse(); if (ERXStringUtilities.stringIsNullOrEmpty(key) ) { r.appendConten... | public WOActionResults systemPropertyAction() { if (ERXStringUtilities.stringIsNullOrEmpty(System.getProperty("er.extensions.ERXDirectAction.ChangeSystemPropertyPassword"))) { //returns null, do not give any feedback like password wrong or disabled return null; } String ke... |
if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXJUnitPassword"))) { | if (canPerformActionWithPasswordKey("er.extensions.ERXJUnitPassword")) { | public WOComponent testAction() { WOComponent result=null; if (!WOApplication.application().isCachingEnabled() || ERXExtensions.safeEquals(request().stringFormValueForKey("pw"), System.getProperty("er.extensions.ERXJUnitPassword"))) { result=pageWithName("ERXWOTestInt... |
if (log.isWarnEnabled()) { log.warn("Bug 1279: Child " + i + " is null in " + parent.getName()); | if (log.isErrorEnabled()) { log.error("Please report seeing Bug 1279: Child " + i + " out of " + parent.childCount() + " is null in " + parent.getName() + " while considering adding " + self.getName(), new Throwable()); | protected boolean alreadyAdded(final ComponentData parent, final ComponentData self) { if (self == null || parent == null) return true; ComponentData[] children = parent.getChildren(); if (children == null) return false; if (log.isDebugEnabled() && children.length != parent.childCount()) { ... |
try { Thread.sleep(1); } catch (InterruptedException e) { } | public void run() { while (!quit) { if (canvases.isEmpty()) { try { Thread.sleep(10); } catch (InterruptedException e) { } } else { for (Iterator iter = canvases.iterator(); iter.hasNext(); ) { GLJPanel panel = (GLJPanel) iter.next(); ... | |
quit = true; while (!animatorStopped) { try { Thread.sleep(1); } catch (InterruptedException e) { } } | private void runExit() { quit = true; while (!animatorStopped) { try { Thread.sleep(1); } catch (InterruptedException e) { } } // Note: calling System.exit() synchronously inside the draw, // reshape or init callbacks can lead to deadlocks on certain // platforms (in particular... | |
quit = true; while (!animatorStopped) { try { Thread.sleep(1); } catch (InterruptedException e) { } } | private void runExit() { quit = true; while (!animatorStopped) { try { Thread.sleep(1); } catch (InterruptedException e) { } } // Note: calling System.exit() synchronously inside the draw, // reshape or init callbacks can lead to deadlocks on certain // platforms (in particular... | |
quit = true; while (!animatorStopped) { try { Thread.sleep(1); } catch (InterruptedException e) { } } | public void run() { System.exit(0); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.