rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public static JMenu create(final String text, final Integer mnemonic) { return SINGLETON.doCreate(text, mnemonic); | public static JMenu create(final String text) { return SINGLETON.doCreate(text); | public static JMenu create(final String text, final Integer mnemonic) { return SINGLETON.doCreate(text, mnemonic); } |
if(container.isDraft() && container.isLocalDraft()) { final DraftCell draft = readDraft(container); draftCells.put(container, draft); final List<DraftDocumentCell> draftDocuments = toDisplay(draft, draft.getDocuments()); for(final DraftDocumentCell draftDocument : draftDocuments) { containerIdLookup.put(draftDocument.g... | private void syncContainerInternal(final Long containerId, final Boolean remote) { final ContainerCell container = readContainer(containerId); // if the container is null; we can assume the container has been // deleted (it's not longer being created by the provider); so we find ... | |
syncDraftInternal(containerId, remote); syncVersionInternal(containerId, remote); | private void syncContainerInternal(final Long containerId, final Boolean remote) { final ContainerCell container = readContainer(containerId); // if the container is null; we can assume the container has been // deleted (it's not longer being created by the provider); so we find ... | |
} | browser.runApplyFlagSeenArtifact(cc.getId(), ArtifactType.CONTAINER); } | protected void triggerExpand(final TabCell mainCell) { if (mainCell instanceof ContainerCell) { final ContainerCell cc = (ContainerCell) mainCell; if(isExpanded(cc)) { cc.setExpanded(Boolean.FALSE); } else { cc.setExpanded(Boolean.TRUE... |
this.localization = new MainCellL18n("DraftDocumentCell"); | public DraftDocumentCell(final DraftCell draft, final Document document) { super(document.getCreatedBy(), document.getCreatedOn(), document.getDescription(), document.getFlags(), document.getUniqueId(), document.getName(), document.getUpdatedBy(), document.getUpdatedOn()); ... | |
final StringBuffer sbuf = new StringBuffer(); char[] cbuf = new char[READ_BUFFER_SIZE]; int chars; while((chars = br.read(cbuf)) > 0) { sbuf.append(cbuf, 0, chars); | try { final StringBuffer sbuf = new StringBuffer(); char[] cbuf = new char[READ_BUFFER_SIZE]; int chars; while((chars = br.read(cbuf)) > 0) { sbuf.append(cbuf, 0, chars); } return sbuf.toString(); | public static String read(final File file) throws FileNotFoundException, IOException { final BufferedReader br = new BufferedReader(new FileReader(file), READ_BUFFER_SIZE); final StringBuffer sbuf = new StringBuffer(); char[] cbuf = new char[READ_BUFFER_SIZE]; int chars; while((chars = br.read(cbuf)) > 0) { ... |
return sbuf.toString(); | finally { br.close(); } | public static String read(final File file) throws FileNotFoundException, IOException { final BufferedReader br = new BufferedReader(new FileReader(file), READ_BUFFER_SIZE); final StringBuffer sbuf = new StringBuffer(); char[] cbuf = new char[READ_BUFFER_SIZE]; int chars; while((chars = br.read(cbuf)) > 0) { ... |
logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... | |
xmppSession.addListener(new ArtifactListener() { public void handleDraftCreated(final ArtifactDraftCreatedEvent event) { | xmppSession.addListener(ArtifactDraftCreatedEvent.class, new XMPPEventListener<ArtifactDraftCreatedEvent>() { public void handleEvent(final ArtifactDraftCreatedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} public void handleDraftDeleted(final ArtifactDraftDeletedEvent event) { | }}); xmppSession.addListener(ArtifactDraftDeletedEvent.class, new XMPPEventListener<ArtifactDraftDeletedEvent>() { public void handleEvent(final ArtifactDraftDeletedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} public void handlePublished(final ArtifactPublishedEvent event) { | }}); xmppSession.addListener(ArtifactPublishedEvent.class, new XMPPEventListener<ArtifactPublishedEvent>() { public void handleEvent(final ArtifactPublishedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} public void handleReceived(final ArtifactReceivedEvent event) { | }}); xmppSession.addListener(ArtifactReceivedEvent.class, new XMPPEventListener<ArtifactReceivedEvent>() { public void handleEvent(final ArtifactReceivedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} public void handleTeamMemberAdded(final ArtifactTeamMemberAddedEvent event) { | }}); xmppSession.addListener(ArtifactTeamMemberAddedEvent.class, new XMPPEventListener<ArtifactTeamMemberAddedEvent>() { public void handleEvent(final ArtifactTeamMemberAddedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} public void handleTeamMemberRemoved(final ArtifactTeamMemberRemovedEvent event) { | }}); xmppSession.addListener(ArtifactTeamMemberRemovedEvent.class, new XMPPEventListener<ArtifactTeamMemberRemovedEvent>() { public void handleEvent(final ArtifactTeamMemberRemovedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} }); xmppSession.addListener(new ContainerListener() { public void handleArtifactPublished( final ContainerArtifactPublishedEvent event) { | }}); xmppSession.addListener(ContactDeletedEvent.class, new XMPPEventListener<ContactDeletedEvent>() { public void handleEvent(final ContactDeletedEvent event) { logger.logApiId(); getContactModel().handleContactDeleted(event); }}); xmppSession.addListener(ContactDeletedEvent.class, new XMPPEventListener<ContactDeleted... | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} public void handlePublished(final ContainerPublishedEvent event) { | }}); xmppSession.addListener(ContainerPublishedEvent.class, new XMPPEventListener<ContainerPublishedEvent>() { public void handleEvent(final ContainerPublishedEvent event) { logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
} }); xmppSession.addListener(new ContactListener() { public void handleDeleted(final ContactDeletedEvent event) { getContactModel().handleContactDeleted(event); } public void handleUpdated(final ContactUpdatedEvent event) { getContactModel().handleContactUpdated(event); } public void handleInvitationAccepted( final Co... | }}); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... |
logger.logApiId(); | SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); ... | |
public Document(final Project parent, final String name, | public Document(final String name, | public Document(final Project parent, final String name, final Calendar createdOn, final String createdBy, final String keyHolder, final String description, final File directory, final UUID id, final byte[] content) { super(parent, name, description, createdOn, createdBy, keyHolder, id); this.directory = direc... |
final File directory, final UUID id, final byte[] content) { super(parent, name, description, createdOn, createdBy, keyHolder, id); | final File directory, final UUID id, final byte[] content, final String contentChecksum) { super(null, name, description, createdOn, createdBy, id); | public Document(final Project parent, final String name, final Calendar createdOn, final String createdBy, final String keyHolder, final String description, final File directory, final UUID id, final byte[] content) { super(parent, name, description, createdOn, createdBy, keyHolder, id); this.directory = direc... |
this.contentChecksum = MD5Util.md5Hex(content); this.versions = new Vector<DocumentVersion>(1); | this.contentChecksum = contentChecksum; this.versions = new Vector<DocumentVersion>(3); | public Document(final Project parent, final String name, final Calendar createdOn, final String createdBy, final String keyHolder, final String description, final File directory, final UUID id, final byte[] content) { super(parent, name, description, createdOn, createdBy, keyHolder, id); this.directory = direc... |
protected String render(final Object o) { | protected Object render(final Object o) { | protected String render(final Object o) { return Log4JHelper.render(logger, o); } |
PropertiesUtil.store(properties, new File(Directories.ParityInstall, FileNames.ThinkParityProperties), Sundry.ThinKParityHeader); | PropertiesUtil.store(properties, new File(Directories.ParityInstall, FileNames.ThinkParityProperties), Sundry.ThinkParityHeader); | private void saveProperties() throws IOException { properties.setProperty(PropertyNames.ParityImageName, image.getName()); PropertiesUtil.store(properties, new File(Directories.ParityInstall, FileNames.ThinkParityProperties), Sundry.ThinKParityHeader); } |
final Index index = readIndex(getIndexXmlFile()); final File xmlFile = index.lookupXmlFile(id); | final File xmlFile = lookupXmlFile(id); | public Document get(final UUID id) throws FileNotFoundException, IOException { logger.info("get(UUID)"); logger.debug(id); final Index index = readIndex(getIndexXmlFile()); final File xmlFile = index.lookupXmlFile(id); if(null == xmlFile) { return null; } else { return readDocument(xmlFile); } } |
directoryJTextField = new javax.swing.JTextField(); | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); directoryJLabel = new javax.swing.JLabel(); directoryJTextField = new javax.swing.JTextField(); directoryJButton = new javax.swing.JButton(); openWhenDoneCheckBox = new javax.swing.JCheckBox(); ok... | |
directoryJTextField.setEditable(false); directoryJTextField.setFocusable(false); | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); directoryJLabel = new javax.swing.JLabel(); directoryJTextField = new javax.swing.JTextField(); directoryJButton = new javax.swing.JButton(); openWhenDoneCheckBox = new javax.swing.JCheckBox(); ok... | |
.add(directoryJButton)) | .add(directoryJButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) | private void initComponents() { explanationJLabel = new javax.swing.JLabel(); directoryJLabel = new javax.swing.JLabel(); directoryJTextField = new javax.swing.JTextField(); directoryJButton = new javax.swing.JButton(); openWhenDoneCheckBox = new javax.swing.JCheckBox(); ok... |
directoryJButton.requestFocusInWindow(); | public void reload() { // If input is null then this call to reload() is too early, // the input isn't set up yet. if (input!=null) { reloadExplanation(); reloadDirectory(); okJButton.setEnabled(isInputValid()); } } | |
customize(item, event); | protected DocumentHistoryItem createItem(final AuditEvent event) { final DocumentHistoryItem item = new DocumentHistoryItem(); item.setDocumentId(event.getArtifactId()); if(event instanceof AuditVersionEvent) item.setVersionId(((AuditVersionEvent) event).getArtifactVersionId()); ... | |
catch(final SmackException sx) { unexpectedOccured(sx); } | private void handleKeyRequestDenied(final UUID artifactUniqueId, final JabberId deniedBy) { try { SessionModelImpl.notifyKeyRequestDenied(artifactUniqueId, deniedBy); } catch(final ParityException px) { unexpectedOccured(px); } catch(final RuntimeException rx) { unexpectedOccured(rx); } } | |
setBorder(new MultiLineBorder(new Color[] {BC_1, BC_2})); | public HistoryItems() { super("DocumentHistory", Color.WHITE); initComponents(); } | |
gridBagConstraints.weightx = 1.0; | private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); historyListScrollP... | |
if(historyList.isSelectionEmpty()) historyList.setSelectedIndex(0); | private void loadHistory(final DefaultListModel listModel, final HistoryItem[] history) { DisplayHistoryItem display; for (final HistoryItem hi : history) { display = new DisplayHistoryItem(); display.setAvatar(this); display.setHistoryItem(hi); listM... | |
logout(); | protected void tearDown() throws Exception { datum = null; super.tearDown(); } | |
public List<User> readPublishedTo(final Long containerId, | public Map<User, Calendar> readPublishedTo(final Long containerId, | public List<User> readPublishedTo(final Long containerId, final Long versionId); |
this.xmppConnection = xmppConnection; | public XMPPSessionDebugger(final XMPPConnection xmppConnection, final Writer writer, final Reader reader) { super(); this.writer = writer; this.reader = reader; } | |
login(); | protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); datum = new Fixture(cModel, NAME); cModel.addListener(datum); } | |
logout(); | protected void tearDown() throws Exception { getContainerModel().removeListener(datum); logout(); datum = null; super.tearDown(); } | |
case 16: return REACTIVATE; | public static AuditEventType fromId(final Integer id) { switch(id) { case 11: return ADD_TEAM_MEMBER; case 13: return ADD_TEAM_MEMBER_CONFIRM; case 0: return ARCHIVE; case 1: return CLOSE; case 2: return CREATE; case 14: return CREATE_REMOTE; case 8: return KEY_REQUEST_DENIED; case 9: r... | |
final IQArtifact delete = new IQDeleteArtifact(artifactUniqueId); delete.setType(IQ.Type.SET); sendAndConfirmPacket(delete); | final XMPPMethod method = new XMPPMethod("unsubscribeuser"); method.setParameter(Xml.Artifact.UNIQUE_ID, artifactUniqueId); method.execute(getConnection()); | public void removeArtifactTeamMember(final UUID artifactUniqueId) throws SmackException { logger.info("sendDelete(UUID)"); logger.debug(artifactUniqueId); final IQArtifact delete = new IQDeleteArtifact(artifactUniqueId); delete.setType(IQ.Type.SET); sendAndConfirmPacket(delete); } |
logger.debug("JMenuItem.Mnemonic[" + mnemonic + "]"); | private void applyMnemonic(final JMenuItem jMenuItem, final Integer mnemonic) { jMenuItem.setMnemonic(mnemonic); } | |
logger.debug("JMenuItem[" + text + "]"); | private JMenuItem doCreate(final String text) { final JMenuItem jMenuItem = new JMenuItem(text); applyDefaultFont(jMenuItem); applyHandCursor(jMenuItem); return jMenuItem; } | |
initBrowserTitleComponents(); | initComponents(); | BrowserTitleAvatar() { super("BrowserTitleAvatar"); this.mouseInputAdapter = new MouseInputAdapter() { int offsetX; int offsetY; public void mouseDragged(final MouseEvent e) { getController().moveMainWindow( new Point(e.getPoint().x - offsetX, e.getPoint().y - offsetY)); } public void mouseP... |
getController().end(); } | infoJLabel.setText(""); } | public void actionPerformed(final ActionEvent e) { getController().end(); } |
setMinimumSize(getMainWindowSize()); | setMinimumSize(Dimensions.BrowserWindow.MIN_SIZE); | BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; this.logger = Logger.getLogger(getClass()); this.persistence = PersistenceFactory.getPersistence(getClass()); final Boolean maximized = persistence.get("maximized", Boolean.FALSE); getRoot... |
setMinimumSize(dFinal); | public void setMainWindowSize(final Dimension d) { final Dimension dFinal = new Dimension(d); // Honour the minimum window size. if (dFinal.getWidth() < Dimensions.BrowserWindow.MIN_SIZE.getWidth()) { dFinal.width = (int)Dimensions.BrowserWindow.MIN_SIZE.getWidth(); } ... | |
setMinimumSize(dFinal); | public void setMainWindowSizeAndLocation(final Point p, final Dimension d) { final Point pFinal = new Point(p); final Dimension dFinal = new Dimension(d); // Honour the minimum window size. When going below the size limit in // either x or y, limit both the resize and the move in tha... | |
modifyDocument(OpheliaTestUser.JUNIT, document); | modifyDocument(OpheliaTestUser.JUNIT, document.getId()); | protected void setUp() throws Exception { super.setUp(); final Integer VERSION_COUNT = 3; final DocumentModel documentModel = getDocumentModel(OpheliaTestUser.JUNIT); data = new Vector<Fixture>(getInputFilesLength()); for(final File testFile : getInputFiles()) { final Document document = createDocum... |
SessionModelImpl.notifyArtifactClosed(artifactUniqueId, artifactClosedBy); | try { SessionModelImpl.notifyArtifactClosed( artifactUniqueId, artifactClosedBy); } catch(final ParityException px) { unexpectedOccured(px); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleArtifactClosed(final UUID artifactUniqueId, final JabberId artifactClosedBy) { SessionModelImpl.notifyArtifactClosed(artifactUniqueId, artifactClosedBy); } |
SessionModelImpl.notifyDocumentReceived(xmppDocument); | try { SessionModelImpl.notifyDocumentReceived(xmppDocument); } catch(final ParityException px) { unexpectedOccured(px); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleDocumentReceived(final XMPPDocument xmppDocument) { SessionModelImpl.notifyDocumentReceived(xmppDocument); } |
SessionModelImpl.notifyInvitationAccepted(acceptedBy); | try { SessionModelImpl.notifyInvitationAccepted(acceptedBy); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleInvitationAccepted(final JabberId acceptedBy) { SessionModelImpl.notifyInvitationAccepted(acceptedBy); } |
SessionModelImpl.notifyInvitationDeclined(declinedBy); | try { SessionModelImpl.notifyInvitationDeclined(declinedBy); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleInvitationDeclined(final JabberId declinedBy) { SessionModelImpl.notifyInvitationDeclined(declinedBy); } |
SessionModelImpl.notifyInvitationExtended(invitedBy); | try { SessionModelImpl.notifyInvitationExtended(invitedBy); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleInvitationExtended(final JabberId invitedBy) { SessionModelImpl.notifyInvitationExtended(invitedBy); } |
SessionModelImpl.notifyKeyRequestAccepted(artifactUniqueId, acceptedBy); | try { SessionModelImpl.notifyKeyRequestAccepted( artifactUniqueId, acceptedBy); } catch(final ParityException px) { unexpectedOccured(px); } catch(final RuntimeException rx) { unexpectedOccured(rx); } catch(final SmackException sx) { unexpectedOccured(sx); } | private void handleKeyRequestAccepted(final UUID artifactUniqueId, final JabberId acceptedBy) { SessionModelImpl.notifyKeyRequestAccepted(artifactUniqueId, acceptedBy); } |
SessionModelImpl.notifyKeyRequestDenied(artifactUniqueId, deniedBy); | try { SessionModelImpl.notifyKeyRequestDenied(artifactUniqueId, deniedBy); } catch(final ParityException px) { unexpectedOccured(px); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleKeyRequestDenied(final UUID artifactUniqueId, final JabberId deniedBy) { SessionModelImpl.notifyKeyRequestDenied(artifactUniqueId, deniedBy); } |
SessionModelImpl.notifyKeyRequested(artifactUniqueId, requestedBy); | try { SessionModelImpl.notifyKeyRequested(artifactUniqueId, requestedBy); } catch(final ParityException px) { unexpectedOccured(px); } catch(final RuntimeException rx) { unexpectedOccured(rx); } catch(final SmackException sx) { unexpectedOccured(sx); } | private void handleKeyRequested(final UUID artifactUniqueId, final JabberId requestedBy) { SessionModelImpl.notifyKeyRequested(artifactUniqueId, requestedBy); } |
SessionModelImpl.notifySessionEstablished(); | try { SessionModelImpl.notifySessionEstablished(); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleSessionEstablished() { SessionModelImpl.notifySessionEstablished(); } |
SessionModelImpl.notifySessionTerminated(); | try { SessionModelImpl.notifySessionTerminated(); } catch(final RuntimeException rx) { unexpectedOccured(rx); } | private void handleSessionTerminated() { SessionModelImpl.notifySessionTerminated(); } |
for(final Long metaDataId : metaDataIds) metaDataIO.delete(session, metaDataId); | public void delete(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { final Long[] auditIds = listAuditIds(session, artifactId); final Long[] metaDataIds = listMetaDataIds(session, auditIds); for(final Long metaDataId : metaDataIds) metaDataIO.delete(session, me... | |
for(final Long metaDataId : metaDataIds) metaDataIO.delete(session, metaDataId); | public void delete(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { final Long[] auditIds = listAuditIds(session, artifactId); final Long[] metaDataIds = listMetaDataIds(session, auditIds); for(final Long metaDataId : metaDataIds) metaDataIO.delete(session, me... | |
digester.addBeanPropertySetter("toolbox/tool/request-path", "requestPath"); | protected void addToolRules(Digester digester) { super.addToolRules(digester); digester.addBeanPropertySetter("toolbox/tool/scope", "scope"); } | |
l.artifactClosed(artifactClose.getArtifactUUID()); | l.artifactClosed( artifactClose.getArtifactUUID(), artifactClose.getClosedBy()); | private void notifyXMPPExtension_closeArtifact( final IQCloseArtifact artifactClose) { synchronized(xmppExtensionListenersLock) { for(final XMPPExtensionListener l : xmppExtensionListeners) { l.artifactClosed(artifactClose.getArtifactUUID()); } } } |
xmppSession.addListener(xmppArtifactListener); | SessionModelXMPPHelper() { super(); this.xmppSession = XMPPSessionFactory.createSession(); this.xmppExtensionListener = new XMPPExtensionListener() { public void artifactClosed(final UUID artifactUniqueId, final JabberId artifactClosedBy) { handleArtifactClosed(artifactUniqueId, artifactClosedBy); } pu... | |
public PopupHistoryItem(final MainCellHistoryItem historyItem) { | public PopupHistoryItem(final MainCellHistoryItem historyItem, final Connection connection) { | public PopupHistoryItem(final MainCellHistoryItem historyItem) { super(); this.historyItem = historyItem; this.l18n = new PopupL18n("HistoryListItem"); } |
this.connection = connection; | public PopupHistoryItem(final MainCellHistoryItem historyItem) { super(); this.historyItem = historyItem; this.l18n = new PopupL18n("HistoryListItem"); } | |
if(historyItem.isSetVersionId()) { jPopupMenu.add(new OpenVersion(application)); if(!historyItem.getDocument().isClosed()) { final Set<User> team = historyItem.getDocumentTeam(); if(0 < team.size()) { final JMenu jMenu = MenuFactory.create(getString("SendVersion")); for(final User teamMember : team) jMenu.add(new Send(... | if(Connection.ONLINE == connection) { triggerOnline(application, jPopupMenu, e); } else if(Connection.OFFLINE == connection) { triggerOffline(application, jPopupMenu, e); } else { Assert.assertUnreachable("[LBROWSER] [APPLICATION] [BROWSER] [AVATAR] [HISTORY ITEM POPUP] [TRIGGER] [UNKNOWN CONNECTION STATUS]"); } | public void trigger(final Browser application, final JPopupMenu jPopupMenu, final MouseEvent e) { if(historyItem.isSetVersionId()) { jPopupMenu.add(new OpenVersion(application)); if(!historyItem.getDocument().isClosed()) { final Set<User> team = historyItem.get... |
String idAula=aula.dameValor(Constantes.ID_ISAULA); String idHorario= horario.dameValor(Constantes.ID_ISHORARIO); if(idAula!=null) horCursoAula.cambiaValor(Constantes.ID_HAS_ISAULA_IDISAULA,idAula); | if(aula!=null){ String idAula=aula.dameValor(Constantes.ID_ISAULA); if(idAula!=null) horCursoAula.cambiaValor(Constantes.ID_HAS_ISAULA_IDISAULA,idAula); else horCursoAula.cambiaValor(Constantes.ID_HAS_ISAULA_IDISAULA,""); } | public ListaObjetoBean dameCursosCumplan(ObjetoBean curso,ObjetoBean aula,ObjetoBean horario ){ try{ //primera hacemos una consulta para ver los cursos que cumplen los criterios del bean curso ObjetoBBDD iscurso= ConversorBeanBBDD.convierteBeanABBDD(curso); ObjetoCriterio critCurso = this.crearObjetoCriterioAde... |
if (idHorario!=null) horCursoAula.cambiaValor(Constantes.ID_HAS_ISHORARIO_IDISHORARIO,idHorario); | if(horario!=null){ String idHorario= horario.dameValor(Constantes.ID_ISHORARIO); if (idHorario!=null) horCursoAula.cambiaValor(Constantes.ID_HAS_ISHORARIO_IDISHORARIO,idHorario); else horCursoAula.cambiaValor(Constantes.ID_HAS_ISHORARIO_IDISHORARIO,""); } | public ListaObjetoBean dameCursosCumplan(ObjetoBean curso,ObjetoBean aula,ObjetoBean horario ){ try{ //primera hacemos una consulta para ver los cursos que cumplen los criterios del bean curso ObjetoBBDD iscurso= ConversorBeanBBDD.convierteBeanABBDD(curso); ObjetoCriterio critCurso = this.crearObjetoCriterioAde... |
this.logger = new Log4JWrapper(getClass()); | this.logger = new Log4JWrapper("TEST_DEBUGGER"); | protected TestCase(final String name) { super(name); this.testCaseHelper = new TestCaseHelper(this); this.logger = new Log4JWrapper(getClass()); } |
public List<User> readPublishedTo(final Long containerId, | public Map<User, Calendar> readPublishedTo(final Long containerId, | public List<User> readPublishedTo(final Long containerId, final Long versionId) { final Session session = openSession(); try { session.prepareStatement(SQL_READ_PUBLISHED_TO); session.setLong(1, containerId); session.setLong(2, versionId); session... |
final List<User> publishedTo = new ArrayList<User>(); | final Map<User, Calendar> publishedTo = new HashMap<User, Calendar>(); | public List<User> readPublishedTo(final Long containerId, final Long versionId) { final Session session = openSession(); try { session.prepareStatement(SQL_READ_PUBLISHED_TO); session.setLong(1, containerId); session.setLong(2, versionId); session... |
publishedTo.add(userIO.extractUser(session)); | publishedTo.put(userIO.extractUser(session), session.getCalendar("RECEIVED_ON")); | public List<User> readPublishedTo(final Long containerId, final Long versionId) { final Session session = openSession(); try { session.prepareStatement(SQL_READ_PUBLISHED_TO); session.setLong(1, containerId); session.setLong(2, versionId); session... |
final StreamSession streamSession = streamModel.createSession(userId); final StreamWriter writer = new StreamWriter(streamSession); writer.open(); try { writer.write(streamId, stream, streamSize); } finally { try { stream.close(); } finally { writer.close(); | final StreamSession streamSession = streamModel.createArchiveSession(archiveId); uploadStream(new UploadMonitor() { public void chunkUploaded(final int chunkSize) { logger.logApiId(); logger.logVariable("chunkSize", chunkSize); | void createStream(final JabberId userId, final String streamId, final UUID uniqueId, final Long versionId) { logApiId(); logVariable("userId", userId); logVariable("streamId", streamId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); try ... |
} | }, streamId, streamSession, stream, streamSize); | void createStream(final JabberId userId, final String streamId, final UUID uniqueId, final Long versionId) { logApiId(); logVariable("userId", userId); logVariable("streamId", streamId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); try ... |
protected Map<User, ArtifactReceipt> readPublishedTo(final UUID uniqueId, final Long versionId) { | public Map<User, ArtifactReceipt> readPublishedTo( final UUID uniqueId, final Long versionId) { | static <T extends Artifact, U extends ArtifactVersion> ArchiveReader<T, U> emptyReader() { return new ArchiveReader<T, U>() { @Override public List<T> read() { return Collections.emptyList(); } @Override public T read(final UUID uniqueId) ... |
if (null==this.resizer) { this.resizer = new Resizer(getController(), this, isSupportMouseMove(), getResizeEdges()); final List<Component> componentsThatSupportMouseMove = getComponentsThatSupportMouseMove(); if (null!=componentsThatSupportMouseMove) { resizer.addComponentsThatSupportMouseMove(componentsThatSupportMous... | if (null!=this.resizer) { resizer.removeAllListeners(); } this.resizer = new Resizer(getController(), this, isSupportMouseMove(), getResizeEdges()); final List<Component> componentsThatSupportMouseMove = getComponentsThatSupportMouseMove(); if (null!=componentsThatSupportMouseMove) { resizer.addComponentsThatSupportMo... | public void installResizer() { if (null==this.resizer) { this.resizer = new Resizer(getController(), this, isSupportMouseMove(), getResizeEdges()); final List<Component> componentsThatSupportMouseMove = getComponentsThatSupportMouseMove(); if (null!=componentsThatSupportMouse... |
configureRenderer(configuration, HistoryItem.class, HistoryItemRenderer.class); | private static void configureRenderers(final Properties configuration) { // TODO Change the class\renderer class reference to be absolute instead // of an import. configureRenderer(configuration, User.class, UserRenderer.class); configureRenderer(configuration, Document.class, DocumentRenderer.class); configureRe... | |
StreamUtil.copy(stream, output, streamSession.getBufferSize()); | int len; final byte[] b = new byte[streamSession.getBufferSize()]; try { while((len = stream.read(b)) > 0) { logger.logDebug("{0}/{1}", len, total); output.write(b, 0, len); output.flush(); } } finally { stream.close(); output.flush(); output.close(); } | private void doRun() throws IOException { final InputStream stream = streamServer.openInputStream(streamSession, streamId); StreamUtil.copy(stream, output, streamSession.getBufferSize()); } |
public static Listable[] queryListMultiple(Frame parent, String title, String message, String helpString, String okButton, boolean hasDefault, ListableVector vector, boolean[] selected) { if (vector==null) return null; Listable[] names = vector.getListables(); if (names==null) return null; ListDialog id = new ListDialo... | public static Listable[] queryListMultiple(Frame parent, String title, String message, String helpString, ListableVector vector, boolean[] selected) { return queryListMultiple(parent, title, message, helpString, null, true, vector, selected); | public static Listable[] queryListMultiple(Frame parent, String title, String message, String helpString, String okButton, boolean hasDefault, ListableVector vector, boolean[] selected) { if (vector==null) return null; Listable[] names = vector.getListables(); if (names==null) return null; ListDialog id = new... |
final File modFile = modifyDocument(OpheliaTestUser.JUNIT, document); | final File modFile = modifyDocument(OpheliaTestUser.JUNIT, document.getId()); | protected void setUp() throws Exception { super.setUp(); final File inputFile = getInputFile("JUnitTestFramework.txt"); final InternalDocumentModel documentModel = getDocumentModel(OpheliaTestUser.JUNIT); final Document document = createDocument(OpheliaTestUser.JUNIT, inputFile); final File modFile = modify... |
version = datum.documentModel.createVersion( | datum.documentModel.createVersion( | public void testCreateVersion() { try { DocumentVersion version; DocumentVersionContent versionContent; for(Fixture datum : data) { version = datum.documentModel.createVersion( datum.document, datum.action, datum.actionData); assertNotNull(version); assertEquals(datum.action, version.getAction());... |
iVersions = datum.documentModel.listVersions(datum.document).iterator(); version = null; while(iVersions.hasNext()) { version = iVersions.next(); } | public void testCreateVersion() { try { DocumentVersion version; DocumentVersionContent versionContent; for(Fixture datum : data) { version = datum.documentModel.createVersion( datum.document, datum.action, datum.actionData); assertNotNull(version); assertEquals(datum.action, version.getAction());... | |
EventDispatcher.getInstance().initialize(); | static void initialize() { System.setProperty("sun.awt.noerasebackground", "true"); System.setProperty("parity.insecure", "true"); LoggerFactory.getLogger(Browser2PlatformInitializer.class); ModelFactory.getInstance().initialize(); EventDispatcher.getInstance().initialize(); // Set the application lnf try { UIM... | |
final Container cRead = getContainerModel(datum.junit).read(c.getId()); assertNull("Container \"" + c.getName() + "\" was not deleted.", cRead); assertTrue("Container deleted event was not fired for container \"" + c.getName() + ".\"", datum.didNotify); | assertDeleted(datum.junit, c); | public void testDelete() { final Container c = createContainer(datum.junit, NAME); getContainerModel(datum.junit).addListener(datum); logger.logInfo("Deleting container \"{0}\" as \"{1}.\"", c.getName(), datum.junit_x.getSimpleUsername()); getContainerModel(datum.junit).de... |
final Container cRead = getContainerModel(datum.junit).read(c.getId()); assertNull("Container \"" + c.getName() + "\" was not deleted.", cRead); assertTrue("Container deleted event was not fired for container \"" + c.getName() + ".\"", datum.didNotify); | assertDeleted(datum.junit, c, d); | public void testDeletePostAdd() { final Container c = createContainer(datum.junit, NAME); addDocument(datum.junit, c.getId(), "JUnitTestFramework.doc"); addDocument(datum.junit, c.getId(), "JUnitTestFramework.odt"); addDocument(datum.junit, c.getId(), "JUnitTestFramework.pdf"); ad... |
final Container cRead = getContainerModel(datum.junit).read(c.getId()); assertNull("Container \"" + c.getName() + "\" was not deleted.", cRead); assertTrue("Container deleted event was not fired for container \"" + c.getName() + ".\"", datum.didNotify); | assertDeleted(datum.junit, c, d); | public void testDeletePostMultiPublish() { final Container c = createContainer(datum.junit, NAME); final Document d_doc = addDocument(datum.junit, c.getId(), "JUnitTestFramework.doc"); final Document d_odt = addDocument(datum.junit, c.getId(), "JUnitTestFramework.odt"); final Document d_... |
final Container cRead = getContainerModel(datum.junit).read(c.getId()); assertNull("Container \"" + c.getName() + "\" was not deleted.", cRead); assertTrue("Container deleted event was not fired for container \"" + c.getName() + ".\"", datum.didNotify); | assertDeleted(datum.junit, c, d); | public void testDeletePostPublish() { final Container c = createContainer(datum.junit, NAME); addDocument(datum.junit, c.getId(), "JUnitTestFramework.doc"); addDocument(datum.junit, c.getId(), "JUnitTestFramework.odt"); addDocument(datum.junit, c.getId(), "JUnitTestFramework.pdf"); ... |
final Container cRead = getContainerModel(datum.junit_x).read(c_x.getId()); assertNull("Container \"" + c_x.getName() + "\" was not deleted.", cRead); assertTrue("Container deleted event was not fired for container \"" + c_x.getName() + ".\"", datum.didNotify); | assertDeleted(datum.junit_x, c_x, d_x); | public void testDeletePostPublishAsRecipient() { final Container c = createContainer(datum.junit, NAME); addDocument(datum.junit, c.getId(), "JUnitTestFramework.doc"); addDocument(datum.junit, c.getId(), "JUnitTestFramework.odt"); addDocument(datum.junit, c.getId(), "JUnitTestFramework.p... |
add(new WindowTitle(), c.clone()); | void addPanel(final AbstractJPanel jPanel) { final GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; add(new WindowTitle(), c.clone()); jPanels.add(jPanel); ac.gridy++; add((Component) jPanel, ac.clone()); } | |
ac.gridy++; | void addPanel(final AbstractJPanel jPanel) { final GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; add(new WindowTitle(), c.clone()); jPanels.add(jPanel); ac.gridy++; add((Component) jPanel, ac.clone()); } | |
finally { session.close(); } | public DocumentVersion getVersion(final Long documentId, final Long versionId) { final Session session = openSession(); try { session.prepareStatement(SQL_GET_VERSION); session.setLong(1, documentId); session.setLong(2, versionId); session.executeQuery(); if(session.nextResult()) { return extractVersion(se... | |
void deleteRemoteInfo(final Session session, final Long artifactId) { session.prepareStatement(SQL_DELETE_REMOTE_INFO); session.setLong(1, artifactId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete remote info."); } | public void deleteRemoteInfo(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { deleteRemoteInfo(session, artifactId); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } } | void deleteRemoteInfo(final Session session, final Long artifactId) { session.prepareStatement(SQL_DELETE_REMOTE_INFO); session.setLong(1, artifactId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete remote info."); } |
public KeywordSpotter() { super("Sieve.KeywordSpotter"); | public KeywordSpotter(String name, String hostname, Integer port) { super("KeywordSpotter." + name, hostname, port); | public KeywordSpotter() { super("Sieve.KeywordSpotter"); } |
public void airBrushReceiveMessage(Message msg) { super.airBrushReceiveMessage(msg); if (msg.type.equals("Keywords")) { | public boolean airBrushReceiveMessage(Message msg) { if (super.airBrushReceiveMessage(msg)) return true; if (msg.to.equals("WB.Control")) { if (msg.type.equals("KeywordSpotter.Keywords.Contents")) { contentMatchString = msg.content; System.out.println("Content match string: " + contentMatchString); return true; } else... | public void airBrushReceiveMessage(Message msg) { super.airBrushReceiveMessage(msg); if (msg.type.equals("Keywords")) { // FIXME: Do something } } |
return false; | public void airBrushReceiveMessage(Message msg) { super.airBrushReceiveMessage(msg); if (msg.type.equals("Keywords")) { // FIXME: Do something } } | |
if (content.matches("IJsland")) { | if (content.matches(contentMatchString)) { | public Analysis doAnalysis(Story story, String topic) { Analysis a = new Analysis(); a.setID(story.getID()); a.setTopic(topic); String content = story.getContent(); if (content.matches("IJsland")) { // If the string IJsland appears in the text, it's definitely about ... |
if (author.matches("Christian")) { a.setTopicRelevance(0.75); | if (author.matches(authorMatchString)) { a.setAuthorRelevance(1.0); | public Analysis doAnalysis(Story story, String topic) { Analysis a = new Analysis(); a.setID(story.getID()); a.setTopic(topic); String content = story.getContent(); if (content.matches("IJsland")) { // If the string IJsland appears in the text, it's definitely about ... |
public SieveObject(String moduleName) { super(moduleName); | public SieveObject(String moduleName, String hostname, Integer port) { super("Sieve." + moduleName, hostname, port); | public SieveObject(String moduleName) { super(moduleName); } |
public void airBrushReceiveMessage(Message msg) { if (msg.type.equals("Story")) { System.out.println("Story received"); handleIncomingStory(msg); | public boolean airBrushReceiveMessage(Message msg) { if (super.airBrushReceiveMessage(msg)) return true; if (msg.to.equals("WB.Stories")) { if (msg.type.equals("Story")) { System.out.println("Story received"); handleIncomingStory(msg); return true; } } else if (msg.to.equals("WB.Control")) { if (msg.type.equals("Sieve... | public void airBrushReceiveMessage(Message msg) { if (msg.type.equals("Story")) { System.out.println("Story received"); handleIncomingStory(msg); } } |
return false; | public void airBrushReceiveMessage(Message msg) { if (msg.type.equals("Story")) { System.out.println("Story received"); handleIncomingStory(msg); } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.