rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Preferences pref = getController().getPreferences(); pref.putBoolean(CONFIG_WARN_ON_CLOSE, false); | PreferencesEntry.CONFIG_WARN_ON_CLOSE.setValue(getController(), false); | public boolean isShutdownAllowed() { if (warnOnClose()) { List<Folder> foldersToWarn = new ArrayList<Folder>( getFolders().length); for (Folder folder : getFolders()) { if (folder.isSynchronizing()) { log().warn("Close warning on folder: ... |
Preferences pref = getController().getPreferences(); return pref.getBoolean(CONFIG_WARN_ON_CLOSE, true); | return PreferencesEntry.CONFIG_WARN_ON_CLOSE.getValueBoolean(getController()); | private boolean warnOnClose() { Preferences pref = getController().getPreferences(); return pref.getBoolean(CONFIG_WARN_ON_CLOSE, true); } |
Reconnector reconnector = (Reconnector) reconnectors .remove(0); | Reconnector reconnector = reconnectors.remove(0); | private void resizeReconnectorPool() { int nReconnector = reconnectors.size(); // Calculate required reconnectors int reqReconnectors = Math.min(Constants.NUMBER_RECONNECTORS, Math .max(Constants.NUMBER_RECONNECTORS_PRIVATE_NETWORKING, reconnect... |
if (!chatTreeNodes.contains(node) && !node.isMySelf()) chatTreeNodes.addChild(node); | if (chatTreeNodes != null && !chatTreeNodes.contains(node) && !node.isMySelf()) chatTreeNodes.addChild(node); | public void addChatMember(Member node) { if (!chatTreeNodes.contains(node) && !node.isMySelf()) chatTreeNodes.addChild(node); } |
for (Iterator it = knownNodes.values().iterator(); it.hasNext();) { Member node = (Member) it.next(); | for (Member node : knownNodes.values()) { | public int broadcastMessageToSupernodes(Message message, int nSupernodes) { log().verbose("Broadcasting message to supernodes: " + message); int nNodes = 0; List<Member> supernodes = new LinkedList(); synchronized (knownNodes) { for (Iterator it = knownNodes.values().iterator(... |
for (Iterator it = knownNodes.values().iterator(); it.hasNext();) { Member node = (Member) it.next(); | for (Member node : knownNodes.values()) { | private Set<Member> getFriends0() { Set<Member> friends = new HashSet<Member>(); synchronized (knownNodes) { for (Iterator it = knownNodes.values().iterator(); it.hasNext();) { Member node = (Member) it.next(); if (node.isFriend()) { friends.... |
chatTreeNodes.removeChild(member); } | if (chatTreeNodes != null) { chatTreeNodes.removeChild(member); } } | public void removeChatMember(Member member) { chatTreeNodes.removeChild(member); } |
uiController = null; | public synchronized void shutdown() { shuttingDown = true; log().info("Shutting down..."); if (started) { // Save config need a started in that method so do that first saveConfig(); } // stop boolean wasStarted = started; started = false; ... | |
java.lang.String companyId, java.lang.String name) | java.lang.String userId, java.lang.String companyId, java.lang.String name) | public static com.liferay.portal.model.Role addRole( java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { RoleLocalService roleLocalService = RoleLocalServiceFactory.getService(); return roleLocalService.addRole(companyId, na... |
return roleLocalService.addRole(companyId, name); | return roleLocalService.addRole(userId, companyId, name); | public static com.liferay.portal.model.Role addRole( java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { RoleLocalService roleLocalService = RoleLocalServiceFactory.getService(); return roleLocalService.addRole(companyId, na... |
.getTranslation("linespeed.uploadspeed"), customDownloadSpeedField); | .getTranslation("linespeed.downloadspeed"), customDownloadSpeedField); | private void buildPanel() { FormLayout layout = new FormLayout("pref:grow", "pref, 3dlu, pref, 3dlu, pref"); setLayout(layout); CellConstraints cc = new CellConstraints(); customUploadSpeedPanel = createInputFieldPanel(Translation .getTranslation("linespeed.uploadsp... |
logVerbose = Logger.isEnabled() && log.isVerbose(); logEnabled = Logger.isEnabled() && !log.isExcluded(); | logEnabled = Logger.isEnabled() && !log.isExcluded(); logVerbose = Logger.isVerboseLevelEnabled() && !log.isExcluded(); logError = Logger.isErrorLevelEnabled() && !log.isExcluded(); logDebug = Logger.isDebugLevelEnabled() && !log.isExcluded(); logInfo = Logger.isInfoLevelEnabled() && !log.isExcluded(); logWarn = Logger... | protected Loggable() { super(); log = Logger.getLogger(this); logVerbose = Logger.isEnabled() && log.isVerbose(); logEnabled = Logger.isEnabled() && !log.isExcluded(); } |
public void init() | public void init(MessageBundleInfo[] inBundles) | public void init() { LoggerAdapter.initializeLogger("test"); try { FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING); } catch (Exception ex) { LoggerAdapter.error("Error initializing suite", ex, this); System.ex... |
JRadioButton nothingRadioButton = new JRadioButton("nothing"); JRadioButton renameRadioButton = new JRadioButton("rename to ..."); JRadioButton addToIgnoreRadioButton = new JRadioButton( "add to ignore"); | JRadioButton nothingRadioButton = new JRadioButton(Translation .getTranslation("filenameproblem.dialog.do_nothing")); JRadioButton renameRadioButton = new JRadioButton(Translation .getTranslation("filenameproblem.dialog.automatic_rename")); renameRadioButton .setToolTipText(Translation .getTranslation("filenameproblem.... | private Component getSolutionComponent(final FileInfo fileInfo) { if (solutionsPanelCache.containsKey(fileInfo)) { return solutionsPanelCache.get(fileInfo); } FormLayout layout = new FormLayout("pref", "pref, pref, pref"); PanelBuilder builder = new Pan... |
log().debug("addToIgnoreRadioButton action"); | private Component getSolutionComponent(final FileInfo fileInfo) { if (solutionsPanelCache.containsKey(fileInfo)) { return solutionsPanelCache.get(fileInfo); } FormLayout layout = new FormLayout("pref", "pref, pref, pref"); PanelBuilder builder = new Pan... | |
log().debug("renameRadioButton action"); | private Component getSolutionComponent(final FileInfo fileInfo) { if (solutionsPanelCache.containsKey(fileInfo)) { return solutionsPanelCache.get(fileInfo); } FormLayout layout = new FormLayout("pref", "pref, pref, pref"); PanelBuilder builder = new Pan... | |
log().debug("addToIgnoreRadioButton action"); | public void actionPerformed(ActionEvent e) { log().debug("addToIgnoreRadioButton action"); solutionsMap.put(fileInfo, Solution.NOTHING); } | |
log().debug("renameRadioButton action"); | public void actionPerformed(ActionEvent e) { log().debug("renameRadioButton action"); solutionsMap.put(fileInfo, Solution.RENAME); } | |
log().debug("addToIgnoreRadioButton action"); | public void actionPerformed(ActionEvent e) { log().debug("addToIgnoreRadioButton action"); solutionsMap.put(fileInfo, Solution.ADD_TO_IGNORE); } | |
log().debug("okButton pressed"); | private JPanel createToolbar() { JButton cancel = new JButton(Translation .getTranslation("general.cancel")); cancel.setMnemonic(Translation.getTranslation("general.cancel.key") .trim().charAt(0)); JButton ok = new JButton(Translation.getTranslation("general.ok")); ... | |
log().debug("okButton pressed"); | public void actionPerformed(ActionEvent e) { log().debug("okButton pressed"); doSolutions(); dialog.setVisible(false); dialog.dispose(); dialog = null; } | |
"fill:pref:grow, pref, pref"); | "7dlu, pref, 7dlu, fill:pref:grow, pref, pref"); | private Component getUIComponent() { if (panel == null) { initComponents(); FormLayout layout = new FormLayout("fill:pref:grow", "fill:pref:grow, pref, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(... |
builder.add(tableScroller, cc.xy(1, 1)); builder.addSeparator(null, cc.xy(1, 2)); builder.add(toolbar, cc.xy(1, 3)); | JLabel jLabel = SimpleComponentFactory .createBigTextLabel(Translation .getTranslation("filenameproblem.dialog.description")); builder.add(jLabel, cc.xy(1, 2)); builder.add(tableScroller, cc.xy(1, 4)); builder.addSeparator(null, cc.xy(1, 5)); builder.add(toolbar, cc.xy(1, 6)); | private Component getUIComponent() { if (panel == null) { initComponents(); FormLayout layout = new FormLayout("fill:pref:grow", "fill:pref:grow, pref, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(... |
initComponents(); | public void open() { initComponents(); dialog = new JDialog(getUIController().getMainFrame().getUIComponent(), "title", true); // modal dialog.getContentPane().add(getUIComponent()); dialog.pack(); dialog.setVisible(true); } | |
"title", true); | Translation.getTranslation("filenameproblem.dialog.title"), true); | public void open() { initComponents(); dialog = new JDialog(getUIController().getMainFrame().getUIComponent(), "title", true); // modal dialog.getContentPane().add(getUIComponent()); dialog.pack(); dialog.setVisible(true); } |
getOrderManager().setIDFactory(idFactory); | public static void initIDFactory() throws IOException { URL url = new URL( "http", getPreferenceStore().getString(ConnectionConstants.WEB_APP_HOST_KEY), getPreferenceStore().getInt(ConnectionConstants.WEB_APP_PORT_KEY), "/id_repository/get_next_batch" ); HttpDatabaseIDFactory tempIDFactory = new HttpDat... | |
orderManager = new OrderManager(idFactory, fixMessageHistory); | orderManager = new OrderManager(fixMessageHistory); | public Object run(Object args) throws Exception { initPreferenceStore(); preferenceStore.addPropertyChangeListener(this); initResources(); fixMessageHistory = new FIXMessageHistory(); jmsConnector = new JMSConnector(); orderManager = new OrderManager(idFactory, fixMessageHistory); setUpQuoteFeed(); Displ... |
super(); | public MailReceipt() { super(); } | |
public void forceScanOnNextMaintenance() { log().verbose("Scan forced"); | public void forceScanOnNextMaintenance() { log().verbose("forceScanOnNextMaintenance Scan forced"); forced = true; | public void forceScanOnNextMaintenance() { log().verbose("Scan forced"); lastScan = null; } |
scanLocalFiles(false); | log().debug("Forced:" + forced); boolean forcedNow = forced; forced = false; scanLocalFiles(forcedNow); | public void maintain() { log().info("Maintaining '" + getName() + "'"); // Maintain the desktop shortcut maintainDesktopShortcut(); synchronized (this) { // Handle deletions handleRemoteDeletedFiles(false); // local files scanLocalFiles(false);... |
public static String getLayoutActualURL(Layout layout, String mainPath) | public static String getLayoutActualURL( Layout layout, ThemeDisplay themeDisplay) | public static String getLayoutActualURL(Layout layout, String mainPath) throws PortalException, SystemException { Map vars = new FastHashMap(); vars.put("liferay:mainPath", mainPath); vars.put("liferay:plid", layout.getPlid()); vars.putAll(layout.getLayoutType().getTypeSettingsProperties()); String href = PropsU... |
Map vars = new FastHashMap(); vars.put("liferay:mainPath", mainPath); vars.put("liferay:plid", layout.getPlid()); vars.putAll(layout.getLayoutType().getTypeSettingsProperties()); String href = PropsUtil.getComponentProperties().getString( PropsUtil.LAYOUT_URL, Filter.by(layout.getType()).setVariables(vars)); return ... | return getLayoutActualURL(layout, themeDisplay.getPathMain()); | public static String getLayoutActualURL(Layout layout, String mainPath) throws PortalException, SystemException { Map vars = new FastHashMap(); vars.put("liferay:mainPath", mainPath); vars.put("liferay:plid", layout.getPlid()); vars.putAll(layout.getLayoutType().getTypeSettingsProperties()); String href = PropsU... |
log().warn("Shutting down", e); | log().verbose("Shutting down", e); | public void run() { while (!Thread.currentThread().isInterrupted()) { try { // accept a clients socket and add it to the connection pool if (logVerbose) { log().verbose( "Listening for new connections on " + serverSocket); ... |
public void setDefault(String name, int value); | public void setDefault(String name, double value); | public void setDefault(String name, int value); |
this.window = window; | public FocusCommandAction(IWorkbenchWindow window, CommandStatusLineContribution commandInput) { this.window = window; setId(ID); setActionDefinitionId(ID); setText("Goto &command input area"); setToolTipText("Put the cursor in the command input area"); setImageDescriptor(PhotonPlugin.getImageDescriptor(IImageKe... | |
fireScansStarted(); | fireMaintanceStarted(); | public void run() { long waitTime = getController().getWaitTime() * 12; if (getController().isUIEnabled()) { // Wait to build up ui try { // inital wait before first scan synchronized (scanTrigger) { scanTrigger.wait(getController(... |
fireScansFinished(); | fireMaintenanceFinished(); | public void run() { long waitTime = getController().getWaitTime() * 12; if (getController().isUIEnabled()) { // Wait to build up ui try { // inital wait before first scan synchronized (scanTrigger) { scanTrigger.wait(getController(... |
java.lang.String name, double version) | java.lang.String name) | public static void deleteFileEntry(java.lang.String folderId, java.lang.String name, double version) throws com.liferay.portal.PortalException, java.rmi.RemoteException, com.liferay.portal.SystemException { DLFileEntryService dlFileEntryService = DLFileEntryServiceFactory.getService(); dlFileEntryService.delete... |
dlFileEntryService.deleteFileEntry(folderId, name, version); | dlFileEntryService.deleteFileEntry(folderId, name); | public static void deleteFileEntry(java.lang.String folderId, java.lang.String name, double version) throws com.liferay.portal.PortalException, java.rmi.RemoteException, com.liferay.portal.SystemException { DLFileEntryService dlFileEntryService = DLFileEntryServiceFactory.getService(); dlFileEntryService.delete... |
declareIdeWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_ERROR_PATH, PATH_OBJECT + "error_tsk.gif", true); declareIdeWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_WARNING_PATH, PATH_OBJECT + "warn_tsk.gif", true); declareIdeWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_INF... | private void declareIdeWorkbenchImages() { final String ICONS_PATH = "$nl$/icons/full/";//$NON-NLS-1$ final String PATH_ETOOL = ICONS_PATH + "etool16/"; // Enabled toolbar icons.//$NON-NLS-1$ Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH); declareIdeWorkbenchImage(ideBundle, IDEInternal... | |
if (compareVal > 0){ | if (compareVal > 0 || (compareVal == 0 && holder.getMessageReference() > latestMessage.getMessageReference())) { | public MessageHolder evaluate(List<MessageHolder> arg0) { MessageHolder latestMessage = null; for (MessageHolder holder : arg0) { Message message = holder.getMessage(); if (filter(holder)) { try { if (latestMessage == null){ latestMessage = holder; } else { Date newTime = message.getUtcTimeS... |
public static java.util.List getArticles(java.lang.String groupId, int begin, int end) throws com.liferay.portal.SystemException { | public static java.util.List getArticles(java.lang.String groupId) throws com.liferay.portal.SystemException { | public static java.util.List getArticles(java.lang.String groupId, int begin, int end) throws com.liferay.portal.SystemException { try { JournalArticleLocalService journalArticleLocalService = JournalArticleLocalServiceFactory.getService(); return journalArticleLocalService.getArticles(groupId, begin, end); } ... |
return journalArticleLocalService.getArticles(groupId, begin, end); | return journalArticleLocalService.getArticles(groupId); | public static java.util.List getArticles(java.lang.String groupId, int begin, int end) throws com.liferay.portal.SystemException { try { JournalArticleLocalService journalArticleLocalService = JournalArticleLocalServiceFactory.getService(); return journalArticleLocalService.getArticles(groupId, begin, end); } ... |
log().verbose( "Listening for new connections on " + serverSocket); | if (logVerbose) { log().verbose( "Listening for new connections on " + serverSocket); } | public void run() { while (!Thread.currentThread().isInterrupted()) { try { // accept a clients socket and add it to the connection pool log().verbose( "Listening for new connections on " + serverSocket); Socket nodeSocket = serverSoc... |
log().verbose( "Incoming connection from: " + nodeSocket.getInetAddress() + ":" + nodeSocket.getPort()); | if (logVerbose) { log().verbose( "Incoming connection from: " + nodeSocket.getInetAddress() + ":" + nodeSocket.getPort()); } | public void run() { while (!Thread.currentThread().isInterrupted()) { try { // accept a clients socket and add it to the connection pool log().verbose( "Listening for new connections on " + serverSocket); Socket nodeSocket = serverSoc... |
networkingMode = null; | public void setNetworkingMode(NetworkingMode newMode) { networkingMode = null; log().debug("setNetworkingMode: " + newMode); String oldValue = getNetworkingMode().name(); if (!newMode.equals(oldValue)) { ConfigurationEntry.NETWORKING_MODE.setValue(this, newMode.name()); ... | |
String oldValue = getNetworkingMode().name(); | NetworkingMode oldValue = getNetworkingMode(); | public void setNetworkingMode(NetworkingMode newMode) { networkingMode = null; log().debug("setNetworkingMode: " + newMode); String oldValue = getNetworkingMode().name(); if (!newMode.equals(oldValue)) { ConfigurationEntry.NETWORKING_MODE.setValue(this, newMode.name()); ... |
Message executionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2001", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.BUY, new BigDecimal(1000), new BigDecimal(789), null, null, new BigDecimal(1000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("ASDF")); | Message executionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2001", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.BUY, new BigDecimal(1000), new BigDecimal(789), null, null, new BigDecimal(1000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("ASDF"), null); | public void testAddFIXMessageListener() throws NoSuchFieldException, IllegalAccessException { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); ... |
Message message = FIXMessageUtil.newExecutionReport(orderID1, clOrderID1, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol); | Message message = FIXMessageUtil.newExecutionReport(orderID1, clOrderID1, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol, null); | public void testAddIncomingMessage() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStat... |
Message message2 = FIXMessageUtil.newExecutionReport(orderID2, clOrderID2, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol); | Message message2 = FIXMessageUtil.newExecutionReport(orderID2, clOrderID2, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol, null); | public void testAddIncomingMessage() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStat... |
Message message = FIXMessageUtil.newExecutionReport(orderID1, clOrderID1, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol); | Message message = FIXMessageUtil.newExecutionReport(orderID1, clOrderID1, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol, null); | public void testAveragePriceList() throws Exception { FIXMessageHistory messageHistory = getMessageHistory(); InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "300"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordS... |
message = FIXMessageUtil.newExecutionReport(orderID1, clOrderID1, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol); | message = FIXMessageUtil.newExecutionReport(orderID1, clOrderID1, execID, execTransType, execType, ordStatus, side, orderQty, orderPrice, lastQty, lastPrice, leavesQty, cumQty, avgPrice, symbol, null); | public void testAveragePriceList() throws Exception { FIXMessageHistory messageHistory = getMessageHistory(); InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "300"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordS... |
Message executionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2001", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.BUY, new BigDecimal(1000), new BigDecimal(789), null, null, new BigDecimal(1000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("ASDF")); | Message executionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2001", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.BUY, new BigDecimal(1000), new BigDecimal(789), null, null, new BigDecimal(1000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("ASDF"), null); | public void testGetLatestExecutionReports() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); Message executionReportForOrd... |
Message executionReportForOrder2 = FIXMessageUtil.newExecutionReport(new InternalID("1003"), new InternalID("3"), "2003", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.SELL, new BigDecimal(2000), new BigDecimal(789), null, null, new BigDecimal(2000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("QWER")); | Message executionReportForOrder2 = FIXMessageUtil.newExecutionReport(new InternalID("1003"), new InternalID("3"), "2003", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.SELL, new BigDecimal(2000), new BigDecimal(789), null, null, new BigDecimal(2000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("QWER"), null); | public void testGetLatestExecutionReports() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); Message executionReportForOrd... |
Message secondExecutionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2004", ExecTransType.STATUS, ExecType.PARTIAL_FILL, OrdStatus.PARTIALLY_FILLED, Side.BUY, new BigDecimal(1000), new BigDecimal(789), new BigDecimal(100), new BigDecimal("11.5"), new BigDecimal(900), ... | Message secondExecutionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2004", ExecTransType.STATUS, ExecType.PARTIAL_FILL, OrdStatus.PARTIALLY_FILLED, Side.BUY, new BigDecimal(1000), new BigDecimal(789), new BigDecimal(100), new BigDecimal("11.5"), new BigDecimal(900), ... | public void testGetLatestExecutionReports() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); Message executionReportForOrd... |
Message executionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2001", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.BUY, new BigDecimal(1000), new BigDecimal(789), null, null, new BigDecimal(1000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("ASDF")); | Message executionReportForOrder1 = FIXMessageUtil.newExecutionReport(new InternalID("1001"), new InternalID("1"), "2001", ExecTransType.NEW, ExecType.NEW, OrdStatus.NEW, Side.BUY, new BigDecimal(1000), new BigDecimal(789), null, null, new BigDecimal(1000), BigDecimal.ZERO, BigDecimal.ZERO, new MSymbol("ASDF"), null); | public void testRemovePortfolioListener() throws NoSuchFieldException, IllegalAccessException { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT"));... |
tempMap.put(symbolSide, computeAveragePrice(tempMap.get(symbol), message)); | tempMap.put(symbolSide, computeAveragePrice(tempMap.get(symbolSide), message)); | public FIXMessageHistory getAveragePriceHistory() { ArrayList<MessageHolder> messages = new ArrayList<MessageHolder>(); Map<SymbolSide, Message> tempMap = new HashMap<SymbolSide, Message>(); for (MessageHolder holder : messageList) { if (holder instanceof IncomingMessageHolder) { IncomingMessageHolder inHolder... |
LoggerAdapter.error("Failed while sending a message", ex, this); throw new RuntimeException("Failed while sending a message", ex); | LoggerAdapter.error(MessageKey.JMS_SEND_ERROR.getLocalizedMessage(), ex, this); throw new RuntimeException(MessageKey.JMS_SEND_ERROR.getLocalizedMessage(), ex); | protected void sendHelper(quickfix.Message inMessage) { if(LoggerAdapter.isDebugEnabled(this)) { try { if (HEARTBEAT_CHAR != inMessage.getHeader().getChar(MsgType.FIELD)) { LoggerAdapter.debug("FixSource received incoming msg: " + inMessage, this); ... |
LoggerAdapter.info("Initializing plugin ["+pluginName+"]", this); | LoggerAdapter.info(MessageKey.JCYCLONE_PLUGIN_INIT.getLocalizedMessage(pluginName), this); | public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { if(LoggerAdapter.isInfoEnabled(this)) { LoggerAdapter.info("Initializing plugin ["+pluginName+"]", this); } // lookup next stage. Since jcyclone doesn't provide a separate conf... |
cbCreateShortcut = new JCheckBox(Translation .getTranslation((String) getUIController().getFolderCreateShortcutAction() .getValue(Action.NAME))); | cbCreateShortcut = new JCheckBox((String) getUIController().getFolderCreateShortcutAction() .getValue(Action.NAME)); | protected void initCustomComponents() { storeInvitationBox = new JCheckBox(Translation .getTranslation("foldercreate.dialog.saveinvitation")); cbCreateShortcut = new JCheckBox(Translation .getTranslation((String) getUIController().getFolderCreateShortcutAction() ... |
cbCreateShortcut.setEnabled(getUIController().getFolderCreateShortcutAction() .getValue(CreateShortcutAction.SUPPORTED) == Boolean.TRUE); | protected void initCustomComponents() { storeInvitationBox = new JCheckBox(Translation .getTranslation("foldercreate.dialog.saveinvitation")); cbCreateShortcut = new JCheckBox(Translation .getTranslation((String) getUIController().getFolderCreateShortcutAction() ... | |
public Document(String initialContent) { | public Document() { | public Document(String initialContent) { super(); setTextStore(new GapTextStore(50, 300)); setLineTracker(new DefaultLineTracker()); getStore().set(initialContent); getTracker().set(initialContent); completeInitialization(); } |
setLineTracker(new DefaultLineTracker()); getStore().set(initialContent); getTracker().set(initialContent); | setLineTracker(new DefaultLineTracker()); | public Document(String initialContent) { super(); setTextStore(new GapTextStore(50, 300)); setLineTracker(new DefaultLineTracker()); getStore().set(initialContent); getTracker().set(initialContent); completeInitialization(); } |
public FilenameProblemDialog(Controller controller, boolean modal, ScanResult scanResult) { super(controller, modal); | public FilenameProblemDialog(Controller controller, ScanResult scanResult) { super(controller); | public FilenameProblemDialog(Controller controller, boolean modal, ScanResult scanResult) { super(controller, modal); this.scanResult = scanResult; problemList = new ArrayList<FileInfo>(scanResult.getProblemFiles() .keySet()); solutionsMap = new HashMap<FileInfo, Sol... |
setVisible(false); close(); | dialog.setVisible(false); dialog.dispose(); dialog = null; | public void actionPerformed(ActionEvent e) { setVisible(false); close(); } |
setVisible(false); close(); | dialog.setVisible(false); dialog.dispose(); dialog = null; | public void actionPerformed(ActionEvent e) { log().debug("okButton pressed"); doSolutions(); setVisible(false); close(); } |
table.setRowHeight(100); | table.setRowHeight(105); | private void setColumnSizes(JTable table) { table.setRowHeight(100); // otherwise the table header may not be visible: table.getTableHeader().setPreferredSize(new Dimension(600, 20)); TableColumn column = table.getColumn(table.getColumnName(0)); column.setPreferredWidth(150); ... |
TestHelper.waitMilliSeconds(100); | public void testAbortUpload() { assertEquals(0, bartModelListener.events.size()); // Create a 10 megs file TestHelper.createRandomFile(getFolderAtBart().getLocalBase(), 20000000); getFolderAtBart().forceScanOnNextMaintenance(); getFolderAtBart().maintain(); TestHelper.waitF... | |
FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_3_BEGIN_STRING); assertEquals(FIXDataDictionaryManager.FIX_4_3_BEGIN_STRING, FIXDataDictionaryManager.getDictionary().getVersion()); FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_4_BEGIN_STRING); assertEquals(FIXDataDictionary... | public void testGetDataDictionary() throws Exception { FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING); assertEquals(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING, FIXDataDictionaryManager.getDictionary().getVersion()); } | |
public static User getSelectedUser(ActionRequest req) | public static User getSelectedUser(HttpServletRequest req) | public static User getSelectedUser(ActionRequest req) throws PortalException, SystemException { ActionRequestImpl reqImpl = (ActionRequestImpl)req; return getSelectedUser(reqImpl.getHttpServletRequest()); } |
ActionRequestImpl reqImpl = (ActionRequestImpl)req; | String emailAddress = ParamUtil.getString(req, "p_u_e_a"); | public static User getSelectedUser(ActionRequest req) throws PortalException, SystemException { ActionRequestImpl reqImpl = (ActionRequestImpl)req; return getSelectedUser(reqImpl.getHttpServletRequest()); } |
return getSelectedUser(reqImpl.getHttpServletRequest()); | User user = null; try { user = UserServiceUtil.getUserByEmailAddress( getCompanyId(req), emailAddress); } catch (NoSuchUserException nsue) { } return user; | public static User getSelectedUser(ActionRequest req) throws PortalException, SystemException { ActionRequestImpl reqImpl = (ActionRequestImpl)req; return getSelectedUser(reqImpl.getHttpServletRequest()); } |
public static void clearResponses(PortletSession ses) { | public static void clearResponses(HttpSession ses) { | public static void clearResponses(PortletSession ses) { getResponses(ses).clear(); } |
setupTestFolder(SyncProfile.AUTO_DOWNLOAD_FROM_ALL); | joinTestFolder(SyncProfile.AUTO_DOWNLOAD_FROM_ALL); | protected void setUp() throws Exception { super.setUp(); // Join on testfolder setupTestFolder(SyncProfile.AUTO_DOWNLOAD_FROM_ALL); } |
public CheckboxTableViewer(Composite parent, int style) { this(createTable(parent, style)); | public CheckboxTableViewer(Composite parent) { this(parent, SWT.BORDER); | public CheckboxTableViewer(Composite parent, int style) { this(createTable(parent, style));} |
public void addMessageResources( com.liferay.portlet.messageboards.model.MBCategory category, com.liferay.portlet.messageboards.model.MBMessage message, boolean addCommunityPermissions, boolean addGuestPermissions) | public void addMessageResources(java.lang.String categoryId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) | public void addMessageResources( com.liferay.portlet.messageboards.model.MBCategory category, com.liferay.portlet.messageboards.model.MBMessage message, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
public void deleteMessage( com.liferay.portlet.messageboards.model.MBMessage message) | public void deleteMessage(java.lang.String messageId) | public void deleteMessage( com.liferay.portlet.messageboards.model.MBMessage message) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
com.liferay.portlet.messageboards.model.MBMessage message, java.lang.String userId) | java.lang.String messageId, java.lang.String userId) | public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay( com.liferay.portlet.messageboards.model.MBMessage message, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
LoggerAdapter.error("Failed while sending a message to the next stage.", ex, this); throw new MarketceteraEventHandlerException("Failed while sending a message to next stage", ex); | LoggerAdapter.error(MessageKey.JCYCLONE_ERROR_SEND_NEXT_STAGE.getLocalizedMessage(), ex, this); throw new MarketceteraEventHandlerException(MessageKey.JCYCLONE_ERROR_SEND_NEXT_STAGE.getLocalizedMessage(), ex); | public void handleEvent(IElement inEvent) throws EventHandlerException { Object theEvent = ((StageElement)inEvent).getElement(); if(theEvent instanceof quickfix.Message) { Message message = (Message) theEvent; try { modifyOrder(message); // if single... |
LoggerAdapter.error("Unexpected message type "+theEvent, this); | LoggerAdapter.error(MessageKey.FIX_UNEXPECTED_MSGTYPE.getLocalizedMessage(theEvent), this); | public void handleEvent(IElement inEvent) throws EventHandlerException { Object theEvent = ((StageElement)inEvent).getElement(); if(theEvent instanceof quickfix.Message) { Message message = (Message) theEvent; try { modifyOrder(message); // if single... |
LoggerAdapter.error("Ignoring default propName "+propName + " since int value couldn't be parsed", ex, this); | LoggerAdapter.error(OMSMessageKey.ERROR_INIT_PROPNAME_IGNORE.getLocalizedMessage(propName), ex, this); | protected void readDefaultFieldsHelper(ConfigData inProps, String propName, String propPrefix, DefaultOrderModifier inOrderModifier, DefaultOrderModifier.MessageFieldType fieldType) { String realFieldName = propName.substr... |
LoggerAdapter.error("Exception: "+msg + " caused by message: "+origMessage, causeEx, this); | LoggerAdapter.error(OMSMessageKey.MESSAGE_EXCEPTION.getLocalizedMessage(new Object[]{msg, origMessage}), causeEx, this); | protected void sendRejectionMessage(Exception causeEx, Message origMessage) throws MarketceteraEventHandlerException { Message rejection = createRejectionMessage(origMessage); String msg = (causeEx.getMessage() == null) ? causeEx.toString() : causeEx.getMessage(); LoggerAdapter.er... |
LoggerAdapter.error("Failed while sending a message", ex, this); throw new MarketceteraEventHandlerException("Failed while sending a message", ex); | LoggerAdapter.error(MessageKey.JMS_SEND_ERROR.getLocalizedMessage(), ex, this); throw new MarketceteraEventHandlerException(MessageKey.JMS_SEND_ERROR.getLocalizedMessage(), ex); | protected void sendRejectionMessage(Exception causeEx, Message origMessage) throws MarketceteraEventHandlerException { Message rejection = createRejectionMessage(origMessage); String msg = (causeEx.getMessage() == null) ? causeEx.toString() : causeEx.getMessage(); LoggerAdapter.er... |
LoggerAdapter.info("Initializing stage "+config.getStage().getName(), this); | LoggerAdapter.info(MessageKey.JCYCLONE_STAGE_INIT.getLocalizedMessage(config.getStage().getName()), this); | public void init(IConfigData config) throws Exception { if(LoggerAdapter.isInfoEnabled(this)) { LoggerAdapter.info("Initializing stage "+config.getStage().getName(), this); } String nextHandlerName = config.getString(JCycloneConstants.NEXT_STAGE); if(nextHandlerName!=null) { ... |
folderBart.scanLocalFiles(true); | folderBart.forceScanOnNextMaintenance(); folderBart.maintain(); | public void testAbortUpload() { // Create a 10 megs file TestHelper.createRandomFile(folderBart.getLocalBase(), 10000000); folderBart.scanLocalFiles(true); TestHelper.waitForCondition(2, new TestHelper.Condition() { public boolean reached() { return getContoller... |
folderBart.scanLocalFiles(true); | folderBart.forceScanOnNextMaintenance(); folderBart.maintain(); | public void testDisconnectWhileUpload() { // Create a 10 megs file TestHelper.createRandomFile(folderBart.getLocalBase(), 10000000); folderBart.scanLocalFiles(true); TestHelper.waitForCondition(2, new TestHelper.Condition() { public boolean reached() { return ba... |
folderBart.scanLocalFiles(true); | folderBart.forceScanOnNextMaintenance(); folderBart.maintain(); | public void testDuplicateRequestedUpload() throws ConnectionException { // Create a 10 megs file TestHelper.createRandomFile(folderBart.getLocalBase(), 10000000); folderBart.scanLocalFiles(true); // wait for 1 active upload TestHelper.waitForCondition(2, new TestHelper.Condition()... |
folderBart.scanLocalFiles(true); | folderBart.forceScanOnNextMaintenance(); folderBart.maintain(); | public void testRunningUpload() { // Create a 10 megs file TestHelper.createRandomFile(folderBart.getLocalBase(), 10000000); folderBart.scanLocalFiles(true); TestHelper.waitForCondition(2, new TestHelper.Condition() { public boolean reached() { return bartModel.... |
folderBart.scanLocalFiles(true); | folderBart.forceScanOnNextMaintenance(); folderBart.maintain(); | public void testSingleFileUpload() { TestHelper.createRandomFile(folderBart.getLocalBase()); folderBart.scanLocalFiles(true); // Copy TestHelper.waitMilliSeconds(1500); // No upload in tablemodel assertEquals(0, bartModel.getRowCount()); // Check correct events from ... |
List<File> returnValues = new ArrayList(); | List<File> returnValues = new ArrayList<File>(); | private List<File> getSelectedFiles() { Object[] selectedValues = getSelectionModel().getSelections(); if (selectedValues == null || selectedValues.length == 0) { return null; } // check for dirs: List<File> returnValues = new ArrayList(); for (int i = 0; i < sel... |
if (comparator != null) { comparator.setDirectory(directory); | if (fileInfoComparatorType != -1) { FileInfoComparator comparator = new FileInfoComparator(fileInfoComparatorType, directory); | private boolean sort(List dispList) { if (comparator != null) { comparator.setDirectory(directory); if (sortAscending) { Collections.sort(dispList, comparator); } else { Collections.sort(dispList, new ReverseComparator(comparator)); } ... |
log().verbose("Received " + message); | log().verbose("FileListChange received: " + message); | public void handleMessage(Message message) { if (message == null) { throw new NullPointerException( "Unable to handle message, message is null"); } // related folder is filled if message is a folder related message FolderInfo targetedFolderInfo = null; Fo... |
public IRubyObject call(IRubyObject[] args, IRubyObject replacementSelf) { Ruby runtime = self.getRuntime(); ThreadContext context = runtime.getCurrentContext(); Block oldBlock = context.getBlockStack().getCurrent(); Block newBlock = this.cloneBlock(); if (replacementSelf != null) { newBlock.self = replacementSelf; } c... | public IRubyObject call(IRubyObject[] args) { return call(args, null); | public IRubyObject call(IRubyObject[] args, IRubyObject replacementSelf) { Ruby runtime = self.getRuntime(); ThreadContext context = runtime.getCurrentContext(); Block oldBlock = context.getBlockStack().getCurrent(); Block newBlock = this.cloneBlock(); if (replacementSelf != null)... |
setupTestFolder(SyncProfile.MANUAL_DOWNLOAD); | joinTestFolder(SyncProfile.MANUAL_DOWNLOAD); | protected void setUp() throws Exception { super.setUp(); // Join on testfolder setupTestFolder(SyncProfile.MANUAL_DOWNLOAD); } |
File file = new File("debug/nodeinfos/" + fileName); | File file = new File(Logger.getDebugDir(), "nodeinfos/" + fileName); | public static String loadDebugReport(MemberInfo node) { Reject.ifNull(node, "Node is null"); String fileName = "Node." + node.nick + ".report.txt"; try { File file = new File("debug/nodeinfos/" + fileName); InputStream fIn = new BufferedInputStream(new FileInputStream(file... |
new File("debug/nodeinfos").mkdirs(); | File dir = new File(Logger.getDebugDir(), "nodeinfos"); dir.mkdirs(); | public static boolean writeNodeInformation(NodeInformation nodeInfo) { if (nodeInfo == null) { throw new NullPointerException("NodeInfo is null"); } String fileName; if (nodeInfo.node != null) { fileName = "Node." + nodeInfo.node.nick + ".report.txt"; } else ... |
"debug/nodeinfos/" + fileName)); | new File(dir, fileName))); | public static boolean writeNodeInformation(NodeInformation nodeInfo) { if (nodeInfo == null) { throw new NullPointerException("NodeInfo is null"); } String fileName; if (nodeInfo.node != null) { fileName = "Node." + nodeInfo.node.nick + ".report.txt"; } else ... |
"debug/" + fileName)); | new File(Logger.getDebugDir() , fileName))); | public static void writeNodeList(Collection<Member> nodes, String fileName) { Reject.ifNull(nodes, "Nodelist is null"); try { OutputStream fOut = new BufferedOutputStream(new FileOutputStream( "debug/" + fileName)); for (Member node : nodes) { fOu... |
"debug/" + fileName)); | new File(Logger.getDebugDir(), fileName))); | public static void writeNodeListCSV(Collection<Member> nodes, String fileName) { Reject.ifNull(nodes, "Nodelist is null"); try { OutputStream fOut = new BufferedOutputStream(new FileOutputStream( "debug/" + fileName)); fOut .write("connect;... |
return new TestSuite(OrderLoaderTest.class); | return new MarketceteraTestSuite(OrderLoaderTest.class, OrderLoader.OL_MESSAGE_BUNDLE_INFO); | public static Test suite() { LoggerAdapter.initializeLogger("test");/* TestSuite suite = new TestSuite(); suite.addTest(new OrderLoaderTest("testEndToEndCustom")); suite.addTest(new OrderLoaderTest("testWithCustomField")); return suite;*/ return new TestSuite(OrderLoader... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.