rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public RecipeDetailsView getRecipeDetailsView() { | public RecipeDetailsView getRecipeDetailsView(String title) { | public RecipeDetailsView getRecipeDetailsView() { TabItem details = new TabItem(myFolder, SWT.NONE); details.setText("Recipe Details"); Group group = new Group(myFolder, SWT.NONE); details.setControl(group); return new SWTRecipeDetailsView(group); } |
details.setText("Recipe Details"); | details.setText(title); | public RecipeDetailsView getRecipeDetailsView() { TabItem details = new TabItem(myFolder, SWT.NONE); details.setText("Recipe Details"); Group group = new Group(myFolder, SWT.NONE); details.setControl(group); return new SWTRecipeDetailsView(group); } |
myLayout = new FillLayout(); myLayout.type = SWT.VERTICAL; | myLayout = new FormLayout(); | public void init() { myLayout = new FillLayout(); myLayout.type = SWT.VERTICAL; myShell.setLayout(myLayout); // @TODO Create a separate view/controller for the TabFolder myFolder = new TabFolder(myShell, SWT.NONE); } |
myRecipeNavigationGroup = new Group(myShell, SWT.NONE); | public void init() { myLayout = new FillLayout(); myLayout.type = SWT.VERTICAL; myShell.setLayout(myLayout); // @TODO Create a separate view/controller for the TabFolder myFolder = new TabFolder(myShell, SWT.NONE); } | |
attach(myRecipeNavigationGroup, null, 0, 0, 0); attach(myFolder, myRecipeNavigationGroup, 0, 0, 5); myRecipeNavigationGroup.pack(); myFolder.layout(); myFolder.pack(); | public void layout() { myShell.layout(); myShell.pack(); } | |
digester.addBeanPropertySetter("*/logentry/author"); | digester.addBeanPropertySetter("*/logentry/author","user"); | public SubversionChangeLogSet parse(Build build, 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... |
public SubversionChangeLogSet(List<LogEntry> logs) { | SubversionChangeLogSet(Build build, List<LogEntry> logs) { this.build = build; | public SubversionChangeLogSet(List<LogEntry> logs) { this.logs = Collections.unmodifiableList(logs); } |
Node processed = j.commandv.process(node,j); | Node processed = j.preprocess(node); | public Node parseProcSimpEval(String expr,Object expected) throws ParseException,Exception { Node node = j.parse(expr); Node processed = j.commandv.process(node,j); Node simp = j.simplify(processed); Object res = j.evaluate(simp); if(!expected.equals(res)) System.out.println("Error: Value of \""+expr+"\" is... |
public Node process(Node node,XJep xjep) throws ParseException | public Node process(Node node,XJep xj) throws ParseException | public Node process(Node node,XJep xjep) throws ParseException { this.xjep=xjep; Node res = (Node) node.jjtAccept(this,null); return res; } |
this.xjep=xjep; | this.xjep=xj; | public Node process(Node node,XJep xjep) throws ParseException { this.xjep=xjep; Node res = (Node) node.jjtAccept(this,null); return res; } |
seismos.put(seis, timeConfig.getTimeRange(seis)); | public void addSeismogram(DataSetSeismogram seis){ timeConfig.addSeismogram(seis, timeFinder.getBeginTime(seis)); seismos.put(seis, timeConfig.getTimeRange(seis)); } | |
if(timeConfig.contains(seis)){ | /*if(timeConfig.contains(seis)){ | public boolean contains(DataSetSeismogram seis){ if(seismos.containsKey(seis)){ return true; } if(timeConfig.contains(seis)){ seismos.put(seis, timeConfig.getTimeRange(seis)); return true; } return false; } |
} | }*/ | public boolean contains(DataSetSeismogram seis){ if(seismos.containsKey(seis)){ return true; } if(timeConfig.contains(seis)){ seismos.put(seis, timeConfig.getTimeRange(seis)); return true; } return false; } |
&& rec.getAlternateLocations() != null | private void parseBody() { if ( isParsed ) { return; } // Already read the header. int offset = 0; byte n = body[offset++]; short recordCount = (short)(n < 0 ? 256 + n : n); // parsing of port and ip is done on demand in getHostAddress() and ... | |
if (param instanceof Number) | if (param instanceof Complex) { return ((Complex)param).tanh(); } else if (param instanceof Number) | public Object tanh(Object param) throws ParseException { if (param instanceof Number) { double value = ((Number)param).doubleValue(); return new Double((Math.exp(value)-Math.exp(-value))/(Math.pow(Math.E,value)+Math.pow(Math.E,-value))); } else if (param instanceof Complex) { return ((Complex)param).tanh()... |
else if (param instanceof Complex) { return ((Complex)param).tanh(); } | public Object tanh(Object param) throws ParseException { if (param instanceof Number) { double value = ((Number)param).doubleValue(); return new Double((Math.exp(value)-Math.exp(-value))/(Math.pow(Math.E,value)+Math.pow(Math.E,-value))); } else if (param instanceof Complex) { return ((Complex)param).tanh()... | |
if (param instanceof Number) | if (param instanceof Complex) { return ((Complex)param).acos(); } else if (param instanceof Number) | public Object acos(Object param) throws ParseException { if (param instanceof Number) { return new Double(Math.acos(((Number)param).doubleValue())); } else if (param instanceof Complex) { return ((Complex)param).acos(); } throw new ParseException("Invalid parameter type"); } |
} else if (param instanceof Complex) { return ((Complex)param).acos(); | public Object acos(Object param) throws ParseException { if (param instanceof Number) { return new Double(Math.acos(((Number)param).doubleValue())); } else if (param instanceof Complex) { return ((Complex)param).acos(); } throw new ParseException("Invalid parameter type"); } | |
setVerticalTitle("East-West"); }else if(orientation.equals(labelStrings[1])){ setHorizontalTitle("Up-Down"); setVerticalTitle("North-South"); | public void itemStateChanged(ItemEvent ae) { if(ae.getStateChange() == ItemEvent.SELECTED) { String orientation = ((AbstractButton)ae.getItem()).getText(); view.setDisplayKey(orientation); if(orientation.equals(labelStrings[0])){ setHori... | |
setHorizontalTitle("Up-Down"); setVerticalTitle("East-West"); | setVerticalTitle("Up-Down"); setHorizontalTitle("East-West"); | public void itemStateChanged(ItemEvent ae) { if(ae.getStateChange() == ItemEvent.SELECTED) { String orientation = ((AbstractButton)ae.getItem()).getText(); view.setDisplayKey(orientation); if(orientation.equals(labelStrings[0])){ setHori... |
hAmpScaleMap = new AmpScaleMapper(50, 4); vAmpScaleMap = new AmpScaleMapper(50, 4); | hAmpScaleMap = new UpdatingAmpScaleMapper(50, 4); vAmpScaleMap = new UpdatingAmpScaleMapper(50, 4); | public ParticleMotionDisplay(DataSetSeismogram datasetSeismogram, TimeConfig tc, Color color) { particleDisplayPanel = new JPanel(new BorderLayout()); radioPanel = new JPanel(new GridLayout(1, 0)); setLayout(new BorderLayout()); view = new Particle... |
logger.debug("Setting the size"); | public void setSize(Dimension d) { logger.debug("Setting the size"); if (d.width < d.height) { super.setSize(new Dimension(d.width, d.width)); } else { super.setSize(new Dimension(d.height, d.hei... | |
else { MatrixNodeI node1 = (MatrixNodeI) children[0]; Dimensions dim = Dimensions.valueOf(children.length,node1.getDim()); ASTMFunNode res = (ASTMFunNode) nf.buildOperatorNode(listOp,children,dim); return res; } | MatrixNodeI node1 = children[0]; Dimensions dim = Dimensions.valueOf(children.length,node1.getDim()); ASTMFunNode res = (ASTMFunNode) nf.buildOperatorNode(listOp,children,dim); return res; | public MatrixNodeI preprocess( ASTFunNode node, MatrixPreprocessor visitor, MatrixJep jep, MatrixNodeFactory nf) throws ParseException { MatrixNodeI children[] = visitor.visitChildrenAsArray(node,null); Operator listOp = ((MatrixOperatorSet) jep.getOperatorSet()).getMList(); // What if we have x=[1,2]; y = [x,... |
QueryResponseMsg message = null; | public void sendBrowseHostRequest() throws IOException, BrowseHostException { NLogger.debug(BrowseHostConnection.class, "Connection for Browse Host to " + address ); results.setBrowseHostStatus( BrowseHostResults.BrowseHostStatus.CONNECTING ); SocketFacade socket; tr... | |
message = ( QueryResponseMsg )MessageProcessor.parseMessage( | QueryResponseMsg message = ( QueryResponseMsg )MessageProcessor.parseMessage( | public void sendBrowseHostRequest() throws IOException, BrowseHostException { NLogger.debug(BrowseHostConnection.class, "Connection for Browse Host to " + address ); results.setBrowseHostStatus( BrowseHostResults.BrowseHostStatus.CONNECTING ); SocketFacade socket; tr... |
msgMgr.getQueryResultMonitor().processResponse( message ); results.processResponse( message ); | public void sendBrowseHostRequest() throws IOException, BrowseHostException { NLogger.debug(BrowseHostConnection.class, "Connection for Browse Host to " + address ); results.setBrowseHostStatus( BrowseHostResults.BrowseHostStatus.CONNECTING ); SocketFacade socket; tr... | |
throws InvalidMessageException | public synchronized void processQueryResponse( QueryResponseMsg msg ) { // TODO this can be optimized by checking for the msgID of the query.. for (int i = 0; i < searchList.size(); i++) { Search search = (Search)searchList.get( i ); if ( search instanceof BrowseHostRes... | |
browseHostError = NO_ERROR; | public void startSearching() { isSearching = true; browseHostError = NO_ERROR; Runnable runner = new Runnable() { public void run() { BrowseHostConnection connection = new BrowseHostConnection( destAddress, hostGUID, BrowseHostRe... | |
browseHostError = BROWSE_HOST_ERROR; | browseHostStatus = BROWSE_HOST_ERROR; | public void startSearching() { isSearching = true; browseHostError = NO_ERROR; Runnable runner = new Runnable() { public void run() { BrowseHostConnection connection = new BrowseHostConnection( destAddress, hostGUID, BrowseHostRe... |
browseHostError = CONNECTION_ERROR; | browseHostStatus = CONNECTION_ERROR; | public void startSearching() { isSearching = true; browseHostError = NO_ERROR; Runnable runner = new Runnable() { public void run() { BrowseHostConnection connection = new BrowseHostConnection( destAddress, hostGUID, BrowseHostRe... |
result.nextBuildNumber = 1; | public synchronized Job doCreateJob( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { if(!Hudson.adminCheck(req,rsp)) return null; String name = req.getParameter("name").trim(); String className = req.getParameter("type"); String mode = req.getP... | |
private RpCommand(short command){ | RpCommand(short command){ | private RpCommand(short command){ this.command = command; this.aux1 = -1; } |
if (!rs.next() || "Hello World".equals(rs.getInt(1))) { | if (!rs.next() || !"Hello World".equals(rs.getString(1))) { | public boolean run() throws Exception { Class.forName("org.sqlite.JDBC"); Connection conn = DriverManager.getConnection("jdbc:sqlite:"); Statement stat = conn.createStatement(); ResultSet rs; // test calling Function.create(conn, "f1", new Function() { public void... |
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]); int n = tu.intValue(children[1]); Node sub1 = children[0].jjtGetChild(0); Node sub2 = children[0].jjtGetChild(1);... | |
Node vals[] = new Node[(int) n+1]; | Node vals[] = new Node[n+1]; | public Node apply(ASTFunNode node, Node[] children) throws ParseException { OperatorSet opSet = xj.getOperatorSet(); TreeUtils tu = xj.getTreeUtils(); Operator lhsOp = tu.getOperator(children[0]); int n = tu.intValue(children[1]); Node sub1 = children[0].jjtGetChild(0); Node sub2 = children[0].jjtGetChild(1);... |
else return null; | return null; | public Operator getOperator(Node node) { if(isOperator(node)) return ((ASTFunNode) node).getOperator(); else return null; } |
else return false; | return false; | public boolean isInteger(Node node) { if(isReal(node)) { Number val = (Number) ((ASTConstant) node).getValue(); double x = val.doubleValue(); double xInt = Math.rint(x); return x == xInt; } else return false; } |
int len = Math.min(names.length,homes.length); for(int i=0;i<len;i++) { jdks.add(new JDK(names[i],homes[i])); | if(names!=null && homes!=null) { int len = Math.min(names.length,homes.length); for(int i=0;i<len;i++) { jdks.add(new JDK(names[i],homes[i])); } | public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException { useSecurity = req.getParameter("use_security")!=null; numExecutors = Integer.parseInt(req.getParameter("numExecutors")); {// update JDK installations jdks.clear(); Strin... |
h.setDescription(descrBuf); descrBuf = ""; | public void endElement(String namespaceURI, String sName, // simple name String qName // qualified name ) throws SAXException { if (importType == "STRANGEBREW") { if (qName.equalsIgnoreCase("ITEM") && currentList.equalsIgnoreCase("FERMENTABLES")) { r.addMalt(m); m = null; } else if (qName.equalsIgnore... | |
h.setDescription(s); | descrBuf = descrBuf + 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... |
assertEquals("", credential.getVerifyPassword()); | public void testCredentialFactoryString() { Credential credential = factory.credentialFactory("UNIQUE"); assertEquals("UNIQUE", credential.getPrincipal()); assertEquals(8, credential.getPassword().length()); assertTrue(credential.getCreated().compareTo(new Date()) < 1000); ... | |
DefaultEntity defaultEntity = factory.defaultEntityFactory(); assertEquals("", defaultEntity.getSupervisorName()); | public void testDefaultEntityFactory() { // TODO Auto-generated method stub } | |
DefaultEntity defaultEntity = factory.defaultEntityFactory("UNIQUE"); assertEquals("UNIQUE", defaultEntity.getSupervisorName()); | public void testDefaultEntityFactoryString() { // TODO Auto-generated method stub } | |
DefaultEntity defaultEntity = factory.defaultEntityFactory("UNIQUE", 0); assertEquals("UNIQUE", defaultEntity.getSupervisorName()); assertEquals(0, defaultEntity.getPriority()); java.util.Locale defaultLocale = java.util.Locale.getDefault(); assertEquals(defaultLocale.getLanguage(), defaultEntity.getLocale().getLanguag... | public void testDefaultEntityFactoryStringInt() { // TODO Auto-generated method stub } | |
Credential credential = factory.credentialFactory("UNIQUE"); Supervisor supervisor = factory.supervisorFactory(); Individual individual = factory.individualFactory(supervisor, credential); assertEquals("UNIQUE", individual.getAlias()); assertSame(credential, individual.getCredential()); | public void testIndividualFactory() { // TODO Auto-generated method stub } | |
Supervisor supervisor = factory.supervisorFactory(); Organization organization = factory.organizationFactory(supervisor, "UNIQUE"); assertEquals("UNIQUE", organization.getAlias()); assertEquals("UNIQUE", organization.getBusinessName()); | public void testOrganizationFactorySupervisorString() { // TODO Auto-generated method stub } | |
Supervisor supervisor = factory.supervisorFactory(); Organization organization = factory.organizationFactory(supervisor, "UNIQUE", "BSN_NAME"); assertEquals("UNIQUE", organization.getAlias()); assertEquals("BSN_NAME", organization.getBusinessName()); | public void testOrganizationFactorySupervisorStringString() { // TODO Auto-generated method stub } | |
Supervisor supervisor = factory.supervisorFactory(); Credential credential = factory.credentialFactory("UNIQUE"); Entity entity = factory.entityFactory(supervisor, "UNIQUE_ENTITY"); User user = factory.userFactory(entity, credential); assertSame(entity, user.getEntity()); assertSame(credential, user.getCredential()); a... | public void testUserFactoryEntityCredential() { // TODO Auto-generated method stub } | |
rsp.sendRedirect(req.getContextPath()); | rsp.sendRedirect(req.getContextPath()+"/"); | public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException { if(!Hudson.adminCheck(req,rsp)) return; interrupt(); rsp.sendRedirect(req.getContextPath()); } |
j.dv.addStandardDiffRules(); | j.addStandardDiffRules(); | protected void setUp() { j = new DJep(); j.addStandardConstants(); j.addStandardFunctions(); j.addComplex(); //j.setTraverse(true); j.setAllowAssignment(true); j.setAllowUndeclared(true); j.setImplicitMul(true); j.dv.addStandardDiffRules(); } |
buf.flip(); decoder.decode(buf,out,true); buf.compact(); | decode(true); | public void close() throws IOException { buf.flip(); decoder.decode(buf,out,true); buf.compact(); flushOutput(); writer.close(); } |
buf.compact(); | public void close() throws IOException { buf.flip(); decoder.decode(buf,out,true); buf.compact(); flushOutput(); writer.close(); } | |
private void decode() throws IOException { | private void decode(boolean last) throws IOException { | private void decode() throws IOException { buf.flip(); while(true) { CoderResult r = decoder.decode(buf, out, false); if(r==CoderResult.OVERFLOW) { flushOutput(); continue; } if(r==CoderResult.UNDERFLOW) { buf.com... |
CoderResult r = decoder.decode(buf, out, false); | CoderResult r = decoder.decode(buf, out, last); | private void decode() throws IOException { buf.flip(); while(true) { CoderResult r = decoder.decode(buf, out, false); if(r==CoderResult.OVERFLOW) { flushOutput(); continue; } if(r==CoderResult.UNDERFLOW) { buf.com... |
decode(); | decode(false); | public void flush() throws IOException { decode(); flushOutput(); writer.flush(); } |
decode(); | decode(false); | public void write(int b) throws IOException { if(buf.remaining()==0) decode(); buf.put((byte)b); } |
loadRecipes(currentDir); | public FindDialog(JFrame frame) { super(frame); recipes = new ArrayList(); files = new ArrayList(); inst = (StrangeSwing) frame; currentDir = new java.io.File("."); initGUI(); dirLocationText.setText(currentDir.getAbsolutePath()); loadRecipes(currentDir); } | |
if (i > -1) { | if (i > -1 && i < recipes.size()) { | public void actionPerformed(ActionEvent e) { Object o = e.getSource(); if (o == cancelButton) { setVisible(false); dispose(); return; } else if (o == openButton) { int i = recipeTable.getSelectedRow(); if (i > -1) { inst.setRecipe((Recipe) recipes.get(i), (File) files.get(i)); } setVisible(false); ... |
if (file.getName().endsWith("xml") || file.getName().endsWith("qbrew")) { | if (file.getPath().endsWith(".rec") || file.getPath().endsWith(".qbrew") || file.getPath().endsWith(".xml")) { | private void loadRecipes(File dir) { recipes.clear(); files.clear(); for (int i = 0; i < dir.list().length; i++) { File file = new File(dir.list()[i]); if (file.getName().endsWith("xml") || file.getName().endsWith("qbrew")) { Debug.print("Opening: " + file.getName() + ".\n"); // file.getAbsolutePath doesn... |
ImportXml imp = new ImportXml(fileName, "recipe"); Recipe r = imp.handler.getRecipe(); recipes.add(r); files.add(file); | file = new File(fileName); OpenImport openImport = new OpenImport(); r = openImport.openFile(file); if (openImport.getFileType().equals("sb") || openImport.getFileType().equals("qbrew") || openImport.getFileType().equals("promash")) { recipes.add(r); files.add(file); | private void loadRecipes(File dir) { recipes.clear(); files.clear(); for (int i = 0; i < dir.list().length; i++) { File file = new File(dir.list()[i]); if (file.getName().endsWith("xml") || file.getName().endsWith("qbrew")) { Debug.print("Opening: " + file.getName() + ".\n"); // file.getAbsolutePath doesn... |
} else if (openImport.getFileType().equals("beerxml")) { ArrayList rs = openImport.getRecipes(); for (int j=0; j<rs.size(); j++){ recipes.add(rs.get(j)); files.add(file); } } | private void loadRecipes(File dir) { recipes.clear(); files.clear(); for (int i = 0; i < dir.list().length; i++) { File file = new File(dir.list()[i]); if (file.getName().endsWith("xml") || file.getName().endsWith("qbrew")) { Debug.print("Opening: " + file.getName() + ".\n"); // file.getAbsolutePath doesn... | |
String recipeUnitsAbrv = new Quantity().getVolAbrv(myRecipe.getVolUnits()); String mashUnitsAbrv = new Quantity().getVolAbrv(myRecipe.mash.getMashVolUnits()); | String recipeUnitsAbrv = Quantity.getVolAbrv(myRecipe.getVolUnits()); String mashUnitsAbrv = Quantity.getVolAbrv(myRecipe.mash.getMashVolUnits()); | public void displayWater(){ String recipeUnitsAbrv = new Quantity().getVolAbrv(myRecipe.getVolUnits()); String mashUnitsAbrv = new Quantity().getVolAbrv(myRecipe.mash.getMashVolUnits()); totalWaterLbl.setText(myRecipe.getTotalWater()); totalUnitsLbl.setText(recipeUnitsAbrv); usedMashLbl.setText(myRecipe.mash.... |
&& u[i].unit != s) { | && !u[i].unit.equalsIgnoreCase(s)) { | private String getAbrvFromUnit(String t, String s){ int i=0; Converter[] u; if (t == "vol") u = volUnits; else // assume weight u = weightUnits; while (i < u.length && u[i].unit != s) { i++; } if (i >= u.length) return null; else return u[i].abrv; } |
otherTxt.addActionListener(this); | } private void initGUI() { try { jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); jPanel1Layout.rowWeights = new double[]{0.1, 0.1, 0.1, 0.1, 0.1, 0.1}; jPanel1Layout.rowHeights = new int[]{7, 7, 7, 7, 7, 7}; jPanel1Layout.columnWeights = new double[]{0.1, 0.1, 0.1, 0.1}; jPanel1... | |
.andReturn(isA(UserLog.class)); | .andReturn(userLog); | public void testSwitchAuthorizedUserSuccess() { Credential credential = new Credential(); User[] users = createUsersWithSameCredential(credential, 2); UserLog userLog = new UserLog(); userLog.setUser(users[0]); UserDetailsAdapter secureUser = new UserDetailsAdapter... |
JPanel lowerRightPanel = new JPanel(); | lowerRightPanel = new JPanel(); | public void initComponent( DGuiSettings guiSettings ) { addTabAction( CLEAR_SEARCH_RESULTS_ACTION, new ClearSearchResultsAction() ); addTabAction( CREATE_NEW_SEARCH_ACTION, new CreateNewSearchAction() ); addTabAction( CLOSE_SEARCH_ACTION, new CloseSearchAction() ); CellConstra... |
PanelBuilder lowerRightBuilder = new PanelBuilder( lowerRightLayout, lowerRightPanel ); | lowerRightBuilder = new PanelBuilder( lowerRightLayout, lowerRightPanel ); | public void initComponent( DGuiSettings guiSettings ) { addTabAction( CLEAR_SEARCH_RESULTS_ACTION, new ClearSearchResultsAction() ); addTabAction( CREATE_NEW_SEARCH_ACTION, new CreateNewSearchAction() ); addTabAction( CLOSE_SEARCH_ACTION, new CloseSearchAction() ); CellConstra... |
boolean isSearchBarVisible = true; if ( guiSettings != null && guiSettings.isSetSearchBarVisible() ) { isSearchBarVisible = guiSettings.isSearchBarVisible(); } | public void initComponent( DGuiSettings guiSettings ) { addTabAction( CLEAR_SEARCH_RESULTS_ACTION, new ClearSearchResultsAction() ); addTabAction( CREATE_NEW_SEARCH_ACTION, new CreateNewSearchAction() ); addTabAction( CLOSE_SEARCH_ACTION, new CloseSearchAction() ); CellConstra... | |
setSearchListVisible( true ); | setSearchListVisible( isSearchListVisible ); setFilterPanelVisible( isFilterPanelVisible ); | public void initComponent( DGuiSettings guiSettings ) { addTabAction( CLEAR_SEARCH_RESULTS_ACTION, new ClearSearchResultsAction() ); addTabAction( CREATE_NEW_SEARCH_ACTION, new CreateNewSearchAction() ); addTabAction( CLOSE_SEARCH_ACTION, new CloseSearchAction() ); CellConstra... |
actionList.add( new ToggleSearchListAction( true ) ); | actionList.add( new ToggleSearchListAction( isSearchListVisible ) ); actionList.add( filterPanelToggleAction ); | public void initComponent( DGuiSettings guiSettings ) { addTabAction( CLEAR_SEARCH_RESULTS_ACTION, new ClearSearchResultsAction() ); addTabAction( CREATE_NEW_SEARCH_ACTION, new CreateNewSearchAction() ); addTabAction( CLOSE_SEARCH_ACTION, new CloseSearchAction() ); CellConstra... |
filterListBtn = new JToggleButton( Localizer.getString( "SearchTab_FilterList" ), | filterListBtn = new JToggleButton( Localizer.getString( "SearchTab_FilterRules" ), | public SearchFilterPanel( SearchTab tab ) { super(); searchTab = tab; setBorder( BorderFactory.createLineBorder( PhexColors.getBoxPanelBorderColor() ) ); setBackground( UIManager.getDefaults().getColor("window") ); CellConstraints cc = new C... |
if( header.getDataLength() > ( pktDataLength - MsgHeader.DATA_LENGTH ) ) { NLogger.warn( NLoggerNames.UDP_INCOMING_MESSAGES, " Msg Header Data length is invalid " ); } header.countHop(); switch( header.getPayload() ) { case MsgHeader.PING_PAYLOAD : NLogger.debug( NLoggerNames.UDP_INCOMING_MESSAGES, " Recvd Ping from... | public void run() { DatagramPacket packet; while( true ) { packet = readMessage(); if( packet == null ) { continue; } byte[] packetData = packet.getData(); ... | |
PingMsg udpPing = null; | private void handlePing( MsgHeader header, byte[] body, Host fromHost ) { PingMsg udpPing = null; try { udpPing = PingMsg.createUdpPingMsg( header, body, MsgHeader.DATA_LENGTH, fromHost ); NLogger.debug( NLoggerNames.UDP_INCOMING_MESSAGES, " Recieved Udp Ping " + ... | |
udpPing = PingMsg.createUdpPingMsg( header, body, MsgHeader.DATA_LENGTH, fromHost ); | if ( header.getHopsTaken() > 1 ) { throw new InvalidMessageException( "Udp Ping traveled more then 1 hop." ); } PingMsg udpPing = PingMsg.createUdpPingMsg( header, body, MsgHeader.DATA_LENGTH, fromHost ); | private void handlePing( MsgHeader header, byte[] body, Host fromHost ) { PingMsg udpPing = null; try { udpPing = PingMsg.createUdpPingMsg( header, body, MsgHeader.DATA_LENGTH, fromHost ); NLogger.debug( NLoggerNames.UDP_INCOMING_MESSAGES, " Recieved Udp Ping " + ... |
catch ( InvalidMessageException e ) | catch ( InvalidMessageException exp ) | private void handlePong( MsgHeader header, byte[] data, Host fromHost ) { // first check if we had sent a ping to recieve a pong GUID guid = header.getMsgID(); DestAddress address = pingRoutingTable.getAndRemoveRouting( guid ); if( address == null ) { // did not fin... |
dropMessage( header, data, fromHost, "Invalid message: " + exp.getMessage() ); NLogger.warn(NLoggerNames.UDP_INCOMING_MESSAGES, exp, exp ); | private void handlePong( MsgHeader header, byte[] data, Host fromHost ) { // first check if we had sent a ping to recieve a pong GUID guid = header.getMsgID(); DestAddress address = pingRoutingTable.getAndRemoveRouting( guid ); if( address == null ) { // did not fin... | |
public static PongMsg createUdpPongMsg( MsgHeader msgHdr, byte[] data, int offset, Host fromHost ) throws InvalidMessageException { if( ! ( MessageProcessor.isValidUdpMsgHeader( msgHdr ) ) ) { NLogger.warn( NLoggerNames.UDP_INCOMING_MESSAGES, " Could not create udp pong " + "from given byte array. Message Verification ... | public static PongMsg createUdpPongMsg( byte[] bytesMsg, Host fromHost ) throws InvalidMessageException { MsgHeader msgHdr = MsgHeader.createMsgHeader( bytesMsg, 0 ); return createUdpPongMsg( msgHdr, bytesMsg, MsgHeader.DATA_LENGTH, fromHost ); } | public static PongMsg createUdpPongMsg( MsgHeader msgHdr, byte[] data, int offset, Host fromHost ) throws InvalidMessageException { if( ! ( MessageProcessor.isValidUdpMsgHeader( msgHdr ) ) ) { NLogger.warn( NLoggerNames.UDP_INCOMING_MESSAGES, " Could not create udp pong " + ... |
sum = add(sum, param); | sum = add(param, sum); | public void run(Stack stack) throws ParseException { checkStack(stack);// check the stack Object sum = stack.pop(); Object param; int i = 1; // repeat summation for each one of the current parameters while (i < curNumberOfParameters) { // get the parameter from the stack ... |
super.addFunction("ele",new Ele()); | public void addStandardFunctions() { super.addStandardFunctions(); } | |
if (param instanceof Number) { | if (param instanceof Complex) return ((Complex)param).tan(); else if (param instanceof Number) | public Object tan(Object param) throws ParseException { if (param instanceof Number) { return new Double(Math.tan(((Number)param).doubleValue())); } else if (param instanceof Complex) { return ((Complex)param).tan(); } throw new ParseException("Invalid parameter type"); } |
} else if (param instanceof Complex) { return ((Complex)param).tan(); } | public Object tan(Object param) throws ParseException { if (param instanceof Number) { return new Double(Math.tan(((Number)param).doubleValue())); } else if (param instanceof Complex) { return ((Complex)param).tan(); } throw new ParseException("Invalid parameter type"); } | |
phase = new String(eightBytes); | phase = new String(PSNDataFile.chopToLength(eightBytes)); | public PSNPhasePick(DataInputStream data) throws IOException{ dis = data; startTime = new PSNDateTime(dis); dis.readFully(eightBytes); phase = new String(eightBytes); flags = SacTimeSeries.swapBytes((short)dis.readUnsignedShort()); dispYPosition = SacTimeSeries.swapBytes(di... |
travelTimeFileName = new String(sixteenBytes); | travelTimeFileName = new String(PSNDataFile.chopToLength(sixteenBytes)); | public PSNPhasePick(DataInputStream data) throws IOException{ dis = data; startTime = new PSNDateTime(dis); dis.readFully(eightBytes); phase = new String(eightBytes); flags = SacTimeSeries.swapBytes((short)dis.readUnsignedShort()); dispYPosition = SacTimeSeries.swapBytes(di... |
super(aView); | super(aView, aRecipe); | public MainController(MainView aView, Recipe aRecipe) { super(aView); myContents = aView; myRecipe = aRecipe; } |
myRecipe = aRecipe; | public MainController(MainView aView, Recipe aRecipe) { super(aView); myContents = aView; myRecipe = aRecipe; } | |
myRecipeNavigation.dispose(); | public void dispose() { myRecipeDetails.dispose(); myView.dispose(); } | |
RecipeDetailsView newView = myContents.getRecipeDetailsView(); myRecipeDetails = new RecipeDetailsController(newView, myRecipe); | RecipeNavigationView nv = myContents.getRecipeNavigationView(); myRecipeNavigation = new RecipeNavigationController(nv, myRecipe); myRecipeNavigation.init(); RecipeDetailsView dv = myContents.getRecipeDetailsView("Recipe Details"); myRecipeDetails = new RecipeDetailsController(dv, myRecipe); | public void init() { myView.init(); RecipeDetailsView newView = myContents.getRecipeDetailsView(); myRecipeDetails = new RecipeDetailsController(newView, myRecipe); myRecipeDetails.init(); myView.layout(); } |
return Rotate.rotate(x, y, (180-distAz.baz)*Math.PI/180); | return Rotate.rotate(x, y, -1*(180+distAz.baz)*Math.PI/180); | public static float[][] rotateGCP(LocalSeismogramImpl x, LocalSeismogramImpl y, Location staLoc, Location evtLoc) { DistAz distAz = new DistAz(staLoc.latitude, staLoc.longitude, ... |
buf.append("See ").append(baseUrl).append(build.getUrl()).append("\n\n"); | buf.append("See ").append(baseUrl).append(Util.encode(build.getUrl())).append("\n\n"); | private void appendBuildUrl(Build build, StringBuffer buf) { String baseUrl = DESCRIPTOR.getUrl(); if(baseUrl!=null) { buf.append("See ").append(baseUrl).append(build.getUrl()).append("\n\n"); } } |
String expect = "where identity.identityType != 'G' and (" + | String expect = "and (" + | public void testCreateCriteriaAsStringFull() { filter.setNameOrAliasSearch("nameOrAliasSearch"); filter.setPrincipalSearch("principalSearch"); String criteria = identitySelectionStrategy.createCriteriaAsString(filter ); String expect = "where identity.identityType != 'G' and ... |
String expect = "where identity.identityType != 'G' and (" + | String expect = "and (" + | public void testCreateCriteriaAsStringNameOrAlias() { filter.setNameOrAliasSearch("nameOrAliasSearch"); filter.setPrincipalSearch(""); String criteria = identitySelectionStrategy.createCriteriaAsString(filter ); String expect = "where identity.identityType != 'G' and (" + ... |
String expect = "where identity.identityType != 'G' and (" + | String expect = "and (" + | public void testCreateCriteriaAsStringPrincipal() { filter.setNameOrAliasSearch(""); filter.setPrincipalSearch("principalSearch"); String criteria = identitySelectionStrategy.createCriteriaAsString(filter ); String expect = "where identity.identityType != 'G' and (" + ... |
case 0 : | case 0: return data.getMaltSteep(row); case 1: return data.getMaltMashed(row); case 2 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 1 : | case 3 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 2 : | case 4 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 3 : | case 5 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 4 : | case 6 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 5 : | case 7 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 6 : | case 8 : | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : // indicate this is a sugar: String s = ""; if (!data.getMaltMashed(row) && data.getMaltSteep(row)) s = "*"; return s + data.getMaltName(row); case 1 : return SB... |
case 0 : | case 0: data.setMaltSteep(row, new Boolean (value.toString()).booleanValue()); break; case 1: data.setMaltMashed(row, new Boolean(value.toString()).booleanValue()); break; case 2 : | public void setValueAt(Object value, int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : data.setMaltName(row, value.toString()); break; case 1 : data.setMaltAmount(row, Double.parseDouble(value.toString())); break; case 2 : // m.setUn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.