bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public ValueParser(Map source) { setSource(source); }
|
public ValueParser(Map source) { setSource(source); }
| 1,113,537
|
public boolean getBoolean(String key, boolean alternate) { Boolean bool = getBoolean(key); return (bool != null) ? bool.booleanValue() : alternate; }
|
public Boolean getBoolean(String key) { Boolean bool = getBoolean(key); return (bool != null) ? bool.booleanValue() : alternate; }
| 1,113,538
|
public boolean getBoolean(String key, boolean alternate) { Boolean bool = getBoolean(key); return (bool != null) ? bool.booleanValue() : alternate; }
|
public boolean getBoolean(String key, boolean alternate) { Boolean bool = getBoolean(key); return (bool != null) ? bool.booleanValue() : alternate; }
| 1,113,539
|
public Alternator(boolean auto, List list) { this(auto, list.toArray(new Object[list.size()])); }
|
public Alternator(List list) { this(auto, list.toArray(new Object[list.size()])); }
| 1,113,540
|
public Alternator(boolean auto, List list) { this(auto, list.toArray(new Object[list.size()])); }
|
public Alternator(boolean auto, List list) { this(true, list); }
| 1,113,541
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
| 1,113,542
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
| 1,113,543
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
| 1,113,544
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { getServletContext().log("VelocityViewServlet: PANIC! unable to init() - "+e); throw new ServletException(e); } }
|
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); setVelocityEngine(velocity); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocity); velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext()); // default to servletlogger, which logs to the servlet engines log velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletLogger.class.getName()); // by default, load resources with webapp resource loader velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "webapp"); velocity.setProperty("webapp.resource.loader.class", WebappLoader.class.getName()); // Try reading an overriding Velocity configuration try { ExtendedProperties p = loadConfiguration(config); velocity.setExtendedProperties(p); } catch(Exception e) { getServletContext().log("VelocityViewServlet: Unable to read Velocity configuration file: "+e); getServletContext().log("VelocityViewServlet: Using default Velocity configuration."); } // now all is ready - init Velocity try { velocity.init(); } catch(Exception e) { log("VelocityViewServlet: PANIC! unable to init()", e); throw new ServletException(e); } }
| 1,113,545
|
protected String createFailMessage(final Throwable t) { return createFailMessage(getName(), t); }
|
protected String createFailMessage(final Throwable t) { return createFailMessage(getName(), t); }
| 1,113,546
|
public boolean accept(final File pathname) { return pathname.isFile(); }
|
public boolean accept(final File pathname) { return !illegalResources.contains(pathname.getName()); }
| 1,113,547
|
private List<URL> getResources() throws IOException { final List<URL> resources = new ArrayList<URL>(); final File[] resourceFiles = fileSystem.list("/", RESOURCE_FILE_FILTER); for (final File resourceFile : resourceFiles) { resources.add(resourceFile.toURL()); } return resources; }
|
private List<URL> getResources() throws IOException { final List<URL> resources = new ArrayList<URL>(); final File[] resourceFiles = fileSystem.list("/", RESOURCE_FILTER); for (final File resourceFile : resourceFiles) { resources.add(resourceFile.toURL()); } return resources; }
| 1,113,548
|
public File[] list(final String path, final Boolean doRecurse) { final File file = resolve(path); if(null == file) { return null; } if(file.isFile()) { return null; } if(doRecurse) { return list(file).toArray(new File[] {}); } else { return file.listFiles(); } }
|
public File[] list(final String path, final Boolean doRecurse) { final File file = resolve(path); if(null == file) { return null; } if(file.isFile()) { return null; } if(doRecurse) { return list(file).toArray(new File[] {}); } else { return file.listFiles(); } }
| 1,113,549
|
protected PluginException translateError(final Throwable t) { if (PluginException.class.isAssignableFrom(t.getClass())) { return (PluginException) t; } else { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); return PluginException.translate(errorId.toString(), t); } }
|
protected PluginException translateError(final Throwable t) { if (PluginException.class.isAssignableFrom(t.getClass())) { return (PluginException) t; } else { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); return PluginException.translate(errorId, t); } }
| 1,113,550
|
public AcceptInvitation() { super("AcceptInvitation", ID, NAME, ICON); }
|
public AcceptInvitation(final Browser browser) { super("AcceptInvitation", ID, NAME, ICON); this.browser = browser; }
| 1,113,551
|
public void invoke(final Data data) throws Exception { final Long messageId = (Long) data.get(DataKey.SYSTEM_MESSAGE_ID); try { final SystemMessageModel sMModel = getSystemMessageModel(); final ContactInvitationMessage message = (ContactInvitationMessage) sMModel.read(messageId); getSessionModel().acceptInvitation(message.getInvitedBy()); sMModel.delete(messageId); } catch(final ParityException px) { throw new RuntimeException(px); } }
|
public void invoke(final Data data) throws Exception { final Long messageId = (Long) data.get(DataKey.SYSTEM_MESSAGE_ID); try { final SystemMessageModel sMModel = getSystemMessageModel(); final ContactInvitationMessage message = (ContactInvitationMessage) sMModel.read(messageId); getSessionModel().acceptInvitation(message.getInvitedBy()); sMModel.delete(messageId); } catch(final ParityException px) { throw new RuntimeException(px); } }
| 1,113,552
|
public void open() { connect(Type.DOWNSTREAM); }
|
public void open() throws IOException { connect(Type.DOWNSTREAM); }
| 1,113,553
|
public void read(final String streamId, final OutputStream stream) { write(new StreamHeader(StreamHeader.Type.STREAM_BEGIN, streamId)); read(stream); }
|
public void read(final String streamId, final OutputStream stream) { write(new StreamHeader(StreamHeader.Type.STREAM_ID, streamId)); read(stream); }
| 1,113,554
|
public void service() { logApiId(); final Profile profile = logVariable("profile", read(readJabberId("userId"))); if(null != profile) { writeJabberId("id", profile.getId()); writeString("name", profile.getName()); if (profile.isSetOrganization()) writeString("organization", profile.getOrganization()); if (profile.isSetTitle()) writeString("title", profile.getTitle()); } }
|
public void service() { logApiId(); final Profile profile = logger.logVariable("profile", read(readJabberId("userId"))); if(null != profile) { writeJabberId("id", profile.getId()); writeString("name", profile.getName()); if (profile.isSetOrganization()) writeString("organization", profile.getOrganization()); if (profile.isSetTitle()) writeString("title", profile.getTitle()); } }
| 1,113,555
|
protected String createFailMessage(Throwable t) { testLogger.error("Failure", t); return super.createFailMessage(t); }
|
protected String createFailMessage(Throwable t) { testLogger.error("Failure", t); return super.createFailMessage(t); }
| 1,113,556
|
protected boolean isNYIAOnLinux(final Throwable t) { Throwable cause = t.getCause(); while(null != cause) { if(NotYetImplementedAssertion.class.isAssignableFrom(cause.getClass())) { switch(OSUtil.getOS()) { case LINUX: testLogger.warn("[PARITY] Running test on un-supported platform."); return true; } } cause = cause.getCause(); } return false; }
|
protected boolean isNYIAOnLinux(final Throwable t) { Throwable cause = t.getCause(); while(null != cause) { if(NotYetImplementedAssertion.class.isAssignableFrom(cause.getClass())) { switch(OSUtil.getOS()) { case LINUX: logger.logWarning("Running test on un-supported platform."); return true; } } cause = cause.getCause(); } return false; }
| 1,113,557
|
public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } }
|
public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } }
| 1,113,558
|
public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } }
|
public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } }
| 1,113,559
|
public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } }
|
public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } }
| 1,113,560
|
protected static void assertNotNull(final String assertion, final List<Container> containers) { assertNotNull(assertion + " [CONTAINERS IS NULL]", (Object) containers); for(final Container container : containers) { assertNotNull(assertion, container); } }
|
protected static void assertNotNull(final String assertion, final List<Container> containers) { assertNotNull(assertion + " [CONTAINERS IS NULL]", (Object) containers); for(final Container container : containers) { assertNotNull(assertion, container); } }
| 1,113,562
|
NameComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); }
|
NameComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); }
| 1,113,564
|
private static void configure() { synchronized(configureLock) { if(Boolean.FALSE == isConfigured) { final Properties log4jProperties = new Properties(); log4jProperties.setProperty("log4j.threshold", "debug"); log4jProperties.setProperty("log4j.rootLogger", "debug, broswerHTML, console"); configureGlobal(log4jProperties); configureRenderers(log4jProperties); final ModelFactory modelFactory = ModelFactory.getInstance(); configureBrowserHTMLAppender(log4jProperties, modelFactory.getWorkspace(LoggerFactory.class)); configureConsoleAppender(log4jProperties); PropertyConfigurator.configure(log4jProperties); isConfigured = Boolean.TRUE; } } }
|
private static void configure() { synchronized(configureLock) { if(Boolean.FALSE == isConfigured) { final Properties log4jProperties = new Properties(); log4jProperties.setProperty("log4j.threshold", "debug"); log4jProperties.setProperty("log4j.rootLogger", "debug, broswerHTML, console"); configureRenderers(log4jProperties); final ModelFactory modelFactory = ModelFactory.getInstance(); configureBrowserHTMLAppender(log4jProperties, modelFactory.getWorkspace(LoggerFactory.class)); configureConsoleAppender(log4jProperties); PropertyConfigurator.configure(log4jProperties); isConfigured = Boolean.TRUE; } } }
| 1,113,565
|
protected void initComponents(final Avatar avatar) { avatar.reload(); windowPanel = new WindowPanel(); windowPanel.addPanel(avatar); add(windowPanel); // Install the resizer here; if done earlier then the resizer // can't successfully get the window ancestor. avatar.installResizer(); avatar.setRoundCorners(Boolean.TRUE); }
|
protected void initComponents(final Avatar avatar) { avatar.reload(); windowPanel = new WindowPanel(); windowPanel.addPanel(avatar); add(windowPanel); // Install the resizer here; if done earlier then the resizer // can't successfully get the window ancestor. avatar.installResizer(); }
| 1,113,566
|
void addPanel(final Avatar avatar) { final GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; add(new WindowTitle(avatar.getAvatarTitle()), c.clone()); jPanels.add(avatar); ac.gridy++; add((Component) avatar, ac.clone()); }
|
void addPanel(final Avatar avatar) { final GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; if (avatar.isAvatarTitle()) { add(new WindowTitle(avatar.getAvatarTitle()), c.clone()); } jPanels.add(avatar); ac.gridy++; add((Component) avatar, ac.clone()); }
| 1,113,568
|
public static String toString(final Class type, final Object... memberData) { final StringBuffer toString = new StringBuffer(type.getName()) .append("$"); for (int i = 0; i < memberData.length; i++) { if (0 == i) { toString.append(memberData[i]).append(":"); continue; } if (0 == i % 2) { toString.append(","); } toString.append(memberData[i]); if (1 == i % 2) { toString.append(":"); } } return toString.toString(); }
|
public static String toString(final Class type, final Object... memberData) { final StringBuffer toString = new StringBuffer(type.getName()) .append("$"); for (int i = 0; i < memberData.length; i++) { if (0 == i) { toString.append(memberData[i]).append(":"); continue; } if (0 == i % 2) { toString.append(","); } toString.append(memberData[i]); if (1 == i % 2) { toString.append(":"); } } return toString.toString(); }
| 1,113,569
|
public static String toString(final Class type, final Object... memberData) { final StringBuffer toString = new StringBuffer(type.getName()) .append("$"); for (int i = 0; i < memberData.length; i++) { if (0 == i) { toString.append(memberData[i]).append(":"); continue; } if (0 == i % 2) { toString.append(","); } toString.append(memberData[i]); if (1 == i % 2) { toString.append(":"); } } return toString.toString(); }
|
public static String toString(final Class type, final Object... memberData) { final StringBuffer toString = new StringBuffer(type.getName()) .append("$"); for (int i = 0; i < memberData.length; i++) { if (0 == i) { toString.append(memberData[i]).append(":"); continue; } if (0 == i % 2) { toString.append(","); } toString.append(memberData[i]); if (1 == i % 2) { toString.append(":"); } } return toString.toString(); }
| 1,113,570
|
Boolean isDraftModified(final Long documentId) { logger.info(getApiId("[IS DRAFT MODIFIED]")); logger.debug(documentId); try { final DocumentVersion latestVersion = readLatestVersion(documentId); if (null == latestVersion) { return Boolean.TRUE; } else { final Document document = read(documentId); final LocalFile localFile = getLocalFile(document); localFile.read(); final String draftChecksum = localFile.getFileChecksum(); return !latestVersion.getChecksum().equals(draftChecksum); } } catch (final Throwable t) { throw translateError("[IS DRAFT MODIFIED]", t); } }
|
Boolean isDraftModified(final Long documentId) { logger.info(getApiId("[IS DRAFT MODIFIED]")); logger.debug(documentId); try { final DocumentVersion latestVersion = readLatestVersion(documentId); if (null == latestVersion) { return Boolean.TRUE; } else { final Document document = read(documentId); final LocalFile localFile = getLocalFile(document); localFile.read(); final String draftChecksum = localFile.getFileChecksum(); return !latestVersion.getChecksum().equals(draftChecksum); } } catch (final Throwable t) { throw translateError("[IS DRAFT MODIFIED]", t); } }
| 1,113,571
|
Boolean isDraftModified(final Long documentId) { logger.info(getApiId("[IS DRAFT MODIFIED]")); logger.debug(documentId); try { final DocumentVersion latestVersion = readLatestVersion(documentId); if (null == latestVersion) { return Boolean.TRUE; } else { final Document document = read(documentId); final LocalFile localFile = getLocalFile(document); localFile.read(); final String draftChecksum = localFile.getFileChecksum(); return !latestVersion.getChecksum().equals(draftChecksum); } } catch (final Throwable t) { throw translateError("[IS DRAFT MODIFIED]", t); } }
|
Boolean isDraftModified(final Long documentId) { logger.info(getApiId("[IS DRAFT MODIFIED]")); logger.debug(documentId); try { final DocumentVersion latestVersion = readLatestVersion(documentId); if (null == latestVersion) { return Boolean.TRUE; } else { final Document document = read(documentId); final LocalFile localFile = getLocalFile(document); localFile.read(); final String draftChecksum = localFile.getFileChecksum(); return !versions.get(versions.size() - 1).getChecksum().equals(draftChecksum); } } catch (final Throwable t) { throw translateError("[IS DRAFT MODIFIED]", t); } }
| 1,113,572
|
void create(final Long artifactId, final String artifactName) throws ParityException { getInternalIndexModel().createArtifact(artifactId, artifactName); }
|
void create(final Long documentId, final String documentName) throws ParityException { getInternalIndexModel().createArtifact(artifactId, artifactName); }
| 1,113,573
|
void create(final Long artifactId, final String artifactName) throws ParityException { getInternalIndexModel().createArtifact(artifactId, artifactName); }
|
void create(final Long artifactId, final String artifactName) throws ParityException { getInternalIndexModel().createDocument(documentId, documentName); }
| 1,113,574
|
void delete(final Long id) throws ParityException { getInternalIndexModel().deleteArtifact(id); }
|
void delete(final Long id) throws ParityException { getInternalIndexModel().deleteArtifact(id); }
| 1,113,575
|
void fireSessionEstablished() { impl.fireUpdateTrayMenu(Boolean.TRUE); }
|
void fireSessionEstablished() { impl.reloadConnectionStatus(Platform.Connection.ONLINE); }
| 1,113,576
|
void fireSessionTerminated() { impl.fireUpdateTrayMenu(Boolean.FALSE); }
|
void fireSessionTerminated() { impl.reloadConnectionStatus(Platform.Connection.OFFLINE); }
| 1,113,577
|
public void open() { listenersImpl = new ListenersImpl(this); listenersImpl.start(); preferencesImpl = new PreferencesImpl(this); preferencesImpl.load(); sessionManagerImpl = new SessionManagerImpl(this); sessionManagerImpl.start(); xmppSessionImpl = new XMPPSessionImpl(); shutdownHooks = new ArrayList<ShutdownHook>(); FileUtil.deleteTree(initChild(DirectoryNames.Workspace.TEMP)); }
|
public void open() { listenersImpl = new ListenersImpl(this); listenersImpl.start(); preferencesImpl = new PreferencesImpl(this); preferencesImpl.load(); sessionManagerImpl = new SessionManagerImpl(this); sessionManagerImpl.start(); xmppSessionImpl = new XMPPSessionImpl(XMPPSessionDebugger.class); shutdownHooks = new ArrayList<ShutdownHook>(); FileUtil.deleteTree(initChild(DirectoryNames.Workspace.TEMP)); }
| 1,113,579
|
private void enqueue(final IQ iq) throws ParityServerModelException { final QueueModel queueModel = QueueModel.getModel(session); queueModel.enqueue(iq.toXML()); }
|
private void enqueue(final JID jid, final IQ iq) throws ParityServerModelException { final QueueModel queueModel = QueueModel.getModel(session); queueModel.enqueue(iq.toXML()); }
| 1,113,580
|
private void enqueue(final IQ iq) throws ParityServerModelException { final QueueModel queueModel = QueueModel.getModel(session); queueModel.enqueue(iq.toXML()); }
|
private void enqueue(final IQ iq) throws ParityServerModelException { final QueueModel queueModel = QueueModel.getModel(session); queueModel.enqueue(jid, iq); }
| 1,113,581
|
protected void send(final JID jid, final IQ iq) throws ParityServerModelException, UnauthorizedException { logger.info("route(JID,IQ)"); logger.debug(jid); logger.debug(iq); if(isOnline(jid)) { logger.info("isOnline(jid)"); getSessionManager().getSession(jid).process(iq); } else { enqueue(iq); } }
|
protected void send(final JID jid, final IQ iq) throws ParityServerModelException, UnauthorizedException { logger.info("route(JID,IQ)"); logger.debug(jid); logger.debug(iq); if(isOnline(jid)) { logger.info("isOnline(jid)"); getSessionManager().getSession(jid).process(iq); } else { enqueue(jid, iq); } }
| 1,113,582
|
protected void tearDown() throws Exception {}
|
protected void tearDown() throws Exception { super.tearDown(); }
| 1,113,583
|
ContainerEvent generate(final Container container) { return new ContainerEvent(source, container); }
|
ContainerEvent generate(final Container container) { return new ContainerEvent(source, container); }
| 1,113,584
|
public ContainerEvent(final Source source, final Container container) { this(source, container, null, null); }
|
public ContainerEvent(final Source source, final Container container) { this(source, container, null, null, null); }
| 1,113,585
|
public void update(final Document document) { logger.warn("Update is misleading. Only name, timestamp and flag information is being set."); final Session session = openSession(); try { artifactIO.setFlags(session, document.getId(), document.getFlags()); session.prepareStatement(SQL_UPDATE); session.setCalendar(1, document.getUpdatedOn()); session.setString(2, document.getName()); session.setLong(3, document.getId()); if(1 != session.executeUpdate()) throw new HypersonicException("Could not update document."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
|
public void update(final Document document) { logger.warn("Update is misleading. Only name, state, timestamp and flag information is being set."); final Session session = openSession(); try { artifactIO.setFlags(session, document.getId(), document.getFlags()); session.prepareStatement(SQL_UPDATE); session.setCalendar(1, document.getUpdatedOn()); session.setString(2, document.getName()); session.setLong(3, document.getId()); if(1 != session.executeUpdate()) throw new HypersonicException("Could not update document."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
| 1,113,587
|
public void update(final Document document) { logger.warn("Update is misleading. Only name, timestamp and flag information is being set."); final Session session = openSession(); try { artifactIO.setFlags(session, document.getId(), document.getFlags()); session.prepareStatement(SQL_UPDATE); session.setCalendar(1, document.getUpdatedOn()); session.setString(2, document.getName()); session.setLong(3, document.getId()); if(1 != session.executeUpdate()) throw new HypersonicException("Could not update document."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
|
public void update(final Document document) { logger.warn("Update is misleading. Only name, timestamp and flag information is being set."); final Session session = openSession(); try { artifactIO.setFlags(session, document.getId(), document.getFlags()); session.prepareStatement(SQL_UPDATE); session.setCalendar(1, document.getUpdatedOn()); session.setString(2, document.getName()); session.setStateAsInteger(3, document.getState()); session.setLong(4, document.getId()); if(1 != session.executeUpdate()) throw new HypersonicException("Could not update document."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
| 1,113,588
|
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
|
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
| 1,113,589
|
protected void registerNodeTypes(Session session) throws InvalidNodeTypeDefException, javax.jcr.RepositoryException, IOException { InputStream xml = new FileInputStream( "./src/test-config/repository/repository/nodetypes/custom_nodetypes.xml"); // HINT: throws InvalidNodeTypeDefException, IOException NodeTypeDef[] types = NodeTypeReader.read(xml); Workspace workspace = session.getWorkspace(); NodeTypeManager ntMgr = workspace.getNodeTypeManager(); NodeTypeRegistry ntReg = ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry(); for (int j = 0; j < types.length; j++) { NodeTypeDef def = types[j]; try { ntReg.getNodeTypeDef(def.getName()); } catch (NoSuchNodeTypeException nsne) { // HINT: if not already registered than register custom node type ntReg.registerNodeType(def); } } }
|
protected void registerNodeTypes(Session session) throws InvalidNodeTypeDefException, javax.jcr.RepositoryException, IOException { InputStream xml = new FileInputStream( "./src/test-config/nodetypes/custom_nodetypes.xml"); // HINT: throws InvalidNodeTypeDefException, IOException NodeTypeDef[] types = NodeTypeReader.read(xml); Workspace workspace = session.getWorkspace(); NodeTypeManager ntMgr = workspace.getNodeTypeManager(); NodeTypeRegistry ntReg = ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry(); for (int j = 0; j < types.length; j++) { NodeTypeDef def = types[j]; try { ntReg.getNodeTypeDef(def.getName()); } catch (NoSuchNodeTypeException nsne) { // HINT: if not already registered than register custom node type ntReg.registerNodeType(def); } } }
| 1,113,591
|
public DigesterMapperImpl(String[] files) { this.mappingFiles = files; }
|
public DigesterMapperImpl(String[] files) { this.mappingFiles = files; }
| 1,113,592
|
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(xmppDocument.getCreatedBy()); version.setCreatedOn(xmppDocument.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(xmppDocument.getUpdatedBy()); version.setUpdatedOn(xmppDocument.getUpdatedOn()); version.setVersionId(xmppDocument.getVersionId()); final DocumentContent content = new DocumentContent(); content.setChecksum(MD5Util.md5Hex(xmppDocument.getContent())); content.setContent(xmppDocument.getContent()); content.setDocumentId(version.getArtifactId()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(version.getArtifactId()); versionContent.setVersionId(version.getVersionId()); insertVersion(version.getArtifactId(), version, versionContent); if(isLatestLocalVersion(version)) { document.setUpdatedBy(xmppDocument.getUpdatedBy()); document.setUpdatedOn(xmppDocument.getUpdatedOn()); documentIO.update(document); documentIO.updateContent(content); } // flag the document flagAsNotSEEN(document); // notify notifyUpdate_objectReceived(document); }
|
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqueId(document.getUniqueId()); version.setCreatedBy(xmppDocument.getCreatedBy()); version.setCreatedOn(xmppDocument.getCreatedOn()); version.setName(document.getName()); version.setUpdatedBy(xmppDocument.getUpdatedBy()); version.setUpdatedOn(xmppDocument.getUpdatedOn()); version.setVersionId(xmppDocument.getVersionId()); final DocumentContent content = new DocumentContent(); content.setChecksum(MD5Util.md5Hex(xmppDocument.getContent())); content.setContent(xmppDocument.getContent()); content.setDocumentId(version.getArtifactId()); final DocumentVersionContent versionContent = new DocumentVersionContent(); versionContent.setDocumentContent(content); versionContent.setDocumentId(version.getArtifactId()); versionContent.setVersionId(version.getVersionId()); insertVersion(version.getArtifactId(), version, versionContent); if(isLatestLocalVersion(version)) { document.setUpdatedBy(xmppDocument.getUpdatedBy()); document.setUpdatedOn(xmppDocument.getUpdatedOn()); documentIO.update(document); final LocalFile localFile = getLocalFile(document); localFile.delete(); localFile.write(content.getContent()); } // flag the document flagAsNotSEEN(document); // notify notifyUpdate_objectReceived(document); }
| 1,113,593
|
private Display createContent() { if(null == content) { content = new ContentDisplay(); // HEIGHT ContentDisplay 459 applySize(content, 459); } return content; }
|
private Display createContent() { if(null == content) { content = new ContentDisplay(); // HEIGHT ContentDisplay 459 applySize(content, 465); } return content; }
| 1,113,595
|
public static Dimension getMainWindowSize() { if(null == mainWindowSize) { // DIMENSION BrowserWindow 350x550 mainWindowSize = new Dimension(350, 550); } return mainWindowSize; }
|
public static Dimension getMainWindowSize() { if(null == mainWindowSize) { // DIMENSION BrowserWindow 350x550 mainWindowSize = new Dimension(350, 556); } return mainWindowSize; }
| 1,113,596
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
| 1,113,597
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
| 1,113,598
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceReset(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
| 1,113,599
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0 && message.isApp()) { generateBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING); } else { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); if (msgType.equals(MsgType.LOGON)) { state.logEvent("Required field missing from logon"); disconnect(); } } } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
| 1,113,600
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); }
|
public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); if (isLoggedOn()) { next(); } }
| 1,113,601
|
OrganizationComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); }
|
OrganizationComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); }
| 1,113,602
|
private Dimension incrementWidth(final Dimension size) { final double newWidth = size.width + INCREMENT_STEP; if(newWidth <= MAX_BROWSER_WIDTH) { size.setSize(newWidth, size.height); } else { isDone = true; } return size; }
|
private Dimension incrementWidth(final Dimension size) { final double newWidth = size.width + INCREMENT_STEP; if(newWidth <= maximumHeight) { size.setSize(newWidth, size.height); } else { isDone = true; } return size; }
| 1,113,604
|
XMPPDocument(final XMPPCore xmppCore) { super(); this.xmppCore = xmppCore; this.logger = ModelLoggerFactory.getLogger(getClass()); }
|
XMPPDocument(final XMPPCore xmppCore) { super(); this.xmppCore = xmppCore; this.logger = Logger.getLogger(getClass()); }
| 1,113,605
|
private KeyListener createSessionModelKeyListener() { return new KeyListener() { public void keyRequestAccepted(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } public void keyRequestDenied(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } public void keyRequested(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } }; }
|
private KeyListener createSessionModelKeyListener() { return new KeyListener() { public void keyRequestAccepted(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); } public void keyRequestDenied(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); } public void keyRequested(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); } }; }
| 1,113,607
|
public void keyRequestAccepted(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); }
|
public void keyRequestAccepted(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); }
| 1,113,608
|
public void keyRequestDenied(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); }
|
public void keyRequestDenied(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); }
| 1,113,609
|
public void keyRequested(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); }
|
public void keyRequested(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); }
| 1,113,610
|
private SystemMessageListener createSystemMessageListener() { return new SystemMessageListener() { public void systemMessageCreated( final SystemMessageEvent systemMessageEvent) { browser.reloadMainList(); } }; }
|
private SystemMessageListener createSystemMessageListener() { return new SystemMessageListener() { public void systemMessageCreated( final SystemMessageEvent systemMessageEvent) { browser.fireSystemMessageCreated(((SystemMessage) systemMessageEvent.getSource()).getId()); } }; }
| 1,113,611
|
public void systemMessageCreated( final SystemMessageEvent systemMessageEvent) { browser.reloadMainList(); }
|
public void systemMessageCreated( final SystemMessageEvent systemMessageEvent) { browser.fireSystemMessageCreated(((SystemMessage) systemMessageEvent.getSource()).getId()); }
| 1,113,612
|
private void pseudoSelectAll(final List<? extends MainCell> mainCells) { for(final MainCell mc : mainCells) { pseudoSelect(mc); } }
|
private void pseudoSelectAll(final List<? extends MainCell> mainCells) { if(null == mainCells) { logger.warn("[LBROWSER] [APPLICATION] [BROWSER] [MAIN] [CANNOT PSEUDO SELECT NULL]"); } else { for(final MainCell mc : mainCells) { pseudoSelect(mc); } } }
| 1,113,613
|
protected void setUp() throws Exception { sendData = new Vector<SendData>(4); final Project testProject = createTestProject("testSend"); final DocumentModel documentModel = getDocumentModel(); final SessionModel sessionModel = getSessionModel(); Document document; String name, description; String message; final ModelTestUser testUser = getModelTestUser(); sessionModel.login(testUser.getUsername(), testUser.getPassword()); final Collection<User> users = sessionModel.getRosterEntries(); for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); message = getJUnitTestText(250); sendData.add(new SendData(document, message, sessionModel, users)); } }
|
protected void setUp() throws Exception { data = new Vector<Fixture>(4); final Project testProject = createTestProject("testSend"); final DocumentModel documentModel = getDocumentModel(); final SessionModel sessionModel = getSessionModel(); Document document; String name, description; String message; final ModelTestUser testUser = getModelTestUser(); sessionModel.login(testUser.getUsername(), testUser.getPassword()); final Collection<User> users = sessionModel.getRosterEntries(); for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); message = getJUnitTestText(250); sendData.add(new SendData(document, message, sessionModel, users)); } }
| 1,113,614
|
protected void setUp() throws Exception { sendData = new Vector<SendData>(4); final Project testProject = createTestProject("testSend"); final DocumentModel documentModel = getDocumentModel(); final SessionModel sessionModel = getSessionModel(); Document document; String name, description; String message; final ModelTestUser testUser = getModelTestUser(); sessionModel.login(testUser.getUsername(), testUser.getPassword()); final Collection<User> users = sessionModel.getRosterEntries(); for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); message = getJUnitTestText(250); sendData.add(new SendData(document, message, sessionModel, users)); } }
|
protected void setUp() throws Exception { sendData = new Vector<SendData>(4); final Project testProject = createTestProject("testSend"); final DocumentModel documentModel = getDocumentModel(); final SessionModel sessionModel = getSessionModel(); Document document; String name, description; String message; final ModelTestUser testUser = getModelTestUser(); sessionModel.login(testUser.getUsername(), testUser.getPassword()); final Collection<User> users = sessionModel.getRosterEntries(); for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); message = getJUnitTestText(250); data.add(new Fixture(document, message, sessionModel, users)); } }
| 1,113,615
|
protected void tearDown() throws Exception { for(SendData datum : sendData) { datum.sessionModel.logout(); } sendData.clear(); sendData = null; }
|
protected void tearDown() throws Exception { for(Fixture datum : data) { datum.sessionModel.logout(); } sendData.clear(); sendData = null; }
| 1,113,616
|
protected void tearDown() throws Exception { for(SendData datum : sendData) { datum.sessionModel.logout(); } sendData.clear(); sendData = null; }
|
protected void tearDown() throws Exception { for(SendData datum : sendData) { datum.sessionModel.logout(); } sendData.clear(); sendData = null; }
| 1,113,617
|
public void testSend() { try { for(SendData datum : sendData) { datum.sessionModel.send(datum.users, datum.document); datum.sessionModel.send(datum.users, datum.message); } } catch(Throwable t) { fail(getFailMessage(t)); } }
|
public void testSend() { try { for(Fixture datum : data) { datum.sessionModel.send(datum.users, datum.document); datum.sessionModel.send(datum.users, datum.message); } } catch(Throwable t) { fail(getFailMessage(t)); } }
| 1,113,618
|
public String getClassname() { return clazz.getName(); }
|
public String getClassname() { return clazz != null ? clazz.getName() : null; }
| 1,113,619
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } }
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } }
| 1,113,620
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } }
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.clazz = getApplicationClass(classname); Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } } if (instance instanceof Configurable) { this.configurable = true; } }
| 1,113,621
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } }
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } else { this.configurable = true; } }
| 1,113,622
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } }
|
public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.clazz = null; } }
| 1,113,623
|
public Taxa getTaxa(MesquiteFile f, int taxaNumber) { int count=0; for (int i=0; i<taxas.size(); i++) { Taxa taxa = ((Taxa)taxas.elementAt(i)); if (f== null || taxa.getFile()==f) { if (count==taxaNumber) return taxa; count++; } } return null; }
|
public Taxa getTaxa(MesquiteFile f, int taxaNumber) { int count=0; for (int i=0; i<taxas.size(); i++) { Taxa taxa = ((Taxa)taxas.elementAt(i)); if (f== null || taxa.getFile()==f) { if (count==taxaNumber) return taxa; count++; } } return null; }
| 1,113,624
|
public String writeTree(int byWhat);
|
public void writeTree(int node, StringBuffer treeDescription, boolean[] deleted);
| 1,113,625
|
public void rosterModified() { doNotifyRosterModified(); }
|
public void rosterModified() {}
| 1,113,626
|
public void addRosterEntry(final User xmppUser) throws SmackException { logger.info("addRosterEntry(UserRenderer)"); logger.debug(xmppUser); assertLoggedIn(); Assert.assertNotNull("Cannot add null user to your roster.", xmppUser); // in phase 2, we'll implement the groups try { final Roster roster = getRoster(); if(!roster.contains(xmppUser.getUsername())) roster.createEntry(xmppUser.getUsername(), xmppUser.getName(), null); } catch(XMPPException xmppx) { logger.error("addRosterEntry(User)", xmppx); throw XMPPErrorTranslator.translate(xmppx); } }
|
public void addRosterEntry(final User xmppUser) throws SmackException { logger.info("addRosterEntry(UserRenderer)"); logger.debug(xmppUser); assertLoggedIn("addRosterEntry(UserRenderer)"); Assert.assertNotNull("Cannot add null user to your roster.", xmppUser); // in phase 2, we'll implement the groups try { final Roster roster = getRoster(); if(!roster.contains(xmppUser.getUsername())) roster.createEntry(xmppUser.getUsername(), xmppUser.getName(), null); } catch(XMPPException xmppx) { logger.error("addRosterEntry(User)", xmppx); throw XMPPErrorTranslator.translate(xmppx); } }
| 1,113,627
|
private void assertLoggedIn() { Assert.assertTrue("Cannot perform action. UserRenderer is not logged in.", smackXMPPConnection.isAuthenticated()); }
|
private void assertLoggedIn() { Assert.assertTrue("Cannot perform action. UserRenderer is not logged in.", smackXMPPConnection.isAuthenticated()); }
| 1,113,628
|
private void doNotifyPresenceChanged(final String xmppAddress) { logger.debug(xmppAddress); final User pendingXMPPUser = pendingXMPPUsers.remove(xmppAddress); if(null != pendingXMPPUser) { final RosterEntry rosterEntry = getRosterEntry(pendingXMPPUser); rosterEntry.setName(pendingXMPPUser.getName()); } }
|
private void doNotifyPresenceChanged(final String xmppAddress) { final User pendingXMPPUser = pendingXMPPUsers.remove(xmppAddress); if(null != pendingXMPPUser) { final RosterEntry rosterEntry = getRosterEntry(pendingXMPPUser); rosterEntry.setName(pendingXMPPUser.getName()); } }
| 1,113,629
|
private void doNotifyProcessPresence(final Presence presence) throws InterruptedException { logger.debug(presence); final Type presencePacketType = presence.getType(); if(presencePacketType == Type.SUBSCRIBE) { doFirePresenceRequested(presence); } else if(presencePacketType == Type.SUBSCRIBED) { final Roster roster = getRoster(); final Presence rosterPresence = roster.getPresence(presence.getFrom()); if(null == rosterPresence) { sendPresenceAcceptance(presence.getFrom()); } } }
|
private void doNotifyProcessPresence(final Presence presence) throws InterruptedException { final Type presencePacketType = presence.getType(); if(presencePacketType == Type.SUBSCRIBE) { doFirePresenceRequested(presence); } else if(presencePacketType == Type.SUBSCRIBED) { final Roster roster = getRoster(); final Presence rosterPresence = roster.getPresence(presence.getFrom()); if(null == rosterPresence) { sendPresenceAcceptance(presence.getFrom()); } } }
| 1,113,630
|
public Collection<User> getRosterEntries() throws SmackException { logger.info("getRosterEntries()"); assertLoggedIn(); final Collection<User> rosterEntries = new Vector<User>(getRosterEntryCount()); final Roster roster = getRoster(); RosterEntry rosterEntry; for(Iterator<?> i = roster.getEntries(); i.hasNext();) { rosterEntry = (RosterEntry) i.next(); rosterEntries.add(createUser(roster, rosterEntry)); } return rosterEntries; }
|
public Collection<User> getRosterEntries() throws SmackException { logger.info("getRosterEntries()"); assertLoggedIn("getRosterEntries()"); final Collection<User> rosterEntries = new Vector<User>(getRosterEntryCount()); final Roster roster = getRoster(); RosterEntry rosterEntry; for(Iterator<?> i = roster.getEntries(); i.hasNext();) { rosterEntry = (RosterEntry) i.next(); rosterEntries.add(createUser(roster, rosterEntry)); } return rosterEntries; }
| 1,113,631
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
|
public void send(Collection<User> users, String message) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
| 1,113,632
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,String)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
| 1,113,633
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
| 1,113,634
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } }
|
public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,String)", ix); throw XMPPErrorTranslator.translate(ix); } }
| 1,113,635
|
public void setExpanded(final Boolean expanded) { this.expanded = expanded.booleanValue(); if (this.expanded) { remove(collapsedJPanel); add(expandedJPanel, constraints.clone()); revalidate(); animator.expand(20, 165); } else { animator.collapse(20, 25); remove(expandedJPanel); add(collapsedJPanel, constraints.clone()); revalidate(); } reload(); }
|
public void setExpanded(final Boolean expanded) { this.expanded = expanded.booleanValue(); if (this.expanded) { remove(collapsedJPanel); add(expandedJPanel, constraints.clone()); revalidate(); animator.expand(20, 165); } else { animator.collapse(20, 25); remove(expandedJPanel); add(collapsedJPanel, constraints.clone()); revalidate(); } reload(); }
| 1,113,636
|
private Properties loadPreferences() { try { initPreferencesFile(); final Properties javaProperties = new Properties(); javaProperties.loadFromXML(new FileInputStream(preferencesFile)); return javaProperties; } catch(FileNotFoundException fnfx) { fnfx.printStackTrace(System.err); return null; } catch(IOException iox) { iox.printStackTrace(System.err); return null; } }
|
private Properties loadPreferences() { try { initPreferences(); final Properties javaProperties = new Properties(); javaProperties.loadFromXML(new FileInputStream(preferencesFile)); return javaProperties; } catch(FileNotFoundException fnfx) { fnfx.printStackTrace(System.err); return null; } catch(IOException iox) { iox.printStackTrace(System.err); return null; } }
| 1,113,638
|
protected void initComponents(final Avatar avatar) { avatar.reload(); initComponents((AbstractJPanel) avatar); }
|
protected void initComponents(final Avatar avatar) { avatar.reload(); initComponents((AbstractJPanel) avatar); }
| 1,113,639
|
public void openAndWait(final Avatar avatar) { openAndWait(avatar, windowSize.get(avatar.getId())); }
|
public void openAndWait(final Avatar avatar) { this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent e) { synchronized(Window.this) { Window.this.notifyAll(); } } }); try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { open(avatar); } }); } catch(final InterruptedException ix) { throw new RuntimeException(ix); } catch(final InvocationTargetException itx) { throw new RuntimeException(itx); } synchronized(Window.this) { try { wait(); } catch(final InterruptedException ix) { throw new RuntimeException(ix); } } }
| 1,113,640
|
public void windowClosed(final WindowEvent e) { synchronized(Window.this) { Window.this.notifyAll(); } }
|
public void windowClosed(WindowEvent e) { synchronized(Window.this) { Window.this.notifyAll(); } }
| 1,113,641
|
public void run() { open(jPanel, size); }
|
public void run() { open(avatar); }
| 1,113,642
|
public WindowPanel() { super("MainPanel"); this.ac = new GridBagConstraints(); this.ac.fill = GridBagConstraints.BOTH; this.ac.weightx = 1; this.ac.weighty = 1; this.ac.gridy = 1; this.jPanels = new LinkedList<AbstractJPanel>(); setLayout(new GridBagLayout()); setOpaque(false); initComponents(); }
|
public WindowPanel() { super("MainPanel"); this.ac = new GridBagConstraints(); this.ac.fill = GridBagConstraints.BOTH; this.ac.weightx = 1; this.ac.weighty = 1; this.ac.gridy = 1; this.jPanels = new LinkedList<AbstractJPanel>(); setLayout(new GridBagLayout()); setOpaque(false); initComponents(); }
| 1,113,643
|
void addPanel(final AbstractJPanel jPanel) { final GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; add(new WindowTitleDecoration(), c.clone()); jPanels.add(jPanel); ac.gridy++; add((Component) jPanel, ac.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()); }
| 1,113,644
|
public void addTool(ToolInfo info) { if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else { toolinfo.add(info); } LOG.info("Added "+info.getKey()+" ("+info.getClassname()+") to the toolbox."); }
|
public void addTool(ToolInfo info) { if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else { toolinfo.add(info); } LOG.info("Added "+info.getKey()+" ("+info.getClassname()+") to the toolbox."); }
| 1,113,645
|
public void addTool(ToolInfo info) { if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else { toolinfo.add(info); } LOG.info("Added "+info.getKey()+" ("+info.getClassname()+") to the toolbox."); }
|
public void addTool(ToolInfo info) { if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else { toolinfo.add(info); } }
| 1,113,646
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.