rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return null; | float[] wp = new float[3]; wp[0] = whitePoint[0]; wp[1] = whitePoint[1]; wp[2] = whitePoint[2]; return wp; | public float[] getMediaWhitePoint() { return null; } |
return null; | short[] data = getCurve(icSigGrayTRCTag); if (data == null) throw new IllegalArgumentException("Couldn't read Gray TRC data."); if (data.length <= 1) throw new ProfileDataException("Gamma value, not a TRC table."); return data; | public short[] getTRC() { return null; } |
this.profileID = profileID; | header = null; tagTable = null; createProfile(profileID); | ICC_Profile(int profileID) { this.profileID = profileID; } |
super(toolkit, checkBox, new JCheckBox()); this.checkBox = checkBox; final JCheckBox jcb = (JCheckBox)jComponent; | super(toolkit, checkBox, new SwingCheckBox(checkBox)); final JCheckBox jcb = (JCheckBox) jComponent; | public SwingCheckboxPeer(SwingToolkit toolkit, Checkbox checkBox) { super(toolkit, checkBox, new JCheckBox()); this.checkBox = checkBox; final JCheckBox jcb = (JCheckBox)jComponent; SwingToolkit.add(checkBox, jcb); SwingToolkit.copyAwtProperties(checkBox, jcb); jcb.setText(checkBox.getLabel()); setState(c... |
g.setClip(portBounds); | g.setClip(new Rectangle(0, 0, portBounds.width, portBounds.height)); | private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds(); g.setClip(port... |
if (pixel < map_size) | if (pixel >= 0 && pixel < map_size) | public final int getRGB (int pixel) { if (pixel < map_size) return rgb[pixel]; return 0; } |
Address sf = VmMagic.getCurrentFrame(); | final VmStackFrameEnumerator sfEnum = new VmStackFrameEnumerator(reader); | public static void checkPermission(Permission perm) throws AccessControlException { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { // getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPermission() //... |
while (reader.isValid(sf)) { final VmMethod method = reader.getMethod(sf); | while (sfEnum.isValid()) { final VmMethod method = sfEnum.getMethod(); | public static void checkPermission(Permission perm) throws AccessControlException { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { // getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPermission() //... |
sf = reader.getPrevious(sf); | sfEnum.next(); | public static void checkPermission(Permission perm) throws AccessControlException { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { // getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPermission() //... |
public final void pop(int type) { | public final int pop() { | public final void pop(int type) { if (tos <= 0) { throw new Error("Stack is empty"); } if (stack[ --tos] != type) { throw new Error("TypeStack[" + tos + "] is not the expected element " + type + " but " + stack[ tos]); } } |
if (stack[ --tos] != type) { throw new Error("TypeStack[" + tos + "] is not the expected element " + type + " but " + stack[ tos]); } | return stack[ --tos]; | public final void pop(int type) { if (tos <= 0) { throw new Error("Stack is empty"); } if (stack[ --tos] != type) { throw new Error("TypeStack[" + tos + "] is not the expected element " + type + " but " + stack[ tos]); } } |
? ((day - 100) * 400) / (365 * 400 + 100 - 4 + 1) : ((day - 100) * 4) / (365 * 4 + 1)); | ? ((day - 100L) * 400L) / (365L * 400L + 100L - 4L + 1L) : ((day - 100L) * 4L) / (365L * 4L + 1L)); | private void calculateDay(int[] fields, long day, boolean gregorian) { // the epoch is a Thursday. int weekday = (int) (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; fields[DAY_OF_WEEK] = weekday; // get a first approximation of the year. This may be one // year too big. int year = 1970 ... |
int leapday = isLeapYear(year, gregorian) ? 1 : 0; | int leapday = isLeapYear(year) ? 1 : 0; | private void calculateDay(int[] fields, long day, boolean gregorian) { // the epoch is a Thursday. int weekday = (int) (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; fields[DAY_OF_WEEK] = weekday; // get a first approximation of the year. This may be one // year too big. int year = 1970 ... |
int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) | int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int[] dayCount = { 0, 31, 59... | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) | if (isSet[DAY_OF_WEEK]) | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
month += 12; year--; | int first = getFirstDayOfMonth(year, month); if (isSet[DAY_OF_WEEK_IN_MONTH]) { int offs = fields[DAY_OF_WEEK] - first; if (offs < 0) offs += 7; day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1); day += offs; } else { day = 1 + 7 * (fields[WEEK_OF_MONTH] - 1); day += fields[DAY_OF_WEEK] - first; } | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
fields[MONTH] = month; isSet[YEAR] = true; fields[YEAR] = year; | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... | |
if (era == BC) year = 1 - year; int[] daysOfYear = getDayOfYear(year); int hour = 0; | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... | |
int minute = isSet[MINUTE] ? fields[MINUTE] : 0; int second = isSet[SECOND] ? fields[SECOND] : 0; int millis = isSet[MILLISECOND] ? fields[MILLISECOND] : 0; int millisInDay; | long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L + millis; day += allMillis / (24 * 60 * 60 * 1000L); millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L)); | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
if (isLenient()) | if (month < 0) | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L + millis; daysOfYear[1] += allMillis / (24 * 60 * 60 * 1000L); millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L)); | year += (int) month / 12; month = month % 12; if (month < 0) { month += 12; year--; | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
else | } if (month > 11) | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
if (hour < 0 || hour >= 24 || minute < 0 || minute > 59 || second < 0 || second > 59 || millis < 0 || millis >= 1000) throw new IllegalArgumentException(); millisInDay = (((hour * 60) + minute) * 60 + second) * 1000 + millis; } time = getLinearTime(year, daysOfYear[0], millisInDay); time += daysOfYear[1] * (24 * 60 ... | year += (month / 12); month = month % 12; | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
int[] f = new int[FIELD_COUNT]; calculateDay(f, day, time - rawOffset >= gregorianCutover); year = f[YEAR]; int month = f[MONTH]; day = f[DAY_OF_MONTH]; int weekday = f[DAY_OF_WEEK]; int dstOffset = isSet[DST_OFFSET] ? fields[DST_OFFSET] : (zone.getOffset((year < 0) ? BC : AD, (year < 0) ? 1 - year : year, month, day, ... | month_days[1] = isLeapYear(year) ? 29 : 28; while (day <= 0) { if (month == 0) { year--; month_days[1] = isLeapYear(year) ? 29 : 28; } month = (month + 11) % 12; day += month_days[month]; | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... |
while (day > month_days[month]) { day -= (month_days[month]); month = (month + 1) % 12; if (month == 0) { year++; month_days[1] = isLeapYear(year) ? 29 : 28; } } int dayOfYear = dayCount[month] + day - 1; if (isLeapYear(year) && month > 1) dayOfYear++; int relativeDay = (year - 1) * 365 + ((year - 1) >> 2) + dayOfYe... | protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[... | |
long julianDay = ((year * (365L * 4 + 1)) >> 2) + dayOfYear - ((1970 * (365 * 4 + 1)) / 4 + 1 - 13); | long julianDay = (year - 1) * 365L + ((year - 1) >> 2) + (dayOfYear - 1) - EPOCH_DAYS; | private long getLinearDay(int year, int dayOfYear, boolean gregorian) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). long julianD... |
int gregOffset = (year / 400) - (year / 100) + 2; if (isLeapYear(year, true) && dayOfYear < 31 + 29) --gregOffset; julianDay += gregOffset; | int gregOffset = (int) Math.floor((double) (year - 1) / 400.) - (int) Math.floor((double) (year - 1) / 100.); return julianDay + gregOffset; | private long getLinearDay(int year, int dayOfYear, boolean gregorian) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). long julianD... |
else julianDay -= 2; | private long getLinearDay(int year, int dayOfYear, boolean gregorian) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). long julianD... | |
int day = (int) (getLinearTime(year, dayOfYear, 0) / (24 * 60 * 60 * 1000L)); | boolean greg = isGregorian(year, dayOfYear); int day = (int) getLinearDay(year, dayOfYear, greg); | private int getWeekDay(int year, int dayOfYear) { int day = (int) (getLinearTime(year, dayOfYear, 0) / (24 * 60 * 60 * 1000L)); // The epoch was a thursday. int weekday = (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; return weekday; } |
if ((year & 3) != 0) | public boolean isLeapYear(int year) { if ((year & 3) != 0) // Only years divisible by 4 can be leap years return false; // compute the linear day of the 29. February of that year. // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. int julianDay = (((year - 1) ... | |
int julianDay = (((year - 1) * (365 * 4 + 1)) >> 2) + (31 + 29 - (((1970 - 1) * (365 * 4 + 1)) / 4 + 1 - 13)); if (julianDay * (24 * 60 * 60 * 1000L) < gregorianCutover) | if (! isGregorian(year, 31 + 29 - 1)) | public boolean isLeapYear(int year) { if ((year & 3) != 0) // Only years divisible by 4 can be leap years return false; // compute the linear day of the 29. February of that year. // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. int julianDay = (((year - 1) ... |
protected Calendar(TimeZone zone, Locale locale) | protected Calendar() | protected Calendar(TimeZone zone, Locale locale) { this.zone = zone; lenient = true; ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = ((Integer) rb.getObject("minimalDaysInFirstWeek")).intValue(); } |
this.zone = zone; lenient = true; ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = ((Integer) rb.getObject("minimalDaysInFirstWeek")).intValue(); | this(TimeZone.getDefault(), Locale.getDefault()); | protected Calendar(TimeZone zone, Locale locale) { this.zone = zone; lenient = true; ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = ((Integer) rb.getObject("minimalDaysInFirstWeek")).intValue(); } |
int index = BasicListUI.this.locationToIndex(list, click); | int index = locationToIndex(list, click); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == | if (list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) list.setSelectedIndex(index); else if (list.getSelectionMode() == | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); | list.setSelectionInterval(list.getAnchorSelectionIndex(), index); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); | if (list.isSelectedIndex(list.getAnchorSelectionIndex())) list.getSelectionModel().setLeadSelectionIndex(index); else list.addSelectionInterval(list.getAnchorSelectionIndex(), index); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); | if (list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) list.setSelectedIndex(index); else if (list.isSelectedIndex(index)) list.removeSelectionInterval(index,index); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
BasicListUI.this.list.addSelectionInterval(index,index); | list.addSelectionInterval(index,index); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
BasicListUI.this.list.setSelectedIndex(index); | list.setSelectedIndex(index); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); | list.ensureIndexIsVisible(list.getLeadSelectionIndex()); | public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.S... |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); for (int i =... | protected void installKeyboardActions() { } | |
keyListener = new KeyHandler(); | protected void installListeners() { if (focusListener == null) focusListener = createFocusListener(); list.addFocusListener(focusListener); if (listDataListener == null) listDataListener = createListDataListener(); list.getModel().addListDataListener(listDataListener); if (listSelectionListe... | |
list.addKeyListener(keyListener); | protected void installListeners() { if (focusListener == null) focusListener = createFocusListener(); list.addFocusListener(focusListener); if (listDataListener == null) listDataListener = createListDataListener(); list.getModel().addListDataListener(listDataListener); if (listSelectionListe... | |
int index = list.getSelectedIndex(); | int index = list.getSelectionModel().getLeadSelectionIndex(); if (index < list.getModel().getSize() - 1) { | protected void selectNextIndex() { int index = list.getSelectedIndex(); index++; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); } |
} | protected void selectNextIndex() { int index = list.getSelectedIndex(); index++; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); } | |
int index = list.getSelectedIndex(); | int index = list.getSelectionModel().getLeadSelectionIndex(); if (index > 0) { | protected void selectPreviousIndex() { int index = list.getSelectedIndex(); index--; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); } |
} | protected void selectPreviousIndex() { int index = list.getSelectedIndex(); index--; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); } | |
list.removeKeyListener(keyListener); | protected void uninstallListeners() { list.removeFocusListener(focusListener); list.getModel().removeListDataListener(listDataListener); list.removeListSelectionListener(listSelectionListener); list.removeMouseListener(mouseInputListener); list.removeKeyListener(keyListener); list.removeMouseMotion... | |
(sb.charAt(len) < ' ' || sb.charAt(len) >= '\uff20' )) { | (sb.charAt(len) < ' ' || sb.charAt(len) >= '\uff20')) { if (sb.charAt(len) == 0x1C && sf.isDupEnabled()) break; | protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ... |
baosp.write(codePage.getEBCDIC(' ')); | if (c == 0x1C) baosp.write(c); else baosp.write(codePage.getEBCDIC(' ')); | protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ... |
super ("UTF-8", null); | super ("UTF-8", new String[] { "ibm-1208", "ibm-1209", "ibm-5304", "ibm-5305", "windows-65001", "cp1208", "UTF8" }); | UTF_8 () { super ("UTF-8", null); } |
catch (ThreadDeath death) { return; } | public void run() { while (true) { try { AWTEvent evt = queue.getNextEvent(); if (isInterrupted ()) { // We are interrupted when we should finish executing return; } KeyboardFocusManager manager; manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (... | |
public void connect(org.omg.CORBA.Object object, byte[] key) | public void connect(org.omg.CORBA.Object object) | public void connect(org.omg.CORBA.Object object, byte[] key) { int a_port = getFreePort(); Connected_objects.cObject ref = connected_objects.add(key, object, a_port, null); IOR ior = createIOR(ref); prepareObject(object, ior); if (running) startService(ior); } |
Connected_objects.cObject ref = connected_objects.add(key, object, a_port, null); | Connected_objects.cObject ref = connected_objects.add(object, a_port); | public void connect(org.omg.CORBA.Object object, byte[] key) { int a_port = getFreePort(); Connected_objects.cObject ref = connected_objects.add(key, object, a_port, null); IOR ior = createIOR(ref); prepareObject(object, ior); if (running) startService(ior); } |
try { ior.Internet.host = InetAddress.getLocalHost().getHostAddress(); | ior.Internet.host = CollocatedOrbs.localHost; | protected IOR createIOR(Connected_objects.cObject ref) throws BAD_OPERATION { IOR ior = new IOR(); ior.key = ref.key; ior.Internet.port = ref.port; if (ref.object instanceof ObjectImpl) { ObjectImpl imp = (ObjectImpl) ref.object; if (imp._ids().length > 0) ior.Id = imp._ids... |
} catch (UnknownHostException ex) { throw new BAD_OPERATION("Cannot resolve the local host address"); } | protected IOR createIOR(Connected_objects.cObject ref) throws BAD_OPERATION { IOR ior = new IOR(); ior.key = ref.key; ior.Internet.port = ref.port; if (ref.object instanceof ObjectImpl) { ObjectImpl imp = (ObjectImpl) ref.object; if (imp._ids().length > 0) ior.Id = imp._ids... | |
} | public org.omg.CORBA.Object ior_to_object(IOR ior) { org.omg.CORBA.Object object = find_local_object(ior); if (object == null) { ObjectImpl impl = StubLocator.search(this, ior); try { if (impl._get_delegate() == null) impl._set_delegate(new IorDelegate(this, ... | |
finally { CollocatedOrbs.unregisterOrb(this); } } | public void run() { running = true; // Instantiate the port server for each socket. Iterator iter = connected_objects.entrySet().iterator(); Map.Entry m; Connected_objects.cObject obj; while (iter.hasNext()) { m = (Map.Entry) iter.next(); obj = (Connected_objects.cObject) m.getVa... | |
String exIDL = toIDL(ex.getClass().getName()); | String exIDL = getRepositoryId(ex.getClass()); | public static void writeSystemException(OutputStream output, SystemException ex ) { String exIDL = toIDL(ex.getClass().getName()); output.write_string(exIDL); output.write_ulong(ex.minor); CompletionStatusHelper.write(output... |
return Class.forName(toClassName(idl) + suffix).newInstance(); | return Class.forName(toClassName(JAVA_PREFIX, idl) + suffix) .newInstance(); | public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(idl) + suffix).newInstance(); } catch (Exception ex) { return null; } } |
} | public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(idl) + suffix).newInstance(); } catch (Exception ex) { return null; } } | |
String cl = toClassName(idl); | String cl = toClassName(JAVA_PREFIX, idl); | public static SystemException createSystemException(String idl, int minor, CompletionStatus completed ) { try { String cl = toClassName(idl); Class exClass = Class.forName(cl); Constr... |
protected static String toClassName(String IDL) | protected static String toClassName(String prefix, String IDL) | protected static String toClassName(String IDL) { String s = IDL; int a = s.indexOf(':') + 1; int b = s.lastIndexOf(':'); s = IDL.substring(a, b); if (s.startsWith(OMG_PREFIX)) s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); return s.replace('/', '.'); } |
s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); | s = prefix + s.substring(OMG_PREFIX.length()); | protected static String toClassName(String IDL) { String s = IDL; int a = s.indexOf(':') + 1; int b = s.lastIndexOf(':'); s = IDL.substring(a, b); if (s.startsWith(OMG_PREFIX)) s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); return s.replace('/', '.'); } |
if (response.getCodeClass() == 3 && getInstanceFollowRedirects()) { | if (isRedirect(response) && getInstanceFollowRedirects()) { InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } | public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : ... |
focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor(); | public MetalToggleButtonUI() { super(); } | |
public AddressPcEntry(int pc, int offset) { | public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method; | public AddressPcEntry(int pc, int offset) { this.pc = pc; this.offset = offset; } |
public void add(int pc, int offset) { | public void add(VmMethod method, int pc, int offset) { | public void add(int pc, int offset) { if (table != null) { throw new RuntimeException( "Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { // Sort on offset (from low to... |
final AddressPcEntry entry = new AddressPcEntry(pc, offset); | final AddressPcEntry entry = new AddressPcEntry(method, pc, offset); | public void add(int pc, int offset) { if (table != null) { throw new RuntimeException( "Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { // Sort on offset (from low to... |
final int[] table = new int[ count * 2]; | final int[] table = new int[ count * 3]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); | final void lock() { AddressPcEntry p = list; int count = 0; while (p != null) { count++; p = p.next; } final int[] table = new int[ count * 2]; p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] ... |
table[ i + 0] = p.pc; table[ i + 1] = p.offset; | table[ i + 0] = methods.indexOf(p.method); table[ i + 1] = p.pc; table[ i + 2] = p.offset; | final void lock() { AddressPcEntry p = list; int count = 0; while (p != null) { count++; p = p.next; } final int[] table = new int[ count * 2]; p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] ... |
i += 2; | i += 3; | final void lock() { AddressPcEntry p = list; int count = 0; while (p != null) { count++; p = p.next; } final int[] table = new int[ count * 2]; p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] ... |
for (int i = 0; i < table.length; i += 2) { final int pc = table[ i + 0]; final int offset = table[ i + 1]; | for (int i = 0; i < table.length; i += 3) { final int methodIdx = table[ i + 0]; final int pc = table[ i + 1]; final int offset = table[ i + 2]; | public void writeTo(PrintStream out) { for (int i = 0; i < table.length; i += 2) { final int pc = table[ i + 0]; final int offset = table[ i + 1]; out.println("PC[" + pc + "]\t0x" + NumberUtils.hex(offset)); } } |
out.println("PC[" + pc + "]\t0x" + NumberUtils.hex(offset)); | out.println(methodTable[ methodIdx].getName() + ", pc[" + pc + "]\t0x" + NumberUtils.hex(offset)); | public void writeTo(PrintStream out) { for (int i = 0; i < table.length; i += 2) { final int pc = table[ i + 0]; final int offset = table[ i + 1]; out.println("PC[" + pc + "]\t0x" + NumberUtils.hex(offset)); } } |
if (a0 < 0) { | if (a0 == 0) { | public static int const0(int a0, int a1) { int l0 = 0; if (a0 < 0) { l0 = -1; } if (a0 > 0) { l0 = 1; } return l0; } |
if ("const1".equals(method.getName())) { | if ("terniary".equals(method.getName())) { | private static VmByteCode loadByteCode(String className) throws MalformedURLException, ClassNotFoundException { VmSystemClassLoader vmc = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture()); VmType type = vmc.loadClass(className, true); VmMethod arithMethod = null; int nMethods = type.getNo... |
if (toAppend != null && toAppend.length() > 0) revalidate(); | public void append(String toAppend) { try { getDocument().insertString(getText().length(), toAppend, null); } catch (BadLocationException exception) { /* This shouldn't happen in theory -- but, if it does... */ throw new RuntimeException("Unexpected exception occurred.", exception)... | |
return VMSecurityManager.currentClassLoader(); | Class cl = currentLoadedClass(); return cl != null ? cl.getClassLoader() : null; | protected ClassLoader currentClassLoader() { return VMSecurityManager.currentClassLoader(); } |
return VMSecurityManager.getClassContext(); | Class[] stack1 = VMStackWalker.getClassContext(); Class[] stack2 = new Class[stack1.length - 1]; System.arraycopy(stack1, 1, stack2, 0, stack1.length - 1); return stack2; | protected Class[] getClassContext() { return VMSecurityManager.getClassContext(); } |
int type = getDataType( locator ); if (type != DOUBLE_DATA_TYPE) { throw new SetDataException ("The target dataCell is not a String"); } | public void appendData (Locator locator, String stringValue) throws SetDataException { String strData; try { strData = getStringData(locator); strData += stringValue; } catch (NoDataException e) { strData = stringValue; } setData(locator, strData); } | |
} else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, new short [shortAxisSize]); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, new long [shortAxisSize]); | private void checkDataArrayBounds (int longIndex, int shortIndex, int type) throws SetDataException { if (shortIndex < 0 || longIndex < 0) { throw new SetDataException("Cant set data: passed locator/axes dont belong to this array?"); } // Does the location exist yet? If not, create t... | |
} else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((short[]) longDataArray.get(longIndex+1), newsize)); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((long []) longDataArray.get(longIndex+1), newsize)); | private void checkDataArrayBounds (int longIndex, int shortIndex, int type) throws SetDataException { if (shortIndex < 0 || longIndex < 0) { throw new SetDataException("Cant set data: passed locator/axes dont belong to this array?"); } // Does the location exist yet? If not, create t... | |
public Object getData (Locator locator) throws NoDataException | public Object getData (Locator locator) throws NoDataException, IllegalArgumentException | public Object getData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw n... |
} catch (Exception e) { | } catch (IllegalArgumentException iae) { throw new IllegalArgumentException(); } catch (Exception e) { | public Object getData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw n... |
throws NoDataException | throws NoDataException, IllegalArgumentException | public double getDoubleData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw... |
} catch (Exception e) { | } catch (IllegalArgumentException iae) { throw new IllegalArgumentException(); } catch (Exception e) { | public double getDoubleData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw... |
} else if (type == SHORT_DATA_TYPE) { size = ((short []) longDataArray.get(longIndex+1)).length; } else if (type == LONG_DATA_TYPE) { size = ((long []) longDataArray.get(longIndex+1)).length; | private int getLongDataArraySize (int longIndex, int type) { int size = 0; if (type == DOUBLE_DATA_TYPE) { size = ((double[]) longDataArray.get(longIndex+1)).length; } else if (type == INT_DATA_TYPE) { size = ((int []) longDataArray.get(longIndex+1)).length; } else if (type == B... | |
JLabel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); | fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); | private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLay... |
JLabel textDescLabel = | textDescLabel = | private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLay... |
queryStatement = new JTextArea(5, 40); | queryStatement = new JTextArea(2, 40); | private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLay... |
as400FieldP = new JPanel(); AlignLayout as400fLayout = new AlignLayout(); as400FieldP.setLayout(as400fLayout); | private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLay... | |
as400p.remove(as400FieldP); as400p.add(as400QueryP, BorderLayout.SOUTH); | as400p.remove(fieldsLabel); as400p.remove(allFields); as400p.remove(selectedFields); as400p.remove(textDescLabel); as400p.remove(txtDesc); as400p.remove(intDesc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.gridheight = 2; gbc.gridwidth = 3; gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBag... | public void itemStateChanged(ItemEvent e) { Object source = e.getItemSelectable(); if (source == useQuery) { if (useQuery.isSelected()) { queryWizard.setEnabled(true); as400p.remove(as400FieldP); as400p.add(as400QueryP, BorderLayout.SOUTH); } else { queryWizard.setEnabled(false); as400p.remove(as4... |
as400p.add(as400FieldP, BorderLayout.SOUTH); | gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Inse... | public void itemStateChanged(ItemEvent e) { Object source = e.getItemSelectable(); if (source == useQuery) { if (useQuery.isSelected()) { queryWizard.setEnabled(true); as400p.remove(as400FieldP); as400p.add(as400QueryP, BorderLayout.SOUTH); } else { queryWizard.setEnabled(false); as400p.remove(as4... |
moveToFront(); | public void show() { if (! isVisible()) { moveToFront(); super.show(); JDesktopPane pane = getDesktopPane(); if (pane != null) pane.setSelectedFrame(this); else { try { setSelected(true); } catch (PropertyVetoException e) { // Do nothing. if they don't want to be selected. ... | |
cloneObj.fieldGroupOwnedHash.add(iter.next()); | cloneObj.fieldGroupOwnedHash.add(((Group)iter.next()).clone()); | public Object clone() throws CloneNotSupportedException { FieldAxis cloneObj = (FieldAxis) super.clone(); synchronized (this.fieldGroupOwnedHash) { synchronized(cloneObj.fieldGroupOwnedHash) { cloneObj.fieldGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.fieldGroupOwnedHash.size())); ... |
darkShadowColor = MetalLookAndFeel.getControlDarkShadow(); highlightColor = MetalLookAndFeel.getControlHighlight(); | public MetalSliderUI() { super(null); filledSlider = UIManager.getBoolean(SLIDER_FILL); } | |
return super.createPropertyChangeListener(slider); | return new MetalPropertyListener(); | protected PropertyChangeListener createPropertyChangeListener(JSlider slider) { // TODO: try to figure out why it might be necessary to override this // method as is done in Sun's implementation return super.createPropertyChangeListener(slider); } |
if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSliderUI instance; if (o == null) { instance = new MetalSliderUI(); instances.put(component, instance); } else instance = (MetalSliderUI) o; return instance; | return new MetalSliderUI(); | public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSliderUI instance; if (o == null) { instance = new MetalSliderUI(); instances.put(component, instance); } else instance = (Met... |
g.setColor(new Color(153, 153, 204)); | if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled()); | protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.