rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
Shape(String url, Point point) {
Shape(String url, Point point, Dimension size) {
Shape(String url, Point point) { this.url = url; this.point = point; }
this.size = size;
Shape(String url, Point point) { this.url = url; this.point = point; }
if (!filter.getPrincipalSearch().isEmpty()) {
if (!filter.getPrincipalSearch().equals("")) {
public String createCriteriaAsString(IdentityFilter filter) { StringBuilder criteria = new StringBuilder(); if (!filter.getPrincipalSearch().isEmpty()) { criteria.append("lower(identity.principal) like '%") .append(filter.getPrincipalSearch().toLowerCase()) .append("%'...
if (!filter.getNameOrAliasSearch().isEmpty()) {
if (!filter.getNameOrAliasSearch().equals("")) {
public String createCriteriaAsString(IdentityFilter filter) { StringBuilder criteria = new StringBuilder(); if (!filter.getPrincipalSearch().isEmpty()) { criteria.append("lower(identity.principal) like '%") .append(filter.getPrincipalSearch().toLowerCase()) .append("%'...
if (!criteria.toString().isEmpty()) {
if (!criteria.toString().equals("")) {
public String createCriteriaAsString(IdentityFilter filter) { StringBuilder criteria = new StringBuilder(); if (!filter.getPrincipalSearch().isEmpty()) { criteria.append("lower(identity.principal) like '%") .append(filter.getPrincipalSearch().toLowerCase()) .append("%'...
if (criteria.toString().isEmpty()) {
if (criteria.toString().equals("")) {
public String createCriteriaAsString(IdentityFilter filter) { StringBuilder criteria = new StringBuilder(); if (!filter.getPrincipalSearch().isEmpty()) { criteria.append("lower(identity.principal) like '%") .append(filter.getPrincipalSearch().toLowerCase()) .append("%'...
if(names[i].length()==0) continue;
if(Util.nullify(names[i])==null) continue; if(Util.nullify(homes[i])==null) continue;
public boolean configure(HttpServletRequest req) { boolean r = true; int i; String[] names = req.getParameterValues("maven_name"); String[] homes = req.getParameterValues("maven_home"); int len; if(names!=null && homes!=null) len =...
if(dead) return EditType.DELETE;
public EditType getEditType() { // see issue #73. Can't do much better right now if(revision.equals("1.1")) return EditType.ADD; if(dead) return EditType.DELETE; return EditType.EDIT; }
scaleRecipe();
scaleRecipe(); setVisible(false); dispose(); } else if (o == cancelButton) {
public void actionPerformed(ActionEvent e) { Object o = e.getSource(); if (o == okBtn) { scaleRecipe(); setVisible(false); dispose(); } else if (o == cancelButton){ setVisible(false); dispose(); } }
else if (o == cancelButton){ setVisible(false); dispose(); }
public void actionPerformed(ActionEvent e) { Object o = e.getSource(); if (o == okBtn) { scaleRecipe(); setVisible(false); dispose(); } else if (o == cancelButton){ setVisible(false); dispose(); } }
this.setTitle("Resize Recipe");
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layout.columnWidths = new int[] {7, 7, 7}; jPanel1.setLayout(jPanel1Layout); getC...
maltUnitsCombo = new JComboBox(); jPanel4.add(maltUnitsCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); maltUnitsCombo.setModel(maltUnitsComboModel); maltUnitsCombo.setPreferredSize(new java.awt.Dimension(96, 20));
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
jLabel1 = new JLabel(); jPanel1.add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel1.setText("New Size:");
hopsUnitsComboModel = new ComboModel(); hopsUnitsComboModel.setList(new Quantity().getListofUnits("weight")); hopsUnitsComboModel.addOrInsert(myRecipe.getHopUnits());
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
sizeTxt = new JTextField(); jPanel1.add(sizeTxt, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); sizeTxt.setText("" + myRecipe.getPostBoilVol(myRecipe.getVolUnits()));
hopsUnitsCombo = new JComboBox(); jPanel4.add(hopsUnitsCombo, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); hopsUnitsCombo.setModel(hopsUnitsComboModel); hopsUnitsCombo.setPreferredSize(new java.awt.Dimension(97, 20));
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
sizeUnitsComboModel = new ComboModel(); sizeUnitsComboModel.setList(new Quantity().getListofUnits("vol")); sizeUnitsComboModel.addOrInsert(myRecipe.getVolUnits());
cancelButton = new JButton(); cancelButton.addActionListener(this); jPanel2.add(cancelButton); cancelButton.setText("Cancel");
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
sizeUnitsCombo = new JComboBox(); jPanel1.add(sizeUnitsCombo, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); sizeUnitsCombo.setModel(sizeUnitsComboModel);
okBtn = new JButton(); okBtn.addActionListener(this); jPanel2.add(okBtn); okBtn.setText("OK");
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
jPanel2 = new JPanel(); FlowLayout jPanel2Layout = new FlowLayout(); jPanel2Layout.setAlignment(FlowLayout.RIGHT); jPanel2.setLayout(jPanel2Layout); getContentPane().add(jPanel2, BorderLayout.SOUTH); cancelButton = new JButton(); cancelButton.addActionListener(this); jPanel2.add(cancelButton); cancelButton.setText("Ca...
this.setSize(306, 193);
private void initGUI() { try { this.setTitle("Resize Recipe"); jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[] {0.1, 0.1}; jPanel1Layout.rowHeights = new int[] {7, 7}; jPanel1Layout.columnWeights = new double[] {0.1, 0.1, 0.1}; jPanel1Layou...
if (convMaltsChk.isSelected()){ for (int i=0;i<myRecipe.getMaltListSize();i++){ myRecipe.getFermentable(i).convertTo(maltUnitsComboModel.getSelectedItem().toString()); } } if (convHopsChk.isSelected()){ for (int i=0;i<myRecipe.getHopsListSize();i++){ myRecipe.getHop(i).convertTo(hopsUnitsComboModel.getSelectedItem().to...
private void scaleRecipe() { String newUnits = sizeUnitsComboModel.getSelectedItem().toString(); double newSize = Double.parseDouble(sizeTxt.getText()); myRecipe.scaleRecipe(newSize, newUnits); app.displayRecipe(); app.maltTable.updateUI(); app.hopsTable.updateUI(); }
if ((param1 instanceof Number) && (param2 instanceof Number))
if ((param1 instanceof Complex) && (param2 instanceof Complex)) { int r; switch (id) { case NE: r = ((Complex)param1).equals((Complex)param2,tolerance) ? 0 : 1; break; case EQ: r = ((Complex)param1).equals((Complex)param2,tolerance) ? 1 : 0; break; default: throw new ParseException("Relational operator type error"); }...
public void run(Stack inStack) throws ParseException { checkStack(inStack);// check the stack Object param2 = inStack.pop(); Object param1 = inStack.pop(); if ((param1 instanceof Number) && (param2 instanceof Number)) { double x = ((Number)param1).doubleValue(); double y = ((Number)param2).doubleValue()...
} else if ((param1 instanceof Complex) && (param2 instanceof Complex)) { int r; switch (id) { case NE: r = ((Complex)param1).equals((Complex)param2,tolerance) ? 0 : 1; break; case EQ: r = ((Complex)param1).equals((Complex)param2,tolerance) ? 1 : 0; break; default: throw new ParseException("Relational operator type err...
} else if ((param1 instanceof String) && (param2 instanceof String))
public void run(Stack inStack) throws ParseException { checkStack(inStack);// check the stack Object param2 = inStack.pop(); Object param1 = inStack.pop(); if ((param1 instanceof Number) && (param2 instanceof Number)) { double x = ((Number)param1).doubleValue(); double y = ((Number)param2).doubleValue()...
else return null;
return null;
public Dimensions calcDim(Dimensions ldim,Dimensions rdim) { if(ldim.equals(rdim)) return ldim; else return null; }
public SubversionChangeLogSet parse(File changelogFile) throws IOException, SAXException {
public SubversionChangeLogSet parse(Build build, File changelogFile) throws IOException, SAXException {
public SubversionChangeLogSet parse(File changelogFile) throws IOException, SAXException { // http://svn.collab.net/repos/svn/trunk/subversion/svn/schema/ Digester digester = new Digester(); ArrayList<LogEntry> r = new ArrayList<LogEntry>(); digester.push(r); digester.addObjectCre...
return new SubversionChangeLogSet(r);
return new SubversionChangeLogSet(build,r);
public SubversionChangeLogSet parse(File changelogFile) throws IOException, SAXException { // http://svn.collab.net/repos/svn/trunk/subversion/svn/schema/ Digester digester = new Digester(); ArrayList<LogEntry> r = new ArrayList<LogEntry>(); digester.push(r); digester.addObjectCre...
User user = userRoleList.get((int) Math.random()*userRoleList.size()).getUser();
User user = (User) userRoleList.get((int) Math.random()*userRoleList.size()).getUserGroup();
public void testGrantedAuthorities() { int i = 4, e = 3, d = 4, s = 3; List<UserRole> userRoleList = AuthorizationTestSupport.createUserRoleList(i, e, d, s); User user = userRoleList.get((int) Math.random()*userRoleList.size()).getUser(); Credential credential = AuthenticationDaoImplTest...
miscCommentsTextArea.setPreferredSize(new java.awt.Dimension(136, 272));
private void initGUI() { try { BoxLayout thisLayout = new BoxLayout(this, javax.swing.BoxLayout.X_AXIS); this.setLayout(thisLayout); setPreferredSize(new Dimension(400, 300)); { tablePanel = new JPanel(); this.add(tablePanel); BoxLayout tablePanelLayout = new BoxLayout(tablePanel, javax.swing.BoxLayo...
return ((Double) value).compareTo(pc.zero) > 0;
return ((Double) value).compareTo((Double) pc.zero) > 0;
public boolean isPositive() { try { return ((Double) value).compareTo(pc.zero) > 0; } catch(Exception e) { return false; } }
public void testDoublePut() throws NotFound, SQLException {
public void testDoublePut() throws SQLException {
public void testDoublePut() throws NotFound, SQLException { assertEquals(table.put(TimeUtils.future.getFissuresTime()), table.put(TimeUtils.future.getFissuresTime())); }
assertSame(user, userRole.getUser());
assertSame(user, userRole.getUserGroup());
public void testUserRoleFactory() { Service service = new Service(); User user = new User(); UserRole userRole = AuthorizationCreator.userRoleFactory(user, service, "EXT"); assertSame(service, userRole.getService()); assertSame(user, userRole.getUser()); assertEqual...
public MashStep(String t, double st, double et, String tu, String m, int min,
public MashStep(String t, double st, double et, String m, int min,
public MashStep(String t, double st, double et, String tu, String m, int min, int rmin) { type = t; startTemp = st; endTemp = et; tempU = tu; method = m; minutes = min; rampMin = rmin; }
endTemp = et; tempU = tu;
endTemp = et;
public MashStep(String t, double st, double et, String tu, String m, int min, int rmin) { type = t; startTemp = st; endTemp = et; tempU = tu; method = m; minutes = min; rampMin = rmin; }
grainTemp = opts.getDProperty("optGrainTemp");
grainTempF = opts.getDProperty("optGrainTemp");
public Mash(){ Options opts = new Options("mash"); mashRatio = opts.getDProperty("optMashRatio"); mashRatioU = opts.getProperty("optMashRatioU");; tempUnits = opts.getProperty("optMashTempU"); volUnits = opts.getProperty("optMashVolU"); grainTemp = opts.getDProperty("optGrainTemp"); boilTempF = opts.getDP...
public void addStep(String type, double st, double et, String tu, String m, int min,
public void addStep(String type, double st, double et, String m, int min,
public void addStep(String type, double st, double et, String tu, String m, int min, int rmin) { MashStep step = new MashStep(type, st, et, tu, m, min, rmin); steps.add(step); calcMashSchedule(); }
MashStep step = new MashStep(type, st, et, tu, m, min, rmin);
MashStep step = new MashStep(type, st, et, m, min, rmin);
public void addStep(String type, double st, double et, String tu, String m, int min, int rmin) { MashStep step = new MashStep(type, st, et, tu, m, min, rmin); steps.add(step); calcMashSchedule(); }
private double cToF(double tempC) {
public static double cToF(double tempC) {
private double cToF(double tempC) { // routine to convert Celcius to Farenheit return ((tempC * 9) / 5) + 32; }
double currentTemp = grainTemp;
double currentTemp = grainTempF;
public void calcMashSchedule() { // Method to run through the mash table and calculate values double strikeTemp = 0; double targetTemp = 0; double endTemp = 0; double waterAddedQTS = 0; double waterEquiv = 0; double mr = mashRatio; double currentTemp = grainTemp; double displTemp = 0; double tunLoss = tunL...
private double fToC(double tempF) {
public static double fToC(double tempF) {
private double fToC(double tempF) { // routine to convert basic F temps to C return (5 * (tempF - 32)) / 9; }
public double getGrainTemp() { return grainTemp; }
public double getGrainTemp() { if (tempUnits.equals("F")) return grainTempF; else return fToC(grainTempF); }
public double getGrainTemp() { return grainTemp; }
grainTemp = t;
if (tempUnits.equals("F")) grainTempF = t; else grainTempF = cToF(t);
public void setGrainTemp(double t){ grainTemp = t; calcMashSchedule(); }
totalWeight = Quantity.convertUnit(weightUCombo.getSelectedItem().toString(), "lb", totalWeight);
private void calcWeights() { // we've set the % in the fermentables list, now // let's figure out the correct amounts: // by weight? if (weightBtn.isSelected()) { double totalWeight = Double.parseDouble(weightSpn.getValue().toString()); for (int i = 0; i < myRecipe.getMaltListSize(); i++) { double newAmou...
weightSpn.setValue(new Double(myRecipe.getTotalMaltLbs()));
weightSpn.setValue(new Double(myRecipe.getTotalMalt()));
private void initGUI() { try { this.setTitle("Malt Percent"); TableModel maltTableModel = new MaltPercentTableModel(); jPanel5 = new JPanel(); BoxLayout jPanel5Layout = new BoxLayout(jPanel5, javax.swing.BoxLayout.Y_AXIS); jPanel5.setLayout(jPanel5Layout); getContentPane().add(jPanel5, BorderLayout.CENTER);...
jLabel1 = new JLabel(); jPanel4.add(jLabel1, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel1.setText("lbs");
ComboModel weightUComboModel = new ComboModel(); weightUComboModel.setList(new Quantity().getListofUnits("weight")); weightUComboModel.addOrInsert(myRecipe.getMaltUnits()); weightUCombo = new JComboBox(); jPanel4.add(weightUCombo, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstrain...
private void initGUI() { try { this.setTitle("Malt Percent"); TableModel maltTableModel = new MaltPercentTableModel(); jPanel5 = new JPanel(); BoxLayout jPanel5Layout = new BoxLayout(jPanel5, javax.swing.BoxLayout.Y_AXIS); jPanel5.setLayout(jPanel5Layout); getContentPane().add(jPanel5, BorderLayout.CENTER);...
cmd.add(module);
cmd.addTokenized(module);
public boolean checkout(Build build, Launcher launcher, FilePath dir, BuildListener listener, File changelogFile) throws IOException { List<String> changedFiles = null; // files that were affected by update. null this is a check out if(canUseUpdate && isUpdatable(dir.getLocal())) { changedF...
else {
public Node differentiate(ASTFunNode node,String var,Node [] children,Node [] dchildren,DJep djep) throws ParseException { OperatorSet opset = djep.getOperatorSet(); NodeFactory nf = djep.getNodeFactory(); Operator op = opset.getMultiply(); if(mulOp!=null) op = mulOp; int nchild = node.jjtGetNumChildren(); i...
}
public Node differentiate(ASTFunNode node,String var,Node [] children,Node [] dchildren,DJep djep) throws ParseException { OperatorSet opset = djep.getOperatorSet(); NodeFactory nf = djep.getNodeFactory(); Operator op = opset.getMultiply(); if(mulOp!=null) op = mulOp; int nchild = node.jjtGetNumChildren(); i...
j.dv.addStandardDiffRules();
j.addStandardDiffRules();
protected void setUp() { j = new MatrixJep(); j.addStandardConstants(); j.addStandardFunctions(); j.addComplex(); //j.setTraverse(true); j.setAllowAssignment(true); j.setAllowUndeclared(true); j.setImplicitMul(true); j.dv.addStandardDiffRules(); }
String res = j.pv.toString(simp);
String res = j.toString(simp);
public void simplifyTest(String expr,String expected) throws ParseException { Node node = j.parse(expr); MatrixNodeI matEqn = j.dec.preprocess(node,j); Node simp = j.simplify(matEqn); String res = j.pv.toString(simp); Node node2 = j.parse(expected); MatrixNodeI matEqn2 = j.dec.preprocess(node2,j); Node simp2 ...
String res2 = j.pv.toString(simp2);
String res2 = j.toString(simp2);
public void simplifyTest(String expr,String expected) throws ParseException { Node node = j.parse(expr); MatrixNodeI matEqn = j.dec.preprocess(node,j); Node simp = j.simplify(matEqn); String res = j.pv.toString(simp); Node node2 = j.parse(expected); MatrixNodeI matEqn2 = j.dec.preprocess(node2,j); Node simp2 ...
String res = j.pv.toString(matEqn);
String res = j.toString(matEqn);
public void simplifyTestString(String expr,String expected) throws ParseException { Node node = j.parse(expr); MatrixNodeI matEqn = j.dec.preprocess(node,j); String res = j.pv.toString(matEqn); if(!expected.equals(res)) System.out.println("Error: Value of \""+expr+"\" is \""+res+"\" should be \""+expected+"\...
stat.executeUpdate("create temp table testobj ("
stat.executeUpdate("create table testobj ("
@Test public void getObject() throws SQLException { stat.executeUpdate("create temp table testobj (" + "c1 integer, c2 float, c3, c4 varchar, c5 bit, c6, c7);"); PreparedStatement prep = conn.prepareStatement( "insert into testobj values (?,?,?,?,?,?,?);"); prep.setInt ...
stat.executeUpdate("create temp table in1000 (a);");
stat.executeUpdate("create table in1000 (a);");
@Test public void insert1000() throws SQLException { stat.executeUpdate("create temp table in1000 (a);"); PreparedStatement prep = conn.prepareStatement( "insert into in1000 values (?);"); conn.setAutoCommit(false); for (int i=0; i < 1000; i++) { prep.setInt(1, ...
double bugu = myRecipe.getIbu() / (myRecipe.getEstOg() - 1) * 1000; ogbuLbl.setText("" + SBStringUtils.format(bugu, 1));
ogbuLbl.setText("" + SBStringUtils.format(myRecipe.getBUGU(), 1));
public void setStyleData(){ Style s = (Style) cmbStyle2Model.getSelectedItem(); // descriptionTextArea.setText(s.getDescription()); // cmbStyle2.setToolTipText(multiLineToolTip(50,s.getDescription())); stlLowOG.setText(SBStringUtils.format(s.ogLow, 3)); stlRcpOG.setText(SBStringUtils.format(myRecipe.getEstOg(), 3...
TestResultAction action = new TestResultAction(build, fs.getDirectoryScanner(p), listener);
if(ds.getIncludedFiles().length==0) { listener.getLogger().println("No test report files wer efound. Configuration error?"); build.setResult(Result.FAILURE); } TestResultAction action = new TestResultAction(build, ds, listener);
public boolean perform(Build build, Launcher launcher, BuildListener listener) { FileSet fs = new FileSet(); Project p = new Project(); fs.setProject(p); fs.setDir(build.getProject().getWorkspace().getLocal()); fs.setIncludes(testResults); TestResultAction action = new Test...
listener.getLogger().println("No test report is found. Configuration error?");
listener.getLogger().println("Test reports were found but none of them are new. Did tests run?");
public boolean perform(Build build, Launcher launcher, BuildListener listener) { FileSet fs = new FileSet(); Project p = new Project(); fs.setProject(p); fs.setDir(build.getProject().getWorkspace().getLocal()); fs.setIncludes(testResults); TestResultAction action = new Test...
return isFolder?"folder.png":"text.png";
return isFolder?"folder.gif":"text.gif";
public String getIconName() { return isFolder?"folder.png":"text.png"; }
if(state!=State.COMPLETED) return null;
public final Result getResult() { if(state!=State.COMPLETED) return null; return result; }
&& ( ((ASTConstant) node).getValue() instanceof Number );
&& ( ((ASTConstant) node).getValue() instanceof Double );
public boolean isReal(Node node) { return (node instanceof ASTConstant) && ( ((ASTConstant) node).getValue() instanceof Number ); }
Trigger.init();
public void contextInitialized(ServletContextEvent event) { File home = getHomeDir(event); home.mkdirs(); System.out.println("hudson home directory: "+home); try { event.getServletContext().setAttribute("app",new Hudson(home)); } catch( IOException e ) { thro...
public void fireDownloadFileChanged( SWDownloadFile file )
private void fireDownloadFileChanged( final int position )
public void fireDownloadFileChanged( SWDownloadFile file ) { int position = downloadList.indexOf( file ); if ( position >= 0 ) { fireDownloadFileChanged( position ); } }
int position = downloadList.indexOf( file ); if ( position >= 0 )
AsynchronousDispatcher.invokeLater( new Runnable()
public void fireDownloadFileChanged( SWDownloadFile file ) { int position = downloadList.indexOf( file ); if ( position >= 0 ) { fireDownloadFileChanged( position ); } }
fireDownloadFileChanged( position ); }
public void run() { Object[] listeners = listenerList.toArray(); DownloadFilesChangeListener listener; for ( int i = listeners.length - 1; i >= 0; i-- ) { listener = (DownloadFilesChangeListener)listeners[ i ]; listener.downloadFileChanged( position ); } } });
public void fireDownloadFileChanged( SWDownloadFile file ) { int position = downloadList.indexOf( file ); if ( position >= 0 ) { fireDownloadFileChanged( position ); } }
public void run(Stack inStack) throws ParseException { if (null == inStack) {
public void run(Stack stack) throws ParseException { if (null == stack) {
public void run(Stack inStack) throws ParseException { /* Check if stack is null */ if (null == inStack) { throw new ParseException("Stack argument null"); } Object param = null; double r = 0; while(!inStack.isEmpty()) { // get the parameter from the stack ...
double r = 0; while(!inStack.isEmpty()) {
double result = 0; int i = 0; while (i < curNumberOfParameters) {
public void run(Stack inStack) throws ParseException { /* Check if stack is null */ if (null == inStack) { throw new ParseException("Stack argument null"); } Object param = null; double r = 0; while(!inStack.isEmpty()) { // get the parameter from the stack ...
param = inStack.pop();
param = stack.pop();
public void run(Stack inStack) throws ParseException { /* Check if stack is null */ if (null == inStack) { throw new ParseException("Stack argument null"); } Object param = null; double r = 0; while(!inStack.isEmpty()) { // get the parameter from the stack ...
r += ((Double) param).doubleValue();
result += ((Double) param).doubleValue(); } else { throw new ParseException("Invalid parameter type");
public void run(Stack inStack) throws ParseException { /* Check if stack is null */ if (null == inStack) { throw new ParseException("Stack argument null"); } Object param = null; double r = 0; while(!inStack.isEmpty()) { // get the parameter from the stack ...
else throw new ParseException("Invalid parameter type");
i++;
public void run(Stack inStack) throws ParseException { /* Check if stack is null */ if (null == inStack) { throw new ParseException("Stack argument null"); } Object param = null; double r = 0; while(!inStack.isEmpty()) { // get the parameter from the stack ...
inStack.push(new Double(r));
stack.push(new Double(result));
public void run(Stack inStack) throws ParseException { /* Check if stack is null */ if (null == inStack) { throw new ParseException("Stack argument null"); } Object param = null; double r = 0; while(!inStack.isEmpty()) { // get the parameter from the stack ...
if (logger.isDebugEnabled()) { logger.debug("Persisted "+userGroup); } } else { if (logger.isDebugEnabled()) { logger.debug("Retrieved "+userGroup); }
public UserGroup findOrCreateUserGroup(Entity entity, String groupName) { Identity groupIdentity = authenticationDao.findIdentityByPrincipal(groupName); if (groupIdentity==null) { groupIdentity = AuthenticationCreator.identityFactory(groupName, groupName); groupIdentity.setIdenti...
private Dimensions() {};
private Dimensions() {}
private Dimensions() {};
private Complex parseNextLine(BufferedReader reader) { Complex value;
private Object parseNextLine(BufferedReader reader) throws Exception { Object value;
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(...
try { line = reader.readLine(); lineCount++; } catch (Exception e) { return null; }
line = reader.readLine(); lineCount++; if (line == null) return null; } while (line.length() == 0 || line.trim().charAt(0) == '#');
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(...
if (line==null) return null; } while (line.length()==0 || line.trim().charAt(0)=='#');
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(...
errorStr = myParser.getErrorInfo(); if (errorStr != null) { println("Error while parsing line " + lineCount + ": " + errorStr); return null;
if (myParser.hasError()) { errorStr = myParser.getErrorInfo(); throw new Exception("Error while parsing 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(...
value = myParser.getComplexValue();
value = myParser.getValueAsObject();
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(...
errorStr = myParser.getErrorInfo(); if ((value == null) || (errorStr != null)) { println("Error while evaluating line " + lineCount + ": " + errorStr); return null;
if (value == null || myParser.hasError()) { errorStr = myParser.getErrorInfo(); throw new Exception("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(...
Complex c1, c2;
Object v1, v2;
public void run(String fileName) { BufferedReader reader; Complex c1, c2; boolean hasError = false; // Load the input file try { reader = new BufferedReader(new FileReader(fileName)); } catch (Exception e) { println("File \""+fileName+"\" not found"); return; } // reset the line count lineCount = 0; ...
c1 = parseNextLine(reader); c2 = parseNextLine(reader);
try { v1 = parseNextLine(reader); v2 = parseNextLine(reader); } catch (Exception e) { println(e.getMessage()); hasError = true; break; }
public void run(String fileName) { BufferedReader reader; Complex c1, c2; boolean hasError = false; // Load the input file try { reader = new BufferedReader(new FileReader(fileName)); } catch (Exception e) { println("File \""+fileName+"\" not found"); return; } // reset the line count lineCount = 0; ...
if (c1==null || c2==null) break; if (!c1.equals(c2,1e-15)) {
if (v1 == null || v2 == null) { println("Reached end of file."); break; } try { if (!equal(v1, v2)) { hasError = true; print("Line: " + lineCount + ": "); println(v1.toString() + " != " + v2.toString()); } } catch (Exception e) {
public void run(String fileName) { BufferedReader reader; Complex c1, c2; boolean hasError = false; // Load the input file try { reader = new BufferedReader(new FileReader(fileName)); } catch (Exception e) { println("File \""+fileName+"\" not found"); return; } // reset the line count lineCount = 0; ...
print("Line: " + lineCount + ": "); if (c1.im() == 0) print("" + c1.re() + " != "); else print("" + c1 + " != "); if (c2.im() == 0) println("" + c2.re()); else println("" + c2);
println(e.getMessage());
public void run(String fileName) { BufferedReader reader; Complex c1, c2; boolean hasError = false; // Load the input file try { reader = new BufferedReader(new FileReader(fileName)); } catch (Exception e) { println("File \""+fileName+"\" not found"); return; } // reset the line count lineCount = 0; ...
if (!hasError) { print("\n" + lineCount + " lines processed. No errors were found.\n\n");
print("\n" + lineCount + " lines processed. "); if (hasError) { print("Errors were found.\n\n"); } else { print("No errors were found.\n\n");
public void run(String fileName) { BufferedReader reader; Complex c1, c2; boolean hasError = false; // Load the input file try { reader = new BufferedReader(new FileReader(fileName)); } catch (Exception e) { println("File \""+fileName+"\" not found"); return; } // reset the line count lineCount = 0; ...
sitMap.clear(); chanMap.clear();
public void setChannels(String netCode, String stationCode) { NetworkAccess netAccess = (edu.iris.Fissures.IfNetwork.NetworkAccess) netMap.get(netCode); Station station = (edu.iris.Fissures.IfNetwork.Station) staMap.get(stationCode); Channel[] allChannels = netAccess.retrieve_for_station(station.get_id()); for (i...
staMap.clear();
public void setStations(String netcode) { edu.iris.Fissures.IfNetwork.NetworkAccess netAccess = (edu.iris.Fissures.IfNetwork.NetworkAccess) netMap.get(netcode); edu.iris.Fissures.IfNetwork.Station[] allstations = netAccess.retrieve_stations(); Set staSet = new HashSet(); for (int i=0; i < allstations.length; i++) ...
return node.getNodeName();
return getNode().getNodeName();
public String getDisplayName() { return node.getNodeName(); }
if(p.getAssignedNode()==node)
if(p.getAssignedNode()==getNode())
public List<Project> getTiedJobs() { List<Project> r = new ArrayList<Project>(); for( Job j : Hudson.getInstance().getJobs() ) { if (j instanceof Project) { Project p = (Project) j; if(p.getAssignedNode()==node) r.add(p); } ...
req.setCharacterEncoding("UTF-8");
public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { if(!Hudson.adminCheck(req,rsp)) return; description = req.getParameter("description"); if(req.getParameter("logrotate")!=null) logRotator = LogRotator....
private Date parseDate(final String date) { try { return c_inputDate.parse(date); } catch (ParseException e) { StringWriter w = new StringWriter(); w.write("Failed to parse "); w.write(date); w.write('\n'); e.printStackTrace(new PrintWriter(w)); owner.log(w.toString(), Project.MSG_ERR); return null;
private Date parseDate(String date) { for (SimpleDateFormat df : c_inputDate) { try { return df.parse(date); } catch (ParseException e) { }
private Date parseDate(final String date) { try { return c_inputDate.parse(date); } catch (ParseException e) { StringWriter w = new StringWriter(); w.write("Failed to parse "); w.write(date); w.write('\n'); e.printStackTrace(new PrintWr...
owner.log("Failed to parse "+date+"\n", Project.MSG_ERR); return null;
private Date parseDate(final String date) { try { return c_inputDate.parse(date); } catch (ParseException e) { StringWriter w = new StringWriter(); w.write("Failed to parse "); w.write(date); w.write('\n'); e.printStackTrace(new PrintWr...
ShapeType(String typeID, String name, boolean isSelected) {
ShapeType(String typeID, String name, String color, boolean isSelected) {
ShapeType(String typeID, String name, boolean isSelected) { this.typeID = typeID; this.name = name; this.isSelected = isSelected; }
this.color = color;
ShapeType(String typeID, String name, boolean isSelected) { this.typeID = typeID; this.name = name; this.isSelected = isSelected; }
swarmingMgr = SwarmingManager.getInstance();
public void run() { while ( !isShutingDown ) { try { writeDownloadData(); synchronized( this ) { wait( 5000 ); } } catch (Throwable th) { NLogger.erro...
List<SWDownloadFile> downloadList = SwarmingManager.getInstance().getDownloadFileListCopy();
List<SWDownloadFile> downloadList = swarmingMgr.getDownloadFileListCopy();
private void writeDownloadData() { long totalBufferedSize = 0; boolean performCompleteWrite = false; if ( isShutingDown || lastCompleteWrite + DateUtils.MILLIS_PER_MINUTE < System.currentTimeMillis() ) { NLogger.debug(DownloadDataWriter.class, "Time for complete...
memoryFile.isBufferWritingRequested() ||
private void writeDownloadData() { long totalBufferedSize = 0; boolean performCompleteWrite = false; if ( isShutingDown || lastCompleteWrite + DateUtils.MILLIS_PER_MINUTE < System.currentTimeMillis() ) { NLogger.debug(DownloadDataWriter.class, "Time for complete...
if (!o.getClass().getName().endsWith("JTextField"))
if (!o.getClass().getName().endsWith("TextField"))
public void actionPerformed(ActionEvent e) { Object o = e.getSource(); String s = ""; // String t = ""; if (!o.getClass().getName().endsWith("JTextField")) return; s = ((JTextField) o).getText(); // t = s.replace(',','.'); // accept also european decimal komma if (o == txtName) myRecipe.setName(s); els...
else if (o == txtPreBoil) {
else if (o == preBoilText) {
public void actionPerformed(ActionEvent e) { Object o = e.getSource(); String s = ""; // String t = ""; if (!o.getClass().getName().endsWith("JTextField")) return; s = ((JTextField) o).getText(); // t = s.replace(',','.'); // accept also european decimal komma if (o == txtName) myRecipe.setName(s); els...
txtPreBoil.addFocusListener(this); txtPreBoil.addActionListener(this);
preBoilText.addFocusListener(this); preBoilText.addActionListener(this); postBoilText.addFocusListener(this); postBoilText.addActionListener(this);
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...
postBoilText.addFocusListener(new FocusAdapter() {
/* postBoilText.addFocusListener(new FocusAdapter() {
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...
}); postBoilText.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { myRecipe.setPostBoil(Double.parseDouble(postBoilText.getText() .toString()));
});*/
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...
displayRecipe(); } });
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...
recipeSettingsActionPerformed(evt);
Fermentable f = (Fermentable) cmbMaltModel .getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1 ) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ f2.setLov(f.getLov()); f2.setPppg(f.getPppg()); f2.setDescription(f.getDescription()); f2.setMashed(f.getMashed()); f2.setS...
public void actionPerformed(ActionEvent evt) { recipeSettingsActionPerformed(evt); }
recipeSettingsActionPerformed(evt);
String u = (String) cmbMaltUnitsModel.getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ f2.convertTo(u); myRecipe.calcMaltTotals(); displayRecipe(); } }
public void actionPerformed(ActionEvent evt) { recipeSettingsActionPerformed(evt); }
Fermentable f = (Fermentable) cmbMaltModel .getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1 ) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ f2.setLov(f.getLov()); f2.setPppg(f.getPppg()); f2.setDescription(f.getDescription()); f2.setMashed(f.getMashed()); f2.setS...
Hop h = (Hop) cmbHopsModel.getSelectedItem(); int i = hopsTable.getSelectedRow(); if (myRecipe != null && i != -1) { Hop h2 = myRecipe.getHop(i); h2.setAlpha(h.getAlpha()); h2.setDescription(h.getDescription()); h2.setCost(h.getCostPerU());
public void actionPerformed(ActionEvent evt) { Fermentable f = (Fermentable) cmbMaltModel .getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1 ) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ f2.setLov(f.getLov()); f2.setPppg(f.getPppg...