rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
protected String generateExperimentName(String name) { return experimentNames.generateName(name); | protected String generateExperimentName(String name, boolean allowExistingName) { return experimentNames.generateUniqueName(name, allowExistingName); | protected String generateExperimentName(String name) { return experimentNames.generateName(name); } |
protected String generateSocietyName(String name) { return societyNames.generateName(name); | protected String generateSocietyName(String name, boolean allowExistingName) { return societyNames.generateUniqueName(name, allowExistingName); | protected String generateSocietyName(String name) { return societyNames.generateName(name); } |
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, ... | experiment.saveToDb(saveToDbConflictHandler); | public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, ... |
boolean success = sc.saveToDatabase(); | exp.saveToDb(saveToDbConflictHandler); | public void run() { boolean success = sc.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); if (!success && organizer.log.isWarnEnabled()) { organizer.log.warn("Failed to save society " + sc.getSocietyName()); } else if (organ... |
if (!success && organizer.log.isWarnEnabled()) { organizer.log.warn("Failed to save society " + sc.getSocietyName()); } else if (organizer.log.isDebugEnabled()) { organizer.log.debug("Saved society " + sc.getSocietyName()); } } | } | public void run() { boolean success = sc.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); if (!success && organizer.log.isWarnEnabled()) { organizer.log.warn("Failed to save society " + sc.getSocietyName()); } else if (organ... |
Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingTaskEnd(organizer); } | if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, ... | public void run() { // a potentially long process Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingT... |
experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } | Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingTaskEnd(organizer); } | public void run() { experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); } |
public static PopulateDb.ConflictHandler createSaveToDbConflictHandler(final Component parent) { return new PopulateDb.ConflictHandler() { public int handleConflict(Object msg, Object[] choices, Object defaultChoice) { return JOptionPane.showOptionDialog(parent, msg, "Database Conflict", JOptionPane.WARNING_MESSAGE, JO... | public static DBConflictHandler createSaveToDbConflictHandler(final Component parent) { return new GUIDBConflictHandler(parent); | public static PopulateDb.ConflictHandler createSaveToDbConflictHandler(final Component parent) { return new PopulateDb.ConflictHandler() { public int handleConflict(Object msg, Object[] choices, Object defaultChoice) { return JOptionPane.showOptionDialog(parent, ... |
public OrganizerNameSet(String namePrefix) { | public OrganizerNameSet(String namePrefix, String prompt, String databaseCheck) { | public OrganizerNameSet(String namePrefix) { super(namePrefix); } |
this.prompt = prompt; this.databaseCheck = databaseCheck; | public OrganizerNameSet(String namePrefix) { super(namePrefix); } | |
organizer.buildCommunityAction, | public OrganizerMouseListener(Organizer organizer, OrganizerTree workspace) { this.organizer = organizer; this.workspace = workspace; // define pop-up menus Object[] rootMenuItems = { newExperimentMenu, newRecipeMenu, organizer.newFolderAction, organizer.... | |
if (sc instanceof SocietyFileComponent || sc instanceof SocietyUIComponent) { | public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean componentWasRemoved = false; PopulateDb pdb = null; SocietyComponent sc = getSocietyComponent(); if (sc == null) { if (log.isE... | |
pdb = new PopulateDb("CMT", "CSHNA", "CSMI", getExperimentName(), getExperimentID(), trialID, ch, sc.getAssemblyId()); | public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean componentWasRemoved = false; PopulateDb pdb = null; SocietyComponent sc = getSocietyComponent(); if (sc == null) { if (log.isE... | |
pdb = new PopulateDb("CSHNA", "CSMI", getExperimentName(), null, null, ch); } else { pdb = new PopulateDb("CMT", "CSHNA", "CSMI", getExperimentName(), getExperimentID(), trialID, ch); } | public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean componentWasRemoved = false; PopulateDb pdb = null; SocietyComponent sc = getSocietyComponent(); if (sc == null) { if (log.isE... | |
log.error("Society Data is null!"); | log.error("save: Society Data is null!"); | public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean componentWasRemoved = false; PopulateDb pdb = null; SocietyComponent sc = getSocietyComponent(); if (sc == null) { if (log.isE... |
if (componentWasRemoved) pdb.repopulateCMT(completeSociety); | if (componentWasRemoved) { if (log.isDebugEnabled()) { log.debug("save: After adding CDATA, got a removed."); } pdb.populateCSA(completeSociety); } else { if (log.isDebugEnabled()) { log.debug("save: Done adding CDATA, ready to modify."); } } | public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean componentWasRemoved = false; PopulateDb pdb = null; SocietyComponent sc = getSocietyComponent(); if (sc == null) { if (log.isE... |
pdb.repopulateCMT(completeSociety); | if (log.isDebugEnabled()) { log.debug("save: After modifying CDATA by comp " + soc.getShortName() + ", got a removed."); } pdb.populateCSA(completeSociety); | public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date List components = getComponents(); boolean componentWasRemoved = false; PopulateDb pdb = null; SocietyComponent sc = getSocietyComponent(); if (sc == null) { if (log.isE... |
public JTextArea(String text, int rows, int columns) | public JTextArea() | public JTextArea(String text, int rows, int columns) { this(null, text, rows, columns); } |
this(null, text, rows, columns); | this(null, null, 0, 0); | public JTextArea(String text, int rows, int columns) { this(null, text, rows, columns); } |
public Vector(Collection c) | public Vector() | public Vector(Collection c) { int csize = c.size(); elementData = new Object[csize]; elementCount = csize; Iterator itr = c.iterator(); for (int i = 0; i < csize; i++) { elementData[i] = itr.next(); } } |
int csize = c.size(); elementData = new Object[csize]; elementCount = csize; Iterator itr = c.iterator(); for (int i = 0; i < csize; i++) { elementData[i] = itr.next(); } | this(10); | public Vector(Collection c) { int csize = c.size(); elementData = new Object[csize]; elementCount = csize; Iterator itr = c.iterator(); for (int i = 0; i < csize; i++) { elementData[i] = itr.next(); } } |
public JList(Vector listData) | public JList() | public JList(Vector listData) { init(); setListData(listData); } |
setListData(listData); | public JList(Vector listData) { init(); setListData(listData); } | |
public String generateName(String name) { if (contains(name)) { String base = name; do { name = base + ++nameCounter; } while (contains(name)); } return name; | public String generateName() { return generateName(prefix); | public String generateName(String name) { if (contains(name)) { String base = name; do { name = base + ++nameCounter; } while (contains(name)); } return name; } |
protected String getUniqueName(String prompt, String originalName, boolean allowExistingName, String databaseCheck) { Method dbCheckMethod = null; | protected String getUniqueName(String originalName, boolean allowExistingName) { | protected String getUniqueName(String prompt, String originalName, boolean allowExistingName, String databaseCheck) { Method dbCheckMethod = null; String name = null; while (true) { // get new name from user ... |
if (dbCheckMethod == null) dbCheckMethod = getDatabaseCheckMethod(databaseCheck); | protected String getUniqueName(String prompt, String originalName, boolean allowExistingName, String databaseCheck) { Method dbCheckMethod = null; String name = null; while (true) { // get new name from user ... | |
boolean inDatabase = isInDatabase(name, dbCheckMethod); | boolean inDatabase = isInDatabase(name); | protected String getUniqueName(String prompt, String originalName, boolean allowExistingName, String databaseCheck) { Method dbCheckMethod = null; String name = null; while (true) { // get new name from user ... |
protected boolean isUniqueName(String name, String databaseCheck) { boolean inDatabase = false; if (databaseCheck != null) { Method dbCheckMethod = getDatabaseCheckMethod(databaseCheck); if (dbCheckMethod != null) inDatabase = isInDatabase(name, dbCheckMethod); } return !contains(name) && !inDatabase; | protected boolean isUniqueName(String name) { return !contains(name) && !isInDatabase(name); | protected boolean isUniqueName(String name, String databaseCheck) { boolean inDatabase = false; if (databaseCheck != null) { Method dbCheckMethod = getDatabaseCheckMethod(databaseCheck); if (dbCheckMethod != null) inDatabase = isInDatabase(name, dbCheckMethod); } return !contains(name) &&... |
public FileInputStream(File file) throws FileNotFoundException, IOException | public FileInputStream(String name) throws FileNotFoundException | public FileInputStream(File file) throws FileNotFoundException, IOException { this(file.getPath()); } |
this(file.getPath()); | SecurityManager s = System.getSecurityManager(); if (s != null) s.checkRead(name); fd = new FileDescriptor(name, FileDescriptor.READ); | public FileInputStream(File file) throws FileNotFoundException, IOException { this(file.getPath()); } |
public FileOutputStream (File file) | public FileOutputStream (String path, boolean append) | public FileOutputStream (File file) throws SecurityException, FileNotFoundException { this (file.getPath(), false); } |
this (file.getPath(), false); | SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite(path); fd = new FileDescriptor (path, (append ? FileDescriptor.APPEND : FileDescriptor.WRITE)); | public FileOutputStream (File file) throws SecurityException, FileNotFoundException { this (file.getPath(), false); } |
writeArraySizeAndElements (obj, clazz); | writeArraySizeAndElements (obj, clazz.getComponentType ()); | public final void writeObject (Object obj) throws IOException { if (useSubclassMethod) { writeObjectOverride (obj); return; } boolean was_serializing = isSerializing; if (! was_serializing) setBlockDataMode (false); try { isSerializing = true; boolean replaceDone = false... |
if (i == (ULThreads.length-1)) cb.setEnabled(false); | public CMTDialog(JFrame parent, Organizer organizer, String experimentName, String experimentId) { super(parent, "Threads and Groups", true); // modal dialog this.organizer = organizer; // to get unique names this.experimentName = experimentName; this.experimentId = exp... | |
con = cls.getConstructor(new Class[] {String.class, String.class}); | con = cls.getConstructor(new Class[] {String.class, String.class, String.class}); | protected RecipeComponent getDatabaseRecipe(String recipeId, String recipeName) { createLogger(); String query = null; RecipeComponent rc = null; try { Connection conn = DBUtils.getConnection(); try { Map substitutions = new HashMap(); ... |
rc = (RecipeComponent) con.newInstance(new Object[] {rs.getString(2), getRecipeAssembly(conn, substitutions)}); | rc = (RecipeComponent) con.newInstance(new Object[] {rs.getString(2), getRecipeAssembly(conn, substitutions), recipeId}); | protected RecipeComponent getDatabaseRecipe(String recipeId, String recipeName) { createLogger(); String query = null; RecipeComponent rc = null; try { Connection conn = DBUtils.getConnection(); try { Map substitutions = new HashMap(); ... |
public void setLocation (Point2D pt) { setLocation(pt.getX(), pt.getY()); } | public abstract void setLocation (double x, double y); | public void setLocation (Point2D pt) { setLocation(pt.getX(), pt.getY()); } |
public SAPDBPlugIn( JDBCAdaptor theAdaptor) { super( theAdaptor ); | public SAPDBPlugIn(JDBCAdaptor adaptor) { super(adaptor); | public SAPDBPlugIn( JDBCAdaptor theAdaptor) { super( theAdaptor ); } |
private String[] getRecipeIdAndClass(String recipeName) throws SQLException { substitutions.put(":recipe_name:", recipeName); ResultSet rs = executeQuery(stmt, dbp.getQuery("queryLibRecipeByName", substitutions)); | private String[] getRecipeIdAndClass(String recipeName) { substitutions.put(":recipe_name:", recipeName); ResultSet rs = null; try { rs = executeQuery(stmt, dbp.getQuery("queryLibRecipeByName", substitutions)); if (rs.next()) { return new String[] {rs.getString(1), rs.getString(2)}; } else { return null; } } catch (SQL... | private String[] getRecipeIdAndClass(String recipeName) throws SQLException { substitutions.put(":recipe_name:", recipeName); ResultSet rs = executeQuery(stmt, dbp.getQuery("queryLibRecipeByName", substitutions)); try { if (rs.next()) { return new String[] {... |
if (rs.next()) { return new String[] {rs.getString(1), rs.getString(2)}; } else { return null; } } finally { | if (rs != null) | private String[] getRecipeIdAndClass(String recipeName) throws SQLException { substitutions.put(":recipe_name:", recipeName); ResultSet rs = executeQuery(stmt, dbp.getQuery("queryLibRecipeByName", substitutions)); try { if (rs.next()) { return new String[] {... |
} | private String[] getRecipeIdAndClass(String recipeName) throws SQLException { substitutions.put(":recipe_name:", recipeName); ResultSet rs = executeQuery(stmt, dbp.getQuery("queryLibRecipeByName", substitutions)); try { if (rs.next()) { return new String[] {... | |
public String insertLibRecipe(RecipeComponent rc) throws SQLException { String recipeId = checkRecipeExistence(rc); if (recipeId != null) return recipeId; recipeId = getNextId("queryMaxRecipeId", "RECIPE-"); | private String insertLibRecipe(RecipeComponent rc, String recipeId) throws SQLException { try { if (recipeId != null) removeLibRecipeNamed(rc.getRecipeName()); else recipeId = getNextId("queryMaxRecipeId", "RECIPE-"); | public String insertLibRecipe(RecipeComponent rc) throws SQLException { String recipeId = checkRecipeExistence(rc); if (recipeId != null) return recipeId; recipeId = getNextId("queryMaxRecipeId", "RECIPE-"); substitutions.put(":recipe_id:", recipeId); substitutions.put(":java_clas... |
} catch (SQLException sqle) { System.out.println("Exception in insertLibRecipe: " + sqle); Thread.dumpStack(); return null; } | public String insertLibRecipe(RecipeComponent rc) throws SQLException { String recipeId = checkRecipeExistence(rc); if (recipeId != null) return recipeId; recipeId = getNextId("queryMaxRecipeId", "RECIPE-"); substitutions.put(":recipe_id:", recipeId); substitutions.put(":java_clas... | |
String recipeId = checkRecipeExistence(rc); if (recipeId != null) return recipeId; return insertLibRecipe(rc); | String[] recipeIdAndClass = getRecipeIdAndClass(rc.getRecipeName()); if (recipeIdAndClass != null) { if (isRecipeEqual(recipeIdAndClass, rc)) return recipeIdAndClass[0]; else return insertLibRecipe(rc, recipeIdAndClass[0]); } else return insertLibRecipe(rc, null); | public String insureLibRecipe(RecipeComponent rc) throws SQLException { String recipeId = checkRecipeExistence(rc); if (recipeId != null) return recipeId; return insertLibRecipe(rc); } |
try { if (checkRecipeExistence(rc) == null) return RECIPE_STATUS_ABSENT; else return RECIPE_STATUS_EXISTS; } catch (SQLException sqle) { return RECIPE_STATUS_DIFFERS; } | String[] recipeIdAndClass = getRecipeIdAndClass(rc.getRecipeName()); if (recipeIdAndClass == null) return RECIPE_STATUS_ABSENT; else { if (isRecipeEqual(recipeIdAndClass, rc)) return RECIPE_STATUS_EXISTS; else return RECIPE_STATUS_DIFFERS; | public int recipeExists(RecipeComponent rc) { try { if (checkRecipeExistence(rc) == null) return RECIPE_STATUS_ABSENT; else return RECIPE_STATUS_EXISTS; } catch (SQLException sqle) { return RECIPE_STATUS_DIFFERS; } } |
} | public int recipeExists(RecipeComponent rc) { try { if (checkRecipeExistence(rc) == null) return RECIPE_STATUS_ABSENT; else return RECIPE_STATUS_EXISTS; } catch (SQLException sqle) { return RECIPE_STATUS_DIFFERS; } } | |
this(pattern, Locale.getDefault()); | super(); Locale locale = Locale.getDefault(); calendar = new GregorianCalendar(locale); tokens = new Vector(); formatData = new DateFormatSymbols(locale); pattern = formatData.dateFormats[DEFAULT]+' '+formatData.timeFormats[DEFAULT]; compileFormat(pattern); numberFormat = NumberFormat.getInstance(locale); | public SimpleDateFormat(String pattern) { this(pattern, Locale.getDefault()); } |
SQLException(String message) | SQLException() | SQLException(String message){ this(message, null, 0);} |
this(message, null, 0); | this(null, null, 0); | SQLException(String message){ this(message, null, 0);} |
public static String valueOf (int i) | public static String valueOf (Object obj) | public static String valueOf (int i) { return Integer.toString(i); } |
return Integer.toString(i); | return obj == null ? "null" : obj.toString(); | public static String valueOf (int i) { return Integer.toString(i); } |
WOComponent result=ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext(),session()); | WOComponent result=ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(d2wContext(),session()); | public WOComponent printerFriendlyVersion() { WOComponent result=ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext(),session()); ((EditPageInterface)result).setObject(object()); return result; } |
public static ERXLogger getERXLogger(Class clazz, String subTopic) { return (ERXLogger)getERXLogger(clazz.getName() + (subTopic != null && subTopic.length() > 0 ? "."+ subTopic : null)); | public static ERXLogger getERXLogger(String name) { Logger logger = getLogger(name); if(logger != null && !(logger instanceof ERXLogger)) throw new RuntimeException("Can't load Logger for \""+name+"\" because it is not of class ERXLogger but \""+logger.getClass().getName()+"\". Let your Application class inherit from E... | public static ERXLogger getERXLogger(Class clazz, String subTopic) { return (ERXLogger)getERXLogger(clazz.getName() + (subTopic != null && subTopic.length() > 0 ? "."+ subTopic : null)); } |
current = defaultLocalizer(); | if(!isInitialized) { initialize(); } current = defaultLocalizer(); | public static ERXLocalizer currentLocalizer() { ERXLocalizer current = (ERXLocalizer)ERXThreadStorage.valueForKey("localizer"); if(current == null) { current = defaultLocalizer(); } return current; } |
public void remove(Component comp) | public void remove(int index) | public void remove(Component comp) { for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } } } |
for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } } | Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); if (layoutMgr != null) layoutMgr.removeLayoutComponent(r); ContainerEvent ce = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOV... | public void remove(Component comp) { for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } } } |
NSMutableDictionary branch = new NSMutableDictionary(); branch.setObjectForKey(method.getName(), "branchName"); branch.setObjectForKey(ERXStringUtilities.displayNameForKey(method.getName()), "branchButtonLabel"); | NSDictionary branch = branchChoiceDictionary(method.getName(), null); | public NSArray branchChoicesForContext(D2WContext context) { NSArray choices = (NSArray)context.valueForKey("branchChoices"); if (choices == null || choices.count() == 0) { try { NSMutableArray methodChoices = new NSMutableArray(); Method methods[] = getClass()... |
throw new Error("not implemented"); | if ((flags & (FRAMEBITS | ALLBITS)) != 0) repaint (); else if ((flags & SOMEBITS) != 0) { if (incrementalDraw) { if (redrawRate != null) { long tm = redrawRate.longValue(); if (tm < 0) tm = 0; repaint (tm); } else repaint (100); } } return (flags & (ALLBITS | ABORT | ERROR)) == 0; | public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) { // XXX Implement. throw new Error("not implemented"); } |
public static boolean isInfinite (double v) | public boolean isInfinite () | public static boolean isInfinite (double v) { return (v == POSITIVE_INFINITY || v == NEGATIVE_INFINITY); } |
return (v == POSITIVE_INFINITY || v == NEGATIVE_INFINITY); | return isInfinite (value); | public static boolean isInfinite (double v) { return (v == POSITIVE_INFINITY || v == NEGATIVE_INFINITY); } |
public static boolean isNaN (double v) | public boolean isNaN () | public static boolean isNaN (double v) { // This works since NaN != NaN is the only reflexive inequality // comparison which returns true. return v != v; } |
return v != v; | return isNaN (value); | public static boolean isNaN (double v) { // This works since NaN != NaN is the only reflexive inequality // comparison which returns true. return v != v; } |
public BigInteger pow(int exponent) | private BigInteger pow(BigInteger y) | public BigInteger pow(int exponent) { if (exponent <= 0) { if (exponent == 0) return ONE; else throw new ArithmeticException("negative exponent"); } if (isZero()) return this; int plen = words == null ? 1 : ival; // Length of pow2. int blen = ((bitLength() * exponent) >> 5) + 2 * plen... |
if (exponent <= 0) { if (exponent == 0) return ONE; else throw new ArithmeticException("negative exponent"); } | if (isOne()) return this; if (isMinusOne()) return y.isOdd () ? this : ONE; if (y.words == null && y.ival >= 0) return pow(y.ival); | public BigInteger pow(int exponent) { if (exponent <= 0) { if (exponent == 0) return ONE; else throw new ArithmeticException("negative exponent"); } if (isZero()) return this; int plen = words == null ? 1 : ival; // Length of pow2. int blen = ((bitLength() * exponent) >> 5) + 2 * plen... |
int plen = words == null ? 1 : ival; int blen = ((bitLength() * exponent) >> 5) + 2 * plen; boolean negative = isNegative() && (exponent & 1) != 0; int[] pow2 = new int [blen]; int[] rwords = new int [blen]; int[] work = new int [blen]; getAbsolute(pow2); int rlen = 1; rwords[0] = 1; | BigInteger pow2 = this; BigInteger r = null; | public BigInteger pow(int exponent) { if (exponent <= 0) { if (exponent == 0) return ONE; else throw new ArithmeticException("negative exponent"); } if (isZero()) return this; int plen = words == null ? 1 : ival; // Length of pow2. int blen = ((bitLength() * exponent) >> 5) + 2 * plen... |
if ((exponent & 1) != 0) { MPN.mul(work, pow2, plen, rwords, rlen); int[] temp = work; work = rwords; rwords = temp; rlen += plen; while (rwords[rlen - 1] == 0) rlen--; } exponent >>= 1; if (exponent == 0) break; MPN.mul(work, pow2, plen, pow2, plen); int[] temp = work; work = pow2; pow2 = temp; plen *= 2; while ... | if (y.isOdd()) r = r == null ? pow2 : times(r, pow2); y = BigInteger.shift(y, -1); if (y.isZero()) break; pow2 = times(pow2, pow2); | public BigInteger pow(int exponent) { if (exponent <= 0) { if (exponent == 0) return ONE; else throw new ArithmeticException("negative exponent"); } if (isZero()) return this; int plen = words == null ? 1 : ival; // Length of pow2. int blen = ((bitLength() * exponent) >> 5) + 2 * plen... |
if (rwords[rlen - 1] < 0) rlen++; if (negative) negate(rwords, rwords, rlen); return BigInteger.make(rwords, rlen); | return r == null ? ONE : r; | public BigInteger pow(int exponent) { if (exponent <= 0) { if (exponent == 0) return ONE; else throw new ArithmeticException("negative exponent"); } if (isZero()) return this; int plen = words == null ? 1 : ival; // Length of pow2. int blen = ((bitLength() * exponent) >> 5) + 2 * plen... |
public BigInteger add(BigInteger val) | private static final BigInteger add(int x, int y) | public BigInteger add(BigInteger val) { return add(this, val, 1); } |
return add(this, val, 1); | return BigInteger.make((long) x + (long) y); | public BigInteger add(BigInteger val) { return add(this, val, 1); } |
public boolean equals(Object obj) | private static boolean equals(BigInteger x, BigInteger y) | public boolean equals(Object obj) { if (obj == null || ! (obj instanceof BigInteger)) return false; return BigInteger.equals(this, (BigInteger) obj); } |
if (obj == null || ! (obj instanceof BigInteger)) | if (x.words == null && y.words == null) return x.ival == y.ival; if (x.words == null || y.words == null || x.ival != y.ival) | public boolean equals(Object obj) { if (obj == null || ! (obj instanceof BigInteger)) return false; return BigInteger.equals(this, (BigInteger) obj); } |
return BigInteger.equals(this, (BigInteger) obj); | for (int i = x.ival; --i >= 0; ) { if (x.words[i] != y.words[i]) return false; } return true; | public boolean equals(Object obj) { if (obj == null || ! (obj instanceof BigInteger)) return false; return BigInteger.equals(this, (BigInteger) obj); } |
if (val.isZero()) throw new ArithmeticException("divisor is zero"); | boolean xNegative, yNegative; if (x < 0) { xNegative = true; if (x == Long.MIN_VALUE) { divide(BigInteger.make(x), BigInteger.make(y), quotient, remainder, rounding_mode); return; } x = -x; } else xNegative = false; | public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); } |
BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); | if (y < 0) { yNegative = true; if (y == Long.MIN_VALUE) { if (rounding_mode == TRUNCATE) { if (quotient != null) quotient.set(0); if (remainder != null) remainder.set(x); } else divide(BigInteger.make(x), BigInteger.make(y), quotient, remainder, rounding_mode); return; } y = -y; } else yNegative = false; long q = x / ... | public BigInteger divide(BigInteger val) { if (val.isZero()) throw new ArithmeticException("divisor is zero"); BigInteger quot = new BigInteger(); divide(this, val, quot, null, TRUNCATE); return quot.canonicalize(); } |
public BigInteger negate() | private static boolean negate(int[] dest, int[] src, int len) | public BigInteger negate() { return BigInteger.neg(this); } |
return BigInteger.neg(this); | long carry = 1; boolean negative = src[len-1] < 0; for (int i = 0; i < len; i++) { carry += ((long) (~src[i]) & 0xffffffffL); dest[i] = (int) carry; carry >>= 32; } return (negative && dest[len-1] < 0); | public BigInteger negate() { return BigInteger.neg(this); } |
public synchronized StringBuffer insert(int offset, char ch) | public synchronized StringBuffer insert(int offset, char[] str, int str_offset, int len) | public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); System.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return ... |
if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); System.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; | if (offset < 0 || offset > count || len < 0 || str_offset < 0 || str_offset + len > str.length) throw new StringIndexOutOfBoundsException(); ensureCapacity_unsynchronized(count + len); System.arraycopy(value, offset, value, offset + len, count - offset); System.arraycopy(str, str_offset, value, offset, len); count += l... | public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); System.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return ... |
_localizeDisplayKeys = ERXUtilities.booleanValueForBindingOnComponentWithDefault("localizeDisplayKeys", this, localizeDisplayKeysDefault); | _localizeDisplayKeys = ERXValueUtilities.booleanValueForBindingOnComponentWithDefault("localizeDisplayKeys", this, localizeDisplayKeysDefault); | public boolean localizeDisplayKeys() { if(!_localizeDisplayKeysRead) { _localizeDisplayKeysRead = true; _localizeDisplayKeys = ERXUtilities.booleanValueForBindingOnComponentWithDefault("localizeDisplayKeys", this, localizeDisplayKeysDefault); } return _localizeDisplayKeys;... |
_isMandatory = ERXUtilities.booleanValue(aValue); | _isMandatory = ERXValueUtilities.booleanValue(aValue); | public void setIsMandatory(Object aValue) { try { _isMandatory = ERXUtilities.booleanValue(aValue); } catch (Throwable e) { String error = "WOToOneRelationship (setIsMandatory) - unable to set isMandatory value "+e.getMessage(); NSLog.err.appendln(error); } } |
getImpl().setOption (SocketOptions.IP_MULTICAST_LOOP, new Boolean (disable)); | getImpl().setOption (SocketOptions.IP_MULTICAST_LOOP, Boolean.valueOf(disable)); | public void setLoopbackMode(boolean disable) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); getImpl().setOption (SocketOptions.IP_MULTICAST_LOOP, new Boolean (disable)); } |
public InetSocketAddress(int port) | public InetSocketAddress(InetAddress addr, int port) | public InetSocketAddress(int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; try { this.addr = InetAddress.getLocalHost(); } catch (Exception e) { } } |
this.addr = addr; | public InetSocketAddress(int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; try { this.addr = InetAddress.getLocalHost(); } catch (Exception e) { } } | |
try { this.addr = InetAddress.getLocalHost(); } catch (Exception e) { } | public InetSocketAddress(int port) throws IllegalArgumentException { if (port < 0 || port > 65535) throw new IllegalArgumentException(); this.port = port; try { this.addr = InetAddress.getLocalHost(); } catch (Exception e) { } } | |
SocketException(String message) | SocketException() | SocketException(String message){ super(message);} |
super(message); | super(); | SocketException(String message){ super(message);} |
public InetAddress getAddress() | public final InetAddress getAddress() | public InetAddress getAddress() { return addr; } |
public boolean isFocusCycleRoot() | public boolean isFocusCycleRoot(Container c) | public boolean isFocusCycleRoot() { return false; } |
ByteBuffer destScaled = ByteBuffer.allocateDirect(dest.capacity()); destScaled.order(ByteOrder.nativeOrder()); int res = glu.gluScaleImage(GL.GL_RGB, img.getWidth(), img.getHeight(), GL.GL_UNSIGNED_BYTE, dest, img.getWidth(), img.getHeight(), GL.GL_UNSIGNED_BYTE, destScaled); | private void makeRGBTexture(GL gl, GLU glu, BufferedImage img, int target, boolean mipmapped) { ByteBuffer dest = null; switch (img.getType()) { case BufferedImage.TYPE_3BYTE_BGR: case BufferedImage.TYPE_CUSTOM: { byte[] data = ((DataBufferByte) img.getRaster().getDataBuffer()).getD... | |
GL.GL_UNSIGNED_BYTE, destScaled); | GL.GL_UNSIGNED_BYTE, dest); | private void makeRGBTexture(GL gl, GLU glu, BufferedImage img, int target, boolean mipmapped) { ByteBuffer dest = null; switch (img.getType()) { case BufferedImage.TYPE_3BYTE_BGR: case BufferedImage.TYPE_CUSTOM: { byte[] data = ((DataBufferByte) img.getRaster().getDataBuffer()).getD... |
public ByteBuffer put (byte[] src, int offset, int length) | public ByteBuffer put (ByteBuffer src) | public ByteBuffer put (byte[] src, int offset, int length) { if ((offset < 0) || (offset > src.length) || (length < 0) || (length > src.length - offset)) throw new IndexOutOfBoundsException (); for (int i = offset; i < offset + length; i++) put (src [i]); return this; } |
if ((offset < 0) || (offset > src.length) || (length < 0) || (length > src.length - offset)) throw new IndexOutOfBoundsException (); | if (src == this) throw new IllegalArgumentException (); | public ByteBuffer put (byte[] src, int offset, int length) { if ((offset < 0) || (offset > src.length) || (length < 0) || (length > src.length - offset)) throw new IndexOutOfBoundsException (); for (int i = offset; i < offset + length; i++) put (src [i]); return this; } |
for (int i = offset; i < offset + length; i++) put (src [i]); | if (src.remaining () > remaining ()) throw new BufferOverflowException (); if (src.remaining () > 0) { byte[] toPut = new byte [src.remaining ()]; src.get (toPut); src.put (toPut); } | public ByteBuffer put (byte[] src, int offset, int length) { if ((offset < 0) || (offset > src.length) || (length < 0) || (length > src.length - offset)) throw new IndexOutOfBoundsException (); for (int i = offset; i < offset + length; i++) put (src [i]); return this; } |
public IntBuffer put (int[] src, int offset, int length) | public IntBuffer put (IntBuffer src) | public IntBuffer put (int[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) put (src [i]); return this; } |
for (int i = offset; i < offset + length; i++) put (src [i]); | if (src == this) throw new IllegalArgumentException (); if (src.remaining () > remaining ()) throw new BufferOverflowException (); if (src.remaining () > 0) { int[] toPut = new int [src.remaining ()]; src.get (toPut); src.put (toPut); } | public IntBuffer put (int[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) put (src [i]); return this; } |
public Frame (String title) { this(); setTitle(title); } | public Frame () { } | public Frame (String title) { this(); setTitle(title); } |
if (last == 0 && path.charAt (0) == '/') ++last; | public String getParent () { int last = path.lastIndexOf(separatorChar); if (last == -1) return null; return path.substring(0, last); } | |
if (dupSeparator.equals("\\") && dupIndex == 0) | if (dupSeparator.equals("\\\\") && dupIndex == 0) | private String normalizePath(String p) { int dupIndex = p.indexOf(dupSeparator); int plen = p.length(); // Special case: permit Windows UNC path prefix. if (dupSeparator.equals("\\") && dupIndex == 0) dupIndex = p.indexOf(dupSeparator, 1); if (dupIndex == -1) { // Ignore trailing ... |
public void checkRead (String fileName) | public void checkRead (FileDescriptor fd) | public void checkRead (String fileName) { throw new SecurityException(); } |
public void checkWrite (String fileName) | public void checkWrite (FileDescriptor fd) | public void checkWrite (String fileName) { throw new SecurityException(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.