rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if(log.isInfoEnabled()) log.info("merge task started"); | if(log.isDebugEnabled()) log.debug("merge task started"); | public void run() { MergeData combined_merge_data=null; if(merging == true) { if(log.isWarnEnabled()) log.warn("merge is already in progress, terminating"); return; } if(log.isInfoEnabled()) log.info("merge task started"); try ... |
if(log.isInfoEnabled()) log.info("merge task terminated"); | if(log.isDebugEnabled()) log.debug("merge task terminated"); | public void run() { MergeData combined_merge_data=null; if(merging == true) { if(log.isWarnEnabled()) log.warn("merge is already in progress, terminating"); return; } if(log.isInfoEnabled()) log.info("merge task started"); try ... |
if(log.isInfoEnabled()) log.info("merge data is " + tmp_data); | if(log.isDebugEnabled()) log.debug("merge data is " + tmp_data); | MergeData consolidateMergeData(Vector v) { MergeData ret=null; MergeData tmp_data; long logical_time=0; // for new_vid ViewId new_vid, tmp_vid; MergeView new_view; View tmp_view; Membership new_mbrs=new Membership(); int num_mbrs=0; Digest new_digest=nu... |
if(log.isInfoEnabled()) log.info("new merged view will be " + new_view); | if(log.isDebugEnabled()) log.debug("new merged view will be " + new_view); | MergeData consolidateMergeData(Vector v) { MergeData ret=null; MergeData tmp_data; long logical_time=0; // for new_vid ViewId new_vid, tmp_vid; MergeView new_view; View tmp_view; Membership new_mbrs=new Membership(); int num_mbrs=0; Digest new_digest=nu... |
if(log.isInfoEnabled()) log.info("consolidated digest=" + new_digest); | if(log.isDebugEnabled()) log.debug("consolidated digest=" + new_digest); | MergeData consolidateMergeData(Vector v) { MergeData ret=null; MergeData tmp_data; long logical_time=0; // for new_vid ViewId new_vid, tmp_vid; MergeView new_view; View tmp_view; Membership new_mbrs=new Membership(); int num_mbrs=0; Digest new_digest=nu... |
if(log.isInfoEnabled()) log.info("sending MERGE_REQ to " + coords); | if(log.isDebugEnabled()) log.debug("sending MERGE_REQ to " + coords); | void getMergeDataFromSubgroupCoordinators(Vector coords, long timeout) { Message msg; GMS.GmsHeader hdr; Address coord; long curr_time, time_to_wait=0, end_time; int num_rsps_expected=0; if(coords == null || coords.size() <= 1) { if(log.isErrorEnabled()) log.erro... |
if(log.isInfoEnabled()) log.info("waiting for " | if(log.isDebugEnabled()) log.debug("waiting for " | void getMergeDataFromSubgroupCoordinators(Vector coords, long timeout) { Message msg; GMS.GmsHeader hdr; Address coord; long curr_time, time_to_wait=0, end_time; int num_rsps_expected=0; if(coords == null || coords.size() <= 1) { if(log.isErrorEnabled()) log.erro... |
if(log.isInfoEnabled()) log.info("num_rsps_expected=" + num_rsps_expected | if(log.isDebugEnabled()) log.debug("num_rsps_expected=" + num_rsps_expected | void getMergeDataFromSubgroupCoordinators(Vector coords, long timeout) { Message msg; GMS.GmsHeader hdr; Address coord; long curr_time, time_to_wait=0, end_time; int num_rsps_expected=0; if(coords == null || coords.size() <= 1) { if(log.isErrorEnabled()) log.erro... |
if(log.isInfoEnabled()) log.info("sender=" + sender + ", merge_id=" + merge_id); | if(log.isDebugEnabled()) log.debug("sender=" + sender + ", merge_id=" + merge_id); | MergeData getMergeResponse(Address sender, Object merge_id) { Digest digest; View view; MergeData retval; if(sender == null) { if(log.isErrorEnabled()) log.error("sender == null; cannot send back a response"); return null; } if(m... |
if(log.isInfoEnabled()) log.info("mbr=" + mbr); | if(log.isDebugEnabled()) log.debug("mbr=" + mbr); | public synchronized JoinRsp handleJoin(Address mbr) { Vector new_mbrs=new Vector(); View v=null; Digest d, tmp; if(log.isInfoEnabled()) log.info("mbr=" + mbr); if(gms.local_addr.equals(mbr)) { if(log.isErrorEnabled()) log.error("cannot join myself !"); return... |
if(log.isInfoEnabled()) log.info("got digest=" + tmp); | if(log.isDebugEnabled()) log.debug("got digest=" + tmp); | public synchronized JoinRsp handleJoin(Address mbr) { Vector new_mbrs=new Vector(); View v=null; Digest d, tmp; if(log.isInfoEnabled()) log.info("mbr=" + mbr); if(gms.local_addr.equals(mbr)) { if(log.isErrorEnabled()) log.error("cannot join myself !"); return... |
if(log.isInfoEnabled()) log.info("mbr=" + mbr); | if(log.isDebugEnabled()) log.debug("mbr=" + mbr); | public synchronized void handleLeave(Address mbr, boolean suspected) { Vector v=new Vector(); // contains either leaving mbrs or suspected mbrs if(log.isInfoEnabled()) log.info("mbr=" + mbr); if(!gms.members.contains(mbr)) { if(log.isErrorEnabled()) log.error("mbr " + ... |
if(log.isInfoEnabled()) log.info("merge was cancelled (merge_id=" + merge_id + ")"); | if(log.isDebugEnabled()) log.debug("merge was cancelled (merge_id=" + merge_id + ")"); | public void handleMergeCancelled(Object merge_id) { if(merge_id != null && this.merge_id != null && this.merge_id.equals(merge_id)) { if(log.isInfoEnabled()) log.info("merge was cancelled (merge_id=" + merge_id + ")"); this.merge_id=null; mer... |
if(log.isInfoEnabled()) log.info("sender=" + sender + ", merge_id=" + merge_id); | if(log.isDebugEnabled()) log.debug("sender=" + sender + ", merge_id=" + merge_id); | public void handleMergeRequest(Address sender, Object merge_id) { Digest digest; View view; if(sender == null) { if(log.isErrorEnabled()) log.error("sender == null; cannot send back a response"); return; } if(merging) { if(log.isErrorEnabled()) log... |
if(log.isInfoEnabled()) log.info("view=" + new_view + ", digest=" + digest); | if(log.isDebugEnabled()) log.debug("view=" + new_view + ", digest=" + digest); | public void handleViewChange(View new_view, Digest digest) { Vector mbrs=new_view.getMembers(); { if(digest != null) if(log.isInfoEnabled()) log.info("view=" + new_view + ", digest=" + digest); else if(log.isInfoEnabled()) log.info("view=" + new_vie... |
if(log.isInfoEnabled()) log.info("view=" + new_view); | if(log.isDebugEnabled()) log.debug("view=" + new_view); | public void handleViewChange(View new_view, Digest digest) { Vector mbrs=new_view.getMembers(); { if(digest != null) if(log.isInfoEnabled()) log.info("view=" + new_view + ", digest=" + digest); else if(log.isInfoEnabled()) log.info("view=" + new_vie... |
if(log.isInfoEnabled()) log.info("coordinators in merge protocol are: " + tmp); | if(log.isDebugEnabled()) log.debug("coordinators in merge protocol are: " + tmp); | public void merge(Vector other_coords) { Membership tmp; Address leader=null; if(merging) { if(log.isWarnEnabled()) log.warn("merge already in progress, discarded MERGE event"); return; } if(other_coords == null) { if(log.isWarnEnabled()) log.w... |
if(log.isInfoEnabled()) log.info("I (" + leader + ") will be the leader. Starting the merge task"); | if(log.isDebugEnabled()) log.debug("I (" + leader + ") will be the leader. Starting the merge task"); | public void merge(Vector other_coords) { Membership tmp; Address leader=null; if(merging) { if(log.isWarnEnabled()) log.warn("merge already in progress, discarded MERGE event"); return; } if(other_coords == null) { if(log.isWarnEnabled()) log.w... |
if(log.isInfoEnabled()) log.info("removed element " + data); | if(log.isDebugEnabled()) log.debug("removed element " + data); | void removeRejectedMergeRequests(Vector coords) { MergeData data; for(Iterator it=merge_rsps.iterator(); it.hasNext();) { data=(MergeData)it.next(); if(data.merge_rejected) { if(data.getSender() != null && coords != null) coords.removeElement(dat... |
if(log.isInfoEnabled()) log.info("response=" + hdr); | if(log.isDebugEnabled()) log.debug("response=" + hdr); | void sendMergeRejectedResponse(Address sender) { Message msg=new Message(sender, null, null); GMS.GmsHeader hdr=new GMS.GmsHeader(GMS.GmsHeader.MERGE_RSP); hdr.merge_rejected=true; hdr.merge_id=merge_id; msg.putHeader(gms.getName(), hdr); if(log.isInfoEnabled()) log.inf... |
if(log.isInfoEnabled()) log.info("response=" + hdr); | if(log.isDebugEnabled()) log.debug("response=" + hdr); | void sendMergeResponse(Address sender, View view, Digest digest) { Message msg=new Message(sender, null, null); GMS.GmsHeader hdr=new GMS.GmsHeader(GMS.GmsHeader.MERGE_RSP); hdr.merge_id=merge_id; hdr.view=view; hdr.digest=digest; msg.putHeader(gms.getName(), hdr); ... |
public MergeView(ViewId vid, Vector members, Vector subgroups) { super(vid, members); this.subgroups=subgroups; | public MergeView() { | public MergeView(ViewId vid, Vector members, Vector subgroups) { super(vid, members); this.subgroups=subgroups; } |
if(observer != null) observer.up(evt); | private void handleMyMessage(Message msg, boolean multicast) { if(stats) { num_msgs_received++; num_bytes_received+=msg.getLength(); } Address src=msg.getSrc(); if(loopback && multicast && src != null && local_addr.equals(src)) { ... | |
if(observer != null) observer.passDown(evt); | public void down(Event evt) { if(evt.getType() != Event.MSG) { // unless it is a message handle it and respond handleDownEvent(evt); return; } Message msg=(Message)evt.getArg(); if(header != null) { // added patch by Roland Kurmann (March 20 2003) ... | |
if(observer != null) observer.up(evt); | private void handleIncomingMessage(Message msg) { Event evt; TpHeader hdr; if(stats) { num_msgs_received++; num_bytes_received+=msg.getLength(); } evt=new Event(Event.MSG, msg); if(trace) { StringBuffer sb=new StringBuffer("message is... | |
log.error("failed creating DatagramSocket: " + ex); | System.err.println("failed creating DatagramSocket: " + ex); | static int senseMaxFragSize() { int upper=4096; int lower=0; int highest_failed=-1; DatagramSocket sock; byte[] buf; DatagramPacket packet; InetAddress local_addr; final int num_iterations=15; try { sock=new DatagramSocket(); local... |
if(credits.longValue() <= length) { | if(credits != null && credits.longValue() <= length) { | private void determineCreditors(Address dest, int length) { boolean multicast=dest == null || dest.isMulticastAddress(); Address mbr; Long credits; if(multicast) { Map.Entry entry; for(Iterator it=sent.entrySet().iterator(); it.hasNext();) { entry=... |
public Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout) throws TimeoutException, SuspectedException { byte[] buf=null; Message msg=null; Object retval=null; if(log.isTraceEnabled()) log.trace("dest=" + dest + ", method_call=" + method_call + ", mode=" + mode + ", timeout=" + t... | public Object callRemoteMethod(Address dest, String method_name, Object[] args, Class[] types, int mode, long timeout) throws Throwable { MethodCall method_call=new MethodCall(method_name, args, types); return callRemoteMethod(dest, method_call, mode, timeout); | public Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout) throws TimeoutException, SuspectedException { byte[] buf=null; Message msg=null; Object retval=null; if(log.isTraceEnabled()) log.trace("dest=" + dest + ", method_call=... |
log.error("File not found.\n" + notFound); | System.err.println("File not found.\n" + notFound); | public static void main(String[] args) { String config="config.txt"; BufferedReader fileReader; String line; boolean sender=false; int num_msgs=1000; int msg_size=500; int num_senders=1; long log_interval=1000; ServerSocket srv_sock; List nodes... |
log.error(ioError); | System.err.println(ioError); | public static void main(String[] args) { String config="config.txt"; BufferedReader fileReader; String line; boolean sender=false; int num_msgs=1000; int msg_size=500; int num_senders=1; long log_interval=1000; ServerSocket srv_sock; List nodes... |
System.out.println("Available: " + in.available() + " trying to read to: " + len + " at: " + pos); | public final byte[] readOpaque(int len) throws IOException { byte[] buffer = new byte[len]; int pos = 0; int chunk; while (pos < len) { System.out.println("Available: " + in.available() + " trying to read to: " + len + " at: " + pos); chunk = Math.min(in.available()... | |
combined.start=System.currentTimeMillis(); combined.stop=System.currentTimeMillis(); | combined.start = Long.MAX_VALUE; combined.stop = Long.MIN_VALUE; | void dump(HashMap map, StringBuffer sb) { Map.Entry entry; Object sender; MemberInfo mi; MemberInfo combined=new MemberInfo(0); combined.start=System.currentTimeMillis(); combined.stop=System.currentTimeMillis(); for(Iterator it2=map.entrySet().iterator(); it2.h... |
SVNRepository repos = null; SVNFileType srcKind = SVNFileType.getType(path); List newPaths = new ArrayList(); SVNURL rootURL = dstURL; while (true) { try { repos = createRepository(rootURL, true); } catch (SVNException e) { SVNErrorManager.error("svn: invalid URL '" + dstURL + "'"); } if (repos == null) { SVNErrorManag... | return doImport(path, dstURL, commitMessage, true, recursive); | public SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage, boolean recursive) throws SVNException { // first find dstURL root. SVNRepository repos = null; SVNFileType srcKind = SVNFileType.getType(path); List newPaths = new ArrayList(); SVNURL rootURL = dstURL; ... |
private boolean importDir(File rootFile, File dir, String importPath, boolean recursive, ISVNEditor editor) throws SVNException { | private boolean importDir(File rootFile, File dir, String importPath, boolean useGlobalIgnores, boolean recursive, ISVNEditor editor) throws SVNException { | private boolean importDir(File rootFile, File dir, String importPath, boolean recursive, ISVNEditor editor) throws SVNException { checkCancelled(); File[] children = dir.listFiles(); boolean changed = false; for (int i = 0; children != null && i < children.length; i++) { File ... |
if (getOptions().isIgnored(file.getName())) { | if (!useGlobalIgnores && getOptions().isIgnored(file.getName())) { | private boolean importDir(File rootFile, File dir, String importPath, boolean recursive, ISVNEditor editor) throws SVNException { checkCancelled(); File[] children = dir.listFiles(); boolean changed = false; for (int i = 0; children != null && i < children.length; i++) { File ... |
importDir(rootFile, file, path, recursive, editor); | importDir(rootFile, file, path, useGlobalIgnores, recursive, editor); | private boolean importDir(File rootFile, File dir, String importPath, boolean recursive, ISVNEditor editor) throws SVNException { checkCancelled(); File[] children = dir.listFiles(); boolean changed = false; for (int i = 0; children != null && i < children.length; i++) { File ... |
return myError; | if (myErrors != null) { return new SVNException(getErrorMessages()); } return null; | public SVNException getError() { return myError; } |
protected void dispatchEvent(SVNEvent event, double progress) { if (myEventDispatcher != null) { String path = ""; if (!myPathPrefixesStack.isEmpty()) { for (Iterator paths = myPathPrefixesStack.iterator(); paths .hasNext();) { String segment = (String) paths.next(); path = SVNPathUtil.append(path, segment); } } if (pa... | protected void dispatchEvent(SVNEvent event) { dispatchEvent(event, ISVNEventHandler.UNKNOWN); | protected void dispatchEvent(SVNEvent event, double progress) { if (myEventDispatcher != null) { String path = ""; if (!myPathPrefixesStack.isEmpty()) { for (Iterator paths = myPathPrefixesStack.iterator(); paths .hasNext();) { St... |
myEditor.closeFile(myChecksum); | myEditor.closeFile(myPath.toString(), myChecksum); | protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException { if (element == OPEN_DIRECTORY || element == OPEN_FILE || element == ADD_DIRECTORY || element == ADD_FILE) { if (isDir(myPath)) { myEditor.closeDir(); if ("".equals(... |
myEditor.changeFileProperty(myPropertyName, value); | myEditor.changeFileProperty(myPath.toString(), myPropertyName, value); | protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException { if (element == OPEN_DIRECTORY || element == OPEN_FILE || element == ADD_DIRECTORY || element == ADD_FILE) { if (isDir(myPath)) { myEditor.closeDir(); if ("".equals(... |
public void setPath(String path, String locktoken, long revision, boolean startEmpty) throws SVNException { | public void setPath(String path, String locktoken, long revision, boolean startEmpty) { | public static StringBuffer generateEditorRequest(final DAVConnection connection, StringBuffer buffer, final String url, long targetRevision, String target, String dstPath, boolean recurse, boolean ignoreAncestry, boolean resourceWalk, boolean fetchContents, ISVNReporterBaton repor... |
public void deletePath(String path) throws SVNException { | public void deletePath(String path) { | public static StringBuffer generateEditorRequest(final DAVConnection connection, StringBuffer buffer, final String url, long targetRevision, String target, String dstPath, boolean recurse, boolean ignoreAncestry, boolean resourceWalk, boolean fetchContents, ISVNReporterBaton repor... |
public void finishReport() throws SVNException { | public void finishReport() { | public static StringBuffer generateEditorRequest(final DAVConnection connection, StringBuffer buffer, final String url, long targetRevision, String target, String dstPath, boolean recurse, boolean ignoreAncestry, boolean resourceWalk, boolean fetchContents, ISVNReporterBaton repor... |
public void deletePath(String path) throws SVNException { | public void deletePath(String path) { | public void deletePath(String path) throws SVNException { path = DAVUtil.xmlEncode(path); report.append("<S:missing>"); report.append(path); report.append("</S:missing>\n"); } |
public void finishReport() throws SVNException { | public void finishReport() { | public void finishReport() throws SVNException { } |
public void setPath(String path, String locktoken, long revision, boolean startEmpty) throws SVNException { | public void setPath(String path, String locktoken, long revision, boolean startEmpty) { | public void setPath(String path, String locktoken, long revision, boolean startEmpty) throws SVNException { path = DAVUtil.xmlEncode(path); report.append("<S:entry rev=\""); report.append(revision); report.append("\" "); ... |
return myEditor.textDeltaChunk(window); | return myEditor.textDeltaChunk(myPath.toString(), window); | protected OutputStream handleDiffWindow(SVNDiffWindow window) throws SVNException { return myEditor.textDeltaChunk(window); } |
myEditor.textDeltaEnd(); | myEditor.textDeltaEnd(myPath.toString()); | protected void handleDiffWindowClosed() throws SVNException { myEditor.textDeltaEnd(); } |
myEditor.changeFileProperty(name, null); | myEditor.changeFileProperty(myPath.toString(), name, null); | protected void startElement(DAVElement parent, DAVElement element, Attributes attrs) throws SVNException { if (element == UPDATE_REPORT) { String receiveAll = attrs.getValue(SEND_ALL_ATTR); if (receiveAll == null || !Boolean.valueOf(receiveAll).booleanValue()) { throw new SV... |
myEditor.applyTextDelta(myChecksum); | myEditor.applyTextDelta(myPath.toString(), myChecksum); | protected void startElement(DAVElement parent, DAVElement element, Attributes attrs) throws SVNException { if (element == UPDATE_REPORT) { String receiveAll = attrs.getValue(SEND_ALL_ATTR); if (receiveAll == null || !Boolean.valueOf(receiveAll).booleanValue()) { throw new SV... |
protected void setDeltaProcessing(boolean processing) { | protected void setDeltaProcessing(boolean processing) throws SVNException { | protected void setDeltaProcessing(boolean processing) { myIsDeltaProcessing = processing; if (!myIsDeltaProcessing) { SVNDiffWindow window = null; OutputStream os = null; myByteBuffer = Base64.base64ToByteArray(myDeltaOutputStream, myByteBuffer); if (Base64.... |
os.close(); | protected void setDeltaProcessing(boolean processing) { myIsDeltaProcessing = processing; if (!myIsDeltaProcessing) { SVNDiffWindow window = null; OutputStream os = null; myByteBuffer = Base64.base64ToByteArray(myDeltaOutputStream, myByteBuffer); if (Base64.... | |
DebugLog.error(e); } catch (SVNException e) { DebugLog.error(e); } | throw new SVNException(e); } finally { try { if (os != null) { os.close(); } } catch (IOException e) { } } | protected void setDeltaProcessing(boolean processing) { myIsDeltaProcessing = processing; if (!myIsDeltaProcessing) { SVNDiffWindow window = null; OutputStream os = null; myByteBuffer = Base64.base64ToByteArray(myDeltaOutputStream, myByteBuffer); if (Base64.... |
try { handleDiffWindowClosed(); } catch (SVNException e) { DebugLog.error(e); } | handleDiffWindowClosed(); | protected void setDeltaProcessing(boolean processing) { myIsDeltaProcessing = processing; if (!myIsDeltaProcessing) { SVNDiffWindow window = null; OutputStream os = null; myByteBuffer = Base64.base64ToByteArray(myDeltaOutputStream, myByteBuffer); if (Base64.... |
collection.setMetadata("provenance_description", license); | collection.setMetadata("provenance_description", provenance); | private void processConfirmEditCollection(Context context, HttpServletRequest request, HttpServletResponse response, Community community, Collection collection) throws ServletException, IOException, SQLException, AuthorizeException { if (request.getParameter("create").eq... |
backupManager.setPort(DB_SERVER_PORT); | protected void setUp() throws Exception { super.setUp(); fbManager = createFBManager(); fbManager.setServer(DB_SERVER_URL); fbManager.setPort(DB_SERVER_PORT); fbManager.start(); fbManager.setForceCreate(true); fbManager.createDatabase(getDatabasePath(), DB_US... | |
final GDSType gdsType = GDSType.getType(System.getProperty("test.gds_type")); | final GDSType gdsType = GDSType.getType(System.getProperty("test.gds_type", "PURE_JAVA")); | protected GDSType getGdsType() { final GDSType gdsType = GDSType.getType(System.getProperty("test.gds_type")); if( gdsType == null ) throw new RuntimeException("Unrecoginzed value for 'test.gds_type' property."); return gdsType; } |
boolean commit = false; | public int[] executeBatch() throws SQLException { Object syncObject = getSynchronizationObject(); synchronized (syncObject) { try { notifyStatementStarted(); ArrayList results = new ArrayList(batchList.size()); Iterator iter = batchList.iterator(... | |
notifyStatementCompleted(); | notifyStatementCompleted(commit); | public int[] executeBatch() throws SQLException { Object syncObject = getSynchronizationObject(); synchronized (syncObject) { try { notifyStatementStarted(); ArrayList results = new ArrayList(batchList.size()); Iterator iter = batchList.iterator(... |
public ConnectionTable1_4(int srv_port, long reaper_interval, long conn_expire_time) throws Exception { super(srv_port, reaper_interval, conn_expire_time); | public ConnectionTable1_4(int srv_port) throws Exception { super(srv_port); | public ConnectionTable1_4(int srv_port, long reaper_interval, long conn_expire_time) throws Exception { super(srv_port, reaper_interval, conn_expire_time); } |
dir.getRoot().delete(); | if (deleteWorkingFiles) { dir.getRoot().delete(); } | private static void destroyDirectory(SVNDirectory parent, SVNDirectory dir, boolean deleteWorkingFiles) throws SVNException { dir.getWCAccess().checkCancelled(); SVNEntries entries = dir.getEntries(); entries.getEntry("", true).setIncomplete(true); for (Iterator ents = entries.entries(tr... |
public void handleEvent(SVNEvent event, double progress) { if (myDispatcher != null) { try { myDispatcher.handleEvent(event, progress); } catch (Throwable th) { } } | public void handleEvent(SVNEvent event) { handleEvent(event, ISVNEventHandler.UNKNOWN); | public void handleEvent(SVNEvent event, double progress) { if (myDispatcher != null) { try { myDispatcher.handleEvent(event, progress); } catch (Throwable th) { } } } |
if (REF_MIN_POOL_SIZE.equals(type)) | if (REF_MIN_CONNECTIONS.equals(type)) | public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { if (!(obj instanceof Reference)) return null; Reference ref = (Reference)obj; if (!getClass().getName().equals(ref.getClassNa... |
ds.setTransactionIsolationLevel(Integer.parseInt(addr)); | ds.setIsolation(addr); | public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { if (!(obj instanceof Reference)) return null; Reference ref = (Reference)obj; if (!getClass().getName().equals(ref.getClassNa... |
for (int i = 0; i < addressesToRemove.length; i++) { | for (int i = addressesToRemove.length - 1; i >= 0 ; i--) { | public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { if (!(obj instanceof Reference)) return null; Reference ref = (Reference)obj; if (!getClass().getName().equals(ref.getClassNa... |
while(true) { | while(running) { | private void startProcessingThreads() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(true) { try { event=(Event) m_upQueue.take(); ... |
while(true) { | while(running) { | public void run() { Event event=null; while(true) { try { event=(Event) m_upQueue.take(); m_upLatch.passThrough(); handleUp(event); } ... |
running=true; | public void start() { if(corr == null) { if(transport_adapter != null) { corr=new RequestCorrelator("MessageDispatcher", transport_adapter, this, deadlock_detection, local_addr, concurrent_processing); } else { corr=new Req... | |
running=false; | public void stop() { if(null != prot_adapter) { prot_adapter.pause(); } if(corr != null) { corr.stop(); corr=null; } } | |
assertTrue("Not enough TypeInfo rows fetched: " + count, count >= 16); | assertTrue("Not enough TypeInfo rows fetched: " + count, count >= 12); | public void testGetTypeInfo() throws Exception { if (log != null) log.info("testGetTypeInfo"); ResultSet rs = dmd.getTypeInfo(); assertTrue("No resultset returned from getTablePrivileges", rs != null); int count = 0; String out = ""; while (rs.next()) { count++; ... |
public FBRowUpdater(AbstractConnection connection, XSQLVAR[] xsqlvars) throws SQLException { | public FBRowUpdater(AbstractConnection connection, XSQLVAR[] xsqlvars, Synchronizable syncProvider) throws SQLException { | public FBRowUpdater(AbstractConnection connection, XSQLVAR[] xsqlvars) throws SQLException { this.connection = connection; this.xsqlvars = new XSQLVAR[xsqlvars.length]; this.fields = new FBField[xsqlvars.length]; for (int i = 0; i < xsqlvars.length; i++) { XSQL... |
XSQLVAR xsqlvar = new XSQLVAR(); xsqlvar.copyFrom(xsqlvars[i]); | XSQLVAR xsqlvar = xsqlvars[i].deepCopy(); | public FBRowUpdater(AbstractConnection connection, XSQLVAR[] xsqlvars) throws SQLException { this.connection = connection; this.xsqlvars = new XSQLVAR[xsqlvars.length]; this.fields = new FBField[xsqlvars.length]; for (int i = 0; i < xsqlvars.length; i++) { XSQL... |
try { if (deleteStatement == null) deleteStatement = connection.getAllocatedStatement(); executeStatement(DELETE_STATEMENT_TYPE, deleteStatement); } catch(GDSException ex) { throw new FBSQLException(ex); | Object mutex = syncProvider.getSynchronizationObject(); synchronized(mutex) { try { connection.ensureInTransaction(); if (deleteStatement == null) deleteStatement = connection.getAllocatedStatement(); executeStatement(DELETE_STATEMENT_TYPE, deleteStatement); } catch(GDSException ex) { throw new FBSQLException(ex); }... | public void deleteRow() throws SQLException { try { if (deleteStatement == null) deleteStatement = connection.getAllocatedStatement(); executeStatement(DELETE_STATEMENT_TYPE, deleteStatement); } catch(GDSException ex) { throw new ... |
try { if (insertStatement == null) insertStatement = connection.getAllocatedStatement(); executeStatement(INSERT_STATEMENT_TYPE, insertStatement); } catch(GDSException ex) { throw new FBSQLException(ex); | Object mutex = syncProvider.getSynchronizationObject(); synchronized(mutex) { try { connection.ensureInTransaction(); if (insertStatement == null) insertStatement = connection.getAllocatedStatement(); executeStatement(INSERT_STATEMENT_TYPE, insertStatement); } catch(GDSException ex) { throw new FBSQLException(ex); ... | public void insertRow() throws SQLException { try { if (insertStatement == null) insertStatement = connection.getAllocatedStatement(); executeStatement(INSERT_STATEMENT_TYPE, insertStatement); } catch(GDSException ex) { ... |
try { if (selectStatement == null) selectStatement = connection.getAllocatedStatement(); executeStatement(SELECT_STATEMENT_TYPE, selectStatement); Object[] rows = selectStatement.getRows(); if (rows.length == 0) throw new FBSQLException("No rows could be fetched."); if (rows.length > 1) throw new FBSQLException("Mor... | Object mutex = syncProvider.getSynchronizationObject(); synchronized(mutex) { try { connection.ensureInTransaction(); if (selectStatement == null) selectStatement = connection.getAllocatedStatement(); executeStatement(SELECT_STATEMENT_TYPE, selectStatement); Object[] rows = selectStatement.getRows(); if (rows.lengt... | public void refreshRow() throws SQLException { try { if (selectStatement == null) selectStatement = connection.getAllocatedStatement(); executeStatement(SELECT_STATEMENT_TYPE, selectStatement); Object[] rows = selectStatement.getRows(); ... |
try { if (updateStatement == null) updateStatement = connection.getAllocatedStatement(); executeStatement(UPDATE_STATEMENT_TYPE, updateStatement); } catch(GDSException ex) { throw new FBSQLException(ex); | Object mutex = syncProvider.getSynchronizationObject(); synchronized(mutex) { try { connection.ensureInTransaction(); if (updateStatement == null) updateStatement = connection.getAllocatedStatement(); executeStatement(UPDATE_STATEMENT_TYPE, updateStatement); } catch(GDSException ex) { throw new FBSQLException(ex); ... | public void updateRow() throws SQLException { try { if (updateStatement == null) updateStatement = connection.getAllocatedStatement(); executeStatement(UPDATE_STATEMENT_TYPE, updateStatement); } catch(GDSException ex) { throw new ... |
line.append("svn: "); | public String toString() { StringBuffer line = new StringBuffer(); line.append("svn: "); if (getType() == TYPE_WARNING) { line.append("warning: "); } if ("".equals(myMessage)) { line.append(myErrorCode.toString()); } else { line.append(myObj... | |
line.append("warning: "); | line.append("Warning: "); } else { line.append("svn: "); | public String toString() { StringBuffer line = new StringBuffer(); line.append("svn: "); if (getType() == TYPE_WARNING) { line.append("warning: "); } if ("".equals(myMessage)) { line.append(myErrorCode.toString()); } else { line.append(myObj... |
public Object invoke(Object target, Object[] args) throws Throwable { if(args != null) this.args=args; return invoke(target); | public Object invoke(Object target) throws Throwable { Class cl; Method meth=null; Object retval=null; if(method_name == null || target == null) { if(log.isErrorEnabled()) log.error("method name or target is null"); return null; } cl=target.getClass(); try { switch(mode) { case OLD: meth=findMethod(cl); break; case ... | public Object invoke(Object target, Object[] args) throws Throwable { if(args != null) this.args=args; return invoke(target); } |
protected synchronized void setPath( final File[] path ) | protected synchronized void setPath( final String pathString ) | protected synchronized void setPath( final File[] path ) { validatePath( path ); m_path = resolvePath( path ); m_needToScan = true; } |
validatePath( path ); m_path = resolvePath( path ); m_needToScan = true; | final String[] pathElements = split( pathString, SEPARATOR ); setPath( pathElements ); | protected synchronized void setPath( final File[] path ) { validatePath( path ); m_path = resolvePath( path ); m_needToScan = true; } |
callersRollup.addCall(parent); | callersRollup.addCall(parent, call.getTime()); | public CallDetails(Call root, final Call selected) { this.root = root; this.callName = selected.getName(); /* * This class recurses through the call graph, computing aggregated data on the selected call. */ class SearchFor { private CallAdapter adapter = new CallAdapter(); public void search(Call paren... |
calleesRollup.addCall(child); | calleesRollup.addCall(child, child.getTime()); | public CallDetails(Call root, final Call selected) { this.root = root; this.callName = selected.getName(); /* * This class recurses through the call graph, computing aggregated data on the selected call. */ class SearchFor { private CallAdapter adapter = new CallAdapter(); public void search(Call paren... |
callersRollup.addCall(parent); | callersRollup.addCall(parent, call.getTime()); | public void search(Call parent, Call call) { boolean match = false; if ( call.getName().equals(selected.getName()) ) { Log.debug(LOG, "Call ", call, " matches selected call ", selected); match = true; adapter.initialize(call); inclusiveTime += adapter.getInclusiveTime(TimeMeasure.TotalTime... |
calleesRollup.addCall(child); | calleesRollup.addCall(child, child.getTime()); | public void search(Call parent, Call call) { boolean match = false; if ( call.getName().equals(selected.getName()) ) { Log.debug(LOG, "Call ", call, " matches selected call ", selected); match = true; adapter.initialize(call); inclusiveTime += adapter.getInclusiveTime(TimeMeasure.TotalTime... |
int lastParenCloseIndex = name.lastIndexOf(')'); if ( lastParenCloseIndex != -1 ) { int lastParenOpenIndex = name.lastIndexOf('('); String parenContents = name.substring(lastParenOpenIndex, lastParenCloseIndex); if ( parenContents.indexOf('.') == -1 && parenContents.indexOf('<') == -1 && parenContents.indexOf(':') == -... | public static String getShortName(String name) { int parens = 0; int dotCount = 0; StringBuffer sb = new StringBuffer(); for ( int i = name.length() - 1; i >= 0; --i ) { char c = name.charAt(i); if ( c == ')' ) ++parens; else if ( c == '(' ) --parens; if ( parens == 0 && ( c == '.' || c == '\\' |... | |
private void addCall(Call call, double t) | private void addCall(String type, Call call, double t) | private void addCall(Call call, double t) { Double time = (Double)timeByCallName.get(call.getName()); if ( time == null ) { time = new Double(t); } else { time = new Double(time.doubleValue() + t); } timeByCallName.put(call.getName(), time); } |
Log.debug(LOG, "Adding ", type, " ", call, ", t = ", t); | private void addCall(Call call, double t) { Double time = (Double)timeByCallName.get(call.getName()); if ( time == null ) { time = new Double(t); } else { time = new Double(time.doubleValue() + t); } timeByCallName.put(call.getName(), time); } | |
Time getTime() throws java.sql.SQLException { | Time getTime(Calendar cal) throws java.sql.SQLException { | Time getTime() throws java.sql.SQLException { if (rs.row[numCol]==null) return TIME_NULL_VALUE; return XSQLVAR.decodeTime(rs.row[numCol]); } |
return XSQLVAR.decodeTime(rs.row[numCol]); | return XSQLVAR.decodeTime(getTime(),cal); | Time getTime() throws java.sql.SQLException { if (rs.row[numCol]==null) return TIME_NULL_VALUE; return XSQLVAR.decodeTime(rs.row[numCol]); } |
Timestamp getTimestamp() throws java.sql.SQLException { | Timestamp getTimestamp(Calendar cal) throws java.sql.SQLException { | Timestamp getTimestamp() throws java.sql.SQLException { if (rs.row[numCol]==null) return TIMESTAMP_NULL_VALUE; return new Timestamp(getTime().getTime()); } |
return new Timestamp(getTime().getTime()); | return XSQLVAR.decodeTimestamp(getTimestamp(),cal); | Timestamp getTimestamp() throws java.sql.SQLException { if (rs.row[numCol]==null) return TIMESTAMP_NULL_VALUE; return new Timestamp(getTime().getTime()); } |
void setTime(Time value) throws java.sql.SQLException { | void setTime(Time value, Calendar cal) throws java.sql.SQLException { | void setTime(Time value) throws java.sql.SQLException { if (value == null) { field.sqldata = null; return; } field.sqldata = XSQLVAR.encodeTime(value); } |
field.sqldata = XSQLVAR.encodeTime(value); | setTime(XSQLVAR.encodeTime(value,cal)); | void setTime(Time value) throws java.sql.SQLException { if (value == null) { field.sqldata = null; return; } field.sqldata = XSQLVAR.encodeTime(value); } |
void setTimestamp(Timestamp value) throws java.sql.SQLException { | void setTimestamp(Timestamp value, Calendar cal) throws java.sql.SQLException { | void setTimestamp(Timestamp value) throws java.sql.SQLException { if (value == null) { field.sqldata = null; return; } setTime(new Time(value.getTime())); } |
setTime(new Time(value.getTime())); | setTimestamp(XSQLVAR.encodeTimestamp(value,cal)); | void setTimestamp(Timestamp value) throws java.sql.SQLException { if (value == null) { field.sqldata = null; return; } setTime(new Time(value.getTime())); } |
public Time decodeTime(byte[] int_byte) { datetime dt = new datetime(null,int_byte); return dt.toTime(); | public java.sql.Time decodeTime(java.sql.Time d, Calendar cal, boolean invertTimeZone) { if (cal == null) { return d; } else { long time = d.getTime() - (invertTimeZone ? -1 : 1) * (cal.getTimeZone().getRawOffset() - Calendar.getInstance().getTimeZone().getRawOffset()); return new Time(time); } | public Time decodeTime(byte[] int_byte) { datetime dt = new datetime(null,int_byte); return dt.toTime(); } |
public byte[] encodeTime(Time d) { | public java.sql.Time encodeTime(Time d, Calendar cal, boolean invertTimeZone) { | public byte[] encodeTime(Time d) { datetime dt = new datetime(d); return dt.toTimeBytes(); } |
datetime dt = new datetime(d); return dt.toTimeBytes(); | if (cal == null) { return d; } else { long time = d.getTime() + (invertTimeZone ? -1 : 1) * (cal.getTimeZone().getRawOffset() - Calendar.getInstance().getTimeZone().getRawOffset()); return new Time(time); } | public byte[] encodeTime(Time d) { datetime dt = new datetime(d); return dt.toTimeBytes(); } |
Arrays.sort(pathsArray); | Arrays.sort(pathsArray, SVNPathUtil.PATH_COMPARATOR); | public static void driveCommitEditor(ISVNCommitPathHandler handler, Collection paths, ISVNEditor editor, long revision) throws SVNException { if (paths == null || paths.isEmpty() || handler == null || editor == null) { return; } String[] pathsArray = (String[]) paths.toArray(new Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.