rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
documentJLabel.setText(getString("DocumentLabel.Empty")); | documentNameJLabel.setText(getString("DocumentNameLabel.Empty")); | private void reloadDocument() { documentJLabel.setText(getString("DocumentLabel.Empty")); if(null != input) { final Document document = getDocument(); final Object[] arguments = new Object[] {document.getName()}; documentJLabel.setText(getString("DocumentLabel", arguments)); } } |
documentJLabel.setText(getString("DocumentLabel", arguments)); | documentNameJLabel.setText(getString("DocumentNameLabel", arguments)); | private void reloadDocument() { documentJLabel.setText(getString("DocumentLabel.Empty")); if(null != input) { final Document document = getDocument(); final Object[] arguments = new Object[] {document.getName()}; documentJLabel.setText(getString("DocumentLabel", arguments)); } } |
else { final DocumentVersion version = extractDocumentVersion(); if(version == WorkingVersion.getWorkingVersion()) { getSessionModel().send(contacts, documentId); } else { getSessionModel().send( contacts, documentId, version.getVersionId()); } } | else { getSessionModel().send(contacts, documentId); } | private void sendJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendJButtonActionPerformed if(isInputValid()) { final Long documentId = extractDocumentId(); final List<User> contacts = proxy(extractTeam()); contacts.addAll(proxy(extractContacts())); final Boolean doIncludeKey ... |
return new ValueParserSub(this, key); | return getString(key); | public Object get(String key) { return new ValueParserSub(this, key); } |
public void addTeamMember(final UUID uniqueId, final JabberId jabberId) throws SmackException { | public void addTeamMember(final UUID uniqueId, final JabberId jabberId) { | public void addTeamMember(final UUID uniqueId, final JabberId jabberId) throws SmackException { xmppArtifact.addTeamMember(uniqueId, jabberId); } |
final JabberId invitedBy) throws SmackException { | final JabberId invitedBy) { | public void declineInvitation(final EMail invitedAs, final JabberId invitedBy) throws SmackException { xmppContact.decline(invitedAs, invitedBy); } |
final Credentials credentials) throws SmackException { | final Credentials credentials) { | public void login(final Environment environment, final Credentials credentials) throws SmackException { login(1, environment, credentials); } |
public void publish(ContainerVersion container, Map<DocumentVersion, InputStream> documents, List<JabberId> publishTo, JabberId publishedBy, Calendar publishedOn) throws SmackException { | public void publish(ContainerVersion container, Map<DocumentVersion, InputStream> documents, List<JabberId> publishTo, JabberId publishedBy, Calendar publishedOn) { | public void publish(ContainerVersion container, Map<DocumentVersion, InputStream> documents, List<JabberId> publishTo, JabberId publishedBy, Calendar publishedOn) throws SmackException { try { xmppContainer.publish(container, documents, publishTo, publishedBy, publishedOn); ... |
throw XMPPErrorTranslator.translate(iox); | throw translateError(iox); | public void publish(ContainerVersion container, Map<DocumentVersion, InputStream> documents, List<JabberId> publishTo, JabberId publishedBy, Calendar publishedOn) throws SmackException { try { xmppContainer.publish(container, documents, publishTo, publishedBy, publishedOn); ... |
public User readCurrentUser() throws SmackException { | public User readCurrentUser() { | public User readCurrentUser() throws SmackException { assertLoggedIn("[LMODEL] [XMPP] [READ CURRENT USER] [NO SESSION]"); final String qualifiedJabberId = xmppConnection.getUser(); final JabberId jabberId = JabberIdBuilder.parseQualifiedJabberId(qualifiedJabberId); return xmppUser.read(jabberId); ... |
public Profile readProfile() throws SmackException { | public Profile readProfile() { | public Profile readProfile() throws SmackException { assertLoggedIn("[LMODEL] [XMPP] [READ PROFILE] [USER NOT ONLINE]"); return xmppProfile.read(getJabberId()); } |
final List<JabberId> sendTo, final JabberId sentBy, final Calendar sentOn) throws SmackException { | final List<JabberId> sendTo, final JabberId sentBy, final Calendar sentOn) { | public void send(final ContainerVersion container, final Map<DocumentVersion, InputStream> documents, final List<JabberId> sendTo, final JabberId sentBy, final Calendar sentOn) throws SmackException { try { xmppContainer.send(container, documents, sendTo, sentBy, s... |
throw XMPPErrorTranslator.translate(iox); | throw translateError(iox); | public void send(final ContainerVersion container, final Map<DocumentVersion, InputStream> documents, final List<JabberId> sendTo, final JabberId sentBy, final Calendar sentOn) throws SmackException { try { xmppContainer.send(container, documents, sendTo, sentBy, s... |
public void sendLogFileArchive(final File logFileArchive, final User user) throws SmackException { | public void sendLogFileArchive(final File logFileArchive, final User user) { | public void sendLogFileArchive(final File logFileArchive, final User user) throws SmackException { logger.logApiId(); logger.logVariable("logFileArchive", logFileArchive); logger.logVariable("user", user); } |
XMPPErrorTranslator.translateUnchecked(this, "UPDATE PROFILE CREDENTIALS", t); | throw translateError(t); | public void updateProfileCredentials(final JabberId userId, final Credentials credentials) { try { Assert.assertTrue("CAN ONLY UPDATE PROFILE CREDENTIALS", userId.equals(getJabberId())); final AccountManager accountManager = new AccountManager(xmppConnectio... |
return Class.forName(this.fieldType); | return ReflectionUtils.forName(this.fieldType); | private Class loadFieldTypeClass() { if (this.fieldType == null) { return null; } if ("byte".equals(this.fieldType)) { return byte.class; } else if ("short".equals(this.fieldType)) { return short.class; } else if ("int".equals(this.fi... |
catch (ClassNotFoundException cnfe) { | catch (JcrMappingException jme) { | private Class loadFieldTypeClass() { if (this.fieldType == null) { return null; } if ("byte".equals(this.fieldType)) { return byte.class; } else if ("short".equals(this.fieldType)) { return short.class; } else if ("int".equals(this.fi... |
System.out.println("notationDecl(" + name + ", " + publicId + ", " + systemId + ");"); | public void notationDecl(String name, String publicId, String systemId) throws SAXException { System.out.println("notationDecl(" + name + ", " + publicId + ", " + systemId + ");"); } | |
XMLNode newNode = new XMLNode(namespaceURI, sName, qName, attributes, currentNode); currentNode.addChild(newNode); currentNode = newNode; | startElementInternal(namespaceURI, sName, qName, attributes); | public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException { //System.out.println("SE"); Attribute[] attributes = new Attribute[attrs.getLength()]; for(int i = 0; i < attributes.length; ++i) { attributes[i] = new Attribute(attrs.getLocalName(i), attrs.... |
return va1.getDependencies().size() - va2.getDependencies().size(); | return va1.getDependencyList().size() - va2.getDependencyList().size(); | public int compare(Object o1, Object o2) { ValidatorAction va1 = (ValidatorAction)o1; ValidatorAction va2 = (ValidatorAction)o2; String vad1 = va1.getDepends(); String vad2 = va2.getDepends(); if ((vad1 == null || vad1.length() == 0) &... |
for (Iterator x = field.getDependencies().iterator(); x.hasNext();) | for (Iterator x = field.getDependencyList().iterator(); x.hasNext();) | protected List createActionList(ValidatorResources resources, Form form) { List actionMethods = new ArrayList(); // Get List of actions for this Form for (Iterator i = form.getFields().iterator(); i.hasNext();) { Field field = (Field)i.next(); for (Iterator x = f... |
ModuleConfig mconfig = RequestUtils.getModuleConfig(request, app); | ModuleConfig mconfig = ModuleUtils.getInstance().getModuleConfig(request, app); | public void init(Object obj) { if (!(obj instanceof ViewContext)) { throw new IllegalArgumentException( "Tool can only be initialized with a ViewContext"); } this.context = (ViewContext)obj; this.request = context.getRequest(); this.session ... |
final void setParameter(final String name, final byte[] value) { | public final void setParameter(final String name, final byte[] value) { | final void setParameter(final String name, final byte[] value) { parameters.add(new Parameter(name, byte[].class, value)); } |
throw Assert.createUnreachable("[UNKNOWN CONNECTION]"); | throw Assert.createUnreachable("Unknown connection."); | private void setIcon() { switch(systemApplication.getConnection()) { case OFFLINE: systemTrayIcon.setIcon(Icons.Tray.TRAY_ICON_OFFLINE); break; case ONLINE: systemTrayIcon.setIcon(Icons.Tray.TRAY_ICON_ONLINE); default: throw Assert.createUnreac... |
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); try { saxParser.parse(is, handler); } catch(SAXException se) { se.printStackTrace(); System.err.println("Could not read the partition list... exiting."); System.exit(1); | if(useSaxParser) { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); try { if(verbose) printSAXParserInfo(saxParser.getXMLReader(), System.out, ""); saxParser.parse(is, handler); } catch(SAXException se) { se.printStackTrace(); System.err.println("Could not read the partition list... exiting."); Syst... | public static void notmain(String[] args) throws Exception { if(debug) verbose = true; parseArgs(args); printlnVerbose("Processing: " + dmgFile); RandomAccessFile dmgRaf = new RandomAccessFile(dmgFile, "r"); RandomAccessFile isoRaf = null; boolean testOnly = false; if(isoFile != null) { isoRaf = new RandomAcce... |
println("Could not parse DMG-file!"); | println("Could not parse UDIF-file!"); | public static void notmain(String[] args) throws Exception { if(debug) verbose = true; parseArgs(args); printlnVerbose("Processing: " + dmgFile); RandomAccessFile dmgRaf = new RandomAccessFile(dmgFile, "r"); RandomAccessFile isoRaf = null; boolean testOnly = false; if(isoFile != null) { isoRaf = new RandomAcce... |
println(" options:"); println(" -v verbose operation... for finding out what went wrong"); println(" -saxparser use the standard SAX parser for XML processing instead of"); println(" the homewritten parser (will connect to Apple's website"); println(" for validation)"); pr... | public static void parseArgs(String[] args) { boolean parseSuccessful = false; try { /* Take care of the options... */ int i; for(i = 0; i < args.length; ++i) { String cur = args[i]; if(!cur.startsWith("-")) break; else if(cur.equals("-gui")) { graphical = true; // This should be moved... | |
private JFileChooser getJFileChooserForFileSelection() { | private JFileChooser getJFileChooserForFileSelection( final String currentDirectoryKey) { | private JFileChooser getJFileChooserForFileSelection() { if(null == jFileChooser) { jFileChooser = new JFileChooser(); jFileChooser.setMultiSelectionEnabled(Boolean.TRUE); } jFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); jFileChooser.setCurrentDirectory(persistence.get( ... |
jFileChooser.setCurrentDirectory(persistence.get( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FILE_SELECTION, (File) null)); | jFileChooser.setCurrentDirectory( persistence.get(currentDirectoryKey, (File) null)); | private JFileChooser getJFileChooserForFileSelection() { if(null == jFileChooser) { jFileChooser = new JFileChooser(); jFileChooser.setMultiSelectionEnabled(Boolean.TRUE); } jFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); jFileChooser.setCurrentDirectory(persistence.get( ... |
private JFileChooser getJFileChooserForFolderSelection() { | private JFileChooser getJFileChooserForFolderSelection(final String currentDirectoryKey) { | private JFileChooser getJFileChooserForFolderSelection() { if(null == jFileChooser) { jFileChooser = new JFileChooser(); jFileChooser.setMultiSelectionEnabled(Boolean.FALSE); } jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); jFileChooser.setCurrent... |
jFileChooser.setCurrentDirectory(persistence.get( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FOLDER_SELECTION, (File) null)); | jFileChooser.setCurrentDirectory( persistence.get(currentDirectoryKey, (File) null)); | private JFileChooser getJFileChooserForFolderSelection() { if(null == jFileChooser) { jFileChooser = new JFileChooser(); jFileChooser.setMultiSelectionEnabled(Boolean.FALSE); } jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); jFileChooser.setCurrent... |
if(JFileChooser.APPROVE_OPTION == getJFileChooserForFileSelection().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FILE_SELECTION, | if(JFileChooser.APPROVE_OPTION == getJFileChooserForFileSelection( Keys.Persistence.CONTAINER_ADD_DOCUMENT_CURRENT_DIRECTORY).showOpenDialog(mainWindow)) { persistence.set(Keys.Persistence.CONTAINER_ADD_DOCUMENT_CURRENT_DIRECTORY, | public void runAddContainerDocuments(final Long containerId) { if(JFileChooser.APPROVE_OPTION == getJFileChooserForFileSelection().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FILE_SELECTION, jFileChooser.getCu... |
if(JFileChooser.APPROVE_OPTION == getJFileChooserForFolderSelection().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FOLDER_SELECTION, jFileChooser.getCurrentDirectory()); | if(JFileChooser.APPROVE_OPTION == getJFileChooserForFolderSelection( Keys.Persistence.CONTAINER_EXPORT_DRAFT_SELECTED_DIRECTORY).showOpenDialog(mainWindow)) { persistence.set(Keys.Persistence.CONTAINER_EXPORT_DRAFT_SELECTED_DIRECTORY, jFileChooser.getSelectedFile()); | public void runExportDraft(final Long containerId) { if(JFileChooser.APPROVE_OPTION == getJFileChooserForFolderSelection().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FOLDER_SELECTION, jFileChooser.getCurrentD... |
if(JFileChooser.APPROVE_OPTION == getJFileChooserForFolderSelection().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FOLDER_SELECTION, jFileChooser.getCurrentDirectory()); | if(JFileChooser.APPROVE_OPTION == getJFileChooserForFolderSelection( Keys.Persistence.CONTAINER_EXPORT_VERSION_SELECTED_DIRECTORY).showOpenDialog(mainWindow)) { persistence.set(Keys.Persistence.CONTAINER_EXPORT_VERSION_SELECTED_DIRECTORY, jFileChooser.getSelectedFile()); | public void runExportVersion(final Long containerId, final Long versionId) { if(JFileChooser.APPROVE_OPTION == getJFileChooserForFolderSelection().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY_FOLDER_SELECTION, ... |
send(JabberIdBuilder.parseQualifiedJabberId(jid.toBareJID()), iq); | send(JabberIdBuilder.parseQualifiedUsername(jid.toBareJID()), iq); | void send(final QueueItem queueItem) { logApiId(); logger.debug(queueItem); final JID jid = JIDBuilder.build(queueItem.getUsername()); try { final Document queueItemDocument = readXml(queueItem.getQueueMessage()); final IQ iq = new IQ(queueItemDocument.getRootElement()); iq.setTo(jid); send(Jabber... |
s.setPublicationDate(item.getDate()); | private void handleItem(ItemIF item) { Story s = new Story(); s.setID(item.getGuid().getLocation().replaceAll("[^\\p{Print}]", "")); s.setAuthor(item.getCreator().replaceAll("[^\\p{Print}]", "")); s.setTitle(item.getTitle().replaceAll("[^\\p{Print}]", "")); s.setContent(item.getDe... | |
public String getAuthorRelevance() { return getProperty(keyAuthorRelevance); | public Double getAuthorRelevance() { return getDoubleProperty(keyAuthorRelevance); | public String getAuthorRelevance() { return getProperty(keyAuthorRelevance); } |
public String getTopicRelevance() { return getProperty(keyTopicRelevance); | public Double getTopicRelevance() { return getDoubleProperty(keyTopicRelevance); | public String getTopicRelevance() { return getProperty(keyTopicRelevance); } |
if(TxUtils.containsJavaFileList(transferFlavors)) { return true; } | if(TxUtils.containsJavaFileList(transferFlavors)) { if(Connection.ONLINE == browser.getConnectionStatus()) { return true; } } | public boolean canImport(final JComponent comp, final DataFlavor[] transferFlavors) { logger.debug(comp.getClass().getSimpleName()); if(TxUtils.containsJavaFileList(transferFlavors)) { return true; } return false; } |
this.id = JVMUniqueId.nextId(); | protected ListItem(final String l18nContext) { super(); this.localization = new ListItemLocalization(l18nContext); this.logger = LoggerFactory.getLogger(getClass()); this.modelFactory = ModelFactory.getInstance(); this.propertyMap = new Hashtable<Object,Object>(7, 0.75F); } | |
final Object[] arguments, final ActionListener actionListener) { return createJMenuItem(getString(localKey, arguments), getMnemonic(localKey), | final ActionListener actionListener) { return createJMenuItem(getString(localKey), getMnemonic(localKey), | protected JMenuItem createJMenuItem(final String localKey, final Object[] arguments, final ActionListener actionListener) { return createJMenuItem(getString(localKey, arguments), getMnemonic(localKey), actionListener); } |
.append("LSAHD-QOIUQOE-ZXBVMNZNX-MZXXNCBVMX") .insert(0, "LKSJD-ZXVBNZM-QPWOEIURY-NXBCVMXNBC") | .append(System.currentTimeMillis()) | protected String createSessionId(final JabberId userId) { // TODO Generate a unique id per user id and store it in the user's // meta-data final String hashString = new StringBuffer(userId.toString()) .append("LSAHD-QOIUQOE-ZXBVMNZNX-MZXXNCBVMX") .insert(0, "LKSJD-... |
new StreamSocketDelegate(streamServer, clientSocket).run(); | try { new StreamSocketDelegate(streamServer, clientSocket).run(); } catch (final Throwable t) { logger.logError(t, "Failed to negotiate stream {0}.", clientSocket.getRemoteSocketAddress()); } finally { clientSocket.close(); } | public void run() { logger.logApiId(); logger.logVariable("run", run); try { while (run) { started = true; synchronized (this) { notifyAll(); } final Socket clientSocket = serverSocket.accept(); ... |
revertDraft(documentId, readLatestVersion(documentId).getVersionId()); | try { revertDraft(documentId, readLatestVersion(documentId).getVersionId()); } catch (final Throwable t) { throw translateError(t); } | void revertDraft(final Long documentId) { logger.logApiId(); logger.logVariable("documentId", documentId); revertDraft(documentId, readLatestVersion(documentId).getVersionId()); } |
if (!this.isAbsoluteUrl) | if (!isAbsoluteUrl(url)) | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... |
URLConnection uc = u.openConnection(); InputStream i = uc.getInputStream(); | uc = u.openConnection(); i = uc.getInputStream(); if (uc instanceof HttpURLConnection) { huc = (HttpURLConnection)uc; int status = huc.getResponseCode(); if (status < 200 || status > 299) { throw new Exception(status + " " + url); } } | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... |
catch (Exception ex) | catch (UnsupportedEncodingException ueex) | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... |
if (uc instanceof HttpURLConnection) | if (huc == null) | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... |
int status = ((HttpURLConnection)uc).getResponseCode(); if (status < 200 || status > 299) { throw new Exception(status + " " + url); } | return r; | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... |
return r; | else { return new SafeClosingHttpURLConnectionReader(r, huc); } | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... |
if (i != null) { try { i.close(); } catch (IOException ioe) { LOG.error("Could not close InputStream", ioe); } } if (huc != null) { huc.disconnect(); } | protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { ... | |
this.isAbsoluteUrl = isAbsoluteUrl(url); if (this.isAbsoluteUrl) | if (isAbsoluteUrl(url)) | protected String acquireString(String url) throws IOException, Exception { // Record whether our URL is absolute or relative this.isAbsoluteUrl = isAbsoluteUrl(url); if (this.isAbsoluteUrl) { // for absolute URLs, delegate to our peer BufferedReader r = new Buffered... |
BufferedReader r = new BufferedReader(acquireReader(url)); StringBuffer sb = new StringBuffer(); int i; while ((i = r.read()) != -1) | BufferedReader r = null; try | protected String acquireString(String url) throws IOException, Exception { // Record whether our URL is absolute or relative this.isAbsoluteUrl = isAbsoluteUrl(url); if (this.isAbsoluteUrl) { // for absolute URLs, delegate to our peer BufferedReader r = new Buffered... |
sb.append((char)i); | r = new BufferedReader(acquireReader(url)); StringBuffer sb = new StringBuffer(); int i; while ((i = r.read()) != -1) { sb.append((char)i); } return sb.toString(); | protected String acquireString(String url) throws IOException, Exception { // Record whether our URL is absolute or relative this.isAbsoluteUrl = isAbsoluteUrl(url); if (this.isAbsoluteUrl) { // for absolute URLs, delegate to our peer BufferedReader r = new Buffered... |
r.close(); return sb.toString(); | finally { if(r != null) { try { r.close(); } catch (IOException ioe) { LOG.error("Could not close reader.", ioe); } } } | protected String acquireString(String url) throws IOException, Exception { // Record whether our URL is absolute or relative this.isAbsoluteUrl = isAbsoluteUrl(url); if (this.isAbsoluteUrl) { // for absolute URLs, delegate to our peer BufferedReader r = new Buffered... |
protected final InputStream downloadStream(final String streamId) throws IOException { | protected final File downloadStream(final String streamId) throws IOException { | protected final InputStream downloadStream(final String streamId) throws IOException { final File streamFile = workspace.createTempFile(streamId); final FileOutputStream stream = new FileOutputStream(streamFile); final StreamSession session = getSessionModel().createStreamSession(); fina... |
return new FileInputStream(streamFile); | return streamFile; | protected final InputStream downloadStream(final String streamId) throws IOException { final File streamFile = workspace.createTempFile(streamId); final FileOutputStream stream = new FileOutputStream(streamFile); final StreamSession session = getSessionModel().createStreamSession(); fina... |
Mapper mapper = collectionDescriptor.getClassDescriptor().getMappingDescriptor().getMapper(); ClassDescriptor elementClassDescriptor = mapper.getClassDescriptor( ReflectionUtils.forName(collectionDescriptor.getElementClassName())); | ClassDescriptor elementClassDescriptor = mapper.getClassDescriptor( ReflectionUtils.forName(collectionDescriptor.getElementClassName())); | protected void doInsertCollection(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws RepositoryException { if (collection == null) {... |
Mapper mapper = collectionDescriptor.getClassDescriptor().getMappingDescriptor().getMapper(); ClassDescriptor elementClassDescriptor = mapper.getClassDescriptor( ReflectionUtils.forName(collectionDescriptor.getElementClassName())); | ClassDescriptor elementClassDescriptor = mapper.getClassDescriptor( ReflectionUtils.forName(collectionDescriptor.getElementClassName())); | protected void doUpdateCollection(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws RepositoryException { String jcrName = getCollectionJcrName(co... |
info = request.getPathInfo(); } if (info != null) { path += info; | protected Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context ctx) throws Exception { // If we get here from RequestDispatcher.include(), getServletPath() // will return the origina... | |
data.add(new Fixture(document, documentModel, 4)); | data.add(new Fixture(document, documentModel, 3)); | protected void setUp() throws Exception { super.setUp(); data = new Vector<Fixture>(getInputFilesLength()); final DocumentModel documentModel = getDocumentModel(); String name, description; Document document; for(File testFile : getInputFiles()) { name = testFile.getName(); description = "Document: " + name... |
new PopupDocument((MainCellDocument) mainCell).trigger(browser, jPopupMenu, e); | new PopupDocument((MainCellDocument) mainCell, browser.getConnectionStatus()).trigger(browser, jPopupMenu, e); | void triggerPopup(final MainCell mainCell, final Component invoker, final MouseEvent e, final int x, final int y) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); if(mainCell instanceof MainCellDocument) { new PopupDocument((MainCellDocument) mainCell).trigger(browser, ... |
new PopupHistoryItem((MainCellHistoryItem) mainCell).trigger(browser, jPopupMenu, e); | new PopupHistoryItem((MainCellHistoryItem) mainCell, browser.getConnectionStatus()).trigger(browser, jPopupMenu, e); | void triggerPopup(final MainCell mainCell, final Component invoker, final MouseEvent e, final int x, final int y) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); if(mainCell instanceof MainCellDocument) { new PopupDocument((MainCellDocument) mainCell).trigger(browser, ... |
logger.info("[LBROWSER] [APPLICATION] [BROWSER] [DOCUMENT AVATAR] [TRIGGER POPUP]"); logger.debug(browser.getConnectionStatus()); | void triggerPopup(final MainCell mainCell, final Component invoker, final MouseEvent e, final int x, final int y) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); if(mainCell instanceof MainCellDocument) { new PopupDocument((MainCellDocument) mainCell).trigger(browser, ... | |
String requestPath = ServletUtils.getPath(ctx.getRequest()); System.out.println("path: "+requestPath); | public Map getToolbox(Object initData) { //we know the initData is a ViewContext ViewContext ctx = (ViewContext)initData; //create the toolbox map with the application tools in it Map toolbox = new HashMap(appTools); if (!sessionToolInfo.isEmpty()) { H... | |
ToolInfo ti = (ToolInfo)i.next(); stmap.put(ti.getKey(), ti.getInstance(ctx)); | ServletToolInfo sti = (ServletToolInfo)i.next(); if (sti.allowsRequestPath(requestPath)) { stmap.put(sti.getKey(), sti.getInstance(ctx)); } | public Map getToolbox(Object initData) { //we know the initData is a ViewContext ViewContext ctx = (ViewContext)initData; //create the toolbox map with the application tools in it Map toolbox = new HashMap(appTools); if (!sessionToolInfo.isEmpty()) { H... |
if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (!sti.allowsRequestPath(requestPath)) { continue; } } | public Map getToolbox(Object initData) { //we know the initData is a ViewContext ViewContext ctx = (ViewContext)initData; //create the toolbox map with the application tools in it Map toolbox = new HashMap(appTools); if (!sessionToolInfo.isEmpty()) { H... | |
final XMPPMethodResponse response = new XMPPMethodResponse(); parser.next(); while(true) { logger.logVariable("parser.getName()", parser.getName()); logger.logVariable("parser.getDepth()", parser.getDepth()); logger.logVariable("parser.getNamespace()", parser.getNamespace()); if (XmlPullParser.END_TAG == parser.getEv... | try { return doParseIQ(parser); } catch (final Throwable t) { logger.logFatal(t, "Could not parse remote method response."); throw new XMPPException(t); | public IQ parseIQ(final XmlPullParser parser) throws Exception { final XMPPMethodResponse response = new XMPPMethodResponse(); parser.next(); while(true) { logger.logVariable("parser.getName()", parser.getName()); logger.logVariable("parser.getDepth... |
return response; | public IQ parseIQ(final XmlPullParser parser) throws Exception { final XMPPMethodResponse response = new XMPPMethodResponse(); parser.next(); while(true) { logger.logVariable("parser.getName()", parser.getName()); logger.logVariable("parser.getDepth... | |
private Fixture(final List<Contact> contacts, final Container container, final ContainerModel containerModel) { this.contacts = contacts; this.container = container; this.containerModel = containerModel; | private Fixture(final OpheliaTestUser junit, final OpheliaTestUser junit_x, final OpheliaTestUser junit_y) { this.junit = junit; this.junit_x = junit_x; this.junit_y = junit_y; | private Fixture(final List<Contact> contacts, final Container container, final ContainerModel containerModel) { this.contacts = contacts; this.container = container; this.containerModel = containerModel; this.didNotify = Boolean.FALSE; this.t... |
this.teamMembers = Collections.emptyList(); | addQueueHelper(junit); addQueueHelper(junit_x); addQueueHelper(junit_y); | private Fixture(final List<Contact> contacts, final Container container, final ContainerModel containerModel) { this.contacts = contacts; this.container = container; this.containerModel = containerModel; this.didNotify = Boolean.FALSE; this.t... |
login(OpheliaTestUser.JUNIT); final ContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); addDocuments(OpheliaTestUser.JUNIT, container); final List<Contact> contacts = readContacts(OpheliaTestUser.JUNIT); datum = new Fixture(... | datum = new Fixture(OpheliaTestUser.JUNIT, OpheliaTestUser.JUNIT_X, OpheliaTestUser.JUNIT_Y); login(datum.junit); login(datum.junit_x); login(datum.junit_y); | protected void setUp() throws Exception { super.setUp(); login(OpheliaTestUser.JUNIT); final ContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); addDocuments(OpheliaTestUser.JUNIT, cont... |
logger.logTraceId(); datum.containerModel.removeListener(datum); | logout(datum.junit); logout(datum.junit_x); logout(datum.junit_y); | protected void tearDown() throws Exception { logger.logTraceId(); datum.containerModel.removeListener(datum); datum = null; logger.logTraceId(); logout(OpheliaTestUser.JUNIT); logger.logTraceId(); super.tearDown(); logger.logTraceId(); } |
logger.logTraceId(); logout(OpheliaTestUser.JUNIT); logger.logTraceId(); | protected void tearDown() throws Exception { logger.logTraceId(); datum.containerModel.removeListener(datum); datum = null; logger.logTraceId(); logout(OpheliaTestUser.JUNIT); logger.logTraceId(); super.tearDown(); logger.logTraceId(); } | |
logger.logTraceId(); | protected void tearDown() throws Exception { logger.logTraceId(); datum.containerModel.removeListener(datum); datum = null; logger.logTraceId(); logout(OpheliaTestUser.JUNIT); logger.logTraceId(); super.tearDown(); logger.logTraceId(); } | |
datum.containerModel.publish( datum.container.getId(), datum.contacts, datum.teamMembers); logger.logTraceId(); | final Container c = createContainer(datum.junit, NAME); final List<Document> documents = addDocuments(datum.junit, c.getId()); getContainerModel(datum.junit).addListener(datum); publishToContacts(datum.junit, c.getId(), "JUnit.X thinkParity", "JUnit.Y thinkParity"); getContainerModel(datum.junit).addListener(datum); da... | public void testPublish() { logger.logTraceId(); datum.containerModel.publish( datum.container.getId(), datum.contacts, datum.teamMembers); logger.logTraceId(); assertTrue("The draft published event was not fired.", datum.didNotify); // ensure the system is the key ... |
final JabberId keyHolder = getArtifactModel(OpheliaTestUser.JUNIT).readKeyHolder(datum.container.getId()); assertEquals("Local artifact key holder does not match expectation.", User.THINK_PARITY.getId(), keyHolder); assertTrue("Local key flag is still mistakenly applied.", !getArtifactModel(OpheliaTestUser.JUNIT).isFla... | documentModel = getDocumentModel(datum.junit_x); d_other = readDocument(datum.junit_x, d.getUniqueId()); assertFalse("Document \"" + d_other.getName() + "\" for user \"" + datum.junit_x.getSimpleUsername() + "\" still maintains draft.", documentModel.doesExistDraft(d_other.getId())); documentModel = getDocumentModel(d... | public void testPublish() { logger.logTraceId(); datum.containerModel.publish( datum.container.getId(), datum.contacts, datum.teamMembers); logger.logTraceId(); assertTrue("The draft published event was not fired.", datum.didNotify); // ensure the system is the key ... |
if (obj instanceof Long) { Date d = new Date(); d.setTime(((Long)obj).longValue()); return d; } | public static Date toDate(Object obj) { if (obj == null) { return null; } if (obj instanceof Date) { return (Date)obj; } if (obj instanceof Calendar) { return ((Calendar)obj).getTime(); } try { ... | |
System.setProperty("thinkparity.log4j.file", new File(logDirectory, "desdemona.log").getAbsolutePath()); | System.setProperty("thinkparity.log4j.directory", logDirectory.getAbsolutePath()); | private void initializeLogging() { final File logDirectory = new File(JiveGlobals.getHomeDirectory(), "logs"); System.setProperty("thinkparity.log4j.file", new File(logDirectory, "desdemona.log").getAbsolutePath()); logger = new Log4JWrapper(); } |
publisher = readPublisher(); | publisher = readLatestPublisher(); | private void reloadJList() { final List<TeamMember> teamMembers; final List<Contact> contacts; final Map<User, ArtifactReceipt> versionUsers; final User publisher; Boolean firstContact; if (getPublishTypeSpecific() == PublishTypeSpecific.PUBLISH_NOT_FIRST_TIME) { ... |
Object o = rsvc.getApplicationAttribute( "org.apache.velocity.tools.view.servlet.WebappLoader" ); | Object obj = rsvc.getApplicationAttribute(VelocityViewServlet.SERVLET_CONTEXT_KEY); | public void init( ExtendedProperties configuration) { rsvc.info("WebappLoader : initialization starting."); Object o = rsvc.getApplicationAttribute( "org.apache.velocity.tools.view.servlet.WebappLoader" ); if ( o instanceof WebappLoaderAppContext) { servletContext = ( (Weba... |
if ( o instanceof WebappLoaderAppContext) | if (obj instanceof ServletContext) | public void init( ExtendedProperties configuration) { rsvc.info("WebappLoader : initialization starting."); Object o = rsvc.getApplicationAttribute( "org.apache.velocity.tools.view.servlet.WebappLoader" ); if ( o instanceof WebappLoaderAppContext) { servletContext = ( (Weba... |
servletContext = ( (WebappLoaderAppContext) o ).getServletContext(); | servletContext = (ServletContext)obj; | public void init( ExtendedProperties configuration) { rsvc.info("WebappLoader : initialization starting."); Object o = rsvc.getApplicationAttribute( "org.apache.velocity.tools.view.servlet.WebappLoader" ); if ( o instanceof WebappLoaderAppContext) { servletContext = ( (Weba... |
public Applet(String moduleName) { super(moduleName); | public Applet(String moduleName, String hostname, Integer port) { super("Applet." + moduleName, hostname, port); | public Applet(String moduleName) { super(moduleName); // TODO Auto-generated constructor stub } |
public void setUtcTimeOnly(int field, Date value) { | public void setUtcTimeOnly(int field, Date value) throws NoTagValue { | public void setUtcTimeOnly(int field, Date value) { setUtcTimeOnly(field, value, false); } |
public UtilDateTypeConverterImpl(ValueFactory factory) { super(factory); } | public UtilDateTypeConverterImpl() { super(); } | public UtilDateTypeConverterImpl(ValueFactory factory) { super(factory); } |
document.setParent(new Document()); | public void testDocument() { Document document = new Document(); document.setId(Long.MAX_VALUE); document.setId(Long.MIN_VALUE); document.setEntity(new Entity()); document.setDocCode(""); document.setDocName(""); document.setChildren(new ArrayList<Tree>(0)); } | |
externalDocument.setParent(new ExternalDocument()); | public void testExternalDocument() { ExternalDocument externalDocument = new ExternalDocument(); externalDocument.setId(Long.MAX_VALUE); externalDocument.setId(Long.MIN_VALUE); externalDocument.setEntity(new Entity()); externalDocument.setDocCode(""); externalDocument.setDocName(""); externalDocument.setDocUrl(... | |
alpha = Math.max( 0, alpha ); | private void paintScopeList( DownloadScopeList scopeList, Color baseColor, Graphics2D g2 ) { double valPerPixel = (fileSize-1) / (double)viewRect.width; int scopeCount = scopeList.size(); Color useColor; for( int i = 0; i < scopeCount; i++ ) { DownloadScope scope; ... | |
logger.log(Level.WARNING,"Unable to load "+dir,e); | private void reload() { try { TreeMap<String,ExternalRun> runs = new TreeMap<String,ExternalRun>(reverseComparator); File[] subdirs = getBuildDir().listFiles(new FileFilter() { public boolean accept(File subdir) { return subdir.isDirectory(); ... | |
protected final Map createEnvVarMap() { | protected final Map createEnvVarMap(boolean overrideOnly) { | protected final Map createEnvVarMap() { Map env = new HashMap(); buildEnvVars(env); return env; } |
if(!overrideOnly) env.putAll(EnvVars.masterEnvVars); | protected final Map createEnvVarMap() { Map env = new HashMap(); buildEnvVars(env); return env; } | |
Map env = createEnvVarMap(); | Map env = createEnvVarMap(true); | protected final boolean run(Launcher launcher, String cmd, TaskListener listener, FilePath dir, OutputStream out) throws IOException { Map env = createEnvVarMap(); int r = launcher.launch(cmd,env,out,dir).join(); if(r!=0) listener.fatalError(getDescriptor().getDisplayName()+" failed"... |
t1.join(); t2.join(); | public int join() { try { return proc.waitFor(); } catch (InterruptedException e) { return -1; } } | |
public Job doCreateJob(StaplerRequest req, StaplerResponse rsp) throws IOException { | public Job doCreateJob(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { | public Job doCreateJob(StaplerRequest req, StaplerResponse rsp) throws IOException { if(!Hudson.adminCheck(req,rsp)) return null; Job job = owner.doCreateJob(req, rsp); if(job!=null) { jobNames.add(job.getName()); owner.save(); } return job; } |
public abstract RecipeDetailsView getRecipeDetailsView(); | public abstract RecipeDetailsView getRecipeDetailsView(String title); | public abstract RecipeDetailsView getRecipeDetailsView(); |
log.debug("User successfully authorized."); | public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException { final HttpServletRequest request = (HttpServletRequest) servletRequest; final HttpServletResponse re... | |
if (principal != null && principal.length() > 0) { | if (principal == null || principal.length() == 0) { | public void validatePrincipal(Credential credential, Errors errors) { if (logger.isDebugEnabled()) { logger.debug("Validating Credential principal"); } String principal = credential.getPrincipal(); if (principal != null && principal.length() > 0) { errors.rejectValu... |
"credential.error.whitespace", | "credential.error.empty", | public void validatePrincipal(Credential credential, Errors errors) { if (logger.isDebugEnabled()) { logger.debug("Validating Credential principal"); } String principal = credential.getPrincipal(); if (principal != null && principal.length() > 0) { errors.rejectValu... |
} for (char c : principal.toCharArray()) { if (!Character.isLetterOrDigit(c)) { errors.rejectValue("principal", "credential.error.invalidchar", "Credential principal should include invalid char " + c); | } else { for (char c : principal.toCharArray()) { if (Character.isWhitespace(c)) { errors.rejectValue("principal", "credential.error.whitespace", "Credential principal should include invalid char " + c); } if (!Character.isLetterOrDigit(c)) { errors.rejectValue("principal", "credential.error.invalidchar", "Credential p... | public void validatePrincipal(Credential credential, Errors errors) { if (logger.isDebugEnabled()) { logger.debug("Validating Credential principal"); } String principal = credential.getPrincipal(); if (principal != null && principal.length() > 0) { errors.rejectValu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.