rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
this.invalid = true; | public isc_svc_handle_impl() { } | |
checkValidity(); | public void setHandle(int rdb_id) { checkValidity(); this.handle = rdb_id; } | |
this.invalid = false; | public void setHandle(int rdb_id) { checkValidity(); this.handle = rdb_id; } | |
if(bind_addr != null) { Map m=new HashMap(1); m.put("bind_addr", bind_addr); passUp(new Event(Event.CONFIG, m)); } | public void start() throws Exception { timer=stack.timer; if(timer == null) throw new Exception("timer is null"); if(enable_diagnostics) { diag_handler=new DiagnosticsHandler(); diag_handler.start(); } if(use_incoming_packet_handler) { i... | |
Community[] parents = item.getCommunities(); for (int j = 0; j < parents.length; j++) { TableRow row = DatabaseManager.create(context, "Communities2Item"); row.setColumn("item_id", item.getID()); row.setColumn("community_id", parents[j].getID()); DatabaseManager.update(context, row); } | public static void itemAdded(Context context, Item item) throws SQLException { Map table2dc = new HashMap(); table2dc.put("ItemsByTitle", item.getDC("title", null, Item.ANY)); table2dc.put("ItemsByAuthor", item.getDC("contributor", Item.ANY, Ite... | |
System.err.println( "wfEngine:" + workflowEngine ); System.err.println( "context:" + context ); System.err.println( "process:" + process ); | public StatesPropertySelectionModel(WorkflowEngine workflowEngine, Object context, String process) throws ProcessSourceException, NoSuchProcessException { this.workflowEngine = workflowEngine; this.context = context; this.process = process; this.states = workflowEngine.getProcess( con... | |
public boolean equals(Object ob1) { User user = (User) ob1; return user.getUserName().equals(getUserName()) && user.getFirstName().equals(getFirstName()) && user.getMiddleName().equals(getMiddleName()) && user.getLastName().equals(getLastName()) && user.getUserId() == getUserId() && user.getGroupId() == getGroupId(); | public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof User)) return false; User user = (User) obj; boolean result = true; | public boolean equals(Object ob1) { User user = (User) ob1; return user.getUserName().equals(getUserName()) && user.getFirstName().equals(getFirstName()) && user.getMiddleName().equals(getMiddleName()) && user.getLastName().equals(getLastName()) ... |
result &= getUserName() != null ? getUserName().equals(user.getUserName()) : user.getUserName() == null; result &= getFirstName() != null ? getFirstName().equals(user.getFirstName()) : user.getFirstName() == null; result &= getMiddleName() != null ? getMiddleName().equals(user.getMiddleName()) : user.getMiddleName() ... | public boolean equals(Object ob1) { User user = (User) ob1; return user.getUserName().equals(getUserName()) && user.getFirstName().equals(getFirstName()) && user.getMiddleName().equals(getMiddleName()) && user.getLastName().equals(getLastName()) ... | |
pinger_thread=null; | void stopPingerThread() { synchronized(pinger_mutex) { if(pinger_thread != null && pinger_thread.isAlive()) { regular_sock_close=true; sendPingTermination(); // PATCH by Bruce Schuchardt (http://jira.jboss.com/jira/browse/JGRP-246) teardownPingSocket();... | |
public static ServerSocket createServerSocket(InetAddress bind_addr, int start_port) { | public static ServerSocket createServerSocket(int start_port) { | public static ServerSocket createServerSocket(InetAddress bind_addr, int start_port) { ServerSocket ret=null; while(true) { try { ret=new ServerSocket(start_port, 50, bind_addr); } catch(BindException bind_ex) { start_port++; ... |
ret=new ServerSocket(start_port, 50, bind_addr); | ret=new ServerSocket(start_port); | public static ServerSocket createServerSocket(InetAddress bind_addr, int start_port) { ServerSocket ret=null; while(true) { try { ret=new ServerSocket(start_port, 50, bind_addr); } catch(BindException bind_ex) { start_port++; ... |
this.inInsertRow = false; | public void cancelRowUpdates() { this.newRow = new byte[xsqlvars.length][]; this.updatedFlags = new boolean[xsqlvars.length]; } | |
this.inInsertRow = false; | public void setRow(byte[][] row) { this.oldRow = row; this.updatedFlags = new boolean[xsqlvars.length]; } | |
Object[] rows = selectStatement.getRows(); if (rows.length == 0) throw new FBSQLException("No rows could be fetched."); if (rows.length > 1) throw new FBSQLException("More then one row fetched."); setRow((byte[][])rows[0]); | try { gdsHelper.fetch(selectStatement, 10); Object[] rows = selectStatement.getRows(); if (selectStatement.size() == 0) throw new FBSQLException("No rows could be fetched."); if (selectStatement.size() > 1) throw new FBSQLException("More then one row fetched."); setRow((byte[][])rows[0]); } finally { gdsHelper.clos... | public void refreshRow() throws SQLException { Object mutex = syncProvider.getSynchronizationObject(); synchronized(mutex) { try { if (selectStatement == null) selectStatement = gdsHelper.allocateStatement(); e... |
if (isPropertyModified(SVNProperty.EOL_STYLE)) { | if (isPropertyModified(SVNProperty.EOL_STYLE) || isPropertyModified(SVNProperty.KEYWORDS) || isPropertyModified(SVNProperty.SPECIAL)) { | public boolean isContentsModified() throws SVNException { if (isPropertyModified(SVNProperty.EOL_STYLE)) { return true; } if (isMissing() || isScheduledForDeletion()) { return false; } File file = getRootEntry().getWorkingCopyFile(this); String timeSta... |
public static String copy(File from, File to, String eol, Map keywords, MessageDigest digest) { InputStream is = null; OutputStream os = null; if (!from.exists()) { return null; } else if (!to.exists()) { to.getParentFile().mkdirs(); try { to.createNewFile(); } catch (IOException e1) { return null; } } FSUtil.setReadon... | public static String copy(InputStream is, OutputStream os, MessageDigest digest) throws IOException { return FSUtil.copy(is, os, null, digest); | public static String copy(File from, File to, String eol, Map keywords, MessageDigest digest) { InputStream is = null; OutputStream os = null; if (!from.exists()) { return null; } else if (!to.exists()) { to.getParentFile().mkdirs(); try { ... |
if (!ourIsEnabled) { return false; } | public static boolean isGeneratorDisabled() { if (isSafeModeDefault()) { // have to enable explicitly return !Boolean.getBoolean("javasvn.generator.enabled"); } if (System.getProperty("javasvn.generator.enabled") == null) { return false; } return !... | |
void generateDiffWindow(ISVNDeltaConsumer consumer, ISVNRAData workFile, ISVNRAData baseFile) throws SVNException; | void generateDiffWindow(String commitPath, ISVNDeltaConsumer consumer, ISVNRAData workFile, ISVNRAData baseFile) throws SVNException; | void generateDiffWindow(ISVNDeltaConsumer consumer, ISVNRAData workFile, ISVNRAData baseFile) throws SVNException; |
if (entry == null) { | if (entry == null || properties == null) { | public void saveBaseProperties(ISVNEntry entry, Map properties) throws SVNException { initAdminArea(entry); if (entry == null) { return; } if (properties == null || (entry.isDirectory() && properties.isEmpty())) { getBasePropertiesFile(entry).delete(); re... |
if (properties == null || (entry.isDirectory() && properties.isEmpty())) { | if (entry.isDirectory() && properties.isEmpty()) { | public void saveBaseProperties(ISVNEntry entry, Map properties) throws SVNException { initAdminArea(entry); if (entry == null) { return; } if (properties == null || (entry.isDirectory() && properties.isEmpty())) { getBasePropertiesFile(entry).delete(); re... |
public void save(boolean recursive) throws SVNException { getAdminArea().saveProperties(this, myProperties); getAdminArea().saveBaseProperties(this, myBaseProperties); getAdminArea().saveWCProperties(this, myWCProperties); | public void save() throws SVNException { save(true); | public void save(boolean recursive) throws SVNException { getAdminArea().saveProperties(this, myProperties); getAdminArea().saveBaseProperties(this, myBaseProperties); getAdminArea().saveWCProperties(this, myWCProperties); } |
if (copyFromPath != null) { copyFromPath = myTargetURL.appendPath(copyFromPath, false).toDecodedString(); } | public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { if (copyFromPath != null) { copyFromPath = myTargetURL.appendPath(copyFromPath, false).toDecodedString(); } myWrappedEditor.addDir(path, copyFromPath, copyFromRevision); } | |
if (copyFromPath != null) { copyFromPath = myTargetURL.appendPath(copyFromPath, false).toDecodedString(); } | public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { if (copyFromPath != null) { copyFromPath = myTargetURL.appendPath(copyFromPath, false).toDecodedString(); } myWrappedEditor.addFile(path, copyFromPath, copyFromRevision); } | |
calcule(); | if ( aSet == true || bSet == true) calcule(); | public void bang() { calcule(); } |
} else { return; | private void calcule() { if ( aSet == true && bSet == false) { b = new float[a.length]; } else if (aSet == false && bSet == true) { a = new float[b.length]; } else { // a et b ne sont mme pas dfinis... sauve qui peut... return; } if (op.equals("*")) calculeProduit(); else if (op.equals("/")) calculeD... | |
public void setPort(int port) { | public void setPort(final int port) { | public void setPort(int port) { this.port = port; } |
public void setURL(String host) { | public void setURL(final String host) { | public void setURL(String host) { this.host = host; } |
if (isCreateOnStart()) { createDatabase(getFileName(), getUserName(), getPassword()); } | public void start() throws Exception { state = STARTING; gds = GDSFactory.newGDS(); c = GDSFactory.newClumplet(gds.isc_dpb_num_buffers, new byte[] {90}); c.append(GDSFactory.newClumplet(gds.isc_dpb_dummy_packet_interval, new byte[] {120, 10, 0, 0})); c.append(GDSFactory.newClumple... | |
public void stop() { | public void stop() throws Exception { if (isDropOnStop()) { dropDatabase(getFileName(), getUserName(), getPassword()); } | public void stop() { state = STOPPING; c = null; gds = null; state = STOPPED; } |
public synchronized void remove(Vector v) { if(v != null) { members.removeAll(v); | public synchronized void remove(Address old_member) { if(old_member != null) { members.remove(old_member); | public synchronized void remove(Vector v) { if(v != null) { members.removeAll(v); } } |
public synchronized void add(Vector v) { if(v != null) { for(int i=0; i < v.size(); i++) { add((Address)v.elementAt(i)); } | public synchronized void add(Address new_member) { if(new_member != null && !members.contains(new_member)) { members.addElement(new_member); | public synchronized void add(Vector v) { if(v != null) { for(int i=0; i < v.size(); i++) { add((Address)v.elementAt(i)); } } } |
DebugLog.log("needs lock: " + needsLock); | public boolean revert(String name) throws SVNException { DebugLog.log("reverting: " + name + " in " + getRoot()); boolean magicPropsChanged = false; boolean wasReverted = false; SVNEntry entry = getEntries().getEntry(name); if (entry == null || entry.isHidden()) { ... | |
native_isc_attach_database(getServerUrl(file_name), db_handle, | String serverUrl = getServerUrl(file_name); byte[] urlData; try { String filenameCharset = databaseParameterBuffer.getArgumentAsString(ISCConstants.isc_dpb_filename_charset); if (filenameCharset != null) urlData = serverUrl.getBytes(filenameCharset); else urlData = serverUrl.getBytes(); byte[] nullTerminated = new by... | public void iscAttachDatabase(String file_name, IscDbHandle db_handle, DatabaseParameterBuffer databaseParameterBuffer) throws GDSException { if (db_handle == null) { throw new GDSException( ISCConstants.isc_bad_db_handle); } DatabaseParameterBuffer cleanDPB = ((Da... |
native_isc_create_database(getServerUrl(file_name), db_handle, | String serverUrl = getServerUrl(file_name); byte[] urlData; try { String filenameCharset = databaseParameterBuffer.getArgumentAsString(ISCConstants.isc_dpb_filename_charset); if (filenameCharset != null) urlData = serverUrl.getBytes(filenameCharset); else urlData = serverUrl.getBytes(); byte[] nullTerminated = new b... | public void iscCreateDatabase(String file_name, IscDbHandle db_handle, DatabaseParameterBuffer databaseParameterBuffer) throws GDSException { if (db_handle == null) { throw new GDSException( ISCConstants.isc_bad_db_handle); } final byte[] dpbBytes = databaseParamet... |
public abstract void native_isc_attach_database(String file_name, | public abstract void native_isc_attach_database(byte[] file_name, | public abstract void native_isc_attach_database(String file_name, IscDbHandle db_handle, byte[] dpbBytes); |
public abstract void native_isc_create_database(String file_name, | public abstract void native_isc_create_database(byte[] file_name, | public abstract void native_isc_create_database(String file_name, IscDbHandle db_handle, byte[] dpbBytes); |
return inputBufferHandle != 0 && outputBufferHandle != 0 && size > 0; | return eventStructHandle != -1; | public boolean isValid(){ return inputBufferHandle != 0 && outputBufferHandle != 0 && size > 0; } |
public boolean isDebugEnabled() { return loggingAvailable && log.isEnabledFor(Priority.DEBUG); } | abstract public boolean isDebugEnabled(); | public boolean isDebugEnabled() { return loggingAvailable && log.isEnabledFor(Priority.DEBUG); } |
"[-busy_sleep] [-yield] [-jg] [-loopback] [-props <channel properties>] [-debug]"); System.out.println("Options -props and -debug are only valid if -jg is used"); | "[-busy_sleep] [-yield] [-jg] [-loopback] [-props <channel properties>]"); System.out.println("Options -props and are only valid if -jg is used"); | static void help() { System.out.println("SpeedTest [-help] [-num_msgs <num>] [-sleep <sleeptime in msecs between messages>] " + "[-busy_sleep] [-yield] [-jg] [-loopback] [-props <channel properties>] [-debug]"); System.out.println("Options -props and -debug are only valid if -jg is used... |
boolean debug=false, busy_sleep=false, yield=false, loopback=false; Debugger debugger=null; | boolean busy_sleep=false, yield=false, loopback=false; | public static void main(String[] args) { DatagramSocket sock=null; Receiver receiver; int num_msgs=1000, num_sent=0, group_port=7500, num_yields=0; DatagramPacket packet; InetAddress group_addr=null; int[][] matrix; boolean jg=false; // use JGroups channel instead of... |
if("-debug".equals(args[i])) { debug=true; continue; } | public static void main(String[] args) { DatagramSocket sock=null; Receiver receiver; int num_msgs=1000, num_sent=0, group_port=7500, num_yields=0; DatagramPacket packet; InetAddress group_addr=null; int[][] matrix; boolean jg=false; // use JGroups channel instead of... | |
"\ndebug = " + debug + | public static void main(String[] args) { DatagramSocket sock=null; Receiver receiver; int num_msgs=1000, num_sent=0, group_port=7500, num_yields=0; DatagramPacket packet; InetAddress group_addr=null; int[][] matrix; boolean jg=false; // use JGroups channel instead of... | |
if(debug) { debugger=new Debugger(channel); debugger.start(); } | public static void main(String[] args) { DatagramSocket sock=null; Receiver receiver; int num_msgs=1000, num_sent=0, group_port=7500, num_yields=0; DatagramPacket packet; InetAddress group_addr=null; int[][] matrix; boolean jg=false; // use JGroups channel instead of... | |
if(debug) { System.out.println("Press key to start"); System.in.read(); } | public static void main(String[] args) { DatagramSocket sock=null; Receiver receiver; int num_msgs=1000, num_sent=0, group_port=7500, num_yields=0; DatagramPacket packet; InetAddress group_addr=null; int[][] matrix; boolean jg=false; // use JGroups channel instead of... | |
public static ProtocolStackConfigurator getStackConfigurator(String properties) throws ChannelException { if (propertiesOverride != null) { properties = propertiesOverride; } if(properties == null) properties=JChannel.DEFAULT_PROTOCOL_STACK; checkForNullConfiguration(properties); | public static ProtocolStackConfigurator getStackConfigurator(File file) throws ChannelException { | public static ProtocolStackConfigurator getStackConfigurator(String properties) throws ChannelException { if (propertiesOverride != null) { properties = propertiesOverride; } // added by bela: for null String props we use the default properties if(properties == null) ... |
XmlConfigurator configurator = null; try { configurator=getXmlConfigurator(properties); } catch (IOException ioe) { throw createChannelConfigurationException(ioe); } if (configurator != null) { returnValue=configurator; | if (propertiesOverride != null) { returnValue = getStackConfigurator(propertiesOverride); | public static ProtocolStackConfigurator getStackConfigurator(String properties) throws ChannelException { if (propertiesOverride != null) { properties = propertiesOverride; } // added by bela: for null String props we use the default properties if(properties == null) ... |
returnValue=new PlainConfigurator(properties); | checkForNullConfiguration(file); checkJAXPAvailability(); try { returnValue= XmlConfigurator.getInstance(new FileInputStream(file)); } catch (IOException ioe) { throw createChannelConfigurationException(ioe); } | public static ProtocolStackConfigurator getStackConfigurator(String properties) throws ChannelException { if (propertiesOverride != null) { properties = propertiesOverride; } // added by bela: for null String props we use the default properties if(properties == null) ... |
Reminder(String target, String message, String sender, long timeToArrive) { | Reminder(String target, String message, String sender) { System.out.println("Message: '"+message+"'\n"); | Reminder(String target, String message, String sender, long timeToArrive) { this.target = target; this.message = message; this.sender = sender; this.timeSent = System.currentTimeMillis(); this.timeToArrive = timeToArrive; this.notified = false; this.next = null; } |
this.sender = sender; | Reminder(String target, String message, String sender, long timeToArrive) { this.target = target; this.message = message; this.sender = sender; this.timeSent = System.currentTimeMillis(); this.timeToArrive = timeToArrive; this.notified = false; this.next = null; } | |
this.timeToArrive = timeToArrive; | Reminder(String target, String message, String sender, long timeToArrive) { this.target = target; this.message = message; this.sender = sender; this.timeSent = System.currentTimeMillis(); this.timeToArrive = timeToArrive; this.notified = false; this.next = null; } | |
ParseTime pt = new ParseTime(); try { this.timeToArrive = pt.textToTime(message); this.timeExpression = pt.getTimeExpression(); this.originalTimeExpression = pt.getOriginalTimeExpression(); } catch (WTFException e) { this.timeToArrive = 0; if (SephiaBotData.iequals(target, sender)) this.timeExpression = "when you get ... | Reminder(String target, String message, String sender, long timeToArrive) { this.target = target; this.message = message; this.sender = sender; this.timeSent = System.currentTimeMillis(); this.timeToArrive = timeToArrive; this.notified = false; this.next = null; } | |
this.originalTimeExpression = matcher.group(); if (iregex("^in ", originalTimeExpression)) { | originalTimeExpression = matcher.group(); timeExpression = originalTimeExpression.replaceAll("about ", ""); if (iregex("^in ", timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
if (iregex(secondUnit, originalTimeExpression)) { | if (iregex(secondUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex(minuteUnit, originalTimeExpression)) { | } else if (iregex(minuteUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex(hourUnit, originalTimeExpression)) { | } else if (iregex(hourUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex(dayUnit, originalTimeExpression)) { | } else if (iregex(dayUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex(weekUnit, originalTimeExpression)) { | } else if (iregex(weekUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex(monthUnit, originalTimeExpression)) { | } else if (iregex(monthUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex(yearUnit, originalTimeExpression)) { | } else if (iregex(yearUnit, timeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
String duration = iregexFind(counter, originalTimeExpression); | String duration = iregexFind(counter, timeExpression); | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... |
} else if (iregex("^in ", originalTimeExpression)) { | public long textToTime(String text) throws WTFException, NumberFormatException { Pattern when = Pattern.compile(timeExpressionPattern, Pattern.CASE_INSENSITIVE); Matcher matcher = when.matcher(text); if (!matcher.find()) throw new WTFException("I can't figure out when to send that."); this.originalTimeExpre... | |
deflater.reset(); deflater.setInput(payload, msg.getOffset(), length); deflater.finish(); deflater.deflate(compressed_payload); int compressed_size=deflater.getTotalOut(); | int compressed_size; synchronized(deflater_mutex) { deflater.reset(); deflater.setInput(payload, msg.getOffset(), length); deflater.finish(); deflater.deflate(compressed_payload); compressed_size=deflater.getTotalOut(); } | public void down(Event evt) { if(evt.getType() == Event.MSG) { Message msg=(Message)evt.getArg(); int length=msg.getLength(); // takes offset/length (if set) into account if(length >= min_size) { byte[] payload=msg.getRawBuffer(); // here we get the ref so we c... |
log.error("COMPRESS.setProperties(): the following properties are not recognized: " + props); | log.error("the following properties are not recognized: " + props); | public boolean setProperties(Properties props) { String str; super.setProperties(props); str=props.getProperty("compression_level"); if(str != null) { compression_level=Integer.parseInt(str); props.remove("compression_level"); } str=props.getProperty("... |
inflater.reset(); inflater.setInput(compressed_payload, msg.getOffset(), msg.getLength()); try { inflater.inflate(uncompressed_payload); if(trace) log.trace("uncompressed " + compressed_payload.length + " bytes to " + original_size + " bytes"); msg.setBuffer(uncompressed_payload); } catch(DataFormatException e) { if(lo... | synchronized(inflater_mutex) { inflater.reset(); inflater.setInput(compressed_payload, msg.getOffset(), msg.getLength()); try { inflater.inflate(uncompressed_payload); if(trace) log.trace("uncompressed " + compressed_payload.length + " bytes to " + original_size + " bytes"); msg.setBuffer(uncompressed_payload); } catch... | public void up(Event evt) { if(evt.getType() == Event.MSG) { Message msg=(Message)evt.getArg(); CompressHeader hdr=(CompressHeader)msg.removeHeader(name); if(hdr != null) { byte[] compressed_payload=msg.getRawBuffer(); if(compressed_payload != nu... |
if(log.isInfoEnabled()) log.info("mbr=" + mbr + " (size=" + suspected_mbrs.size() + ")"); | if(log.isDebugEnabled()) log.debug("mbr=" + mbr + " (size=" + suspected_mbrs.size() + ")"); | void addSuspectedMember(Address mbr) { if(mbr == null) return; if(!members.contains(mbr)) return; synchronized(suspected_mbrs) { if(!suspected_mbrs.contains(mbr)) { suspected_mbrs.addElement(mbr); if(log.isInfoEnabled()) log.i... |
if(log.isInfoEnabled()) log.info("removed " + suspected_mbr + " (size=" + suspected_mbrs.size() + ")"); | if(log.isDebugEnabled()) log.debug("removed " + suspected_mbr + " (size=" + suspected_mbrs.size() + ")"); | void adjustSuspectedMembers(Vector new_mbrship) { Address suspected_mbr; if(new_mbrship == null || new_mbrship.size() == 0) return; synchronized(suspected_mbrs) { for(Iterator it=suspected_mbrs.iterator(); it.hasNext();) { suspected_mbr=(Address... |
if(log.isInfoEnabled()) log.info("member is " + suspected_mbr); | if(log.isDebugEnabled()) log.debug("member is " + suspected_mbr); | void removeSuspectedMember(Address suspected_mbr) { if(suspected_mbr == null) return; if(log.isInfoEnabled()) log.info("member is " + suspected_mbr); synchronized(suspected_mbrs) { suspected_mbrs.removeElement(suspected_mbr); if(suspected_mbrs.size(... |
if(log.isInfoEnabled()) log.info("broadcasting SUSPECT message [suspected_mbrs=" + suspected_mbrs + "] to group"); | if(log.isDebugEnabled()) log.debug("broadcasting SUSPECT message [suspected_mbrs=" + suspected_mbrs + "] to group"); | public void run() { Message suspect_msg; FD.FdHeader hdr; if(log.isInfoEnabled()) log.info("broadcasting SUSPECT message [suspected_mbrs=" + suspected_mbrs + "] to group"); synchronized(suspected_mbrs) { if(suspected_mbrs.size() == 0) { ... |
if(log.isInfoEnabled()) log.info("task done (no suspected members)"); | if(log.isDebugEnabled()) log.debug("task done (no suspected members)"); | public void run() { Message suspect_msg; FD.FdHeader hdr; if(log.isInfoEnabled()) log.info("broadcasting SUSPECT message [suspected_mbrs=" + suspected_mbrs + "] to group"); synchronized(suspected_mbrs) { if(suspected_mbrs.size() == 0) { ... |
if(log.isInfoEnabled()) log.info("task done"); | if(log.isDebugEnabled()) log.debug("task done"); | public void run() { Message suspect_msg; FD.FdHeader hdr; if(log.isInfoEnabled()) log.info("broadcasting SUSPECT message [suspected_mbrs=" + suspected_mbrs + "] to group"); synchronized(suspected_mbrs) { if(suspected_mbrs.size() == 0) { ... |
if(log.isInfoEnabled()) log.info("[" + local_addr + "]: received no heartbeat ack from " + ping_dest + | if(log.isDebugEnabled()) log.debug("[" + local_addr + "]: received no heartbeat ack from " + ping_dest + | public void run() { Message hb_req; long not_heard_from=0; // time in msecs we haven't heard from ping_dest if(ping_dest == null) { if(log.isWarnEnabled()) log.warn("ping_dest is null: members=" + members + ", pingable_mbrs=" + ... |
if(log.isInfoEnabled()) log.info(hb_sender + " is not in " + members + " ! Telling it to leave group"); | if(log.isDebugEnabled()) log.debug(hb_sender + " is not in " + members + " ! Telling it to leave group"); | void shunInvalidHeartbeatSender(Address hb_sender) { int num_pings=0; Message shun_msg; if(hb_sender != null && members != null && !members.contains(hb_sender)) { if(invalid_pingers.containsKey(hb_sender)) { num_pings=((Integer)invalid_pingers.get(hb_sender)).intValue(... |
if(log.isInfoEnabled()) log.info("received ack from " + hdr.from); | if(log.isDebugEnabled()) log.debug("received ack from " + hdr.from); | public void up(Event evt) { Message msg; FdHeader hdr=null; Object sender, tmphdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.MSG: msg=(Message)evt.getArg(); ... |
if(log.isInfoEnabled()) log.info("[SUSPECT] suspect hdr is " + hdr); | if(log.isDebugEnabled()) log.debug("[SUSPECT] suspect hdr is " + hdr); | public void up(Event evt) { Message msg; FdHeader hdr=null; Object sender, tmphdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.MSG: msg=(Message)evt.getArg(); ... |
if(log.isInfoEnabled()) log.info("[NOT_MEMBER] I'm being shunned; exiting"); | if(log.isDebugEnabled()) log.debug("[NOT_MEMBER] I'm being shunned; exiting"); | public void up(Event evt) { Message msg; FdHeader hdr=null; Object sender, tmphdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.MSG: msg=(Message)evt.getArg(); ... |
"delete from bundle2bitstream where bitstream_id=" + getID()); | "delete from bundle2bitstream where bundle_id=" + getID()); | public void delete() throws SQLException, AuthorizeException { // Check authorisation AuthorizeManager.authorizeAction(ourContext, this, Constants.DELETE); log.info(LogManager.getHeader(ourContext, "delete_bundle", "bundle_id=" + getID())); // Remove from ... |
v2.getMembers().add(f); assertFalse(v1.equals(v2)); | public void testEquals2() { View v1=new View(new ViewId(a, 12345), (Vector)members.clone()); View v2=new View(a, 12345, (Vector)members.clone()); assertEquals(v1, v2); View v3=new View(a, 12543, (Vector)members.clone()); assertFalse(v1.equals(v3)); v2.getMembers().add(f); ... | |
if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) { | if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX) && !name.startsWith(SVNProperty.SVN_WC_PREFIX)) { | public void changeDirProperty(String name, String value) throws SVNException { if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) { RemoteSVNStatus status = (RemoteSVNStatus) myRemoteStatuses.get(myCurrentPath); if (status == null) { status = new RemoteSVNStatus(myCurren... |
myRemoteStatuses.put(myCurrentFilePath, status); | myRemoteStatuses.put(myCurrentPath, status); | public void changeDirProperty(String name, String value) throws SVNException { if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) { RemoteSVNStatus status = (RemoteSVNStatus) myRemoteStatuses.get(myCurrentPath); if (status == null) { status = new RemoteSVNStatus(myCurren... |
if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) { | if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX) && !name.startsWith(SVNProperty.SVN_WC_PREFIX)) { | public void changeFileProperty(String name, String value) throws SVNException { if (!name.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) { RemoteSVNStatus status = (RemoteSVNStatus) myRemoteStatuses.get(myCurrentFilePath); if (status == null) { myRemoteStatuses.put(myCurrentFi... |
long wcRevision, long remoteRevision, int remoteContentsStatus, int remotePropsStatus, boolean addedWithHistory, boolean switched, boolean isDirectory, String author) { this(path, propStatus, contentsStatus, revision, wcRevision, remoteRevision, remoteContentsStatus, remotePropsStatus, addedWithHistory, switched, isDir... | long wcRevision, boolean addedWithHistory, boolean switched, boolean isDirectory, String author, SVNLock lock) { this(path, propStatus, contentsStatus, revision, wcRevision, -1, 0, 0, addedWithHistory, switched, isDirectory, author, lock); | public SVNStatus(String path, int propStatus, int contentsStatus, long revision, long wcRevision, long remoteRevision, int remoteContentsStatus, int remotePropsStatus, boolean addedWithHistory, boolean switched, boolean isDirectory, String author) { this(path, propStatus, contentsStatu... |
log.error("#" + seqno + ": " + this + ": (" + "entry is more than " + | System.err.println("#" + seqno + ": " + this + ": (" + "entry is more than " + | boolean isCorrect() { long t; long expected; long diff, delta; boolean off=false; t=first_xmit - start_time; expected=xmit_timeouts[0]; diff=Math.abs(expected - t); delta=(long)(expected * PERCENTAGE_OFF); if(diff... |
log.error("Number of incorrect retransmission timeouts: " + num_non_correct_entries); | System.err.println("Number of incorrect retransmission timeouts: " + num_non_correct_entries); | public void testRetransmits() { Entry entry; int num_non_correct_entries=0; // 1. Add NUM_MSGS messages: System.out.println("-- adding " + NUM_MSGS + " messages:"); for(long i=0; i < NUM_MSGS; i++) { entry=new Entry(i); msgs.put(new Long(i), entry); ... |
try { if(trace) { long stop=System.currentTimeMillis(); double percentage=100.0 / max_bundle_size * count; StringBuffer sb=new StringBuffer("sending ").append(num_msgs).append(" msgs ("); sb.append(count).append(" bytes (" + f.format(percentage) + "% of max_bundle_size), collected in "+ + (stop-start) + "ms) to ").appe... | try { boolean multicast; for(Iterator it=copy.entrySet().iterator(); it.hasNext();) { entry=(Map.Entry)it.next(); l=(List)entry.getValue(); if(l.size() == 0) continue; dst=(Address)entry.getKey(); multicast=dst == null || dst.isMulticastAddress(); synchronized(out_stream) { try { buffer=listToBuffer(l, multicast); doS... | private void bundleAndSend() { Map.Entry entry; Address dst; Buffer buffer; List l; synchronized(msgs) { if(msgs.size() == 0) return; try { if(trace) { ... |
finally { msgs.clear(); num_msgs=0; start=0; count=0; } | } finally { start=0; | private void bundleAndSend() { Map.Entry entry; Address dst; Buffer buffer; List l; synchronized(msgs) { if(msgs.size() == 0) return; try { if(trace) { ... |
showMainPage(c, request, response); | doDSPost(c, request, response); | protected void doDSGet(Context c, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { showMainPage(c, request, response); } |
showMainPage(c, request, response); | request.setAttribute("group", group); request.setAttribute("members", group.getMembers()); JSPManager.showJSP(request, response, "/tools/group-edit.jsp" ); | protected void doDSPost(Context c, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { // Find out if there's a group parameter int groupID = UIUtil.getIntParameter(request, "group_id"); ... |
if(ourLastGeneratedTime != currentTime){ /* The clock reading has changed since the last UUID was generated. | if (ourLastGeneratedTime != currentTime) { /* * The clock reading has changed since the last UUID was generated. | private static long getCurrentTime(){ long currentTime = System.currentTimeMillis(); /* if clock reading changed since last UUID generated... */ if(ourLastGeneratedTime != currentTime){ /* The clock reading has changed since the last UUID was generated. * Reset the fudge ... |
private static void initState() throws SVNException{ /* Offset between UUID formatted times and System.currentTimeMillis() | private static void initState() throws SVNException { /* * Offset between UUID formatted times and System.currentTimeMillis() | private static void initState() throws SVNException{ /* Offset between UUID formatted times and System.currentTimeMillis() * formatted times. UUID UTC base time is October 15, 1582. * System.currentTimeMillis() base time is January 1, 1970. */ long currentTime = System.c... |
public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException { if (myConnection != null) { myConnection.fetchRepositoryRoot(this); | public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException { if (myRepositoryRoot == null) { if (myConnection != null) { myConnection.fetchRepositoryRoot(this); } else if (forceConnection) { openConnection(); try { myConnection.fetchRepositoryRoot(this); } finally { closeConnection(); } } | public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException { if (myConnection != null) { myConnection.fetchRepositoryRoot(this); } return super.getRepositoryRoot(forceConnection); } |
return super.getRepositoryRoot(forceConnection); | return myRepositoryRoot; | public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException { if (myConnection != null) { myConnection.fetchRepositoryRoot(this); } return super.getRepositoryRoot(forceConnection); } |
public boolean keepConnection(); | public boolean keepConnection(SVNRepository repository); | public boolean keepConnection(); |
TimeUtil.formatDate(date, body); | SVNTimeUtil.formatDate(date, body); | public static StringBuffer generateDateRevisionRequest(StringBuffer body, Date date) { body = body == null ? new StringBuffer() : body; body.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); body.append("<S:dated-rev-report xmlns:S=\"svn:\" "); body.append("xmlns:D=\"DAV:\">"); b... |
buffer.append(path); | buffer.append(DAVUtil.xmlEncode(path)); | public static StringBuffer generateLocationsRequest(StringBuffer buffer, String path, long pegRevision, long[] revisions) { buffer = buffer == null ? new StringBuffer() : buffer; buffer.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); buffer.append("<S:get-locations xmlns:S=\"svn:\" xmlns:D=\"DAV:\... |
public static void doCommit(String path, String url, Map entries, ISVNEditor editor, SVNWorkspace ws, SVNProgressProcessor progressProcessor) throws SVNException { doCommit(path, url, entries, editor, ws, progressProcessor, new HashSet()); | public static void doCommit(String path, String url, Map entries, ISVNEditor editor, SVNWorkspace ws, ISVNProgressViewer progressViewer) throws SVNException { doCommit(path, url, entries, editor, ws, progressViewer, new HashSet()); | public static void doCommit(String path, String url, Map entries, ISVNEditor editor, SVNWorkspace ws, SVNProgressProcessor progressProcessor) throws SVNException { doCommit(path, url, entries, editor, ws, progressProcessor, new HashSet()); } |
return new FBTpb(tpb); | return tpb; | public FBTpb getTpb() { return new FBTpb(tpb); } |
if (ISVNAuthenticationManager.SSH.equals(kind) && mySSHAuthentications.size() > mySSHIndex) { | if (ISVNAuthenticationManager.SSH.equals(kind) && mySSHIndex + 1 < mySSHAuthentications.size()) { | public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { if (ISVNAuthenticationManager.SSH.equals(kind) && mySSHAuthentications.size() > mySSHIndex) { mySSHIndex++; return (SVNAuthentication) mySSHAuthentications.get(mySSHIndex); ... |
} else if (ISVNAuthenticationManager.PASSWORD.equals(kind) && myPasswordAuthentications.size() > myPasswordIndex) { | } else if (ISVNAuthenticationManager.PASSWORD.equals(kind) && myPasswordIndex + 1 < myPasswordAuthentications.size()) { | public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { if (ISVNAuthenticationManager.SSH.equals(kind) && mySSHAuthentications.size() > mySSHIndex) { mySSHIndex++; return (SVNAuthentication) mySSHAuthentications.get(mySSHIndex); ... |
public SVNSSHAuthentication(String userName, File keyFile, String passphrase, boolean storageAllowed) { | public SVNSSHAuthentication(String userName, String password, int portNumber, boolean storageAllowed) { | public SVNSSHAuthentication(String userName, File keyFile, String passphrase, boolean storageAllowed) { super(userName, storageAllowed); myPrivateKey = keyFile; myPassphrase = passphrase; } |
myPrivateKey = keyFile; myPassphrase = passphrase; | myPassword = password; myPortNumber = portNumber; | public SVNSSHAuthentication(String userName, File keyFile, String passphrase, boolean storageAllowed) { super(userName, storageAllowed); myPrivateKey = keyFile; myPassphrase = passphrase; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.