rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
listener = (SecurityRulesChangeListener)listeners[ i ]; listener.securityRuleRemoved( position ); | Object[] listeners = listenerList.toArray(); SecurityRulesChangeListener listener; for ( int i = listeners.length - 1; i >= 0; i-- ) { listener = (SecurityRulesChangeListener)listeners[ i ]; listener.securityRuleRemoved( position ); } | private void fireSecurityRuleRemoved( final int position ) { // invoke update in event dispatcher AsynchronousDispatcher.invokeLater( new Runnable() { public void run() { Object[] listeners = listenerList.toArray(); SecurityRulesChan... |
} }); | }, "SecurityRuleRemovedEvent"); | private void fireSecurityRuleRemoved( final int position ) { // invoke update in event dispatcher AsynchronousDispatcher.invokeLater( new Runnable() { public void run() { Object[] listeners = listenerList.toArray(); SecurityRulesChan... |
{ Object[] listeners = listenerList.toArray(); SecurityRulesChangeListener listener; for ( int i = listeners.length - 1; i >= 0; i-- ) | public void run() { Object[] listeners = listenerList.toArray(); SecurityRulesChangeListener listener; // Process the listeners last to first, notifying // those that are interested in this event for ( int i = listeners.le... | |
listener = (SecurityRulesChangeListener)listeners[ i ]; listener.securityRuleRemoved( position ); | Object[] listeners = listenerList.toArray(); SecurityRulesChangeListener listener; for ( int i = listeners.length - 1; i >= 0; i-- ) { listener = (SecurityRulesChangeListener)listeners[ i ]; listener.securityRuleRemoved( position ); } | public void run() { Object[] listeners = listenerList.toArray(); SecurityRulesChangeListener listener; // Process the listeners last to first, notifying // those that are interested in this event for ( int i = listeners.le... |
} | public void run() { Object[] listeners = listenerList.toArray(); SecurityRulesChangeListener listener; // Process the listeners last to first, notifying // those that are interested in this event for ( int i = listeners.le... | |
return s.getFilePath(); | return s.getFilePath().child("workspace").child(getName()); | public FilePath getWorkspace() { Slave s = getSlave(); if(s ==null) return new FilePath(new File(root,"workspace")); else return s.getFilePath(); } |
this.setSize(550, 400); | this.setSize(600, 530); | private void initGUI() { try { GridBagLayout thisLayout = new GridBagLayout(); thisLayout.columnWeights = new double[] {0.1, 0.1, 0.1}; thisLayout.columnWidths = new int[] {7, 7, 7}; thisLayout.rowWeights = new double[] {0.1, 0.8, 0.1, 0.1, 0.1, 0.1}; thisLayout.rowHeights = new int[] {7, 7, 7, 7, 7, 7}; ... |
return df.format(data.getNoteDate(row)); | return SBStringUtils.dateFormatShort.format(data.getNoteDate(row)); | public Object getValueAt(int row, int col) { try { switch (col) { case 0 : return df.format(data.getNoteDate(row)); case 1 : return data.getNoteType(row); case 2 : return data.getNoteNote(row); } } catch (Exception e) { }; return ""; } |
case 0 : try { Date d = df.parse(value.toString()); data.setNoteDate(row, d); } catch(ParseException e) { System.out.println("Unable to parse " + value.toString()); } | case 0 : try { Date d = SBStringUtils.dateFormatShort.parse(value.toString()); data.setNoteDate(row, d); } catch (ParseException e) { System.out.println("Unable to parse " + value.toString()); } | public void setValueAt(Object value, int row, int col) { try { switch (col) { case 0 : try { Date d = df.parse(value.toString()); data.setNoteDate(row, d); } catch(ParseException e) { System.out.println("Unable to par... |
} if( isSetSearchListVisible ) { writer.startElm( "is-searchlist-visible", null ); writer.elmBol( isSearchListVisible ); writer.endElm( "is-searchlist-visible" ); } if( isSetSearchFilterPanelVisible ) { writer.startElm( "is-searchfilterpanel-visible", null ); writer.elmBol( isSearchFilterPanelVisible ); writer.endElm... | public void serialize( PhexXmlSaxWriter writer ) throws SAXException { writer.startElm( ELEMENT_NAME, null ); if( lookAndFeelClass != null ) { writer.startElm( "look-and-feel-class", null ); writer.elmText( lookAndFeelClass ); writer.endElm( "look-and... | |
owner.createHttpAdapter(name, urlPattern, endpoint); | owner.createAdapter(name, urlPattern, endpoint); | public void create(ServletAdapterList owner) { String name = beanName; if(name==null) name=urlPattern; owner.createHttpAdapter(name, urlPattern, endpoint); } |
return Math.abs(((Number)param1).doubleValue()-((Number)param1).doubleValue()) | return Math.abs(((Number)param1).doubleValue()-((Number)param2).doubleValue()) | private boolean equal(Object param1, Object param2) throws Exception { double tolerance = 1e-15; if ((param1 instanceof Complex) && (param2 instanceof Complex)) { return ((Complex)param1).equals((Complex)param2, tolerance); } if ((param1 instanceof Complex) && (param2 instanceof Number)) { return ((Complex)par... |
throws UnsupportedEncodingException | throws InvalidMessageException | public int deserialize(byte[] inbuf, int offset) throws UnsupportedEncodingException { fileIndex = IOUtil.deserializeIntLE(inbuf, offset); offset += 4; fileSize = IOUtil.deserializeIntLE(inbuf, offset); offset += 4; // Handle Gnotella termination of single null terminated f... |
fileName = new String( inbuf, offset, firstTerminatorIdx - offset, "UTF-8" ); | try { fileName = new String( inbuf, offset, firstTerminatorIdx - offset, "UTF-8" ); } catch ( UnsupportedEncodingException exp ) { NLogger.error(NLoggerNames.GLOBAL, exp ); throw new RuntimeException( exp ); } | public int deserialize(byte[] inbuf, int offset) throws UnsupportedEncodingException { fileIndex = IOUtil.deserializeIntLE(inbuf, offset); offset += 4; fileSize = IOUtil.deserializeIntLE(inbuf, offset); offset += 4; // Handle Gnotella termination of single null terminated f... |
NLogger.debug( MsgManager.class, "Updating QRTable for: " + hosts[i] ); | NLogger.debug( Host.class, "Updating QRTable for: " + hosts[i] ); | private void sendQueryRoutingTable() { boolean isUltrapeer = hostMgr.isUltrapeer(); // check if we are a shilded leaf node or a Ultrapeer. // Forwarding QRT is not wanted otherwise. if ( !( hostMgr.isShieldedLeafNode() || isUltrapeer ) ) { return; } Host[] hosts = hostsContainer.getUltrapeerConnecti... |
Iterator msgIterator = QueryRoutingTable.buildRouteTableUpdateMsgIterator( | Iterator<RouteTableUpdateMsg> msgIterator = QueryRoutingTable.buildRouteTableUpdateMsgIterator( | private void sendQueryRoutingTable() { boolean isUltrapeer = hostMgr.isUltrapeer(); // check if we are a shilded leaf node or a Ultrapeer. // Forwarding QRT is not wanted otherwise. if ( !( hostMgr.isShieldedLeafNode() || isUltrapeer ) ) { return; } Host[] hosts = hostsContainer.getUltrapeerConnecti... |
msg = (RouteTableUpdateMsg) msgIterator.next(); | msg = msgIterator.next(); | private void sendQueryRoutingTable() { boolean isUltrapeer = hostMgr.isUltrapeer(); // check if we are a shilded leaf node or a Ultrapeer. // Forwarding QRT is not wanted otherwise. if ( !( hostMgr.isShieldedLeafNode() || isUltrapeer ) ) { return; } Host[] hosts = hostsContainer.getUltrapeerConnecti... |
msgDispatcher = new MessageDispatcher(); | public boolean onPostInitialization() { hostMgr = HostManager.getInstance(); hostsContainer = hostMgr.getNetworkHostsContainer(); queryMgr = QueryManager.getInstance(); Environment.getInstance().scheduleTimerTask( new QRPUpdateTimer(), QRPUpdateTimer.TIMER_PERIOD, QRPUpdateTimer.TIMER_... | |
public void pingHost( Host host, byte ttl ) | public void pingHost( Host host ) | public void pingHost( Host host, byte ttl ) { // Send ping msg. PingMsg pingMsg = new PingMsg(); pingMsg.getHeader().setTTL( ttl ); checkAndAddToPingRoutingTable( pingMsg.getHeader().getMsgID(), Host.LOCAL_HOST ); if ( NLogger.isDebugEnabled( NLoggerNames.OUTGOING_ME... |
PingMsg pingMsg = new PingMsg(); pingMsg.getHeader().setTTL( ttl ); checkAndAddToPingRoutingTable( pingMsg.getHeader().getMsgID(), Host.LOCAL_HOST ); if ( NLogger.isDebugEnabled( NLoggerNames.OUTGOING_MESSAGES ) ) NLogger.debug( NLoggerNames.OUTGOING_MESSAGES, "Queueing Ping: " + pingMsg.getDebugString() + " - " + ping... | pingHost( host, (byte)1 ); | public void pingHost( Host host, byte ttl ) { // Send ping msg. PingMsg pingMsg = new PingMsg(); pingMsg.getHeader().setTTL( ttl ); checkAndAddToPingRoutingTable( pingMsg.getHeader().getMsgID(), Host.LOCAL_HOST ); if ( NLogger.isDebugEnabled( NLoggerNames.OUTGOING_ME... |
throws InvalidMessageException | public synchronized void processQueryResponse(Host remoteHost, QueryResponseMsg msg) { queryMgr.getSearchContainer().processQueryResponse( msg ); queryMgr.getBackgroundSearchContainer().processQueryResponse( msg ); // snoop download candidates and monitor passive searches. que... | |
while(r!=null && r.getResult()==null && (r.isBuilding() || r.getResult().isWorseThan(Result.UNSTABLE))) | while(r!=null && (r.isBuilding() || r.getResult()==null || r.getResult().isWorseThan(Result.UNSTABLE))) | public synchronized RunT getLastSuccessfulBuild() { RunT r = getLastBuild(); // temporary hack till we figure out what's causing this bug while(r!=null && r.getResult()==null && (r.isBuilding() || r.getResult().isWorseThan(Result.UNSTABLE))) r=r.getPreviousBuild(); return r; ... |
try { path = new File(".").getCanonicalPath() + slash + "recipes"; Debug.print("Recipes path:" + path); } catch (Exception e) { e.printStackTrace(); } | public StrangeSwing() { super(); initGUI(); // There has *got* to be a better way to do this: Database db = new Database(); String path = ""; String slash = System.getProperty("file.separator"); try { path = new File(".").getCanonicalPath() + slash + "src" + slash + "ca" + slash + "strangebrew" + slash + ... | |
sbFileFilter saveFileFilter = new sbFileFilter(ext, "XML"); | sbFileFilter saveFileFilter = new sbFileFilter(ext, "StrangeBrew XML"); | private void saveAs() { // Show save dialog; this method does // not return until the dialog is closed String[] ext = {"xml"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "XML"); fileChooser.setFileFilter(saveFileFilter); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChoos... |
fileChooser.setSelectedFile(new File(myRecipe.getName() + ".xml")); | private void saveAs() { // Show save dialog; this method does // not return until the dialog is closed String[] ext = {"xml"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "XML"); fileChooser.setFileFilter(saveFileFilter); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChoos... | |
private NodeFactory() {} | public NodeFactory(XJep xj) {this.xj=xj;} | private NodeFactory() {} |
String fileName = seisurl.getFile(); if (fileName.substring(fileName.length() - 3, fileName.length()).equals("psn")){ PSNDataFile psnData = new PSNDataFile(fileName); seis = PSNToFissures.getSeismograms(psnData)[0]; | if (isPSN()){ psnDataFile = new PSNDataFile(seisurl.getFile()); seis = PSNToFissures.getSeismograms(psnDataFile)[0]; | private LocalSeismogramImpl getSeismogram(URL seisurl) throws IOException, FissuresException { Object obj = urlToLSMap.get(seisurl); if (obj instanceof SoftReference) { Object ref = ((SoftReference)obj).get(); if (ref != null) { obj = ref; } else ... |
SacTimeSeries sac = new SacTimeSeries(); sac.read(new DataInputStream(new BufferedInputStream(seisurl.openStream()))); seis = SacToFissures.getSeismogram(sac); | sacTime = new SacTimeSeries(); sacTime.read(new DataInputStream(new BufferedInputStream(seisurl.openStream()))); seis = SacToFissures.getSeismogram(sacTime); | private LocalSeismogramImpl getSeismogram(URL seisurl) throws IOException, FissuresException { Object obj = urlToLSMap.get(seisurl); if (obj instanceof SoftReference) { Object ref = ((SoftReference)obj).get(); if (ref != null) { obj = ref; } else ... |
} else if (currentElement.equalsIgnoreCase("RECIPE_DATE")) { DateFormat df = new SimpleDateFormat("MM/dd/yyyy"); try { Date d = df.parse(s); r.setCreated(d); } catch(ParseException e) { System.out.println("Unable to parse " + s); } | void sbCharacters(String s){ if (currentList.equals("FERMENTABLES")) { if (currentElement.equalsIgnoreCase("MALT")) { m.setName(s); } else if (currentElement.equalsIgnoreCase("AMOUNT")) { m.setAmount(Double.parseDouble(s)); } else if (currentElement.equalsIgnoreCase("POINTS")) { m.setPppg(Double.parseD... | |
reset(mock); | public void testSwitchAuthorizedUserSuccess() { Credential credential = new Credential(); User[] users = createUsersWithSameCredential(credential, 2); UserLog userLog = new UserLog(); userLog.setUser(users[0]); UserDetailsAdapter secureUser = new UserDetailsAdapter... | |
this.builds = new RunMap<Build>(); | protected void onLoad(Hudson root, String name) throws IOException { super.onLoad(root, name); if(triggers==null) // it didn't exist in < 1.28 triggers = new Vector<Trigger>(); this.builds.load(this,new Constructor<Build>() { public Build create(File dir) throws... | |
if(scm==null) return false; | if(scm==null) { listener.getLogger().println("No SCM"); return false; } | public boolean pollSCMChanges( TaskListener listener ) { if(scm==null) return false; // no SCM FilePath workspace = getWorkspace(); if(!workspace.exists()) return false; try { // TODO: do this by using the right slave return scm.pollChanges(this, new Launcher(li... |
if(!workspace.exists()) return false; | if(!workspace.exists()) { listener.getLogger().println("No workspace is available, so can't check for updates."); listener.getLogger().println("Scheduling a new build to get a workspace."); return true; } | public boolean pollSCMChanges( TaskListener listener ) { if(scm==null) return false; // no SCM FilePath workspace = getWorkspace(); if(!workspace.exists()) return false; try { // TODO: do this by using the right slave return scm.pollChanges(this, new Launcher(li... |
return ((Comparable) value).compareTo((Comparable) c.value); | return ((Comparable) value).compareTo(c.value); | public int compareTo(Constant c) { return ((Comparable) value).compareTo((Comparable) c.value); } |
return myOpenFileDialog.getFileName(); | return myOpenFileDialog.getFilterPath().concat("/").concat( myOpenFileDialog.getFileName()); | public String getOpenFilename() { myOpenFileDialog.open(); return myOpenFileDialog.getFileName(); } |
if(!CVSSCM.this.run(new Launcher(listener),"cvs tag -R "+tagName,listener,new FilePath(destdir,m))) { | if(!CVSSCM.this.run(new Launcher(listener),"cvs tag -R "+tagName,listener,new FilePath(destdir).child(m))) { | public void run() { BuildListener listener = new StreamBuildListener(log); Result result = Result.FAILURE; File destdir = null; listener.started(); try { destdir = Util.createTempDir(); // unzip ... |
public CVSChangeLogSet parse(File changelogFile) throws IOException, SAXException { | public CVSChangeLogSet parse(Build build, File changelogFile) throws IOException, SAXException { | public CVSChangeLogSet parse(File changelogFile) throws IOException, SAXException { return CVSChangeLogSet.parse(changelogFile); } |
public Part partFactory(String partNumber, String partName) { return null; | public Part partFactory(Entity entity, String partNumber, String partName) { return partFactory(entity, partNumber, partName, false); | public Part partFactory(String partNumber, String partName) { // TODO Auto-generated method stub return null; } |
public Part partWithDrawingFactory(String drawingNumber, String drawingName) { return null; | public Part partWithDrawingFactory(Entity entity, String drawingNumber, String drawingName) { return partFactory(entity, drawingNumber, drawingName, true); | public Part partWithDrawingFactory(String drawingNumber, String drawingName) { // TODO Auto-generated method stub return null; } |
processView("identity/details.ftl"); | processView("identity/details.ftl", model, true); | public void testDetailsView() throws Exception { processView("identity/details.ftl"); } |
processView("identity/principal.ftl"); | processView("identity/principal.ftl", model, true); | public void testPrincipalView() throws Exception { processView("identity/principal.ftl"); } |
if (param instanceof Number) | if (param instanceof Complex) { return ((Complex)param).log(); } else if (param instanceof Number) | public Object ln(Object param) throws ParseException { if (param instanceof Number) { // TODODONE: think about only returning Complex if param is <0 double num = ((Number) param).doubleValue(); if( num > 0) return new Double(Math.log(num)); else { Complex temp = new Complex(num); return temp.log... |
else if (param instanceof Complex) { return ((Complex)param).log(); } | public Object ln(Object param) throws ParseException { if (param instanceof Number) { // TODODONE: think about only returning Complex if param is <0 double num = ((Number) param).doubleValue(); if( num > 0) return new Double(Math.log(num)); else { Complex temp = new Complex(num); return temp.log... | |
if ((param1 instanceof Complex) && (param2 instanceof Double)) | if ((param1 instanceof Complex) && (param2 instanceof Number)) | public boolean eq(Object param1, Object param2) throws ParseException { if ((param1 instanceof Complex) && (param2 instanceof Complex)) { return ((Complex)param1).equals((Complex)param2, tolerance); } if ((param1 instanceof Complex) && (param2 instanceof Double)) { return ((Complex)param1).equals(new Complex(... |
if ((param2 instanceof Complex) && (param1 instanceof Double)) | if ((param2 instanceof Complex) && (param1 instanceof Number)) | public boolean eq(Object param1, Object param2) throws ParseException { if ((param1 instanceof Complex) && (param2 instanceof Complex)) { return ((Complex)param1).equals((Complex)param2, tolerance); } if ((param1 instanceof Complex) && (param2 instanceof Double)) { return ((Complex)param1).equals(new Complex(... |
if ((param1 instanceof Complex) && (param2 instanceof Double)) | if ((param1 instanceof Complex) && (param2 instanceof Number)) | public boolean ne(Object param1, Object param2) throws ParseException { if ((param1 instanceof Complex) && (param2 instanceof Complex)) { return !((Complex)param1).equals((Complex)param2, tolerance); } if ((param1 instanceof Complex) && (param2 instanceof Double)) { return !((Complex)param1).equals(new Comple... |
if ((param2 instanceof Complex) && (param1 instanceof Double)) | if ((param2 instanceof Complex) && (param1 instanceof Number)) | public boolean ne(Object param1, Object param2) throws ParseException { if ((param1 instanceof Complex) && (param2 instanceof Complex)) { return !((Complex)param1).equals((Complex)param2, tolerance); } if ((param1 instanceof Complex) && (param2 instanceof Double)) { return !((Complex)param1).equals(new Comple... |
SearchContainer searchContainer = QueryManager.getInstance().getSearchContainer(); searchContainer.removeSearch( btn.search ); | btn.searchTab.closeSearch( btn.search ); } else { super.mouseReleased(e); | public void mouseReleased(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e) ) { AbstractButton b = (AbstractButton) e.getSource(); if ( b.isSelected() ) { int w = closeIcon.getIco... |
super.mouseReleased(e); | public void mouseReleased(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e) ) { AbstractButton b = (AbstractButton) e.getSource(); if ( b.isSelected() ) { int w = closeIcon.getIco... | |
public SearchButton( Search search ) | public SearchButton( Search search, SearchTab searchTab ) | public SearchButton( Search search ) { super( ); this.search = search; search.addSearchChangeListener(this); updateButtonDisplay(); setUI( new SearchButtonUI() ); setBorder( GUIUtils.ROLLOVER_BUTTON_BORDER ); setRolloverEnabled( true ); setHorizonta... |
this.searchTab = searchTab; | public SearchButton( Search search ) { super( ); this.search = search; search.addSearchChangeListener(this); updateButtonDisplay(); setUI( new SearchButtonUI() ); setBorder( GUIUtils.ROLLOVER_BUTTON_BORDER ); setRolloverEnabled( true ); setHorizonta... | |
BuildListener listener=null; try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile())); listener = new BuildListener() { final PrintWriter pw = new PrintWriter(new CloseProofOutputStream(log),true); | try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile())); listener = new BuildListener() { final PrintWriter pw = new PrintWriter(new CloseProofOutputStream(log),true); | protected final void run(Runner job) { if(result!=null) return; // already built. state = State.BUILDING; long start = System.currentTimeMillis(); BuildListener listener=null; try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile()... |
Writer w = listener.fatalError(e.getMessage()); if(w!=null) { try { e.printStackTrace(new PrintWriter(w)); w.close(); } catch (IOException e1) { | Writer w = listener.fatalError(e.getMessage()); if(w!=null) { try { e.printStackTrace(new PrintWriter(w)); w.close(); } catch (IOException e1) { } | protected final void run(Runner job) { if(result!=null) return; // already built. state = State.BUILDING; long start = System.currentTimeMillis(); BuildListener listener=null; try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile()... |
result = Result.FAILURE; } | protected final void run(Runner job) { if(result!=null) return; // already built. state = State.BUILDING; long start = System.currentTimeMillis(); BuildListener listener=null; try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile()... | |
long end = System.currentTimeMillis(); duration = end-start; state = State.COMPLETED; | long end = System.currentTimeMillis(); duration = end-start; | protected final void run(Runner job) { if(result!=null) return; // already built. state = State.BUILDING; long start = System.currentTimeMillis(); BuildListener listener=null; try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile()... |
try { LogRotator lr = getParent().getLogRotator(); if(lr!=null) lr.perform(getParent()); } catch (IOException e) { e.printStackTrace(); | try { LogRotator lr = getParent().getLogRotator(); if(lr!=null) lr.perform(getParent()); } catch (IOException e) { e.printStackTrace(); } } finally { state = State.COMPLETED; | protected final void run(Runner job) { if(result!=null) return; // already built. state = State.BUILDING; long start = System.currentTimeMillis(); BuildListener listener=null; try { final PrintStream log = new PrintStream(new FileOutputStream(getLogFile()... |
CaseResult(Element testCase) { className = testCase.attributeValue("classname"); | CaseResult(SuiteResult parent, Element testCase) { String cn = testCase.attributeValue("classname"); if(cn==null) cn = parent.getName(); className = cn; | CaseResult(Element testCase) { className = testCase.attributeValue("classname"); testName = testCase.attributeValue("name"); errorStackTrace = getError(testCase); } |
public MultiplyDiffRule(String inName) { name = inName; } | private MultiplyDiffRule() {} | public MultiplyDiffRule(String inName) { //dv = inDv; name = inName; } |
public DivideDiffRule(String inName) { name = inName; } | private DivideDiffRule() {} | public DivideDiffRule(String inName) { //dv = inDv; name = inName; } |
public PowerDiffRule(String inName) { name = inName; } | private PowerDiffRule() {} | public PowerDiffRule(String inName) { name = inName; } |
public MacroDiffRules(DJep djep,String inName,String rule) throws ParseException | public MacroDiffRules(DJep djep,String inName,Node node) throws ParseException | public MacroDiffRules(DJep djep,String inName,String rule) throws ParseException { this(djep,inName,djep.getFunctionTable().get(inName),rule); } |
this(djep,inName,djep.getFunctionTable().get(inName),rule); | name = inName; pfmc = djep.getFunctionTable().get(inName); if(pfmc!=null) { int nParam = pfmc.getNumberOfParameters(); if(nParam != 1) throw new ParseException("Number of rules must match number of parameters for "+inName+" which is "+nParam); } rules = new Node[1]; rules[0] = node; | public MacroDiffRules(DJep djep,String inName,String rule) throws ParseException { this(djep,inName,djep.getFunctionTable().get(inName),rule); } |
public Variable makeVarIfNeeded(String name) | public Variable makeVarIfNeeded(String name,Object val) | public Variable makeVarIfNeeded(String name) { Variable var = (Variable) super.get(name); if(var != null) return var; var = createVariable(name); super.put(name,var); return var; } |
if(var != null) return var; var = createVariable(name); | if(var != null) { if(var.isConstant()) throw new IllegalStateException("Attempt to change the value of constant variable "+name); var.setValue(val); return var; } var = createVariable(name,val); | public Variable makeVarIfNeeded(String name) { Variable var = (Variable) super.get(name); if(var != null) return var; var = createVariable(name); super.put(name,var); return var; } |
public void persistPersonalData(PersonalData personalData) { userDao.persistPersonalData(personalData); | public void persistPersonalData(SecureUserDetails secureUserDetails) { userDao.persistCredential(secureUserDetails.getCredential()); | public void persistPersonalData(PersonalData personalData) { userDao.persistPersonalData(personalData); } |
BuildStep.PUBLISHERS.add(SQETestResultPublisher.DESCRIPTOR); | BuildStep.PUBLISHERS.add(0,SQETestResultPublisher.DESCRIPTOR); | public void start() throws Exception { BuildStep.PUBLISHERS.add(SQETestResultPublisher.DESCRIPTOR); } |
SWDownloadFile file = (SWDownloadFile) iterator.next(); list.add( file.createXJBSWDownloadFile() ); | try { SWDownloadFile file = (SWDownloadFile) iterator.next(); list.add( file.createXJBSWDownloadFile() ); } catch ( Throwable th ) { NLogger.error(SwarmingManager.class, th); } | private XJBSWDownloadList createXJBSWDownloadList() throws JAXBException { ObjectFactory objFactory = new ObjectFactory(); XJBSWDownloadList swDownloadList = objFactory.createXJBSWDownloadList(); synchronized( downloadList ) { Iterator... |
file = (SWDownloadFile)urnToDownloadMap.get( matchURN ); | file = urnToDownloadMap.get( matchURN ); | public SWDownloadFile getDownloadFileByURN( URN matchURN ) { SWDownloadFile file; synchronized( downloadList ) { file = (SWDownloadFile)urnToDownloadMap.get( matchURN ); return file; } } |
if(ampConfig instanceof AmpConfigRegistrar) ampConfig.removeAmpSyncListener(this); | ampConfig.removeAmpSyncListener(this); | public void setRegistrar(AmpConfigRegistrar ampConfig){ if(ampConfig instanceof AmpConfigRegistrar) ampConfig.removeAmpSyncListener(this); this.ampConfig = ampConfig; Iterator e = seismograms.iterator(); while(e.hasNext()) ampConfig.addSeismogram(((LocalSeismogram)e.next())); ampConfig.addAmpSyncListener(t... |
if (topNode != null) { errorList.clear(); | if (topNode != null && !hasError()) { | public Object getValueAsObject() { Object result; if (topNode != null) { // errorList.clear(); // evaluate the expression try { result = EvaluatorVisitor.getInstance().getValue(topNode,errorList); } catch (Exception e) { if (debug) System.out.println(e); return null; } return result; ... |
rsp.sendRedirect(req.getContextPath()+"/"); | rsp.sendRedirect2(req.getContextPath()+"/"); | public synchronized void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException { if(!Hudson.adminCheck(req,rsp)) return; owner.deleteView(this); rsp.sendRedirect(req.getContextPath()+"/"); } |
public AdditionDiffRule(String inName) { name = inName; } | private AdditionDiffRule() { } | public AdditionDiffRule(String inName) { //dv = inDv; name = inName; } |
Hop h = ((Hop) hops.get(i)); if (h.getAdd().equalsIgnoreCase("boil") || h.getAdd().equalsIgnoreCase("fwh")) { | Hop h = ((Hop) hops.get(i)); | public void calcHopsTotals() { if (!allowRecalcs) return; double ibuTotal = 0; totalHopsCost = 0; totalHopsOz = 0; for (int i = 0; i < hops.size(); i++) { // calculate the average OG of the boil // first, the OG at the time of addition: double adjPreSize, aveOg = 0; Hop h = ((Hop) hops.get(i)); if (h.... |
if (h.getMinutes() > 0) adjPreSize = postBoilVol.getValueAs("gal") + (preBoilVol.getValueAs("gal") - postBoilVol.getValueAs("gal")) / (boilMinutes / h.getMinutes()); else adjPreSize = postBoilVol.getValueAs("gal"); aveOg = 1 + (((estOg - 1) + ((estOg - 1) / (adjPreSize / postBoilVol .getValueAs("gal")))) / 2); if (ibuC... | int time = h.getMinutes(); if (h.getAdd().equalsIgnoreCase("FWH")) { time = time - fwhTime; } else if (h.getAdd().equalsIgnoreCase("Mash")) { time = mashHopTime; } else if (h.getAdd().equalsIgnoreCase("Dry")) { time = dryHopTime; } | public void calcHopsTotals() { if (!allowRecalcs) return; double ibuTotal = 0; totalHopsCost = 0; totalHopsOz = 0; for (int i = 0; i < hops.size(); i++) { // calculate the average OG of the boil // first, the OG at the time of addition: double adjPreSize, aveOg = 0; Hop h = ((Hop) hops.get(i)); if (h.... |
} ibuTotal += h.getIBU(); | if (h.getMinutes() > 0) adjPreSize = postBoilVol.getValueAs("gal") + (preBoilVol.getValueAs("gal") - postBoilVol.getValueAs("gal")) / (boilMinutes / h.getMinutes()); else adjPreSize = postBoilVol.getValueAs("gal"); aveOg = 1 + (((estOg - 1) + ((estOg - 1) / (adjPreSize / postBoilVol.getValueAs("gal")))) / 2); if (ibu... | public void calcHopsTotals() { if (!allowRecalcs) return; double ibuTotal = 0; totalHopsCost = 0; totalHopsOz = 0; for (int i = 0; i < hops.size(); i++) { // calculate the average OG of the boil // first, the OG at the time of addition: double adjPreSize, aveOg = 0; Hop h = ((Hop) hops.get(i)); if (h.... |
ibuTotal += h.getIBU(); | public void calcHopsTotals() { if (!allowRecalcs) return; double ibuTotal = 0; totalHopsCost = 0; totalHopsOz = 0; for (int i = 0; i < hops.size(); i++) { // calculate the average OG of the boil // first, the OG at the time of addition: double adjPreSize, aveOg = 0; Hop h = ((Hop) hops.get(i)); if (h.... | |
OperatorSet opSet = xj.getOperatorSet(); TreeUtils tu = xj.getTreeUtils(); | public Node apply(ASTFunNode node, Node[] children) throws ParseException { OperatorSet opSet = xj.getOperatorSet(); TreeUtils tu = xj.getTreeUtils(); Operator lhsOp = tu.getOperator(children[0]); Operator rhsOp = tu.getOperator(children[1]); if(lhsOp == opSet.getAdd() || lhsOp == opSet.getSubtract()) { /* (... | |
funTab.put("complex", new ComplexPFMC()); funTab.put("polar", new Polar()); | public void addComplex() { //add constants to Symbol Table symTab.addConstant("i", new Complex(0,1)); funTab.put("re", new Real()); funTab.put("im", new Imaginary()); funTab.put("arg", new Arg()); funTab.put("cmod", new Abs()); } | |
TimerTask task = new TimerTask() { public void run() { try { DestAddress address = remoteFile.getHostAddress(); PhexSecurityManager securityMgr = PhexSecurityManager.getInstance(); ExpiryDate expDate = ExpiryDate.getExpiryDate( System.currentTimeMillis() + DateUtils.MILLIS_PER_DAY * 7 ); securityMgr.createIPAccessRule(... | remoteFile.setFilteredRemoved(true); ExpiryDate expDate = ExpiryDate.getExpiryDate(System .currentTimeMillis() + DateUtils.MILLIS_PER_DAY * 7); BanHostBatch.addDestAddress(remoteFile.getHostAddress(), expDate); | public void invoke( Search search, final RemoteFile remoteFile ) { TimerTask task = new TimerTask() { public void run() { try { DestAddress address = remoteFile.getHostAddress(); PhexSecurityManager securityMg... |
if ((errorStr = myParser.getErrorInfo()) != null) { println("Error while parsing line " + lineCount + ": " + errorStr); | errorStr = myParser.getErrorInfo(); if ((value == null) || (errorStr != null)) { println("Error while evaluating line " + lineCount + ": " + errorStr); | private Complex parseNextLine(BufferedReader reader) { Complex value; String line, errorStr; // cycle till a valid line is found do { try { line = reader.readLine(); lineCount++; } catch (Exception e) { return null; } if (line==null) return null; } while (line.length()==0 || line.trim().charAt(... |
public Number getRootVal() { | public Complex getRootVal() { | public Number getRootVal() { return rootVal; } |
public void setRootVal(Number complex) { | public void setRootVal(Complex complex) { | public void setRootVal(Number complex) { rootVal = complex; } |
credential = AuthenticationCreator.credentialFactory(null, ""); | Identity identity = AuthenticationCreator.identityFactory("", ""); credential = AuthenticationCreator.credentialFactory(identity, ""); | public static Server serverFactory(Operator requiredOperator, String serverName, ServerType serverType, Credential credential) { assertNotNull(requiredOperator); Server server = new Server(); server.setOperator(requiredOperator); server.setServerName(serverName); server.setServerH... |
public static Credential credentialFactory(Identity identity, String password) { | public static Credential credentialFactory(Identity requiredIdentity, String password) { | public static Credential credentialFactory(Identity identity, String password) { Credential credential = new Credential(); if (identity==null) { identity = identityFactory("", ""); } credential.setIdentity(identity); credential.setPassword(password); cred... |
if (identity==null) { identity = identityFactory("", ""); } credential.setIdentity(identity); | assertNotNull(requiredIdentity); credential.setIdentity(requiredIdentity); | public static Credential credentialFactory(Identity identity, String password) { Credential credential = new Credential(); if (identity==null) { identity = identityFactory("", ""); } credential.setIdentity(identity); credential.setPassword(password); cred... |
hopsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); col = htcm.getColumn(0); col.setPreferredWidth(200); hopsTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS); | private void addColumnWidthListeners() { TableColumnModel mtcm = maltTable.getColumnModel(); TableColumnModel htcm = hopsTable.getColumnModel(); //: listener that watches the width of a column PropertyChangeListener mpcl = new PropertyChangeListener() { private int columnCount = maltTable.getColumnCount(); p... | |
f2.setUnitsFull(u); | f2.convertTo(u); | private void addListeners(){ txtName.addActionListener(this); txtName.addFocusListener(this); brewerNameText.addFocusListener(this); brewerNameText.addActionListener(this); txtDate.addFocusListener(this); txtDate.addActionListener(this); txtPreBoil.addFocusListener(this); txtPreBoil.addActionListener(this); b... |
h.setUnitsFull(u); | h.convertTo(u); | private void addListeners(){ txtName.addActionListener(this); txtName.addFocusListener(this); brewerNameText.addFocusListener(this); brewerNameText.addActionListener(this); txtDate.addFocusListener(this); txtDate.addActionListener(this); txtPreBoil.addFocusListener(this); txtPreBoil.addActionListener(this); b... |
f2.setUnitsFull(u); | f2.convertTo(u); | public void actionPerformed(ActionEvent evt) { String u = (String) cmbMaltUnitsModel.getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ f2.setUnitsFull(u); myRecipe.calcMaltTotals(); d... |
h.setUnitsFull(u); | h.convertTo(u); | public void actionPerformed(ActionEvent evt) { String u = (String) cmbHopsUnitsModel.getSelectedItem(); int i = hopsTable.getSelectedRow(); if (myRecipe != null && i != -1) { Hop h = myRecipe.getHop(i); h.setUnitsFull(u); myRecipe.calcHopsTotals(); // tblHops.updateUI(); displayRecipe();... |
imgURL = getClass().getClassLoader().getResource("ca/strangebrew/icons/sb2.gif"); | imgURL = getClass().getClassLoader().getResource("ca/strangebrew/icons/brew.ico"); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
jToolBar1 = new JToolBar(); getContentPane().add(jToolBar1, BorderLayout.NORTH); jToolBar1.setFloatable(false); jToolBar1.setRollover(true); jButton1 = new JButton(); jToolBar1.add(jButton1); jButton1.setMnemonic(java.awt.event.KeyEvent.VK_S); jButton1.setIcon(new ImageIcon(getClass().getClassLoader().getResource( "ca... | mainToolBar = new JToolBar(); getContentPane().add(mainToolBar, BorderLayout.NORTH); mainToolBar.setFloatable(false); mainToolBar.setRollover(true); saveButton = new JButton(); mainToolBar.add(saveButton); saveButton.setMnemonic(java.awt.event.KeyEvent.VK_S); saveButton.setIcon(new ImageIcon(getClass().getClassLoader(... | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
System.out.println("jButton1.actionPerformed, event=" + evt); | saveFile(evt); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
jToolBar1.add(jButton2); | mainToolBar.add(jButton2); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
TableColumn t = tblMaltTotals.getColumnModel().getColumn(2); | TableColumn t = tblMaltTotals.getColumnModel().getColumn(4); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
saveMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { int choice = 1; if (currentFile != null) { File file = currentFile; try { FileWriter out = new FileWriter(file); out.write(myRecipe.toXML()); out.close(); Debug.print("Saved: " + file.getAbsoluteFile()); currentFile ... | saveMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt) { saveFile(evt); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
else { choice = JOptionPane.showConfirmDialog(null, "File not saved. Do you wish to save it?", "File note saved", JOptionPane.YES_NO_OPTION); } if (choice == 0) { saveAs(); } } | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... | |
final JFrame owner = this; printMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { File tmp = new File("tmp.html"); try { saveAsHTML(tmp, "ca/strangebrew/data/recipeToSimpleHtml.xslt"); HTMLViewer view = new HTMLViewer(owner, tmp.toURL()); view.setModal(true); view.setVis... | printMenuItem.setEnabled(false); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
final JFrame owner = this; helpMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { URL help; try { help = new File(appRoot + "/help/index.html").toURL(); HTMLViewer view = new HTMLViewer(owner, help); view.setModal(true); view.setVisible(true); } catch (Exception e) { e.pri... | helpMenuItem.setEnabled(false); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
System.out.println("jButton1.actionPerformed, event=" + evt); | saveFile(evt); | public void actionPerformed(ActionEvent evt) { System.out.println("jButton1.actionPerformed, event=" + evt); //TODO add your code for jButton1.actionPerformed } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.