rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
final DocumentModel documentModel = DocumentModel.getModel(); final DocumentContent content = documentModel.getContent(document); xmppHelper.send(users, XMPPDocument.create(document, content)); | final DocumentModel documentModel = getDocumentModel(); documentModel.createVersion( document, DocumentAction.SEND, createSendDocumentActionData()); xmppHelper.send( users, XMPPDocument.create( document, documentModel.getContent(document))); | void send(final Collection<User> users, final Document document) throws ParityException { synchronized(xmppHelperLock) { assertIsLoggedIn("send(Collection<User>,Document)", xmppHelper); try { final DocumentModel documentModel = DocumentModel.getModel(); final DocumentContent content = documentModel.getCon... |
private Boolean isBrowserWindowMaximized() { | public Boolean isBrowserWindowMaximized() { | private Boolean isBrowserWindowMaximized() { return JFrame.MAXIMIZED_BOTH == mainWindow.getExtendedState(); } |
if (isBrowserWindowMaximized()) { mainWindow.setExtendedState(JFrame.NORMAL); mainWindow.maximizeMainWindow(Boolean.FALSE); } else { mainWindow.setExtendedState(mainWindow.getExtendedState() | JFrame.MAXIMIZED_BOTH); GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); Rectangle bounds = env.ge... | mainWindow.maximizeMainWindow(!isBrowserWindowMaximized()); | public void maximize() { if (isBrowserWindowMaximized()) { mainWindow.setExtendedState(JFrame.NORMAL); mainWindow.maximizeMainWindow(Boolean.FALSE); } else { mainWindow.setExtendedState(mainWindow.getExtendedState() | JFrame.MAXIMIZED_BOTH); /* This works...... |
"Avatar " + avatar.getId() + " already registerd.", | "Avatar " + avatar.getId() + " already registered.", | private void register(final Avatar avatar) { Assert.assertIsNull( "Avatar " + avatar.getId() + " already registerd.", avatarRegistry.put(avatar.getId(), avatar)); } |
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("localization/JPanel_Messages"); explanationJLabel.setText(bundle.getString("NewContainerDialog.Explanation")); | explanationJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("NewContainerDialog.Explanation")); | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
okJButton.setText(bundle.getString("NewContainerDialog.Ok")); | okJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("NewContainerDialog.Ok")); | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
cancelJButton.setText(bundle.getString("NewContainerDialog.Cancel")); | cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("NewContainerDialog.Cancel")); | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
nameJLabel.setText(bundle.getString("NewContainerDialog.Name")); | nameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("NewContainerDialog.Name")); | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
.add(cancelJButton)) .add(explanationJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(nameJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(14, 14, 14) .add(nameJTextField, org.jdesktop.lay... | .add(cancelJButton))) | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
.add(explanationJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) | .add(explanationJLabel) | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 19, Short.MAX_VALUE) | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); nameJLabel = new javax.swing.JLabel(); nameJTextField = new javax.swing.JTextField(); java.util.ResourceBundle bun... |
public void addListener(final ArtifactListener listener) { xmppArtifact.addListener(listener); } | public <T extends XMPPEvent> void addListener(final Class<T> eventClass, final XMPPEventListener<T> listener) { xmppEventDispatcher.addListener(eventClass, listener); } | public void addListener(final ArtifactListener listener) { xmppArtifact.addListener(listener); } |
xmppArchive.clearListeners(); xmppArtifact.clearListeners(); xmppBackup.clearListeners(); xmppContact.clearListeners(); xmppContainer.clearListeners(); xmppProfile.clearListeners(); xmppStream.clearListeners(); xmppSystem.clearListeners(); xmppUser.clearListeners(); | xmppEventDispatcher.clearListeners(); | public void clearListeners() { logger.logApiId(); synchronized (listeners) { listeners.clear(); } xmppArchive.clearListeners(); xmppArtifact.clearListeners(); xmppBackup.clearListeners(); xmppContact.clearListeners(); xmppContainer.clearListeners();... |
clearEventHandlers(); | public void logout() { logger.logApiId(); clearEventHandlers(); clearListeners(); xmppAnonymousConnection.close(); xmppAnonymousConnection = null; xmppConnection.close(); xmppConnection = null; } | |
public void removeListener(final ArtifactListener listener) { xmppArtifact.removeListener(listener); | public void removeListener(final SessionListener listener) { synchronized (listeners) { if (listeners.contains(listener)) { listeners.remove(listener); } else { return; } } | public void removeListener(final ArtifactListener listener) { xmppArtifact.removeListener(listener); } |
this.historyProvider = new HistoryProvider(dModel); | this.historyProvider = new HistoryProvider(loggedInUser, dModel, sModel); | private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.artifactModel = modelFactory.getArtifactModel(getClass()); this.dModel = modelFactory.getDocumentModel(getClass()); this.logger = ModelLoggerFactory.getLogger(getClass()); this.loggedInUser = JabberIdBuilder... |
final int compareResult = o1.getOrganization().compareTo(o2.getOrganization()); if(0 == compareResult) { return subCompare(o1, o2); } else { return compareResult * resultMultiplier; } | final int compareResult = comparator.compare(o1.getOrganization(), o2.getOrganization()); if (0 == compareResult) { return subCompare(o1, o2); } else { return compareResult; } | public int compare(final User o1, final User o2) { final int compareResult = o1.getOrganization().compareTo(o2.getOrganization()); if(0 == compareResult) { return subCompare(o1, o2); } else { return compareResult * resultMultiplier; } } |
EarthViewWrapper evw = new EarthViewWrapper("Applet", "localhost", | evw = new EarthViewWrapper("Applet", "luijten.local", | public Applet() { EarthViewWrapper evw = new EarthViewWrapper("Applet", "localhost", 10000); Container mainpane = this.getContentPane(); mainpane.setBackground(Color.black); mainpane.add(evw.earthView); this.setVisible(true); evw.start(); } |
evw.start(); | public Applet() { EarthViewWrapper evw = new EarthViewWrapper("Applet", "localhost", 10000); Container mainpane = this.getContentPane(); mainpane.setBackground(Color.black); mainpane.add(evw.earthView); this.setVisible(true); evw.start(); } | |
} catch (final SmackException sx) { throw new RuntimeException(sx); | private void processOfflineQueue() { assertIsReachable(environment); XMPPSession session = null; try { session = new XMPPSessionImpl(); session.login(environment, credentials); session.processOfflineQueue(session.readCurrentUser().getId()); } catch (final... | |
try { session.logout(); } catch (final SmackException sx) { throw new RuntimeException(sx); } | session.logout(); | private void processOfflineQueue() { assertIsReachable(environment); XMPPSession session = null; try { session = new XMPPSessionImpl(); session.login(environment, credentials); session.processOfflineQueue(session.readCurrentUser().getId()); } catch (final... |
} catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } | public void changeEncoding(String charset) throws UnsupportedEncodingException { isReader = new InputStreamReader(iStream, charset); } | |
public void close() throws IOException { isReader.close(); } | public void close() throws IOException { try { if(DEBUG) os.println(PREFIX + "isReader.close()"); isReader.close(); } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public void close() throws IOException { isReader.close(); } |
public void mark(int readAheadLimit) throws IOException { isReader.mark(readAheadLimit); } | public void mark(int readAheadLimit) throws IOException { try { if(DEBUG) os.println(PREFIX + "isReader.mark(" + readAheadLimit + ")"); isReader.mark(readAheadLimit); } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public void mark(int readAheadLimit) throws IOException { isReader.mark(readAheadLimit); } |
public boolean markSupported() { return isReader.markSupported(); } | public boolean markSupported() { try { boolean result = isReader.markSupported(); if(DEBUG) os.println(PREFIX + "isReader.markSupported() == " + result); return result; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public boolean markSupported() { return isReader.markSupported(); } |
public int read() throws IOException { return isReader.read(); } | public int read() throws IOException { try { int result = isReader.read(); if(DEBUG) os.println(PREFIX + "isReader.read() == " + result); return result; } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public int read() throws IOException { return isReader.read(); } |
public boolean ready() throws IOException { return isReader.ready(); } | public boolean ready() throws IOException { try { boolean result = isReader.ready(); if(DEBUG) os.println(PREFIX + "isReader.ready() == " + result); return result; } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public boolean ready() throws IOException { return isReader.ready(); } |
public void reset() throws IOException { isReader.reset(); } | public void reset() throws IOException { try { if(DEBUG) os.println(PREFIX + "isReader.reset()"); isReader.reset(); } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public void reset() throws IOException { isReader.reset(); } |
public long skip(long n) throws IOException { return isReader.skip(n); } | public long skip(long n) throws IOException { try { long result = isReader.skip(n); if(DEBUG) os.println(PREFIX + "isReader.skip(" + n + ") == " + result); return result; } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } } | public long skip(long n) throws IOException { return isReader.skip(n); } |
try { usedReader.changeEncoding(encoding.image); } catch(Exception e) { {if (true) throw new RuntimeException(e);} } | final public String encodingDecl() throws ParseException { Token encoding; jj_consume_token(XMLDECL_S); jj_consume_token(ENCODING); jj_consume_token(XMLDECL_EQ); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XD_SQUOTE_OPEN: jj_consume_token(XD_SQUOTE_OPEN); encoding = jj_consume_token(X... | |
Ass a = new Ass(usedReader); a.usedReader = usedReader; a.contentHandler = new DebugXMLContentHandler(); | Ass a = create(usedReader, new DebugXMLContentHandler()); | public static void main(String[] args) throws Exception { MutableInputStreamReader usedReader; if(args.length == 1) usedReader = new MutableInputStreamReader(new FileInputStream(args[0]), "US-ASCII"); else usedReader = new MutableInputStreamReader(System.in, "US-ASCII"); ... |
final public void xmlDecl() throws ParseException { | final public String xmlDecl() throws ParseException { | final public void xmlDecl() throws ParseException { String version, encoding = null; Boolean standalone = null; jj_consume_token(STARTXMLDECL); // Takes us to state WithinXMLDecl version = versionInfo(); if (jj_2_1(2)) { encoding = encodingDecl(); } else { ; } if (... |
contentHandler.xmlDecl(version, encoding, standalone); | contentHandler.xmlDecl(version, encoding, standalone); {if (true) return encoding;} throw new Error("Missing return statement in function"); | final public void xmlDecl() throws ParseException { String version, encoding = null; Boolean standalone = null; jj_consume_token(STARTXMLDECL); // Takes us to state WithinXMLDecl version = versionInfo(); if (jj_2_1(2)) { encoding = encodingDecl(); } else { ; } if (... |
public File[] listFiles(final String path, final Boolean doRecurse) { final File file = resolve(path); if(null == file) { return null; } else if(file.isFile()) { return null; } else { if(doRecurse) { return listFiles(file).toArray(new File[] {}); } else { return file.listFiles(new FileFilter() { public boolean accept(f... | public File[] listFiles(final String path) { return listFiles(path, Boolean.FALSE); | public File[] listFiles(final String path, final Boolean doRecurse) { final File file = resolve(path); if(null == file) { return null; } else if(file.isFile()) { return null; } else { if(doRecurse) { return listFiles(file).toArray(new File[] {}); } else { ... |
final InternalAuditModel iAModel = InternalAuditModel.getInternalModel(context); return iAModel; | return InternalAuditModel.getInternalModel(context); | protected InternalAuditModel getInternalAuditModel() { final InternalAuditModel iAModel = InternalAuditModel.getInternalModel(context); return iAModel; } |
final InternalDocumentModel iDocumentModel = DocumentModel.getInternalModel(getContext()); return iDocumentModel; | return DocumentModel.getInternalModel(context); | protected InternalDocumentModel getInternalDocumentModel() { final InternalDocumentModel iDocumentModel = DocumentModel.getInternalModel(getContext()); return iDocumentModel; } |
final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); return iSessionModel; | return SessionModel.getInternalModel(getContext()); | protected InternalSessionModel getInternalSessionModel() { final InternalSessionModel iSessionModel = SessionModel.getInternalModel(getContext()); return iSessionModel; } |
assertDraftExists("DRAFT DOES NOT EXIST", containerId); containerIO.createDraftArtifactRel(containerId, documentId, ContainerDraft.ArtifactState.ADDED); getIndexModel().indexDocument(containerId, documentId); final Container postAdditionContainer = read(containerId); final ContainerDraft postAdditionDraft = readDraft(c... | try { assertDraftExists("DRAFT DOES NOT EXIST", containerId); containerIO.createDraftArtifactRel(containerId, documentId, ContainerDraft.ArtifactState.ADDED); getIndexModel().indexDocument(containerId, documentId); final Container postAdditionContainer = read(containerId); final ContainerDraft postAdditionDraft = readD... | void addDocument(final Long containerId, final Long documentId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("documentId", documentId); assertDraftExists("DRAFT DOES NOT EXIST", containerId); containerIO.createDraftArtifactRel(containerId... |
assertContainerDraftDoesNotExist("Draft already exist.", containerId); if (isFirstDraft(containerId)) { createFirstDraft(containerId, localTeamMember(containerId)); } else { assertOnline("The user is not online."); final Container container = read(containerId); if (!isDistributed(container.getId())) { createDistributed... | try { assertContainerDraftDoesNotExist("Draft already exist.", containerId); if (isFirstDraft(containerId)) { createFirstDraft(containerId, localTeamMember(containerId)); } else { assertOnline("The user is not online."); final Container container = read(containerId); if (!isDistributed(container.getId())) { createDistr... | ContainerDraft createDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); assertContainerDraftDoesNotExist("Draft already exist.", containerId); if (isFirstDraft(containerId)) { createFirstDraft(containerId, localTeamMember(contain... |
final ContainerVersion latestVersion = readLatestVersion(container.getId()); final List<Document> documents = readDocuments( latestVersion.getArtifactId(), latestVersion.getVersionId()); final ContainerDraft draft = new ContainerDraft(); draft.setOwner(localTeamMember(containerId)); draft.setContainerId(containerId); ... | final Container postCreation= read(containerId); final ContainerDraft postCreationDraft = readDraft(containerId); notifyDraftCreated(postCreation, postCreationDraft, localEventGenerator); return postCreationDraft; } catch (final Throwable t) { throw translateError(t); | ContainerDraft createDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); assertContainerDraftDoesNotExist("Draft already exist.", containerId); if (isFirstDraft(containerId)) { createFirstDraft(containerId, localTeamMember(contain... |
final Container postCreation= read(containerId); final ContainerDraft postCreationDraft = readDraft(containerId); notifyDraftCreated(postCreation, postCreationDraft, localEventGenerator); return postCreationDraft; | ContainerDraft createDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); assertContainerDraftDoesNotExist("Draft already exist.", containerId); if (isFirstDraft(containerId)) { createFirstDraft(containerId, localTeamMember(contain... | |
assertDoesExistLocalDraft("Draft does not exist.", containerId); final Container container = read(containerId); if (!isFirstDraft(container.getId())) { assertOnline("User is not online."); assertIsDistributed("Draft has not been distributed.", containerId); getSessionModel().deleteDraft(container.getUniqueId()); | try { assertDoesExistLocalDraft("Draft does not exist.", containerId); final Container container = read(containerId); if (!isFirstDraft(container.getId())) { assertOnline("User is not online."); assertIsDistributed("Draft has not been distributed.", containerId); getSessionModel().deleteDraft(container.getUniqueId()); ... | void deleteDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); assertDoesExistLocalDraft("Draft does not exist.", containerId); final Container container = read(containerId); if (!isFirstDraft(container.getId())) { assertOn... |
final ContainerDraft draft = readDraft(containerId); for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); notifyDraftDeleted(container, draft, localEventGenerator); | void deleteDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); assertDoesExistLocalDraft("Draft does not exist.", containerId); final Container container = read(containerId); if (!isFirstDraft(container.getId())) { assertOn... | |
assertIsNotLocalUserId(publishedBy); | void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, ... | |
assertIsNotLocalUserId(publishedBy); | void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, ... | |
final ContainerDraft draft = new ContainerDraft(); draft.setContainerId(containerId); final List<TeamMember> team = readTeam(containerId); logger.logVariable("team", team); draft.setOwner(team.get(indexOf(team, createdBy))); containerIO.createDraft(draft); notifyDraftCreated(read(containerId), readDraft(containerId), ... | try { final ContainerDraft draft = new ContainerDraft(); draft.setContainerId(containerId); final List<TeamMember> team = readTeam(containerId); logger.logVariable("team", team); draft.setOwner(team.get(indexOf(team, createdBy))); containerIO.createDraft(draft); notifyDraftCreated(read(containerId), readDraft(containe... | void handleDraftCreated(final Long containerId, final JabberId createdBy, final Calendar createdOn) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("createdBy", createdBy); logger.logVariable("createdOn", createdOn); final Contain... |
final ContainerDraft draft = readDraft(containerId); for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); | try { final ContainerDraft draft = readDraft(containerId); for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); notifyDraftDeleted(read(containerId), draft, remoteEventGenerator); } catch (final Throwable t) { ... | void handleDraftDeleted(final Long containerId, final JabberId deletedBy, final Calendar deletedOn) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("createdBy", deletedBy); logger.logVariable("createdOn", deletedOn); final Contain... |
containerIO.deleteDraft(containerId); notifyDraftDeleted(read(containerId), draft, remoteEventGenerator); | void handleDraftDeleted(final Long containerId, final JabberId deletedBy, final Calendar deletedOn) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("createdBy", deletedBy); logger.logVariable("createdOn", deletedOn); final Contain... | |
final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(uniqueId); final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>()... | try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(uniqueId); final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<U... | void handlePublished(final UUID uniqueId, final Long versionId, final String name, final Integer artifactCount, final JabberId publishedBy, final List<JabberId> publishedTo, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); ... |
publishedToUsers.add(userModel.read(publishedToId)); | if (!contains(localTeam, publishedBy)) { artifactModel.addTeamMember(containerId, publishedBy); } final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", name); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.del... | void handlePublished(final UUID uniqueId, final Long versionId, final String name, final Integer artifactCount, final JabberId publishedBy, final List<JabberId> publishedTo, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); ... |
if (!contains(localTeam, publishedBy)) { artifactModel.addTeamMember(containerId, publishedBy); } final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", name); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.del... | void handlePublished(final UUID uniqueId, final Long versionId, final String name, final Integer artifactCount, final JabberId publishedBy, final List<JabberId> publishedTo, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); ... | |
containerIO.updatePublishedTo(containerId, versionId, receivedBy, receivedOn); containerIO.updateSharedWith(containerId, versionId, receivedBy, receivedOn); | try { containerIO.updatePublishedTo(containerId, versionId, receivedBy, receivedOn); logger.logTraceId(); } catch (final Throwable t) { throw translateError(t); } | void handleReceived(final Long containerId, final Long versionId, final JabberId receivedBy, final Calendar receivedOn) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); logger.logVariable("receivedBy", receivedBy)... |
public UnsubscribeUser() { super(IQAction.UNSUBSCRIBEUSER); } | public UnsubscribeUser() { super("unsubscribeuser"); } | public UnsubscribeUser() { super(IQAction.UNSUBSCRIBEUSER); } |
private void displayMainBrowserAvatar() { | private void displayMainBrowserAvatar(final Boolean doReload) { if(doReload) { getController().reloadMainBrowserAvatar(); } | private void displayMainBrowserAvatar() { getController().displayMainBrowserAvatar(); } |
displayMainBrowserAvatar(); | displayMainBrowserAvatar(Boolean.TRUE); | private void sendJButtonActionPerformed(java.awt.event.ActionEvent evt) { if(isInputValid()) { final Long documentId = extractDocumentId(); final List<User> users = extractTeam(); users.addAll(extractContacts()); final Boolean doIncludeKey = extractDoIncludeKey(); toggleVisualFeedback(Boolean.TRUE); try {... |
public void artifactClosed(final UUID artifactUniqueId) { handleArtifactClosed(artifactUniqueId); | public void artifactClosed(final UUID artifactUniqueId, final JabberId artifactClosedBy) { handleArtifactClosed(artifactUniqueId, artifactClosedBy); | SessionModelXMPPHelper() { super(); this.xmppSession = XMPPSessionFactory.createSession(); this.xmppExtensionListener = new XMPPExtensionListener() { public void artifactClosed(final UUID artifactUniqueId) { handleArtifactClosed(artifactUniqueId); } public void documentReceived(final XMPPDocument xmppDocum... |
public void artifactClosed(final UUID artifactUniqueId) { handleArtifactClosed(artifactUniqueId); | public void artifactClosed(final UUID artifactUniqueId, final JabberId artifactClosedBy) { handleArtifactClosed(artifactUniqueId, artifactClosedBy); | public void artifactClosed(final UUID artifactUniqueId) { handleArtifactClosed(artifactUniqueId); } |
private void handleArtifactClosed(final UUID artifactUniqueId) { SessionModelImpl.notifyArtifactClosed(artifactUniqueId); | private void handleArtifactClosed(final UUID artifactUniqueId, final JabberId artifactClosedBy) { SessionModelImpl.notifyArtifactClosed(artifactUniqueId, artifactClosedBy); | private void handleArtifactClosed(final UUID artifactUniqueId) { SessionModelImpl.notifyArtifactClosed(artifactUniqueId); } |
return getArchiveModel().readTeam(userId, uniqueId); | return getArchiveModel().readTeamIds(userId, uniqueId); | private List<JabberId> readTeamIds(final JabberId userId, final UUID uniqueId) { return getArchiveModel().readTeam(userId, uniqueId); } |
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | final UUID uniqueId, final Long versionId) { | private List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { return getContainerModel().readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } |
uniqueId, versionId, documentUniqueId); | uniqueId, versionId); | private List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { return getContainerModel().readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } |
readLong("versionId"), readUUID("documentUniqueId")); | readLong("versionId")); | public void service() { logApiId(); final List<DocumentVersion> versions = readArchiveDocumentVersions( readJabberId("userId"), readUUID("uniqueId"), readLong("versionId"), readUUID("documentUniqueId")); writeDocumentVersions("documentVersions", "documentVersion", ... |
setBackground(new java.awt.Color(255, 255, 255)); | confirmJButton.setText("!Yes!"); | private void initComponents() { confirmJButton = ButtonFactory.create(getString("ConfirmButton")); denyJButton = ButtonFactory.create(getString("DenyButton")); confirmMessageJTextArea = TextFactory.createArea(); setBackground(new java.awt.Color(255, 255, 255)); confirmJButton.addA... |
confirmMessageJTextArea.setOpaque(false); | private void initComponents() { confirmJButton = ButtonFactory.create(getString("ConfirmButton")); denyJButton = ButtonFactory.create(getString("DenyButton")); confirmMessageJTextArea = TextFactory.createArea(); setBackground(new java.awt.Color(255, 255, 255)); confirmJButton.addA... | |
private ModelTestUser(final String password, final String serverHost, final Integer serverPort, final String username) { | private ModelTestUser(final String password, final String resource, final String serverHost, final Integer serverPort, final String username) { | private ModelTestUser(final String password, final String serverHost, final Integer serverPort, final String username) { super(); this.password = password; this.serverHost = serverHost; this.serverPort = serverPort; this.username = username; } |
this.resource = resource; | private ModelTestUser(final String password, final String serverHost, final Integer serverPort, final String username) { super(); this.password = password; this.serverHost = serverHost; this.serverPort = serverPort; this.username = username; } | |
public Boolean extractSavePassword() { return SwingUtil.extract(savePasswordJCheckBox); } | public Boolean extractSavePassword() { return Boolean.FALSE; } | public Boolean extractSavePassword() { return SwingUtil.extract(savePasswordJCheckBox); } |
private void hideConnectionInfo() { infoJLabel.setText(""); } | private void hideConnectionInfo() { } | private void hideConnectionInfo() { infoJLabel.setText(""); } |
savePasswordJCheckBox = CheckBoxFactory.create(getString("SavePasswordCheckBox")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JButton loginJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; usernameJLabel = LabelFactory.create(getString("UsernameLabel")); usernameJTextField = TextFactory.crea... | |
infoJLabel = LabelFactory.create(); | paddingJLabel = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.insets = new java.awt.Insets(22, 11, 3, 3); add(usernameJLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints... | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JButton loginJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; usernameJLabel = LabelFactory.create(getString("UsernameLabel")); usernameJTextField = TextFactory.crea... |
savePasswordJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); savePasswordJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); savePasswordJCheckBox.setOpaque(false); | gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 22); add(passwordJPasswordField, gridBagConstra... | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JButton loginJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; usernameJLabel = LabelFactory.create(getString("UsernameLabel")); usernameJTextField = TextFactory.crea... |
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayou... | gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.insets = new java.awt.Insets(11, 3, 0, 22); add(cancelJButton, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstra... | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JButton loginJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; usernameJLabel = LabelFactory.create(getString("UsernameLabel")); usernameJTextField = TextFactory.crea... |
infoJLabel.setText(extractErrorMessage()); | public void reload() { if(getPreferences().isSetUsername()) { usernameJTextField.setText(getPreferences().getUsername()); usernameJTextField.setEnabled(false); } else { usernameJTextField.setEnabled(true); } if(containsErrors()) { infoJLabel.setText(extractErrorMessage()); clearErrors(); } } | |
infoJLabel.setText(buffer.toString()); | private void showConnectionInfo() { final StringBuffer buffer = new StringBuffer(getPreferences().getServerHost()) .append(":") .append(getPreferences().getServerPort()) .append(" ") .append(com.thinkparity.browser.Version.getVersion()) .append(" ") .append(com.thinkp... | |
public void run() { window.open(avatar); } | public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); } | public void run() { window.open(avatar); } |
reloadMainList(); | SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); } }); | public void fireDocumentCreated(final Long documentId) { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } }); reloadMainList(); } |
((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); | ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).applyFilter(filter); | public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } |
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); | ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); | public void fireDocumentDeleted(final Long documentId) { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } }); // refresh the document main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((Br... |
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); | ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); | public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); } |
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); | ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); | public void fireDocumentReceived(final Long documentId) { // refresh the document main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); } }); } |
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); | ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); | public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); } |
SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); } }); | fireDocumentUpdated(documentId, Boolean.FALSE); | public void fireDocumentUpdated(final Long documentId) { // refresh the document in the main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId); } }); } |
reloadMainList(); | public void runAcceptContactInvitation(final Long systemMessageId) { final Data data = new Data(1); data.set(AcceptInvitation.DataKey.SYSTEM_MESSAGE_ID, systemMessageId); invoke(ActionId.SESSION_ACCEPT_INVITATION, data); reloadMainList(); } | |
reloadMainList(); | public void runDeclineAllKeyRequests(final Long artifactId) { final Data data = new Data(1); data.set(DeclineAllKeyRequests.DataKey.ARTIFACT_ID, artifactId); invoke(ActionId.ARTIFACT_DECLINE_ALL_KEY_REQUESTS, data); reloadMainList(); } | |
reloadMainList(); | public void runDeleteSystemMessage(final Long systemMessageId) { final Data data = new Data(1); data.set(DeleteSystemMessage.DataKey.SYSTEM_MESSAGE_ID, systemMessageId); invoke(ActionId.SYSTEM_MESSAGE_DELETE, data); reloadMainList(); } | |
runApplyFlagSeen(session.getSelectedDocumentId()); reloadMainList(); | runApplyFlagSeen(getSelectedDocumentId()); fireDocumentUpdated(getSelectedDocumentId()); | public void toggleHistory3Avatar() { if(null == history2Window) { final Avatar avatar = getAvatar(AvatarId.DOCUMENT_HISTORY3); if(null != getAvatarInput(AvatarId.DOCUMENT_HISTORY3)) avatar.setInput(getAvatarInput(AvatarId.DOCUMENT_HISTORY3)); history2Window = new History2Window(mainWindow, avatar); hist... |
final JLabel addDocumentJLabel = LabelFactory.createLink( getString("AddDocument"), UIConstants.DefaultFont); final Color originalForeground = addDocumentJLabel.getForeground(); addDocumentJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { addDocumentJLabel.setForeground(origina... | private void initBrowserMainComponents() { final GridBagConstraints c = new GridBagConstraints(); jListModel = new DefaultListModel(); // the list that resides on the browser's main avatar // * is a single selection list // * spans the width of the entire avatar // * uses a custom cell renderer // * uses a s... | |
Assert.assertTrue( "File \"" + file.getAbsolutePath() + "\" does not exist.", file.exists()); | Document create(final UUID projectId, final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(projectId); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); Assert.assertT... | |
return logVariable("response", super.handleIQ(logVariable("iq", iq))); | final IQ response = super.handleIQ(iq); IQ_LOGGER.logVariable("anonymous iq", iq); IQ_LOGGER.logVariable("anonymous iq response", response); return response; | public IQ handleIQ(final IQ iq) throws UnauthorizedException { synchronized (AbstractHandler.SERIALIZER) { this.userModel = UserModel.getModel(); return logVariable("response", super.handleIQ(logVariable("iq", iq))); } } |
logVariable("iq", iq); | public IQ handleIQ(final IQ iq) throws UnauthorizedException { synchronized (SERIALIZER) { this.session = SessionUtil.getInstance().createSession(iq); this.archiveModel = ArchiveModel.getModel(session); this.artifactModel = ArtifactModel.getModel(session); this.bac... | |
logVariable("response", response); | IQ_LOGGER.logVariable("iq", iq); IQ_LOGGER.logVariable("iq response", response); | public IQ handleIQ(final IQ iq) throws UnauthorizedException { synchronized (SERIALIZER) { this.session = SessionUtil.getInstance().createSession(iq); this.archiveModel = ArchiveModel.getModel(session); this.artifactModel = ArtifactModel.getModel(session); this.bac... |
digester.setClassLoader(getClass().getClassLoader()); | public MappingDescriptor loadClassDescriptors(InputStream stream) { try { Digester digester = new Digester(); digester.setValidating(this.validating); if (null != this.dtdResolver) { digester.register("-//The Apache Software Foundation//DTD Repository//EN", this.... | |
index.addLookup( | index.addXmlFileLookup( | private void readIndex(final Index index, final HierarchicalStreamReader reader, final UnmarshallingContext context) { while(reader.hasMoreChildren()) { reader.moveDown(); index.addLookup( UUID.fromString(reader.getAttribute("id")), new File(reader.getAttribute("xmlFile"))); reader.moveUp(); } } |
assertNull(NAME + " [EVENT CONTAINER IS NOT NULL]", e.getContainer()); | assertNotNull(NAME + " [EVENT CONTAINER IS NOT NULL]", e.getContainer()); | public void containerDeleted(ContainerEvent e) { didNotify = Boolean.TRUE; assertTrue(NAME + " [EVENT GENERATED IS NOT LOCAL]", e.isLocal()); assertTrue(NAME + " [EVENT GENERATED IS REMOTE]", !e.isRemote()); assertNull(NAME + " [EVENT CONTAINER IS NOT NULL]", e.getCon... |
modifyDocument(OpheliaTestUser.JUNIT, document); | modifyDocument(OpheliaTestUser.JUNIT, document.getId()); | protected void setUp() throws Exception { super.setUp(); final Document document = createDocument(OpheliaTestUser.JUNIT, getInputFiles()[0]); modifyDocument(OpheliaTestUser.JUNIT, document); datum = new Fixture(getDocumentModel(OpheliaTestUser.JUNIT), document.getId(), Boolean.TRUE); ... |
this.sessionModel = modelFactory.getSessionModel(getClass()); | this.sModel = modelFactory.getSessionModel(getClass()); | private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.artifactModel = modelFactory.getArtifactModel(getClass()); this.dModel = modelFactory.getDocumentModel(getClass()); this.logger = ModelLoggerFactory.getLogger(getClass()); this.loggedInUser = JabberIdBuilder... |
this.infoProvider = new InfoProvider(dModel); | this.infoProvider = new InfoProvider(dModel, sModel); | private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.artifactModel = modelFactory.getArtifactModel(getClass()); this.dModel = modelFactory.getDocumentModel(getClass()); this.logger = ModelLoggerFactory.getLogger(getClass()); this.loggedInUser = JabberIdBuilder... |
this.manageContactsProvider = new ManageContactsProvider(sessionModel); this.sendArtifactProvider = new SendArtifactProvider(dModel, sessionModel, loggedInUser); this.sendVersionProvider = new SendVersionProvider(dModel, sessionModel, loggedInUser); | this.manageContactsProvider = new ManageContactsProvider(sModel); this.sendArtifactProvider = new SendArtifactProvider(dModel, sModel, loggedInUser); this.sendVersionProvider = new SendVersionProvider(dModel, sModel, loggedInUser); | private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.artifactModel = modelFactory.getArtifactModel(getClass()); this.dModel = modelFactory.getDocumentModel(getClass()); this.logger = ModelLoggerFactory.getLogger(getClass()); this.loggedInUser = JabberIdBuilder... |
final Project inbox = projectModel.getInbox(); final Document document = new Document(inbox.getId(), xmppDocument.getName(), xmppDocument.getCreatedOn(), xmppDocument.getCreatedBy(), xmppDocument.getDescription(), xmppDocument.getId()); final DocumentContent content = new DocumentContent( MD5Util.md5Hex(xmppDocument.g... | final Document existingDocument = get(xmppDocument.getId()); logger.debug(existingDocument); if(null == existingDocument) { receiveCreate(xmppDocument); } else { receiveUpdate(xmppDocument, existingDocument); } | void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { /* * Obtain the inbox parity project within the workspace, and place * the received document within it, the notify all listeners about * the new documen... |
final int compareResult = o1.getName().compareTo(o2.getName()); if(0 == compareResult) { return subCompare(o1, o2); } else { return compareResult * resultMultiplier; } | final int compareResult = comparator.compare(o1.getName(), o2.getName()); if (0 == compareResult) { return subCompare(o1, o2); } else { return compareResult; } | public int compare(final User o1, final User o2) { final int compareResult = o1.getName().compareTo(o2.getName()); if(0 == compareResult) { return subCompare(o1, o2); } else { return compareResult * resultMultiplier; } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.