rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (!src.exists() || !src.isFile()) { | if (!src.exists()) { | public static void rename(File src, File dst) throws IOException { if (!src.exists() || !src.isFile()) { throw new IOException("can't rename file '" + src.getAbsolutePath() + "' : file doesn't exist."); } if (dst.isDirectory()) { throw new IOException("can't ov... |
myCurrentAuthor = fileRevision.getProperties().get("svn:author").toString(); myCurrentDate = TimeUtil.parseDate(fileRevision.getProperties().get("svn:date").toString()); | Map props = fileRevision.getProperties(); if (props != null && props.get("svn:author") != null) { myCurrentAuthor = props.get("svn:author").toString(); } else { myCurrentAuthor = null; } if (props != null && props.get("svn:author") != null) { myCurrentDate = TimeUtil.parseDate(fileRevision.getProperties().get("svn:date... | public void handleFileRevision(SVNFileRevision fileRevision) throws SVNException { Map propDiff = fileRevision.getPropertiesDelta(); String newMimeType = (String) (propDiff != null ? propDiff.get(SVNProperty.MIME_TYPE) : null); DebugLog.log("mime:type at revision: " + fileRevision.getRevision()... |
String fullURL = request.getContextPath() + request.getServletPath(); | String fullURL = request.getRequestURL().toString(); | public static void storeOriginalURL(HttpServletRequest request) { String orig = (String) request.getAttribute("dspace.original.url"); if (orig == null) { String fullURL = request.getContextPath() + request.getServletPath(); if (request.getQueryString() !=... |
StringBuffer spec = null; | public Map listSets() throws NoSetHierarchyException, OAIInternalServerError { log.info(LogManager.getHeader(null, "oai_request", "verb=listSets")); Context context = null; // List to put results in List sets = new LinkedList(); try { context = new ... | |
String spec = "<set><setSpec>hdl_" + allCols[i].getHandle().replace('/', '_') + "</setSpec><setName>" + Utils.addEntities(allCols[i].getMetadata("name")) + "</setName></set>"; sets.add(spec); | spec = new StringBuffer("<set><setSpec>hdl_"); spec.append(allCols[i].getHandle().replace('/', '_')); spec.append("</setSpec>"); String collName = allCols[i].getMetadata("name"); if(collName != null) { spec.append("<setName>"); spec.append(Utils.addEntities(collName)); spec.append("</setName>"); } else { spec.append("<... | public Map listSets() throws NoSetHierarchyException, OAIInternalServerError { log.info(LogManager.getHeader(null, "oai_request", "verb=listSets")); Context context = null; // List to put results in List sets = new LinkedList(); try { context = new ... |
tri.close(); | public static Collection[] findAll(Context context) throws SQLException { TableRowIterator tri = DatabaseManager.query(context, "collection", "SELECT * FROM collection ORDER BY name"); List collections = new ArrayList(); while (tri.hasNext()) { TableRow row =... | |
state_xfer_mutex.notify(); | state_xfer_mutex.notifyAll(); | public void down(Event evt) { Object coord, state; Vector event_list=null; StateTransferInfo info; switch(evt.getType()) { case Event.TMP_VIEW: case Event.VIEW_CHANGE: Vector new_members=((View)evt.getArg()).getMembers(); synchronized(m... |
public GroupRequest(Message m, RequestCorrelator corr, Vector members, int rsp_mode, long timeout, int expected_mbrs) { this(m, corr, members, rsp_mode); if(timeout > 0) this.timeout=timeout; this.expected_mbrs=expected_mbrs; | public GroupRequest(Message m, RequestCorrelator corr, Vector members, int rsp_mode) { request_msg=m; this.corr=corr; this.rsp_mode=rsp_mode; reset(members); | public GroupRequest(Message m, RequestCorrelator corr, Vector members, int rsp_mode, long timeout, int expected_mbrs) { this(m, corr, members, rsp_mode); if(timeout > 0) this.timeout=timeout; this.expected_mbrs=expected_mbrs; } |
return rsps.get(key); | return get(key); | public Object elementAt(int i) throws ArrayIndexOutOfBoundsException { Set keys=new TreeSet(keySet()); if(keys == null) return null; Object[] keys_array=keys.toArray(); Object key=keys_array[i]; return rsps.get(key); } |
public void commit(String target, SVNCommitInfo info, Map wcPropChanges, boolean removeLock, boolean recursive) { | public void commit(String target, SVNCommitInfo info, Map wcPropChanges, boolean removeLock, boolean recursive) throws SVNException { SVNLog log = getLog(0); String checksum = null; if (!"".equals(target)) { File baseFile = getBaseFile(target, true); SVNFileType baseType = SVNFileType.getType(baseFile); if (baseType ... | public void commit(String target, SVNCommitInfo info, Map wcPropChanges, boolean removeLock, boolean recursive) { } |
os = new FileOutputStream(readme); | public static void createVersionedDirectory(File dir) throws SVNException { dir.mkdirs(); File adminDir = new File(dir, ".svn"); adminDir.mkdirs(); SVNFileUtil.setHidden(adminDir, true); File format = new File(adminDir, "format"); OutputStream os = null; if (!format.... | |
if (os != null) { try { os.close(); } catch (IOException e) { } } | SVNFileUtil.closeFile(os); | public static void createVersionedDirectory(File dir) throws SVNException { dir.mkdirs(); File adminDir = new File(dir, ".svn"); adminDir.mkdirs(); SVNFileUtil.setHidden(adminDir, true); File format = new File(adminDir, "format"); OutputStream os = null; if (!format.... |
if (file.isFile() || !file.exists()) { destroyFile(name, deleteWorkingFiles); } else if (file.exists()) { | SVNFileType type = SVNFileType.getType(file); if (type == SVNFileType.DIRECTORY) { | public void destroy(String name, boolean deleteWorkingFiles) throws SVNException { if ("".equals(name)) { SVNDirectory parent = null; if ("".equals(myPath)) { SVNWCAccess parentWCAccess = null; try { parentWCAccess = SVNWCAccess.create(ge... |
} | } else { destroyFile(name, deleteWorkingFiles); } | public void destroy(String name, boolean deleteWorkingFiles) throws SVNException { if ("".equals(name)) { SVNDirectory parent = null; if ("".equals(myPath)) { SVNWCAccess parentWCAccess = null; try { parentWCAccess = SVNWCAccess.create(ge... |
File propFile = null; File baseFile = null; | File propFile; File baseFile; | public boolean hasPropModifications(String name) throws SVNException { File propFile = null; File baseFile = null; if ("".equals(name)) { propFile = getFile(".svn/dir-props", false); baseFile = getFile(".svn/dir-prop-base", false); } else { propFile = get... |
if (textTime == null) { return true; } | public boolean hasTextModifications(String name, boolean force) throws SVNException { if (!getFile(name, false).isFile()) { return false; } SVNEntries entries = getEntries(); if (entries == null || entries.getEntry(name, true) == null) { return false; } ... | |
OutputStream os = null; | File file = getFile(prejTmpPath, false); OutputStream os = SVNFileUtil.openFileForWriting(file); | public SVNStatusType mergeProperties(String name, Map changedProperties, Map locallyChanged, boolean updateBaseProps, SVNLog log) throws SVNException { changedProperties = changedProperties == null ? Collections.EMPTY_MAP : changedProperties; locallyChanged = locallyChanged == null ? Collections.EMPTY... |
os = new FileOutputStream(new File(getRoot(), prejTmpPath)); | public SVNStatusType mergeProperties(String name, Map changedProperties, Map locallyChanged, boolean updateBaseProps, SVNLog log) throws SVNException { changedProperties = changedProperties == null ? Collections.EMPTY_MAP : changedProperties; locallyChanged = locallyChanged == null ? Collections.EMPTY... | |
if (os != null) { try { os.close(); } catch (IOException e) { } } | SVNFileUtil.closeFile(os); | public SVNStatusType mergeProperties(String name, Map changedProperties, Map locallyChanged, boolean updateBaseProps, SVNLog log) throws SVNException { changedProperties = changedProperties == null ? Collections.EMPTY_MAP : changedProperties; locallyChanged = locallyChanged == null ? Collections.EMPTY... |
public void write(int b) throws IOException {} | public void write(int b) {} | public SVNStatusType mergeText(String localPath, String basePath, String latestPath, String localLabel, String baseLabel, String latestLabel, boolean dryRun) throws SVNException { String mimeType = getProperties(localPath, false).getPropertyValue(SVNProperty.MIME_TYPE); SVNEntry entry = getEntries().g... |
result.close(); | if (result != null) { result.close(); } | public SVNStatusType mergeText(String localPath, String basePath, String latestPath, String localLabel, String baseLabel, String latestLabel, boolean dryRun) throws SVNException { String mimeType = getProperties(localPath, false).getPropertyValue(SVNProperty.MIME_TYPE); SVNEntry entry = getEntries().g... |
resultFile.delete(); | if (resultFile != null) { resultFile.delete(); } | public SVNStatusType mergeText(String localPath, String basePath, String latestPath, String localLabel, String baseLabel, String latestLabel, boolean dryRun) throws SVNException { String mimeType = getProperties(localPath, false).getPropertyValue(SVNProperty.MIME_TYPE); SVNEntry entry = getEntries().g... |
public void write(int b) throws IOException {} | public void write(int b) {} | public void write(int b) throws IOException {} |
wasReverted |= true; | wasReverted = true; | public boolean revert(String name) throws SVNException { DebugLog.log("reverting: " + name + " in " + getRoot()); boolean magicPropsChanged = false; boolean wasReverted = false; SVNEntry entry = getEntries().getEntry(name, true); if (entry == null || entry.isHidden()) { ... |
String eolStyle = wcProps.getPropertyValue(SVNProperty.EOL_STYLE); String keywords = wcProps.getPropertyValue(SVNProperty.KEYWORDS); String url = entry.getURL(); String author = entry.getAuthor(); String date = entry.getCommittedDate(); String rev = Long.toString(entry.getCommittedRevision()); | public boolean revert(String name) throws SVNException { DebugLog.log("reverting: " + name + " in " + getRoot()); boolean magicPropsChanged = false; boolean wasReverted = false; SVNEntry entry = getEntries().getEntry(name, true); if (entry == null || entry.isHidden()) { ... | |
Map logFiles = new TreeMap(); File dir = getAdminDirectory(); File[] children = dir.listFiles(); | public void runLogs() throws SVNException { Map logFiles = new TreeMap(); File dir = getAdminDirectory(); File[] children = dir.listFiles(); SVNLogRunner runner = new SVNLogRunner(); int index = 0; while(true) { SVNLog log = new SVNLog(this, index); in... | |
while(true) { SVNLog log = new SVNLog(this, index); index++; if (log.exists()) { log.run(runner); continue; | try { while(true) { SVNLog log = new SVNLog(this, index); index++; if (log.exists()) { log.run(runner); continue; } return; | public void runLogs() throws SVNException { Map logFiles = new TreeMap(); File dir = getAdminDirectory(); File[] children = dir.listFiles(); SVNLogRunner runner = new SVNLogRunner(); int index = 0; while(true) { SVNLog log = new SVNLog(this, index); in... |
return; | } finally { runner.logCompleted(this); | public void runLogs() throws SVNException { Map logFiles = new TreeMap(); File dir = getAdminDirectory(); File[] children = dir.listFiles(); SVNLogRunner runner = new SVNLogRunner(); int index = 0; while(true) { SVNLog log = new SVNLog(this, index); in... |
SVNDirectory parent = null; SVNDirectory child = null; String nameInParent = null; | SVNDirectory parent; SVNDirectory child; String nameInParent; | public void scheduleForDeletion(String name) throws SVNException { SVNEntries entries = getEntries(); SVNEntry entry = entries.getEntry(name, true); if (entry == null) { SVNFileUtil.deleteAll(getFile(name, false)); return; } boolean added = entry.isScheduledF... |
public static void deleteAll(File dir, boolean deleteDirs) { if (dir == null) { return; } File[] children = dir.listFiles(); if (children != null) { for (int i = 0; i < children.length; i++) { File child = children[i]; deleteAll(child, deleteDirs); } } if (dir.isDirectory() && !deleteDirs) { return; } dir.delete(); | public static void deleteAll(File dir) { deleteAll(dir, true); | public static void deleteAll(File dir, boolean deleteDirs) { if (dir == null) { return; } File[] children = dir.listFiles(); if (children != null) { for (int i = 0; i < children.length; i++) { File child = children[i]; deleteAll(child, ... |
long remainder = tstamp - ((tstamp / 1000) * 1000); if (remainder < 500) { return (tstamp / 1000) * 1000; } return (tstamp / 1000) * 1000 + 1000; | return (tstamp / 1000) * 1000; | public static long roundTimeStamp(long tstamp) { long remainder = tstamp - ((tstamp / 1000) * 1000); if (remainder < 500) { return (tstamp / 1000) * 1000; } return (tstamp / 1000) * 1000 + 1000; } |
writeLineAndEol(result, baseLines[baseLineIndex]); | final SVNSequenceLine baseLine = baseLines[baseLineIndex]; writeLineAndEol(result, baseLine); | public int merge(InputStream baseStream, InputStream localStream, InputStream latestStream, OutputStream result) throws IOException { final SVNSequenceLineReader reader = new SVNSequenceLineReader(true); final SVNSequenceLine[] baseLines = reader.read(baseStream); final SVNSequenceLine[] localLines = reader.read(lo... |
} else { int index = line.indexOf('='); if (index > 0) { String attrName = line.substring(0, index).trim(); String value = line.substring(index + 1).trim(); if (value.endsWith("/>")) { value = value.substring(0, value.length() - "/>".length()); } if (value.startsWith("\"")) { value = value.substring(1); } if (value.end... | } int index = line.indexOf('='); if (index > 0) { String attrName = line.substring(0, index).trim(); String value = line.substring(index + 1).trim(); if (value.endsWith("/>")) { value = value.substring(0, value.length() - "/>".length()); | public void run(SVNLogRunner runner) throws SVNException { if (!myFile.exists()) { return; } BufferedReader reader = null; Collection commands = new ArrayList(); try { reader = new BufferedReader(new InputStreamReader(SVNFileUtil .openFileF... |
if (value.startsWith("\"")) { value = value.substring(1); } if (value.endsWith("\"")) { value = value.substring(0, value.length() - 1); } value = SVNEncodingUtil.xmlDecode(value); attrs.put(attrName, value); | public void run(SVNLogRunner runner) throws SVNException { if (!myFile.exists()) { return; } BufferedReader reader = null; Collection commands = new ArrayList(); try { reader = new BufferedReader(new InputStreamReader(SVNFileUtil .openFileF... | |
} else { return entry.put(propertyName, propertyValue) != null; | public boolean setPropertyValue(String name, String propertyName, String propertyValue) { if (myData == null) { return false; } Map entry = (Map) myData.get(name); if (entry != null) { if (SVNProperty.SCHEDULE.equals(propertyName)) { if (SV... | |
return entry.put(propertyName, propertyValue) != null; | public boolean setPropertyValue(String name, String propertyName, String propertyValue) { if (myData == null) { return false; } Map entry = (Map) myData.get(name); if (entry != null) { if (SVNProperty.SCHEDULE.equals(propertyName)) { if (SV... | |
if (myIsProxied && !myIsSecured && myProxyAuthentication != null) { | if ((myIsProxyAuthForced || (myIsProxied && !myIsSecured)) && myProxyAuthentication != null) { | private StringBuffer composeHTTPHeader(String request, String path, Map header, int length) { StringBuffer sb = new StringBuffer(); sb.append(request); sb.append(' '); if (myIsProxied && !myIsSecured) { // prepend path with host name. sb.append("http://"); ... |
myConnection.skipData(this); | if (!"CONNECT".equalsIgnoreCase(request)) { myConnection.skipData(this); } | public void dispatch(String request, String path, Map header, int ok1, int ok2, SVNErrorMessage context) throws IOException { int length = 0; if (myRequestBody != null) { length = myRequestBody.length; } else if (myRequestStream instanceof ByteArrayInputStream) { length = ... |
public void testUnknownAddress() throws UnknownHostException { IpAddress addr=new IpAddress("idontknow.com", 55); assertEquals(addr.getIpAddress(), InetAddress.getLocalHost()); | public void testUnknownAddress() { try { IpAddress tmp=new IpAddress("idontknow.com", 55); fail("should throw an UnknownHostException"); } catch(UnknownHostException e1) { } | public void testUnknownAddress() throws UnknownHostException { IpAddress addr=new IpAddress("idontknow.com", 55); assertEquals(addr.getIpAddress(), InetAddress.getLocalHost()); } |
public IpAddress(String i, int p) { try { ip_addr=InetAddress.getByName(i); } catch(Exception e) { if(log.isWarnEnabled()) log.warn("failed to get " + i + ':' + p + ", using \"127.0.0.1\", exception: " + Util.printStackTrace(e)); try { ip_addr=InetAddress.getByName("127.0.0.1"); } catch(Exception ex) { if(log.isWarnEna... | public IpAddress() { | public IpAddress(String i, int p) { try { ip_addr=InetAddress.getByName(i); } catch(Exception e) { if(log.isWarnEnabled()) log.warn("failed to get " + i + ':' + p + ", using \"127.0.0.1\", exception: " + Util.printStackTrace(e)); try { ... |
if (line == null || line.length() == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.STREAM_UNEXPECTED_EOF, "Reading ''{0}''", formatFile); SVNErrorMessage err1 = SVNErrorMessage.create(SVNErrorCode.WC_NOT_DIRECTORY, "''{0}'' is not a working copy", path); err1.setChildErrorMessage(err); SVNErrorManager.... | protected int getVersion(File path) throws SVNException { File adminDir = new File(path, SVNFileUtil.getAdminDirectoryName()); File formatFile = new File(adminDir, "format"); BufferedReader reader = null; String line = null; int formatVersion = -1; try { ... | |
SVNDebugLog.log(new Exception()); | private SVNURL(String url, boolean uriEncoded) throws SVNException { if (url == null) { SVNDebugLog.log(new Exception()); SVNErrorManager.error("svn: invalid URL '" + url + "'"); } if (url.endsWith("/")) { url = url.substring(0, url.length() - 1); } ... | |
SVNFileUtil.rename(dst, dir.getFile(dstPath, false)); | try { SVNFileUtil.rename(dst, dir.getFile(dstPath, false)); } finally { dst.delete(); } | public static void translate(SVNDirectory dir, String name, String srcPath, String dstPath, boolean expand, boolean safe) throws SVNException { File src = dir.getFile(srcPath, false); File dst = safe ? SVNFileUtil.createUniqueFile(dir.getRoot(), dstPath, ".tmp") : dir.getFile(dstPath, false); ... |
table2dc.put("ItemsByTitle", item.getDC("title", null, Item.ANY)); table2dc.put("ItemsByAuthor", item.getDC("contributor", Item.ANY, Item.ANY)); table2dc.put("ItemsByDate", item.getDC("date", "issued", Item.ANY)); | table2dc.put("ItemsByTitle", titleArray); table2dc.put("ItemsByAuthor", authorArray); table2dc.put("ItemsByDate", dateArray); | public static void itemAdded(Context context, Item item) throws SQLException { // add all parent communities to communities2item table Community[] parents = item.getCommunities(); for (int j = 0; j < parents.length; j++) { TableRow row = DatabaseManager.create(co... |
table2dc.put("ItemsBySubject", item .getDC("subject", Item.ANY, Item.ANY)); | table2dc.put("ItemsBySubject", subjectArray); | public static void itemAdded(Context context, Item item) throws SQLException { // add all parent communities to communities2item table Community[] parents = item.getCommunities(); for (int j = 0; j < parents.length; j++) { TableRow row = DatabaseManager.create(co... |
tri.close(); | public Community[] getCommunities() throws SQLException { List communities = new ArrayList(); // Get community table rows TableRowIterator tri = DatabaseManager .query( ourContext, "community", "SELECT commun... | |
public static TableRow querySingle(Context context, String table, String query) throws SQLException | public static TableRow querySingle(Context context, String query) throws SQLException | public static TableRow querySingle(Context context, String table, String query) throws SQLException { TableRowIterator iterator = query(context, canonicalize(table), query); return (!iterator.hasNext()) ? null : iterator.next(); } |
TableRowIterator iterator = query(context, canonicalize(table), query); | TableRowIterator iterator = query(context, query); | public static TableRow querySingle(Context context, String table, String query) throws SQLException { TableRowIterator iterator = query(context, canonicalize(table), query); return (!iterator.hasNext()) ? null : iterator.next(); } |
return (!iterator.hasNext()) ? null : iterator.next(); | TableRow retRow = (!iterator.hasNext()) ? null : iterator.next(); iterator.close(); return (retRow); | public static TableRow querySingle(Context context, String table, String query) throws SQLException { TableRowIterator iterator = query(context, canonicalize(table), query); return (!iterator.hasNext()) ? null : iterator.next(); } |
System.out.println(opCode); | System.out.println(String.format("%4d: %s", pos, opCode)); | public void executeNextInstruction() { OpCode opCode = OpCodes.getOpcode(byteIterator.nextByte()); System.out.println(opCode); opCode.execute(this); } |
ps.execute(); | ps.executeUpdate(); | public void testFieldTypes() throws Exception { PreparedStatement ps = connection.prepareStatement( "INSERT INTO test_blob(id, bin_data) VALUES (?, ?)"); for(int i = 0; i < TEST_ROW_COUNT; i++) { ps.setInt(1, i); ps.setBytes(2, testData[i]); ... |
fbManager.createDatabase(DB_NAME); | fbManager.createDatabase(DB_NAME, DB_USER, DB_PASSWORD); | protected void setUp() throws Exception { try { fbManager.setURL(DB_SERVER_URL); fbManager.setPort(DB_SERVER_PORT); fbManager.start(); fbManager.createDatabase(DB_NAME); } catch (Exception e) { System.out.println("exception in setup of " + getName()... |
fbManager.dropDatabase(DB_NAME); | fbManager.dropDatabase(DB_NAME, DB_USER, DB_PASSWORD); | protected void tearDown() throws Exception { try { fbManager.dropDatabase(DB_NAME); fbManager.stop(); } catch (Exception e) { System.out.println("exception in teardown of " + getName() + ": " + e); e.printStackTrace(); } // end of try-catch } |
&& (blobBufferLength == blobBufferLength); | && (blobBufferLength == mcf.blobBufferLength); | public boolean equals(Object other) { if (other == this) { return true; } // end of if () if (!(other instanceof FBManagedConnectionFactory)) { return false; } // end of if () FBManagedConnectionFactory mcf = (FBManagedConnectionFactory)oth... |
createArray(); | public FBTpb() { tpb.add(ISC_TPB_WRITE); tpb.add(ISC_TPB_READ_COMMITTED); tpb.add(ISC_TPB_REC_VERSION); //tpt.add(ISC_TPB_CONCURRENCY); tpb.add(ISC_TPB_WAIT); } | |
String enc = FBConnectionHelper.getDefaultJavaEncoding(); String iscEncoding = FBConnectionHelper.getIscEncoding(enc); if (iscEncoding != null) result.setProperty(ISCConstants.isc_dpb_lc_ctype,iscEncoding); else result.setProperty(ISCConstants.isc_dpb_lc_ctype,"ISO8859_1"); | public static FBConnectionRequestInfo getDefaultCri() { FBConnectionRequestInfo result = new FBConnectionRequestInfo(); //result.setProperty(GDS.isc_dpb_num_buffers, new byte[] {90}); //result.setProperty(GDS.isc_dpb_dummy_packet_interval, new byte[] {120, 10, 0, 0}); //result.setPropert... | |
public void info(Object message, Throwable t) { if (loggingAvailable) { log.log(Priority.INFO, message, t); } } | abstract public void info(Object message); | public void info(Object message, Throwable t) { if (loggingAvailable) { log.log(Priority.INFO, message, t); } } |
Set getTpb() { return tpb.getInternalTpb(); | FBTpb getTpb(){ return tpb; | Set getTpb() { return tpb.getInternalTpb(); } |
Set tpb) throws GDSException; | byte[] tpb) throws GDSException; | void isc_start_transaction( isc_tr_handle tr_handle, isc_db_handle db_handle, Set tpb) throws GDSException; |
public void error(Object message, Throwable t) { if (loggingAvailable) { log.log(Priority.ERROR, message, t); } } | abstract public void error(Object message); | public void error(Object message, Throwable t) { if (loggingAvailable) { log.log(Priority.ERROR, message, t); } } |
public void warn(Object message, Throwable t) { if (loggingAvailable) { log.log(Priority.WARN, message, t); } } | abstract public void warn(Object message); | public void warn(Object message, Throwable t) { if (loggingAvailable) { log.log(Priority.WARN, message, t); } } |
addArgument(DatabaseParameterBufferExtension.PASSWORD, password); | if (password != null) addArgument(DatabaseParameterBufferExtension.PASSWORD, password); | public void setPassword(String password) { removeArgument(DatabaseParameterBufferExtension.PASSWORD); addArgument(DatabaseParameterBufferExtension.PASSWORD, password); } |
createArray(); | public void setTpb(FBTpb tpb) { this.tpb.clear(); this.tpb.addAll(tpb.tpb); } | |
SVNEntry entry = entries.getEntry(name, true); | SVNEntry entry = entries.getEntry(name, false); | private static void collectInfo(SVNDirectory dir, String name, boolean recursive, ISVNInfoHandler handler) throws SVNException { SVNEntries entries = dir.getEntries(); SVNEntry entry = entries.getEntry(name, true); try { if (entry != null && !entry.isHidden()) { if (en... |
if (entry != null && !entry.isHidden()) { | if (entry != null) { | private static void collectInfo(SVNDirectory dir, String name, boolean recursive, ISVNInfoHandler handler) throws SVNException { SVNEntries entries = dir.getEntries(); SVNEntry entry = entries.getEntry(name, true); try { if (entry != null && !entry.isHidden()) { if (en... |
return; | public void doResolve(File path, boolean recursive) throws SVNException { SVNWCAccess wcAccess = createWCAccess(path); try { wcAccess.open(true, recursive); String target = wcAccess.getTargetName(); SVNDirectory dir = wcAccess.getAnchor(); if (wcAccess.getTa... | |
return name; | private static String validatePropertyName(String name) throws SVNException { if (name == null || name.trim().length() == 0) { SVNErrorManager.error("svn: Bad property name: '" + name + "'"); } name = name.trim(); if (!(Character.isLetter(name.charAt(0)) || name.charAt(0) == '... | |
public static String detectMimeType(File file) { if (file == null || !file.exists()) { return null; | public static String detectMimeType(InputStream is) throws IOException { byte[] buffer = new byte[1024]; int read = 0; read = is.read(buffer); int binaryCount = 0; for (int i = 0; i < read; i++) { byte b = buffer[i]; if (b == 0) { return BINARY_MIME_TYPE; } if (b < 0x07 || (b > 0x0d && b < 0x20) || b > 0x7F) { binaryCo... | public static String detectMimeType(File file) { if (file == null || !file.exists()) { return null; } InputStream is = null; try { is = openFileForReading(file); return detectMimeType(is); } catch (IOException e) { return null; } ... |
InputStream is = null; try { is = openFileForReading(file); return detectMimeType(is); } catch (IOException e) { return null; } catch (SVNException e) { return null; } finally { closeFile(is); | if (read > 0 && binaryCount * 1000 / read > 850) { return BINARY_MIME_TYPE; | public static String detectMimeType(File file) { if (file == null || !file.exists()) { return null; } InputStream is = null; try { is = openFileForReading(file); return detectMimeType(is); } catch (IOException e) { return null; } ... |
return null; | public static String detectMimeType(File file) { if (file == null || !file.exists()) { return null; } InputStream is = null; try { is = openFileForReading(file); return detectMimeType(is); } catch (IOException e) { return null; } ... | |
return new SVNInfo(file, entry.getURL(), entry.getRevision(), entry | return new SVNInfo(file, entry.getSVNURL(), entry.getRevision(), entry | static SVNInfo createInfo(File file, SVNEntry entry) { if (entry == null) { return null; } SVNLock lock = null; if (entry.getLockToken() != null) { lock = new SVNLock(null, entry.getLockToken(), entry.getLockOwner(), entry.getLockComment(), SVNTim... |
.getSchedule(), entry.getCopyFromURL(), entry | .getSchedule(), entry.getCopyFromSVNURL(), entry | static SVNInfo createInfo(File file, SVNEntry entry) { if (entry == null) { return null; } SVNLock lock = null; if (entry.getLockToken() != null) { lock = new SVNLock(null, entry.getLockToken(), entry.getLockOwner(), entry.getLockComment(), SVNTim... |
SVNExternalInfo info = new SVNExternalInfo("", null, path, url, rev); result.add(info); | try { SVNExternalInfo info = new SVNExternalInfo("", null, path, SVNURL.parseURIEncoded(url), rev); result.add(info); } catch (SVNException e) { } | public static SVNExternalInfo[] parseExternals(String rootPath, String externals) { Collection result = new ArrayList(); if (externals == null) { return (SVNExternalInfo[]) result .toArray(new SVNExternalInfo[result.size()]); } for (StringTokenizer lines = n... |
Process getCurrentProcess() | public Process getCurrentProcess() | Process getCurrentProcess() { return getLocation().getCurrentProcess(); } |
State getCurrentState() | public State getCurrentState() | State getCurrentState() { return getLocation().getCurrentState(); } |
public AuthorizeException(String message) | public AuthorizeException() | public AuthorizeException(String message) { super(message); myaction = -1; myobject = null; } |
super(message); | super(); | public AuthorizeException(String message) { super(message); myaction = -1; myobject = null; } |
repos.setCredentialsProvider(new SVNSimpleCredentialsProvider("alex", "cvs")); | repos.setCredentialsProvider(new SVNSimpleCredentialsProvider("jrandom", "rayjandom")); | public static void main(String[] args) { /* ISVNReporter r = new ISVNReporter() { public void setPath(String path, String lockToken, long revision, boolean startEmpty) throws SVNException { System.out.println("set-path '" + path + "' : " + revision); } ... |
File dst = new File("c:/javasvn2/seq"); | File dst = new File("C:/nautilus/org.tmatesoft.javasvn/javasvn-test/python/cmdline/working_copies/basic_tests-1"); | public static void main(String[] args) { /* ISVNReporter r = new ISVNReporter() { public void setPath(String path, String lockToken, long revision, boolean startEmpty) throws SVNException { System.out.println("set-path '" + path + "' : " + revision); } ... |
String url = "http: updater.doCopy(url, dst, SVNRevision.HEAD); | String url = "svn: updater.doCheckout(url, dst, SVNRevision.HEAD, SVNRevision.HEAD, true); | public static void main(String[] args) { /* ISVNReporter r = new ISVNReporter() { public void setPath(String path, String lockToken, long revision, boolean startEmpty) throws SVNException { System.out.println("set-path '" + path + "' : " + revision); } ... |
repos.setCredentialsProvider(new SVNSimpleCredentialsProvider("alex", "cvs")); | repos.setCredentialsProvider(new SVNSimpleCredentialsProvider("jrandom", "rayjandom")); | public SVNRepository createRepository(String url) throws SVNException { SVNRepository repos = SVNRepositoryFactory.create(SVNRepositoryLocation.parseURL(url)); repos.setCredentialsProvider(new SVNSimpleCredentialsProvider("alex", "cvs")); return repos; ... |
SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = anchorEntries.getEntry(myWCAccess.getTargetName()); | public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = anchorEntries.getEntry(myWCAccess.getTargetName()); try { ... | |
th.printStackTrace(); | public void report(ISVNReporter reporter) throws SVNException { SVNEntries targetEntries = myWCAccess.getTarget().getEntries(); SVNEntries anchorEntries = myWCAccess.getAnchor().getEntries(); SVNEntry targetEntry = anchorEntries.getEntry(myWCAccess.getTargetName()); try { ... | |
SVNTranslator.translate(dir, name, name, SVNFileUtil.getBasePath(dst), true, true); | SVNTranslator.translate(dir, name, SVNFileUtil.getBasePath(src), SVNFileUtil.getBasePath(dst), true, true); | private void restoreFile(SVNDirectory dir, String name) throws SVNException { SVNProperties props = dir.getProperties(name, false); SVNEntry entry = dir.getEntries().getEntry(name); String eolStyle = props.getPropertyValue(SVNProperty.EOL_STYLE); String keywords = props.getPropertyValue(... |
public SVNUpdater(ISVNRepositoryFactory repositoryFactory, SVNOptions options, ISVNEventListener eventDispatcher) { super(repositoryFactory, options, eventDispatcher); | public SVNUpdater(final ISVNCredentialsProvider credentialsProvider, ISVNEventListener eventDispatcher) { super(new ISVNRepositoryFactory() { public SVNRepository createRepository(String url) throws SVNException { SVNRepository repos = SVNRepositoryFactory.create(SVNRepositoryLocation.parseURL(url)); repos.setCredentia... | public SVNUpdater(ISVNRepositoryFactory repositoryFactory, SVNOptions options, ISVNEventListener eventDispatcher) { super(repositoryFactory, options, eventDispatcher); } |
if (!dstPath.exists() || (dstPath.isDirectory() && !SVNWCAccess.isVersionedDirectory(dstPath))) { createVersionedDirectory(dstPath, url, uuid, revNumber); result = doUpdate(dstPath, revision, recursive); } else if (dstPath.isDirectory() && SVNWCAccess.isVersionedDirectory(dstPath)) { SVNWCAccess wcAccess = SVNWCAccess.... | try { if (!dstPath.exists() || (dstPath.isDirectory() && !SVNWCAccess.isVersionedDirectory(dstPath))) { createVersionedDirectory(dstPath, url, uuid, revNumber); | public long doCheckout(String url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive) throws SVNException { url = validateURL(url); if (dstPath == null) { dstPath = new File(".", PathUtil.tail(url)); } if (!revision.isValid() && !pegRevision.isVali... |
} else { SVNErrorManager.error(0, null); | } finally { SVNFileUtil.sleepForTimestamp(); myIsDoNotSleepForTimeStamp = false; | public long doCheckout(String url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive) throws SVNException { url = validateURL(url); if (dstPath == null) { dstPath = new File(".", PathUtil.tail(url)); } if (!revision.isValid() && !pegRevision.isVali... |
if (myData.containsKey(name)) { | if (myData != null && myData.containsKey(name)) { | public SVNEntry getEntry(String name) { if (myData.containsKey(name)) { return new SVNEntry(this, name); } return null; } |
SVNErrorManager.error(0, null); return; } if (dst.exists()) { | public static void translate(File src, File dst, byte[] eol, Map keywords, boolean special) throws SVNException { if (src == null || dst == null) { SVNErrorManager.error(0, null); return; } if (dst.exists()) { SVNErrorManager.error(0, null); return; ... | |
if (dst.exists()) { dst.delete(); } | public static void translate(File src, File dst, byte[] eol, Map keywords, boolean special) throws SVNException { if (src == null || dst == null) { SVNErrorManager.error(0, null); return; } if (dst.exists()) { SVNErrorManager.error(0, null); return; ... | |
if (propValue == null) { continue; } if (!"".equals(name)) { Object expectedValue = null; if (SVNProperty.KIND_DIR.equals(entry.get(SVNProperty.KIND))) { if (SVNProperty.UUID.equals(propName) || SVNProperty.REVISION.equals(propName) || SVNProperty.URL.equals(propName)) { continue; } } else { if (SVNProperty.URL.equals(... | public void save(boolean close) throws SVNException { if (myData == null) { return; } Writer os = null; File tmpFile = new File(myFile.getParentFile(), "tmp/entries"); try { os = new FileWriter(tmpFile); os.write("<?xml version=\"1.0\" encoding=\"u... | |
System.err.println( "connect: " + state.getName() + " to " + destState.getName() ); | public static Graph buildGraph(Process process) { List<State> states = process.getStates(); Graph graph = new DirectedSparseGraph(); Map<State, Vertex> vertexIndex = new HashMap<State, Vertex>(); for ( State state : states ) { SimpleDirectedSparseVertex vertex = new ... | |
mColors = new Hashtable(); | mColors = new HashMap(); | public static void initialise() throws MapyrusException, IOException { String filename, line; StringTokenizer st; LineNumberReader reader = null; mColors = new Hashtable(); /* * If user gave name of file as property then use that. */ try { filename = System.getProperty(Mapyrus.PROGRAM_NAME + ".rgbfile... |
if (fixedStmt == null) { fixedStmt = mc.getAllocatedStatement(); } mc.prepareSQL(fixedStmt, c.nativeSQL(sql), true); | prepareFixedStatement(sql, true); | FBPreparedStatement(FBConnection c, String sql) throws SQLException { super(c); try { c.ensureInTransaction(); if (fixedStmt == null) { fixedStmt = mc.getAllocatedStatement(); } mc.prepareSQL(fixedStmt, c.nativeSQL(sql), true); c.ch... |
*/ for (int i = 0; i < isParamSet.length; i++) isParamSet[i] = false; | public void clearParameters() throws SQLException { for (int i = 1; i <= fixedStmt.getInSqlda().sqln; i++) { setNull(i, 0); } } | |
throw new SQLException("Arrays are not supported."); | public void setArray (int i, Array x) throws SQLException { } | |
parameterWasSet(parameterIndex); | public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { getField(parameterIndex).setBigDecimal(x); } | |
parameterWasSet(parameterIndex); | public void setBinaryStream(int parameterIndex, InputStream inputStream, int length) throws SQLException { //super.setBinaryStream(parameterIndex, inputStream, length); getField(parameterIndex).setBinaryStream(inputStream, length); } | |
parameterWasSet(parameterIndex); | public void setBoolean(int parameterIndex, boolean x) throws SQLException { getField(parameterIndex).setBoolean(x); } | |
parameterWasSet(parameterIndex); | public void setByte(int parameterIndex, byte x) throws SQLException { getField(parameterIndex).setByte(x); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.