rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return fToC(boilTempF); | return BrewCalcs.fToC(boilTempF); | public double getBoilTemp() { if (tempUnits.equals("F")) return boilTempF; else return fToC(boilTempF); } |
return fToC(((MashStep)steps.get(i)).getTemp()); | return BrewCalcs.fToC(((MashStep)steps.get(i)).getTemp()); | public double getStepTemp(int i) { if (((MashStep)steps.get(i)).getTemp() == 0) return 0; if (tempUnits.equals("F")) return ((MashStep)steps.get(i)).getTemp(); else return fToC(((MashStep)steps.get(i)).getTemp()); } |
boilTempF = cToF(t); | boilTempF = BrewCalcs.cToF(t); | public void setBoilTemp(double t){ if (tempUnits.equals("F")) boilTempF = t; else boilTempF = cToF(t); calcMashSchedule(); } |
sb.append(SBStringUtils.xmlElement("GRAIN_TEMP", "" + fToC(grainTempF), 4)); sb.append(SBStringUtils.xmlElement("BOIL_TEMP", "" + fToC(boilTempF), 4)); | sb.append(SBStringUtils.xmlElement("GRAIN_TEMP", "" + BrewCalcs.fToC(grainTempF), 4)); sb.append(SBStringUtils.xmlElement("BOIL_TEMP", "" + BrewCalcs.fToC(boilTempF), 4)); | public String toXml() { StringBuffer sb = new StringBuffer(); sb.append(" <MASH>\n"); sb.append(SBStringUtils.xmlElement("MASH_VOLUME", SBStringUtils.format(Quantity.convertUnit("qt", volUnits, volQts), 2) , 4)); sb.append(SBStringUtils.xmlElement("MASH_VOL_U", "" + volUnits, 4)); sb.append(SBStringUtils.xmlEl... |
sb.append(" <DISPL_TEMP>" + SBStringUtils.format(fToC(st.startTemp), 1) + "</DISPL_TEMP>\n"); | sb.append(" <DISPL_TEMP>" + SBStringUtils.format(BrewCalcs.fToC(st.startTemp), 1) + "</DISPL_TEMP>\n"); | public String toXml() { StringBuffer sb = new StringBuffer(); sb.append(" <MASH>\n"); sb.append(SBStringUtils.xmlElement("MASH_VOLUME", SBStringUtils.format(Quantity.convertUnit("qt", volUnits, volQts), 2) , 4)); sb.append(SBStringUtils.xmlElement("MASH_VOL_U", "" + volUnits, 4)); sb.append(SBStringUtils.xmlEl... |
sb.append(" <DISPL_END_TEMP>" + SBStringUtils.format(fToC(st.endTemp), 1) + "</DISPL_END_TEMP>\n"); | sb.append(" <DISPL_END_TEMP>" + SBStringUtils.format(BrewCalcs.fToC(st.endTemp), 1) + "</DISPL_END_TEMP>\n"); | public String toXml() { StringBuffer sb = new StringBuffer(); sb.append(" <MASH>\n"); sb.append(SBStringUtils.xmlElement("MASH_VOLUME", SBStringUtils.format(Quantity.convertUnit("qt", volUnits, volQts), 2) , 4)); sb.append(SBStringUtils.xmlElement("MASH_VOL_U", "" + volUnits, 4)); sb.append(SBStringUtils.xmlEl... |
sortedGWebCaches = new TreeSet( new GWebCacheComparator() ); | sortedGWebCaches = new TreeSet<GWebCache>( new GWebCacheComparator() ); | public GWebCacheContainer() { NLogger.debug( NLoggerNames.GWEBCACHE, "Initializing GWebCacheContainer" ); allGWebCaches = new ArrayList(); phexGWebCaches = new ArrayList(); functionalGWebCaches = new ArrayList(); uniqueGWebCacheURLs = new HashSet( ); sortedGWebCaches = n... |
*/ | private GWebCache getGWebCacheForUpdate( GWebCache ignore ) { GWebCache gWebCache = null; int count = functionalGWebCaches.size(); if ( count == 0 ) { return null; } else if ( count == 1 ) { gWebCache = (GWebCache)functionalGWebCaches.get( 0 ... | |
assert !gWebCache.isPhexCache() && !gWebCache.equals( connection.getGWebCache() ) | assert gWebCache == null || (!gWebCache.isPhexCache() && !gWebCache.equals( connection.getGWebCache() )) | public boolean updateRemoteGWebCache( DestAddress myHostAddress, boolean preferPhex ) { String fullHostName = null; if ( myHostAddress != null ) { fullHostName = myHostAddress.getFullHostName(); } int retrys = 0; boolean succ = false; do { ... |
public void addCaughtHost( DestAddress address, short priority ) | public boolean addCaughtHost( PongMsg pongMsg ) | public void addCaughtHost( DestAddress address, short priority ) { boolean valid = isValidCaughtHostAddress( address ); if ( !valid ) { return; } CaughtHost caughtHost = new CaughtHost( address ); addPersistentCaughtHost( caughtHost ); addToCaug... |
return; } | return false; } | public void addCaughtHost( DestAddress address, short priority ) { boolean valid = isValidCaughtHostAddress( address ); if ( !valid ) { return; } CaughtHost caughtHost = new CaughtHost( address ); addPersistentCaughtHost( caughtHost ); addToCaug... |
addToCaughtHostFetcher( caughtHost, priority ); | boolean isNew = addToCaughtHostFetcher( caughtHost, priority ); return isNew; | public void addCaughtHost( DestAddress address, short priority ) { boolean valid = isValidCaughtHostAddress( address ); if ( !valid ) { return; } CaughtHost caughtHost = new CaughtHost( address ); addPersistentCaughtHost( caughtHost ); addToCaug... |
else { return ((Integer) index).intValue(); } | return ((Integer) index).intValue(); | final int addVar(Variable var){ Object index = varRefs.get(var); if(index==null) { int size = varRefs.size(); expandVarArray(size+1); varRefs.put(var,new Integer(size)); copyFromVar(var,size); var.addObserver(this); return size; } else { return ((Integer) index).intValue(); } } |
this.jep = jep; | public RpEval(JEP jep) { this.jep = jep; this.opSet = jep.getOperatorSet(); } | |
; | private File getHomeDir(ServletContextEvent event) { // check JNDI for the home directory first try { Context env = (Context) new InitialContext().lookup("java:comp/env"); String value = (String) env.lookup("HUDSON_HOME"); if(value!=null && value.trim().length()>0) ... | |
String sysProp = System.getProperty("HUDSON_HOME"); if(sysProp!=null) return new File(sysProp); | private File getHomeDir(ServletContextEvent event) { // check JNDI for the home directory first try { Context env = (Context) new InitialContext().lookup("java:comp/env"); String value = (String) env.lookup("HUDSON_HOME"); if(value!=null && value.trim().length()>0) ... | |
public String getString(String option, String defaultValue) | public String getString(String option) | public String getString(String option, String defaultValue) { assert(isValidOption(option)); String value = getValue(option); if (value == null) return defaultValue; return value; } |
assert(isValidOption(option)); String value = getValue(option); if (value == null) return defaultValue; return value; | return getString(option, ""); | public String getString(String option, String defaultValue) { assert(isValidOption(option)); String value = getValue(option); if (value == null) return defaultValue; return value; } |
if (!o.getClass().getName().endsWith("JTextField")) return; | public void actionPerformed(ActionEvent e) { Object o = e.getSource(); String s = ""; // String t = ""; s = ((JTextField) o).getText(); // t = s.replace(',','.'); // accept also european decimal komma if (o == txtName) myRecipe.setName(s); else if (o == brewerNameText) myRecipe.setBrewer(s); else if (o == ... | |
txtDate.setText(SBStringUtils.dateFormat1.format(myRecipe.getCreated().getTime())); | try { txtDate.setDate(myRecipe.getCreated().getTime()); } catch (PropertyVetoException e) { e.printStackTrace(); } | public void displayRecipe() { if (myRecipe == null) return; txtName.setText(myRecipe.getName()); brewerNameText.setText(myRecipe.getBrewer()); txtPreBoil.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits()))); lblSizeUnits.setText(myRecipe.getVolUnits()); postBoilText.setValue(new Double(myRecipe... |
imgURL = getClass().getClassLoader().getResource("ca/strangebrew/icons/brew.gif"); | imgURL = getClass().getClassLoader().getResource("ca/strangebrew/icons/sb2.gif"); | 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... |
txtDate = new JFormattedTextField(); | txtDate = new DatePicker(); | 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... |
txtDate.setText("Date"); | 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... | |
amountEditor = new SBCellEditor(new JTextField()); maltColumn = maltTable.getColumnModel().getColumn(1); maltColumn.setCellEditor(amountEditor); | 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... | |
tlbMalt.setPreferredSize(new java.awt.Dimension(55, 20)); | tlbMalt.setPreferredSize(new java.awt.Dimension(386, 20)); | 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... |
tlbHops.setPreferredSize(new java.awt.Dimension(58, 19)); | tlbHops.setPreferredSize(new java.awt.Dimension(413, 19)); | 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... |
for( AbstractTestResultAction a=this; a!=null; a=a.getPreviousResult() ) { | for( AbstractTestResultAction<?> a=this; a!=null; a=a.getPreviousResult(AbstractTestResultAction.class) ) { | public void doGraph( StaplerRequest req, StaplerResponse rsp) throws IOException { if(awtProblem) { // not available. send out error message rsp.sendRedirect2(req.getContextPath()+"/images/headless.png"); return; } try { if(req.checkIfModified(owner.g... |
Build b = owner; while(true) { b = b.getPreviousBuild(); if(b==null) return null; if(b.getResult()== Result.FAILURE) continue; T r = (T)b.getAction(getClass()); if(r!=null) return r; } | return (T)getPreviousResult(getClass()); | public T getPreviousResult() { Build b = owner; while(true) { b = b.getPreviousBuild(); if(b==null) return null; if(b.getResult()== Result.FAILURE) continue; T r = (T)b.getAction(getClass()); if(r!=null) ... |
public <T extends Action> T getAction(Class<T> type) { for (Action a : getActions()) { if(type.isInstance(a)) return (T)a; } return null; | public Action getAction(int index) { if(actions==null) return null; return actions.get(index); | public <T extends Action> T getAction(Class<T> type) { for (Action a : getActions()) { if(type.isInstance(a)) return (T)a; // type.cast() not available in JDK 1.4 } return null; } |
QueryResponseRecord rec; | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... | |
int recordCount = msg.getRecordCount(); ArrayList newHitList = new ArrayList( recordCount ); for (int i = 0; i < recordCount; i++) | QueryResponseRecord[] records = msg.getMsgRecords(); ArrayList<RemoteFile> newHitList = new ArrayList<RemoteFile>( records.length ); for (int i = 0; i < records.length; i++) | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... |
rec = msg.getMsgRecord(i); | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... | |
if ( searchURN != null && rec.getURN() != null ) | if ( searchURN != null && records[i].getURN() != null ) | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... |
if ( !searchURN.equals( rec.getURN() ) ) | if ( !searchURN.equals( records[i].getURN() ) ) | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... |
long fileSize = rec.getFileSize(); String filename = rec.getFilename(); URN urn = rec.getURN(); int fileIndex = rec.getFileIndex(); String metaData = rec.getMetaData(); | long fileSize = records[i].getFileSize(); String filename = records[i].getFilename(); URN urn = records[i].getURN(); int fileIndex = records[i].getFileIndex(); String metaData = records[i].getMetaData(); | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... |
String pathInfo = rec.getPathInfo(); | String pathInfo = records[i].getPathInfo(); | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... |
DestAddress[] alternateLocations = rec.getAlternateLocations(); | DestAddress[] alternateLocations = records[i].getAlternateLocations(); | public void processResponse( QueryResponseMsg msg ) { //we like to receive results even if the query was stopped already. // check if it is a response for this query? if (!msg.getHeader().getMsgID().equals( queryMsg.getHeader().getMsgID())) { return; } ... |
public abstract void processResponse( QueryResponseMsg msg ); | public abstract void processResponse( QueryResponseMsg msg ) throws InvalidMessageException; | public abstract void processResponse( QueryResponseMsg msg ); |
throws InvalidMessageException | public void setQueryResponseFields( QueryResponseMsg msg ) { setVendorCode( msg.getVendorCode() ); setChatSupported( msg.isChatSupported() ); setBrowseHostSupported( msg.isBrowseHostSupported() ); setPushProxyAddresses( msg.getPushProxyAddresses() ); } | |
else { | public Node differentiate(ASTFunNode node,String var,Node [] children,Node [] dchildren,DJep djep) throws ParseException { OperatorSet op = djep.getOperatorSet(); NodeFactory nf = djep.getNodeFactory(); TreeUtils tu = djep.getTreeUtils(); FunctionTable funTab = djep.getFunctionTable(); int nchild = node.jjtGetNumCh... | |
} | public Node differentiate(ASTFunNode node,String var,Node [] children,Node [] dchildren,DJep djep) throws ParseException { OperatorSet op = djep.getOperatorSet(); NodeFactory nf = djep.getNodeFactory(); TreeUtils tu = djep.getTreeUtils(); FunctionTable funTab = djep.getFunctionTable(); int nchild = node.jjtGetNumCh... | |
else | public Node differentiate(ASTFunNode node,String var,Node [] children,Node [] dchildren,DJep djep) throws ParseException { OperatorSet op = djep.getOperatorSet(); NodeFactory nf = djep.getNodeFactory(); TreeUtils tu = djep.getTreeUtils(); FunctionTable funTab = djep.getFunctionTable(); int nchild = node.jjtGetNumCh... | |
try { MagnetData magnetData = MagnetData.parseFromURI(uri); URN urn = MagnetData.lookupSHA1URN(magnetData); SwarmingManager swarmingMgr = SwarmingManager.getInstance(); if ( !swarmingMgr.isURNDownloaded( urn ) ) { swarmingMgr.addFileToDownload( uri ); } } catch (IOException exp) { NLogger.warn(NLoggerNames.MAGMA, exp.... | downloadUri( uri ); | public static void sheduledReadout( URI uri, long time ) { try { // dont add already downloading urns. MagnetData magnetData = MagnetData.parseFromURI(uri); URN urn = MagnetData.lookupSHA1URN(magnetData); SwarmingManager swarmingMgr = SwarmingManager.getInstance(); ... |
File file = new File(archive.getParentFile(), s); | File file = resolve(archive.getParentFile(), s); | public PluginWrapper(PluginManager owner, File archive) throws IOException { LOGGER.info("Loading plugin: "+archive); this.shortName = getShortName(archive); boolean isLinked = archive.getName().endsWith(".hpl"); File expandDir = null; // if .hpi, this is the directory where war is expa... |
this.baseResourceURL = new File(archive.getParentFile(), | this.baseResourceURL = resolve(archive.getParentFile(), | public PluginWrapper(PluginManager owner, File archive) throws IOException { LOGGER.info("Loading plugin: "+archive); this.shortName = getShortName(archive); boolean isLinked = archive.getName().endsWith(".hpl"); File expandDir = null; // if .hpi, this is the directory where war is expa... |
System.out.println("drawing a seismogram"); | logger.debug("drawing a seismogram"); GeneralPath currentShape = new GeneralPath(); | public Shape draw(Dimension size){ System.out.println("drawing a seismogram"); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversized... |
SoftReference xPixelRef = new SoftReference(xPixels); SoftReference yPixelRef = new SoftReference(yPixels); currentShape = new GeneralPath(); currentShape.moveTo(xPixels[0], yPixels[0]); | if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); | public Shape draw(Dimension size){ System.out.println("drawing a seismogram"); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversized... |
if(!hasValidValue()) sb.append("(invalid)"); sb.append(" "); if(getEquation()!=null) sb.append(pv.toString(getEquation())); | if(!hasValidValue()) sb.append("NA"); sb.append("\t"); if(this.isConstant()) sb.append("constant"); else if(getEquation()!=null) sb.append(pv.toString(getEquation())); | public String toString(PrintVisitor pv) { StringBuffer sb = new StringBuffer(name); sb.append(": val "+getValue() ); if(!hasValidValue()) sb.append("(invalid)"); sb.append(" "); if(getEquation()!=null) sb.append(pv.toString(getEquation())); else sb.append("no equation"); return sb.toString(); } |
this.addMouseListener(new PlottableMouseListener(this)); | PlottableMouseListener plottableMouseListener = new PlottableMouseListener(this); this.addMouseListener(plottableMouseListener); this.addMouseMotionListener(plottableMouseListener); | public PlottableDisplay() { super(); removeAll(); final Color bg = Color.white; final Color fg = Color.yellow; //Initialize drawing colors, border, opacity. setBackground(bg); setForeground(fg); setBorder(BorderFactory.createCompoundBorder( Borde... |
int[] minmax = findMinMax(arrayplottable); | private void drawHighlightRegion(Graphics g) { // get new graphics to avoid messing up original Graphics2D newG = (Graphics2D)g.create(); if(g != currentImageGraphics) { newG.translate(labelXShift, titleYShift); newG.clipRect(0, 0, plot_x/plotrows, plot_y +(plotoffset * (plotrows-1))); } in... | |
int mean = getMean(); | private void drawHighlightRegion(Graphics g) { // get new graphics to avoid messing up original Graphics2D newG = (Graphics2D)g.create(); if(g != currentImageGraphics) { newG.translate(labelXShift, titleYShift); newG.clipRect(0, 0, plot_x/plotrows, plot_y +(plotoffset * (plotrows-1))); } in... | |
int by = 0; | private void drawHighlightRegion(Graphics g) { // get new graphics to avoid messing up original Graphics2D newG = (Graphics2D)g.create(); if(g != currentImageGraphics) { newG.translate(labelXShift, titleYShift); newG.clipRect(0, 0, plot_x/plotrows, plot_y +(plotoffset * (plotrows-1))); } in... | |
int ey = 0; | int by = -plotoffset/2 + 10; int ey = plotoffset - 10; | private void drawHighlightRegion(Graphics g) { // get new graphics to avoid messing up original Graphics2D newG = (Graphics2D)g.create(); if(g != currentImageGraphics) { newG.translate(labelXShift, titleYShift); newG.clipRect(0, 0, plot_x/plotrows, plot_y +(plotoffset * (plotrows-1))); } in... |
by = -10; ey = 20; | private void drawHighlightRegion(Graphics g) { // get new graphics to avoid messing up original Graphics2D newG = (Graphics2D)g.create(); if(g != currentImageGraphics) { newG.translate(labelXShift, titleYShift); newG.clipRect(0, 0, plot_x/plotrows, plot_y +(plotoffset * (plotrows-1))); } in... | |
if (propValue != null && propValue.length > 1) { | if (propValue != null && propValue.length() > 1) { | public String getGeographicRegionName(int geoNum) { String propValue = feProps.getProperty("GeogRegion"+geoNum); if (propValue != null && propValue.length > 1) { return propValue; } return "GeoRegion"+geoNum; } |
if (propValue != null && propValue.length > 1) { | if (propValue != null && propValue.length() > 1) { | public String getSeismicRegionName(int seisNum) { String propValue = feProps.getProperty("SeismicRegion"+seisNum); if (propValue != null && propValue.length > 1) { return propValue; } return "SeisRegion"+seisNum; } |
else if (type.equals("mash")){ | /*else if (type.equals("mash")){ | private void setDefaults(Properties d) { if (type.equals("strangebrew")) { for (int i = 0; i<optionString.length; i++) { d.put(optionString[i][0], optionString[i][1]); } } else if (type.equals("mash")){ d.put("optMashVolU", "gallons US"); d.put("optMashTempU", "F"); d.put("optMashRatioU", "... |
} | }*/ | private void setDefaults(Properties d) { if (type.equals("strangebrew")) { for (int i = 0; i<optionString.length; i++) { d.put(optionString[i][0], optionString[i][1]); } } else if (type.equals("mash")){ d.put("optMashVolU", "gallons US"); d.put("optMashTempU", "F"); d.put("optMashRatioU", "... |
public DataSetSeismogram (LocalSeismogramImpl seismo, DataSet ds){ this(seismo, ds, seismo.getName()); | public DataSetSeismogram(DataSetSeismogram dss, String name){ this(dss.getSeismogram(), dss.getDataSet(), name); | public DataSetSeismogram (LocalSeismogramImpl seismo, DataSet ds){ this(seismo, ds, seismo.getName()); } |
Reader r = new InputStreamReader(new FileInputStream(new File(buildDir,"build.xml")),"UTF-8"); createConfiguredStream().unmarshal(new XppReader(r),this); r.close(); | Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(new File(buildDir,"build.xml")),"UTF-8")); try { createConfiguredStream().unmarshal(new XppReader(r),this); } catch (StreamException e) { throw new IOException(e.getMessage()); } finally { r.close(); } | private void load(File buildDir) throws IOException { Reader r = new InputStreamReader(new FileInputStream(new File(buildDir,"build.xml")),"UTF-8"); createConfiguredStream().unmarshal(new XppReader(r),this); r.close(); } |
public static UserRole userRoleFactory(User requiredUser, Service requiredService, String serviceExtension) { | public static UserRole userRoleFactory(UserGroup requiredUser, Service requiredService, String serviceExtension) { | public static UserRole userRoleFactory(User requiredUser, Service requiredService, String serviceExtension) { assertNotNull(requiredUser); assertNotNull(requiredService); UserRole userRole = new UserRole(); userRole.setUser(requiredUser); userRole.setService(requiredServic... |
userRole.setUser(requiredUser); | userRole.setUserGroup(requiredUser); | public static UserRole userRoleFactory(User requiredUser, Service requiredService, String serviceExtension) { assertNotNull(requiredUser); assertNotNull(requiredService); UserRole userRole = new UserRole(); userRole.setUser(requiredUser); userRole.setService(requiredServic... |
if(verbose) | if(verbose) { | public void processEquation(Node node) throws ParseException { MatrixJep mj = (MatrixJep) j; if(verbose) { print("Parsed:\t\t"); println(mj.toString(node)); } Node processed = mj.preprocess(node); if(verbose) { print("Processed:\t"); println(mj.toString(processed)); } Node simp = mj.simplify(pr... |
println(mj.toString(simp)); | println(mj.toString(simp)); } | public void processEquation(Node node) throws ParseException { MatrixJep mj = (MatrixJep) j; if(verbose) { print("Parsed:\t\t"); println(mj.toString(node)); } Node processed = mj.preprocess(node); if(verbose) { print("Processed:\t"); println(mj.toString(processed)); } Node simp = mj.simplify(pr... |
println("DJep: differentation in JEP. eg. diff(x^2,x)"); | println("DJep: differentiation in JEP. e.g. diff(x^2,x)"); | public void printIntroText() { println("DJep: differentation in JEP. eg. diff(x^2,x)"); printStdHelp(); } |
rsp.sendRedirect(req.getContextPath()); | rsp.sendRedirect(req.getContextPath()+"/"); | public synchronized void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException { if(!Hudson.adminCheck(req,rsp)) return; Util.deleteRecursive(root); getParent().deleteJob(this); rsp.sendRedirect(req.getContextPath()); } |
MagnetData magnetData = MagnetData.parseFromURI(uri); URN urn = MagnetData.lookupSHA1URN(magnetData); if ( !isURNDownloaded( urn ) ) { SwarmingManager.getInstance().addFileToDownload( uri ); } | InternalFileHandler.downloadUri( uri ); | public synchronized void addMagmaToDownload( File magmaFile ) //Is this still used anywhere? throws URIException, IOException { BufferedInputStream inStream = new BufferedInputStream( new FileInputStream( magmaFile ) ); MagmaParser parser = new MagmaParser( inStream ); pa... |
public SWDownloadFile( DDownloadFile dFile ) | private SWDownloadFile() | public SWDownloadFile( DDownloadFile dFile ) { this(); URN fileUrn = null; if ( dFile.getFileURN() != null ) { fileUrn = new URN( dFile.getFileURN() ); } String destDir = dFile.getDestinationDirectory(); if ( !StringUtils.isEmpty( destDir ) ) ... |
this(); URN fileUrn = null; if ( dFile.getFileURN() != null ) { fileUrn = new URN( dFile.getFileURN() ); } | allCandidatesList = new ArrayList<SWDownloadCandidate>(); goodCandidatesList = new ArrayList<SWDownloadCandidate>(); mediumCandidatesList = new ArrayList<SWDownloadCandidate>(); badCandidatesList = new ArrayList<SWDownloadCandidate>(); transferCandidatesList = new ArrayList<SWDownloadCandidate>(); queuedCandidatesSet =... | public SWDownloadFile( DDownloadFile dFile ) { this(); URN fileUrn = null; if ( dFile.getFileURN() != null ) { fileUrn = new URN( dFile.getFileURN() ); } String destDir = dFile.getDestinationDirectory(); if ( !StringUtils.isEmpty( destDir ) ) ... |
String destDir = dFile.getDestinationDirectory(); if ( !StringUtils.isEmpty( destDir ) ) { destinationDirectory = new File( destDir ); } initialize( dFile.getLocalFileName(), fileUrn, dFile.getFileSize(), dFile.getSearchTerm(), false ); String incompleteFileName = dFile.getIncompleteFileName(); if ( !StringUtils.isEm... | status = STATUS_FILE_WAITING; bandwidthController = BandwidthController.acquireBandwidthController( "DownloadFile-"+toString(), Long.MAX_VALUE ); bandwidthController.activateShortTransferAvg( 1000, 15 ); bandwidthController.linkControllerIntoChain( BandwidthManager.getInstance().getDownloadBandwidthController() ); | public SWDownloadFile( DDownloadFile dFile ) { this(); URN fileUrn = null; if ( dFile.getFileURN() != null ) { fileUrn = new URN( dFile.getFileURN() ); } String destDir = dFile.getDestinationDirectory(); if ( !StringUtils.isEmpty( destDir ) ) ... |
if ( !managedFile.getFile().exists() ) | if ( !managedFile.exists() ) | public static DPhex loadDPhexFromFile( ManagedFile managedFile ) throws IOException, ManagedFileException { if ( !managedFile.getFile().exists() ) { return null; } NLogger.debug( XMLBuilder.class, "Loading DPhex from: " + managedFile ); InputStream inStream = ... |
public void fireDisplayUserMessage( String userMessageId, String[] args ) | public void fireDisplayUserMessage( String userMessageId ) | public void fireDisplayUserMessage( String userMessageId, String[] args ) { // if initialized if ( userMessageListener != null ) { userMessageListener.displayUserMessage( userMessageId, args ); } } |
userMessageListener.displayUserMessage( userMessageId, args ); | userMessageListener.displayUserMessage( userMessageId, null ); | public void fireDisplayUserMessage( String userMessageId, String[] args ) { // if initialized if ( userMessageListener != null ) { userMessageListener.displayUserMessage( userMessageId, args ); } } |
public void stopDownload() | public void stopDownload( SWDownloadCandidate candidate ) | public void stopDownload() { setStatus( STATUS_FILE_STOPPED ); stopAllWorkers( true ); } |
setStatus( STATUS_FILE_STOPPED ); stopAllWorkers( true ); | SWDownloadWorker worker; synchronized ( candidatesLock ) { worker = (SWDownloadWorker)allocatedCandidateWorkerMap.get( candidate ); } if ( worker != null ) { worker.stopWorker(); worker.waitTillFinished(); } | public void stopDownload() { setStatus( STATUS_FILE_STOPPED ); stopAllWorkers( true ); } |
r.nextBuild = prev.nextBuild; r.previousBuild = prev; if(r.nextBuild!=null) r.nextBuild.previousBuild = r; prev.nextBuild=r; | value.nextBuild = prev.nextBuild; value.previousBuild = prev; if(value.nextBuild!=null) value.nextBuild.previousBuild = value; prev.nextBuild=value; | private R update(TreeMap<Integer, R> m, Integer key, R value) { R r = m.put(key, value); SortedMap<Integer,R> head = m.headMap(key); if(!head.isEmpty()) { R prev = m.get(head.lastKey()); r.nextBuild = prev.nextBuild; r.previousBuild = prev; if(r.nextB... |
r.nextBuild = first; r.previousBuild = null; first.previousBuild = r; | value.nextBuild = first; value.previousBuild = null; first.previousBuild = value; | private R update(TreeMap<Integer, R> m, Integer key, R value) { R r = m.put(key, value); SortedMap<Integer,R> head = m.headMap(key); if(!head.isEmpty()) { R prev = m.get(head.lastKey()); r.nextBuild = prev.nextBuild; r.previousBuild = prev; if(r.nextB... |
if(owner.considerTestAsTestObject()) digester.addCallMethod("*/test", "setconsiderTestAsTestObject"); | public void add( File reportXml ) throws IOException, SAXException { Digester digester = new Digester(); digester.setClassLoader(getClass().getClassLoader()); digester.push(this); digester.addObjectCreate("*/testsuite",Suite.class); digester.addObjectCreate("*/test",Test.class); ... | |
rsp.sendRedirect(req.getContextPath()); | rsp.sendRedirect(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()); } |
lastStackTraceElem = Thread.currentThread().getStackTrace(); | private void checkOpenFile( ) throws ManagedFileException { try { lock.acquire(); } catch ( InterruptedException exp ) { Thread.currentThread().interrupt(); throw new ManagedFileException( "open failes: interrupted", exp ); ... | |
private void printCommandLine(String[] cmd) { | private void printCommandLine(String[] cmd, FilePath workDir) { | private void printCommandLine(String[] cmd) { StringBuffer buf = new StringBuffer(); buf.append('$'); for (String c : cmd) { buf.append(' ').append(c); } listener.getLogger().println(buf.toString()); } |
if (workDir != null) { buf.append('['); buf.append(workDir.getRemote().replace("^.+[/\\]", "")); buf.append("] "); } | private void printCommandLine(String[] cmd) { StringBuffer buf = new StringBuffer(); buf.append('$'); for (String c : cmd) { buf.append(' ').append(c); } listener.getLogger().println(buf.toString()); } | |
public Proc(String[] cmd,String[] env,OutputStream out, File workDir) throws IOException { this( Runtime.getRuntime().exec(cmd,env,workDir), null, out ); | public Proc(String cmd,Map env, OutputStream out, File workDir) throws IOException { this(cmd,mapToEnv(env),out,workDir); | public Proc(String[] cmd,String[] env,OutputStream out, File workDir) throws IOException { this( Runtime.getRuntime().exec(cmd,env,workDir), null, out ); } |
String u = a.substring(i); | String u = a.substring(i); preBoilVol.setQuantity( null, u.trim(), Double.parseDouble(d.trim())); | public void setAmountAndUnits(String a){ int i = a.indexOf(" "); String d = a.substring(0,i); String u = a.substring(i); postBoilVol.setQuantity( null, u.trim(), Double.parseDouble(d.trim())); } |
setPostBoil(Double.parseDouble(d.trim())); | public void setAmountAndUnits(String a){ int i = a.indexOf(" "); String d = a.substring(0,i); String u = a.substring(i); postBoilVol.setQuantity( null, u.trim(), Double.parseDouble(d.trim())); } | |
public void setCost(String c){ if (c.substring(0,1).equals("$")) { c = c.substring(1, c.length()); } costPerU = Double.parseDouble(c); } | public void setCost(double c){ costPerU = c; } | public void setCost(String c){ if (c.substring(0,1).equals("$")) { c = c.substring(1, c.length()); // trim leading "$" } costPerU = Double.parseDouble(c); } |
dilution = new DilutedRecipe(); | public Recipe() { Options opts = new Options(); name = "My Recipe"; created = new GregorianCalendar(); efficiency = opts.getDProperty("optEfficiency"); preBoilVol.setQuantity(opts.getProperty("optSizeU"), null, opts.getDProperty("optPreBoilVol")); postBoilVol.setQuantity(opts.getProperty("optSizeU"), null, opt... | |
return node; | if(nodeName==null) return Hudson.getInstance(); return Hudson.getInstance().getSlave(nodeName); | public Node getNode() { return node; } |
j.dv.addStandardDiffRules(); | j.addStandardDiffRules(); | public static void main(String args[]) { /* initilisation */ DJep j = new DJep(); j.addStandardConstants(); j.addStandardFunctions(); j.addComplex(); j.setAllowUndeclared(true); j.setAllowAssignment(true); j.setImplicitMul(true); j.dv.addStandardDiffRules(); try { // parse the string Node node = j.parse... |
j.dpv.setPrintVariableEquations(true); | j.getDPrintVisitor().setPrintVariableEquations(true); | public static void main(String args[]) { /* initilisation */ DJep j = new DJep(); j.addStandardConstants(); j.addStandardFunctions(); j.addComplex(); j.setAllowUndeclared(true); j.setAllowAssignment(true); j.setImplicitMul(true); j.dv.addStandardDiffRules(); try { // parse the string Node node = j.parse... |
j.dpv.setPrintPartialEquations(false); j.dpv.setPrintVariableEquations(false); | j.getDPrintVisitor().setPrintPartialEquations(false); j.getDPrintVisitor().setPrintVariableEquations(false); | public static void main(String args[]) { /* initilisation */ DJep j = new DJep(); j.addStandardConstants(); j.addStandardFunctions(); j.addComplex(); j.setAllowUndeclared(true); j.setAllowAssignment(true); j.setImplicitMul(true); j.dv.addStandardDiffRules(); try { // parse the string Node node = j.parse... |
nl(); | public void ignorableWhitespace(char buf[], int offset, int len) throws SAXException { nl(); // emit("IGNORABLE"); } | |
nl(); | public void processingInstruction(String target, String data) throws SAXException { nl(); emit("PROCESS: "); emit("<?" + target + " " + data + "?>"); } | |
else if (currentElement.equalsIgnoreCase("YEAST_COST")) { r.getYeastObj().setCost((Double.parseDouble(s))); } else if (currentElement.equalsIgnoreCase("OTHER_COST")) { r.setOtherCost(Double.parseDouble(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... | |
public XMLDataSet(DocumentBuilder docBuilder, URL base, Element config) { this(docBuilder, base); this.config = config; | public XMLDataSet(DocumentBuilder docBuilder, URL datasetURL) { this.base = datasetURL; this.docBuilder = docBuilder; Document doc = docBuilder.newDocument(); config = doc.createElement("dataset"); config.setAttribute("xmlns:xlink", "http: | public XMLDataSet(DocumentBuilder docBuilder, URL base, Element config) { this(docBuilder, base); this.config = config; } |
name = getUniqueName(name); | name = getUniqueName(getSeismogramNames(), name); | public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme... |
if (props[i].name != seisNameKey) { | if (props[i] != null && props[i].name != seisNameKey) { | public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme... |
name = getUniqueName(name); | name = getUniqueName(getSeismogramNames(), name); | public void addSeismogramRef(LocalSeismogramImpl seis, URL seisURL, String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit) { seismogramNameCache = null; S... |
addDataSet(dataset, audit); | public DataSet createChildDataSet(String id, String name, String owner, AuditInfo[] audit) { dataSetIdCache = null; XMLDataSet dataset = new XMLDataSet(docBuilder, base, id, name, owner); addDataSet(dataset, audit); return dataset; } | |
if (name == ds.getName()) { | logger.debug("++++++++ name is "+name +" the datasetID name is "+ds.getName()); if (name.equals(ds.getName())) { | public DataSet getDataSet(String name) { String[] ids = getDataSetIds(); for (int i=0; i<ids.length; i++) { DataSet ds = getDataSetById(ids[i]); if (name == ds.getName()) { return ds; } } // end of for (int i=0; i<ids.length; i++) return nu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.