rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
DocumentListItem.create(d, keys.contains(d.getId()))); | DocumentListItem.create( d, ArtifactUtil.isKeyHolder(d.getId()))); | private void reloadDocuments() { final Object[] elements = ((CompositeFlatContentProvider) contentProvider).getElements(0, null); Document d; for(final Object e : elements) { d = (Document) e; jListModel.addElement( DocumentListItem.create(d, keys.contains(d.getId()))); } } |
public abstract IQ handleIQ(final IQ iq, final Session session) throws ParityServerModelException, UnauthorizedException; | public IQ handleIQ(final IQ iq) throws UnauthorizedException { logger.debug(iq); try { final Session session = new Session() { final JID jid = iq.getFrom(); final JabberId jabberId = JabberIdBuilder.parseQualifiedJabberId(jid.toString()); public JabberId getJabberId() { return jabberId; } public JID getJID() { return j... | public abstract IQ handleIQ(final IQ iq, final Session session) throws ParityServerModelException, UnauthorizedException; |
webPageJLabel.setText(bundle.getString("DisplayInfoAvatar.WebPage")); | webPageJLabel.setText(bundle.getString("DisplayInfoAvatar.ExampleWebPage")); | private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; logoJLabel = new javax.swing.JLabel(); versionJLabel = new javax.swing.JLabel(); buildJLabel = new javax.swing.JLabel(); copyrightJLabel = new javax.swing.JLabel(); fillLeftJLabel = new javax.sw... |
webPageJLabel.setText(getString("WebPage", new Object[] {getWebPageString()})); | private void initWebPageJLabel() { // TODO Get www.thinkparity.com from somewhere. Below returns thinkparity.dyndns.org //final String webPage = LinkFactory.getInstance(Application.OPHELIA, Version.getMode()).create().toString(); //webPageJLabel.setText(webPage); } | |
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http: | String runString = "rundll32 url.dll,FileProtocolHandler " + getWebPage(); Runtime.getRuntime().exec(runString); | private void webPageJLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_webPageJLabelMouseClicked try { Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.thinkparity.com/"); } catch (final Throwable t) { throw new BrowserException(LAUNCH_... |
webPageJLabel.setText(getString("WebPageHighlighted")); | webPageJLabel.setText(getString("WebPageHighlighted", new Object[] {getWebPageString()})); | private void webPageJLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_webPageJLabelMouseEntered webPageJLabel.setText(getString("WebPageHighlighted")); setCursor(new Cursor(Cursor.HAND_CURSOR)); }//GEN-LAST:event_webPageJLabelMouseEntered |
webPageJLabel.setText(getString("WebPage")); | webPageJLabel.setText(getString("WebPage", new Object[] {getWebPageString()})); | private void webPageJLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_webPageJLabelMouseExited webPageJLabel.setText(getString("WebPage")); setCursor(null); }//GEN-LAST:event_webPageJLabelMouseExited |
protected Avatar(final String l18nContext, final Color background) { this(l18nContext, ScrollPolicy.NONE, background); } | protected Avatar(final AvatarId id) { this(id.toString()); } | protected Avatar(final String l18nContext, final Color background) { this(l18nContext, ScrollPolicy.NONE, background); } |
protected String getString(final String localKey, final Object[] arguments) { return localization.getString(localKey, arguments); | protected String getString(final String localKey) { return localization.getString(localKey); | protected String getString(final String localKey, final Object[] arguments) { return localization.getString(localKey, arguments); } |
logger.info("audit(CloseEvent)"); | logger.info("[LMODEL] [AUDIT] [AUDIT CLOSE]"); | void audit(final CloseEvent closeEvent) { logger.info("audit(CloseEvent)"); logger.debug(closeEvent); auditIO.audit(closeEvent); } |
logger.info("delete(Long)"); | logger.info("[LMODEL] [AUDIT] [DELETE]"); | void delete(final Long artifactId) { logger.info("delete(Long)"); logger.debug(artifactId); auditIO.delete(artifactId); } |
logger.info("list(Long)"); | logger.info("[LMODEL] [AUDIT] [READ]"); | Collection<AuditEvent> read(final Long artifactId) { logger.info("list(Long)"); logger.debug(artifactId); return auditIO.list(artifactId); } |
final Long documentId) { | final Long documentId, final Integer eTeamSize) { | private Fixture(final ArtifactModel aModel, final DocumentModel dModel, final Long documentId) { this.aModel = aModel; this.dModel = dModel; this.documentId = documentId; } |
this.eTeamSize = eTeamSize; | private Fixture(final ArtifactModel aModel, final DocumentModel dModel, final Long documentId) { this.aModel = aModel; this.dModel = dModel; this.documentId = documentId; } | |
data = new LinkedList<Fixture>(); | protected void setUp() throws Exception { super.setUp(); data = new LinkedList<Fixture>(); final ArtifactModel aModel = getArtifactModel(); final DocumentModel dModel = getDocumentModel(); final SessionModel sModel = getSessionModel(); final ModelTestUser userX = ModelTestUser.getX(); //... | |
final SessionModel sModel = getSessionModel(); final ModelTestUser userX = ModelTestUser.getX(); | protected void setUp() throws Exception { super.setUp(); data = new LinkedList<Fixture>(); final ArtifactModel aModel = getArtifactModel(); final DocumentModel dModel = getDocumentModel(); final SessionModel sModel = getSessionModel(); final ModelTestUser userX = ModelTestUser.getX(); //... | |
data.add(new Fixture(aModel, dModel, d0.getId())); final File file1 = getInputFiles()[1]; final Document d1 = dModel.create(file1.getName(), file1.getName(), file1); addTeam(d1); modifyDocument(d1); dModel.publish(d1.getId()); sModel.sendKeyResponse(d1.getId(), userX.getJabberId(), KeyResponse.ACCEPT); data.add(new Fi... | datum = new Fixture(aModel, dModel, d0.getId(), aModel.readTeam(d0.getId()).size()); | protected void setUp() throws Exception { super.setUp(); data = new LinkedList<Fixture>(); final ArtifactModel aModel = getArtifactModel(); final DocumentModel dModel = getDocumentModel(); final SessionModel sModel = getSessionModel(); final ModelTestUser userX = ModelTestUser.getX(); //... |
data.clear(); data = null; | datum = null; | protected void tearDown() throws Exception { data.clear(); data = null; super.tearDown(); } |
Document document; Set<User> team; for(final Fixture datum : data) { try { datum.dModel.close(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } | try { datum.dModel.close(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } | public void testClose() { testLogger.info("[LMODEL] [DOCUMENT] [TEST CLOSE]"); Document document; Set<User> team; for(final Fixture datum : data) { try { datum.dModel.close(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } ... |
document = null; try { document = datum.dModel.get(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } assertNotNull("[LMODEL] [DOCUMENT] [TEST CLOSE] [DOCUMENT IS NULL]", document); assertEquals("[LMODEL] [DOCUMENT] [TEST CLOSE] [NON-CLOSED DOCUMENT STATE]", document.getState(), Artif... | Document document = null; try { document = datum.dModel.get(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } assertNotNull("[LMODEL] [DOCUMENT] [TEST CLOSE] [DOCUMENT IS NULL]", document); assertEquals("[LMODEL] [DOCUMENT] [TEST CLOSE] [NON-CLOSED DOCUMENT STATE]", document.getState... | public void testClose() { testLogger.info("[LMODEL] [DOCUMENT] [TEST CLOSE]"); Document document; Set<User> team; for(final Fixture datum : data) { try { datum.dModel.close(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } ... |
team = datum.aModel.readTeam(datum.documentId); assertNotNull("[LMODEL] [DOCUMENT] [TEST CLOSE] [TEAM IS NULL]", team); assertEquals("[LMODEL] [DOCUMENT] [TEST CLOSE] [NON-ZERO TEAM SIZE]", team.size(), 0); } | final Set<User> team = datum.aModel.readTeam(datum.documentId); assertNotNull("[LMODEL] [DOCUMENT] [TEST CLOSE] [TEAM IS NULL]", team); assertEquals("[LMODEL] [DOCUMENT] [TEST CLOSE] [NON-ZERO TEAM SIZE]", datum.eTeamSize.intValue(), team.size()); | public void testClose() { testLogger.info("[LMODEL] [DOCUMENT] [TEST CLOSE]"); Document document; Set<User> team; for(final Fixture datum : data) { try { datum.dModel.close(datum.documentId); } catch(final ParityException px) { fail(createFailMessage(px)); } ... |
case DOCUMENT_HISTORY_LIST: | case DOCUMENT_HISTORY: | public static Avatar create(final AvatarId id) { switch(id) { case BROWSER_LOGO: return SINGLETON.createBrowserLogo(); case BROWSER_MAIN: return SINGLETON.createBrowserMain(); case BROWSER_TITLE: return SINGLETON.createBrowserTitle(); case DOCUMENT_HISTORY_LIST: return SINGLETON.createDocumentHistoryList(... |
documentHistoryList = new DocumentHistoryListAvatar(controller); | documentHistoryList = new DocumentHistoryAvatar(controller); | private Avatar createDocumentHistoryList() { if(null == documentHistoryList) { documentHistoryList = new DocumentHistoryListAvatar(controller); documentHistoryList.setContentProvider(ProviderFactory.getHistoryProvider()); } return documentHistoryList; } |
case CONFIRM_DIALOGUE: avatar = createConfirmDialogue(); break; | private Avatar doCreate(final AvatarId id) { final Avatar avatar; switch(id) { case BROWSER_INFO: avatar = createBrowserInfo(); break; case BROWSER_MAIN: avatar = createBrowserMain(); break; case BROWSER_TITLE: avatar = createBrowserTitle(); break; case DOCUMENT_HISTORY3: avatar = createDocumentHis... | |
CopyActionEnforcer.applyEnforcer(this); | BrowserInfoAvatar() { super("BrowserInfo"); setLayout(new GridBagLayout()); setOpaque(false); setTransferHandler(new CreateDocumentTxHandler(getController())); initComponents(); } | |
@Override protected Map<User, ArtifactReceipt> readPublishedTo(final UUID uniqueId, final Long versionId) { return Collections.emptyMap(); } | static final <T extends Artifact, U extends ArtifactVersion> BackupReader<T, U> emptyReader() { return new BackupReader<T, U>() { @Override public List<T> read() { return Collections.emptyList(); } @Override public T read(final UUID unique... | |
protected Map<User, ArtifactReceipt> readPublishedTo(final UUID uniqueId, final Long versionId) { | public Map<User, ArtifactReceipt> readPublishedTo( final UUID uniqueId, final Long versionId) { | protected Map<User, ArtifactReceipt> readPublishedTo(final UUID uniqueId, final Long versionId) { return Collections.emptyMap(); } |
protected abstract Map<User, ArtifactReceipt> readPublishedTo(final UUID uniqueId, final Long versionId); | public abstract Map<User, ArtifactReceipt> readPublishedTo( final UUID uniqueId, final Long versionId); | protected abstract Map<User, ArtifactReceipt> readPublishedTo(final UUID uniqueId, final Long versionId); |
.add(searchPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE) .addContainerGap()) | .add(searchPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)) | private void initComponents() { com.thinkparity.browser.application.browser.display.avatar.MainTitleAvatarSearchPanel searchPanel; searchPanel = new com.thinkparity.browser.application.browser.display.avatar.MainTitleAvatarSearchPanel(); tabPanel = new com.thinkparity.browser.application.browse... |
if(graphical) { System.setProperty("swing.aatext", "true"); try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} } | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... | |
boolean errorsFound = false; | int errorsReported = 0; int warningsReported = 0; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
DMGBlock currentBlock = new DMGBlock(blockType, skipped, outOffset, outSize, inOffset, inSize); blocks.add(currentBlock); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... | |
if(addInOffset) | if(addInOffset) { if(DEBUG) println("!-----addInOffset mode: inOffset tranformation " + inOffset + "->" + (inOffset+lastInOffset)); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
inOffset += lastInOffset; | inOffset = lastInOffset; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_ADC not supported."); | println(" " + elementNumber + ":" + blockCount + ". ERROR: BT_ADC not supported."); ++errorsReported; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_ZLIB processing..."); | println(" " + elementNumber + ":" + blockCount + ". BT_ZLIB processing..."); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_ZLIB FP != outOffset (" + | println(" " + elementNumber + ":" + blockCount + ". WARNING: BT_ZLIB FP != outOffset (" + | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_ZLIB Could not decode..."); | println(" " + elementNumber + ":" + blockCount + ". ERROR: BT_ZLIB Could not decode..."); ++errorsReported; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
errorsFound = true; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... | |
println(" " + blockCount + ". BT_BZIP2 not currently supported."); | println(" " + elementNumber + ":" + blockCount + ". ERROR: BT_BZIP2 not currently supported."); ++errorsReported; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_COPY processing..."); if(!testOnly && isoRaf.getFilePointer() != outOffset) println(" " + blockCount + ". BT_COPY FP != outOffset (" + isoRaf.getFilePointer() + " != " + outOffset + ")"); | println(" " + elementNumber + ":" + blockCount + ". BT_COPY processing..."); if(!testOnly && isoRaf.getFilePointer() != outOffset) { println(" " + elementNumber + ":" + blockCount + ". WARNING: BT_COPY FP != outOffset (" + isoRaf.getFilePointer() + " != " + outOffset + ")"); ++warningsReported; } | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_ZERO processing..."); if(!testOnly && isoRaf.getFilePointer() != outOffset) println(" " + blockCount + ". BT_ZERO FP != outOffset (" + | println(" " + elementNumber + ":" + blockCount + ". BT_ZERO processing..."); if(!testOnly && isoRaf.getFilePointer() != outOffset) { println(" " + elementNumber + ":" + blockCount + ". WARNING: BT_ZERO FP != outOffset (" + | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_UNKNOWN processing..."); | println(" " + elementNumber + ":" + blockCount + ". BT_UNKNOWN processing..."); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". WARNING! Blocktype BT_UNKNOWN had non-zero sizes...", | println(" " + elementNumber + ":" + blockCount + ". WARNING: Blocktype BT_UNKNOWN had non-zero sizes...", | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_END processing..."); | println(" " + elementNumber + ":" + blockCount + ". BT_END processing..."); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". BT_END FP != outOffset (" + | println(" " + elementNumber + ":" + blockCount + ". WARNING: BT_END FP != outOffset (" + | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". WARNING: previously unseen blocktype " + blockType + " [0x" + Integer.toHexString(blockType) + "]", " " + blockCount + ". outOffset=" + outOffset + " outSize=" + outSize + " inOffset=" + inOffset + " inSize=" + inSize); | println(" " + elementNumber + ":" + blockCount + ". WARNING: previously unseen blocktype " + blockType + " [0x" + Integer.toHexString(blockType) + "]", " " + elementNumber + ":" + blockCount + ". outOffset=" + outOffset + " outSize=" + outSize + " inOffset=" + inOffset + " inSize=" + inSize); ++warningsReport... | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(" " + blockCount + ". unknown blocktype FP != outOffset (" + | println(" " + elementNumber + ":" + blockCount + ". unknown blocktype FP != outOffset (" + | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
String errors = errorsFound?"There were errors...":"No errors reported."; | String summary = (errorsReported != 0)?errorsReported+" errors reported":"No errors reported"; summary += (warningsReported != 0)?" ("+warningsReported+" warnings emitted).":"."; | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
println(errors); | println(summary); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
JOptionPane.showMessageDialog(null, "Extraction complete! " + errors + "\n" + | JOptionPane.showMessageDialog(null, "Extraction complete! " + summary + "\n" + | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
isoRaf.close(); | if(isoRaf != null) isoRaf.close(); | public static void notmain(String[] args) throws Exception { if(DEBUG) verbose = true; parseArgs(args); if(graphical) { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) ... |
else if(cur.equals("-gui")) | else if(cur.equals("-gui")) { | public static void parseArgs(String[] args) { boolean parseSuccessful = false; try { /* Take care of the options... */ int i; for(i = 0; i < args.length; ++i) { String cur = args[i]; if(!cur.startsWith("-")) break; else if(cur.equals("-gui")) graphical = true; else if(cur.equals("-v")) ... |
" written from the source code to the original dmg2iso program", " Copyright (c) 2004 vu1tur <v@vu1tur.eu.org>", " also using the iharder Base64 Encoder/Decoder <http: | " based upon dmg2iso, Copyright (c) 2004 vu1tur <v@vu1tur.eu.org>", " also using the iHarder Base64 Encoder/Decoder <http: | public static void parseArgs(String[] args) { boolean parseSuccessful = false; try { /* Take care of the options... */ int i; for(i = 0; i < args.length; ++i) { String cur = args[i]; if(!cur.startsWith("-")) break; else if(cur.equals("-gui")) graphical = true; else if(cur.equals("-v")) ... |
"later.", "See <http: | "later. See <http: | public static void parseArgs(String[] args) { boolean parseSuccessful = false; try { /* Take care of the options... */ int i; for(i = 0; i < args.length; ++i) { String cur = args[i]; if(!cur.startsWith("-")) break; else if(cur.equals("-gui")) graphical = true; else if(cur.equals("-v")) ... |
throw new RuntimeException("Unexpectedly reached end of file"); | throw new RuntimeException("Unexpectedly reached end of file. (bytesRemainingToRead=" + bytesRemainingToRead + ", curBytesRead=" + curBytesRead + ", totalBytesRead=" + totalBytesRead + ", block.inSize=" + block.inSize + ", inBuffer.length=" + inBuffer.length + ")"); | public static void processZlibBlock(DMGBlock block, RandomAccessFile dmgRaf, RandomAccessFile isoRaf, boolean testOnly, UserInterface ui) throws IOException, DataFormatException { inflater.reset(); dmgRaf.seek(/*block.lastOffs+*/block.inOffset); /* * medan det finns komprimerat data att lsa: * ls in komp... |
final String keyStorePath = "security/client_keystore"; | final String keyStorePath = "security/stream_client_keystore"; | protected StreamClient(final StreamSession session) { super(); this.logger = new Log4JWrapper(); this.session = session; final Environment environment = session.getEnvironment(); this.socketAddress = new InetSocketAddress( environment.getStreamHost(), environment.ge... |
public static void copy(final InputStream is, final OutputStream os, final Integer bufferSize) throws IOException { int len; final byte[] b = new byte[bufferSize]; while((len = is.read(b)) > 0) { os.write(b, 0, len); } os.flush(); | public static void copy(final InputStream is, final OutputStream os) throws IOException { copy(is, os, 512); | public static void copy(final InputStream is, final OutputStream os, final Integer bufferSize) throws IOException { int len; final byte[] b = new byte[bufferSize]; while((len = is.read(b)) > 0) { os.write(b, 0, len); } os.flush(); } |
void addPacketListeners(final XMPPConnection xmppConnection) {} | void addPacketListeners(final XMPPConnection xmppConnection) { xmppConnection.addPacketListener( new PacketListener() { public void processPacket(final Packet packet) { notifyTeamMemberAdded((IQTeamMemberAddedNotification) packet); } }, new PacketTypeFilter(IQTeamMemberAddedNotification.class)); xmppConnection.addPacke... | void addPacketListeners(final XMPPConnection xmppConnection) {} |
return (XMPPMethodResponse) idCollector.nextResult(); } catch (final ClassCastException ccx) { final String errorId = new ErrorHelper().getErrorId(ccx); logger.logError(errorId, ccx); | final XMPPMethodResponse response = (XMPPMethodResponse) idCollector.nextResult(7 * 1000); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); | public XMPPMethodResponse execute(final XMPPConnection xmppConnection) { // add an executed on parameter setParameter(Xml.All.EXECUTED_ON, DateUtil.getInstance()); // create a collector for the response final PacketCollector idCollector = createPacketCollector(xmppConnection); // ... |
throws IOException { final ByteArrayInputStream bytesIn = new ByteArrayInputStream(bytes); | throws DataFormatException, IOException { | public static synchronized byte[] decompress(final byte[] bytes) throws IOException { final ByteArrayInputStream bytesIn = new ByteArrayInputStream(bytes); final Inflater inflater = new Inflater(); final InflaterInputStream inflaterInputStream = new InflaterInputStream( bytesIn, inflater, bytes.length); byte[... |
final InflaterInputStream inflaterInputStream = new InflaterInputStream( bytesIn, inflater, bytes.length); byte[] decompressedContent = new byte[0]; byte[] inflatedBytes = new byte[1024]; byte[] tempoararyBytes; int bytesRead = inflaterInputStream.read(inflatedBytes); int offset = 0; while (-1 != bytesRead) { tempoara... | inflater.setInput(bytes); final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(bytes.length); byte[] byteBuffer = new byte[1024]; while(!inflater.finished()) { int count = inflater.inflate(byteBuffer); byteOutput.write(byteBuffer, 0, count); } byteOutput.close(); return byteOutput.toByteArray(); | public static synchronized byte[] decompress(final byte[] bytes) throws IOException { final ByteArrayInputStream bytesIn = new ByteArrayInputStream(bytes); final Inflater inflater = new Inflater(); final InflaterInputStream inflaterInputStream = new InflaterInputStream( bytesIn, inflater, bytes.length); byte[... |
final ByteArrayOutputStream bytesOut = new ByteArrayOutputStream(); final Deflater deflater = new Deflater(level.getLevel()); final DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream( bytesOut, deflater, bytes.length); deflaterOutputStream.write(bytes); deflaterOutputStream.finish(); return bytesOut.t... | final Deflater deflater = new Deflater(); deflater.setLevel(level.getLevel()); deflater.setInput(bytes); deflater.finish(); final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(bytes.length); byte[] byteBuffer = new byte[BUFFER_SIZE]; while(!deflater.finished()) { int count = deflater.deflate(byteBuffer);... | public static synchronized byte[] compress(final byte[] bytes, final Level level) throws IOException { final ByteArrayOutputStream bytesOut = new ByteArrayOutputStream(); final Deflater deflater = new Deflater(level.getLevel()); final DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream( bytesO... |
browserMain = new BrowserMainAvatar(controller); | browserMain = new BrowserMainAvatar(); | private Avatar createBrowserMain() { if(null == browserMain) { browserMain = new BrowserMainAvatar(controller); browserMain.setContentProvider(ProviderFactory.getMainProvider()); } return browserMain; } |
BrowserMainAvatar(final Controller controller) { super("MainListAvatar", ScrollPolicy.VERTICAL, new Color(255, 255, 255, 0)); this.listItemMap = new Hashtable<JVMUniqueId, Component>(20, 0.75F); | BrowserMainAvatar() { super("BrowserMainAvatar", ScrollPolicy.NONE, Color.WHITE); | BrowserMainAvatar(final Controller controller) { super("MainListAvatar", ScrollPolicy.VERTICAL, new Color(255, 255, 255, 0)); this.listItemMap = new Hashtable<JVMUniqueId, Component>(20, 0.75F); setLayout(new GridBagLayout()); } |
initBrowserMainComponents(); | BrowserMainAvatar(final Controller controller) { super("MainListAvatar", ScrollPolicy.VERTICAL, new Color(255, 255, 255, 0)); this.listItemMap = new Hashtable<JVMUniqueId, Component>(20, 0.75F); setLayout(new GridBagLayout()); } | |
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | final UUID uniqueId, final Long versionId) { | private List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { return getContainerModel().readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } |
uniqueId, versionId, documentUniqueId); | uniqueId, versionId); | private List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { return getContainerModel().readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } |
readLong("versionId"), readUUID("documentUniqueId")); | readLong("versionId")); | public void service() { logApiId(); final List<DocumentVersion> versions = readBackupDocumentVersions( readJabberId("userId"), readUUID("uniqueId"), readLong("versionId"), readUUID("documentUniqueId")); writeDocumentVersions("documentVersions", "documentVersion", v... |
this.logger = new Log4JWrapper(); | this.logger = new Log4JWrapper(getClass()); | public AbstractHandler(final String action) { super(action); this.logger = new Log4JWrapper(); } |
public List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | public List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId) { | public List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readBackupDocumentVersions(userId, uniqueId, versionId, ... |
return getImpl().readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); | return getImpl().readBackupDocumentVersions(userId, uniqueId, versionId); | public List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readBackupDocumentVersions(userId, uniqueId, versionId, ... |
public void close() { | public void close() throws IOException { | public void close() { disconnect(); } |
public void open() { | public void open() throws IOException { | public void open() { connect(Type.UPSTREAM); } |
public void write(final String streamId, final InputStream stream) { write(new StreamHeader(StreamHeader.Type.STREAM_BEGIN, streamId)); write(stream); | public void write(final String streamId, final InputStream stream, final Long streamSize) { write(new StreamHeader(StreamHeader.Type.STREAM_ID, streamId)); write(new StreamHeader(StreamHeader.Type.STREAM_SIZE, String.valueOf(streamSize))); write(stream, streamSize); | public void write(final String streamId, final InputStream stream) { write(new StreamHeader(StreamHeader.Type.STREAM_BEGIN, streamId)); write(stream); } |
public Boolean confirm(final String messageKey, final Object[] messageArguments) { final Data input = new Data(2); | public Boolean confirm(final String messageKey) { final Data input = new Data(1); | public Boolean confirm(final String messageKey, final Object[] messageArguments) { final Data input = new Data(2); input.set(ConfirmDialog.DataKey.MESSAGE_KEY, messageKey); input.set(ConfirmDialog.DataKey.MESSAGE_ARGUMENTS, messageArguments); return confirm(input); } |
input.set(ConfirmDialog.DataKey.MESSAGE_ARGUMENTS, messageArguments); | public Boolean confirm(final String messageKey, final Object[] messageArguments) { final Data input = new Data(2); input.set(ConfirmDialog.DataKey.MESSAGE_KEY, messageKey); input.set(ConfirmDialog.DataKey.MESSAGE_ARGUMENTS, messageArguments); return confirm(input); } | |
public void runAddContainerDocuments(final Long containerId, final File[] files) { final Data data = new Data(2); data.set(AddDocument.DataKey.CONTAINER_ID, containerId); data.set(AddDocument.DataKey.FILES, files); invoke(ActionId.CONTAINER_ADD_DOCUMENT, data); | public void runAddContainerDocuments(final Long containerId) { if(JFileChooser.APPROVE_OPTION == getJFileChooser().showOpenDialog(mainWindow)) { persistence.set( Keys.Persistence.JFILECHOOSER_CURRENT_DIRECTORY, jFileChooser.getCurrentDirectory()); runAddContainerDocuments(containerId, jFileChooser.getSelectedFiles()); ... | public void runAddContainerDocuments(final Long containerId, final File[] files) { final Data data = new Data(2); data.set(AddDocument.DataKey.CONTAINER_ID, containerId); data.set(AddDocument.DataKey.FILES, files); invoke(ActionId.CONTAINER_ADD_DOCUMENT, data); } |
public void runCreateContainer(final List<File> files) { runCreateContainer(null, files); | public void runCreateContainer() { runCreateContainer(null, null); | public void runCreateContainer(final List<File> files) { runCreateContainer(null, files); } |
public void runRenameDocument(final Long documentId, final String documentName) { final Data data = new Data(3); | public void runRenameDocument(final Long documentId) { final Data data = new Data(1); | public void runRenameDocument(final Long documentId, final String documentName) { final Data data = new Data(3); data.set(Rename.DataKey.DOCUMENT_ID, documentId); data.set(Rename.DataKey.DOCUMENT_NAME, documentName); invoke(ActionId.DOCUMENT_RENAME, data); } |
data.set(Rename.DataKey.DOCUMENT_NAME, documentName); | public void runRenameDocument(final Long documentId, final String documentName) { final Data data = new Data(3); data.set(Rename.DataKey.DOCUMENT_ID, documentId); data.set(Rename.DataKey.DOCUMENT_NAME, documentName); invoke(ActionId.DOCUMENT_RENAME, data); } | |
mainWindowLocation.setLocation(pFinal); | public void setMainWindowSizeAndLocation(final Point p, final Dimension d) { final Point pFinal = new Point(p); final Dimension dFinal = new Dimension(d); // Honour the minimum window size. When going below the size limit in // either x or y, limit both the resize and the move in tha... | |
this.persistence = PersistenceFactory.getPersistence(getClass()); | this.persistence = PersistenceFactory.getPersistence(getClass()); final Boolean maximized = persistence.get("maximized", Boolean.FALSE); | BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; this.logger = Logger.getLogger(getClass()); this.persistence = PersistenceFactory.getPersistence(getClass()); getRootPane().setBorder(new WindowBorder2()); addWindowListener(new Wind... |
initMenu(); | initMenu(maximized); | BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; this.logger = Logger.getLogger(getClass()); this.persistence = PersistenceFactory.getPersistence(getClass()); getRootPane().setBorder(new WindowBorder2()); addWindowListener(new Wind... |
final Point location = persistence.get("location", new Point(100, 100)); | final Point location = persistence.get("location", getMainWindowLocation()); | BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; this.logger = Logger.getLogger(getClass()); this.persistence = PersistenceFactory.getPersistence(getClass()); getRootPane().setBorder(new WindowBorder2()); addWindowListener(new Wind... |
mainWindowSize.setSize(size); | mainWindowSize.setSize(size); if (maximized) { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); setMaximizedBounds(env.getMaximumWindowBounds()); setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); } | BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; this.logger = Logger.getLogger(getClass()); this.persistence = PersistenceFactory.getPersistence(getClass()); getRootPane().setBorder(new WindowBorder2()); addWindowListener(new Wind... |
if (!maximized) { roundCorners(); } | BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; this.logger = Logger.getLogger(getClass()); this.persistence = PersistenceFactory.getPersistence(getClass()); getRootPane().setBorder(new WindowBorder2()); addWindowListener(new Wind... | |
final Long documentId = assertNotNullLong( "The main provider's document provider requires " + "non-null java.lang.Long input.", input); | final Long documentId = (Long) ((Pair) input).getFirst(); final Filter<Artifact> filter = (Filter<Artifact>) ((Pair) input).getSecond(); | public MainProvider(final ArtifactModel artifactModel, final DocumentModel documentModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = assertNotNullLong( "The main pro... |
return toDisplay(document, artifactModel); | if(filter.doFilter(document)) { return null; } else { return toDisplay(document, artifactModel); } | public MainProvider(final ArtifactModel artifactModel, final DocumentModel documentModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = assertNotNullLong( "The main pro... |
final Long documentId = assertNotNullLong( "The main provider's document provider requires " + "non-null java.lang.Long input.", input); | final Long documentId = (Long) ((Pair) input).getFirst(); final Filter<Artifact> filter = (Filter<Artifact>) ((Pair) input).getSecond(); | public Object getElement(final Object input) { final Long documentId = assertNotNullLong( "The main provider's document provider requires " + "non-null java.lang.Long input.", input); try { final Document document = documentModel.get(documentId); return toDisplay(document, artifactModel); ... |
return toDisplay(document, artifactModel); | if(filter.doFilter(document)) { return null; } else { return toDisplay(document, artifactModel); } | public Object getElement(final Object input) { final Long documentId = assertNotNullLong( "The main provider's document provider requires " + "non-null java.lang.Long input.", input); try { final Document document = documentModel.get(documentId); return toDisplay(document, artifactModel); ... |
final ContainerVersion latestVersion = readLatestVersion(containerId); return null != latestVersion; | final List<ContainerVersion> versions = readVersions(containerId); return 0 < versions.size(); | private Boolean isDistributed(final Long containerId) { final ContainerVersion latestVersion = readLatestVersion(containerId); return null != latestVersion; } |
for (final Document document : draft.getDocuments()) { if (ContainerDraft.ArtifactState.NONE == draft.getState(document)) { if (documentModel.isDraftModified(document.getId())) { draft.putState(document, ContainerDraft.ArtifactState.MODIFIED); | if (null != draft) { for (final Document document : draft.getDocuments()) { if (ContainerDraft.ArtifactState.NONE == draft.getState(document)) { if (documentModel.isDraftModified(document.getId())) { draft.putState(document, ContainerDraft.ArtifactState.MODIFIED); } | ContainerDraft readDraft(final Long containerId) { logger.info(getApiId("[READ DRAFT]")); logger.debug(containerId); final InternalDocumentModel documentModel = getInternalDocumentModel(); final ContainerDraft draft = containerIO.readDraft(containerId); for (final Document documen... |
void create(final Long containerId, final String containerName) throws ParityException { | void create(final Long containerId, final String containerName) { | void create(final Long containerId, final String containerName) throws ParityException { getInternalIndexModel().createContainer(containerId, containerName); } |
protected void assertOnline(final StringBuffer api) { assertOnline(api.toString()); | protected void assertOnline(final String assertion) { Assert.assertTrue(assertion, isOnline()); | protected void assertOnline(final StringBuffer api) { assertOnline(api.toString()); } |
void delete(final Long containerId) throws ParityException { | void delete(final Long containerId) { | void delete(final Long containerId) throws ParityException { getInternalIndexModel().deleteArtifact(containerId); } |
public Container read(final Long containerId); | public List<Container> read(); | public Container read(final Long containerId); |
final String containerName) throws ParityException { | final String containerName) { | public void createContainer(final Long containerId, final String containerName) throws ParityException { synchronized(getImplLock()) { getImpl().createContainer(containerId, containerName); } } |
void createContainer(final Long containerId, final String containerName) throws ParityException { logger.info(getApiId("[CREATE CONTAINER]")); logger.debug(containerId); logger.debug(containerName); | void createContainer(final Long containerId, final String containerName) { logApiId(); logVariable("containerId", containerId); logVariable("containerName", containerName); try { final Set<User> team = getInternalArtifactModel().readTeam(containerId); final DocumentBuilder documentBuilder = new DocumentBuilder(6); doc... | void createContainer(final Long containerId, final String containerName) throws ParityException { logger.info(getApiId("[CREATE CONTAINER]")); logger.debug(containerId); logger.debug(containerName); final Set<User> team = getInternalArtifactModel().readTeam(containerId); ... |
final Set<User> team = getInternalArtifactModel().readTeam(containerId); final DocumentBuilder documentBuilder = new DocumentBuilder(6); documentBuilder.append(IDX_ARTIFACT_ID.setValue(containerId).toField()) .append(IDX_ARTIFACT_TYPE.setValue(ArtifactType.CONTAINER).toField()) .append(IDX_ARTIFACT_NAME.setValue(conta... | index(documentBuilder.toDocument()); } catch (final Throwable t) { throw translateError("CREATE CONTAINER", t); } | void createContainer(final Long containerId, final String containerName) throws ParityException { logger.info(getApiId("[CREATE CONTAINER]")); logger.debug(containerId); logger.debug(containerName); final Set<User> team = getInternalArtifactModel().readTeam(containerId); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.