buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.ui_options); PreferenceScreen prefSet = getPreferenceScreen(); mUseScreenOnAnim = (CheckBoxPreference)prefSet.findPreference(USE_SCREENON_ANIM); mUseScreenOnAnim.setChecked(Settings.Sys...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.ui_options); PreferenceScreen prefSet = getPreferenceScreen(); mUseScreenOnAnim = (CheckBoxPreference)prefSet.findPreference(USE_SCREENON_ANIM); mUseScreenOnAnim.setChecked(Settings.Sys...
public Product getReferenceProduct() throws IOException { if (container.getValue(PROPERTY_SOURCE_PRODUCT_FILES) != null) { final File[] files = (File[]) container.getValue(PROPERTY_SOURCE_PRODUCT_FILES); if (files.length > 0) { try { if (!files[0]....
public Product getReferenceProduct() throws IOException { if (container.getValue(PROPERTY_SOURCE_PRODUCT_FILES) != null) { final File[] files = (File[]) container.getValue(PROPERTY_SOURCE_PRODUCT_FILES); if (files.length > 0) { try { if (!files[0]....
protected void createOptionsGroup(Composite control) { GridLayout sashFormLayout = new GridLayout(); sashFormLayout.numColumns = 4; sashFormLayout.marginHeight = 5; sashFormLayout.marginWidth = 5; sashFormLayout.horizontalSpacing = 5; final Composite composite = new Composite(control, SWT.NONE); composi...
protected void createOptionsGroup(Composite control) { GridLayout sashFormLayout = new GridLayout(); sashFormLayout.numColumns = 4; sashFormLayout.marginHeight = 5; sashFormLayout.marginWidth = 5; sashFormLayout.horizontalSpacing = 5; final Composite composite = new Composite(control, SWT.NONE); composi...
public boolean containsTable(DataSource ds, String tablename) { if (ds == null) { throw new NullPointerException("Require a datasource."); } if ((tablename == null) || (tablename.length() == 0)) { throw new IllegalArgumentException("Invalid table name given"); ...
public boolean containsTable(DataSource ds, String tablename) { if (ds == null) { throw new NullPointerException("Require a datasource."); } if ((tablename == null) || (tablename.length() == 0)) { throw new IllegalArgumentException("Invalid table name given"); ...
public void execute(CommandSender sender, String... args) { // which material? Player target; if (args.length == 0) { Utils.sI18n(sender, "kitList", "list", ACHelper.getInstance().getKitList()); return; } ArrayList<ItemStack> items = ACHelper.getInstance().getKit(args[0]); if(items==null) { Util...
public void execute(CommandSender sender, String... args) { // which material? Player target; if (args.length == 0) { Utils.sI18n(sender, "kitList", "list", ACHelper.getInstance().getKitList()); return; } ArrayList<ItemStack> items = ACHelper.getInstance().getKit(args[0]); if(items.isEmpty()) { ...
@Override public void execute(final RcmlInterpreter interpreter, final RcmlInterpreterContext context, final RcmlTag tag) throws TagStrategyException { try { // Collect some digits. final List<URI> announcements = getAnnouncements(interpreter, context, tag); final Call call = context.getCall(); ...
@Override public void execute(final RcmlInterpreter interpreter, final RcmlInterpreterContext context, final RcmlTag tag) throws TagStrategyException { try { // Collect some digits. final List<URI> announcements = getAnnouncements(interpreter, context, tag); final Call call = context.getCall(); ...
protected void createVideoContent(MediaContainer mc) { String baseUrl = factory.baseURL(); List<Track> tracks = mc.getTracks(); String mediaTagId = Long.valueOf(mc.getMediaTagVersion()).toString(); for (Track track : tracks) { AudioTrackContentInfo mpi = new AudioTrackContentInfo(); mpi.setMediaTagIdenti...
protected void createVideoContent(MediaContainer mc) { String baseUrl = factory.baseURL(); List<Track> tracks = mc.getTracks(); String mediaTagId = Long.valueOf(mc.getMediaTagVersion()).toString(); for (Track track : tracks) { AudioTrackContentInfo mpi = new AudioTrackContentInfo(); mpi.setMediaTagIdenti...
public String step1(int crednr, String value, String verificationId) { Gson gson = new GsonBuilder(). setPrettyPrinting(). registerTypeAdapter(IResponseAPDU.class, new ResponseAPDUDeserializer()). create(); // Get the nonce based on the id @SuppressWarnings("unchecked") Map<String ,BigInteger> n...
public String step1(int crednr, String value, String verificationId) { Gson gson = new GsonBuilder(). setPrettyPrinting(). registerTypeAdapter(IResponseAPDU.class, new ResponseAPDUDeserializer()). create(); // Get the nonce based on the id @SuppressWarnings("unchecked") Map<String ,BigInteger> n...
private void process(IResource resource) throws CoreException { if (resource instanceof IFile) { final IFile file = (IFile) resource; String fileExtension = file.getFileExtension(); Job job = null; if (fileExtension.equals(new CsMetaInformation().getSyntaxName())) { job = new GenerateResourcePluginsJ...
private void process(IResource resource) throws CoreException { if (resource instanceof IFile) { final IFile file = (IFile) resource; String fileExtension = file.getFileExtension(); Job job = null; if (fileExtension == null) { return; } if (fileExtension.equals(new CsMetaInformation().getSyntax...
public void score(@Nonnull UserHistory<? extends Event> history, @Nonnull MutableSparseVector scores) { SparseVector user = RatingVectorUserHistorySummarizer.makeRatingVector(history); int nUnpred = 0; for (VectorEntry e: scores.fast(VectorEntry.State.EITHER)) { ...
public void score(@Nonnull UserHistory<? extends Event> history, @Nonnull MutableSparseVector scores) { SparseVector user = RatingVectorUserHistorySummarizer.makeRatingVector(history); int nUnpred = 0; for (VectorEntry e: scores.fast(VectorEntry.State.EITHER)) { ...
public void handleAbout(ApplicationEvent evt) { HelpManager hm = (HelpManager) bio.getManager(HelpManager.class); if (hm == null) evt.setHandled(false); else { evt.setHandled(true); hm.helpShow("About"); } }
public void handleAbout(ApplicationEvent evt) { HelpManager hm = (HelpManager) bio.getManager(HelpManager.class); if (hm == null) evt.setHandled(false); else { evt.setHandled(true); hm.helpAbout(); } }
public void setSelectedIssue(int issueid, boolean value) { String selectedIssuesString = instancePrefs.getString("selectedissues", ""); if (value) { //Shall be selected if (this.getSelectedIssues().findByIssueID(issueid).size() == 0) { //is not selected ...
public void setSelectedIssue(int issueid, boolean value) { String selectedIssuesString = instancePrefs.getString("selectedissues", ""); if (value) { //Shall be selected if (this.getSelectedIssues().findByIssueID(issueid).size() == 0) { //is not selected ...
private static String XlateSeleneseStatementTokens(String op, String[] tokens, String oldLine) { boolean isBoolean = isBoolean(op); String commentedSelenese = "\t\t\t// " + oldLine .replaceFirst(BEGIN_SELENESE, "") .replaceFirst(END_SELENESE, "") .replaceAll(SELENESE_TOKEN_DI...
private static String XlateSeleneseStatementTokens(String op, String[] tokens, String oldLine) { boolean isBoolean = isBoolean(op); String commentedSelenese = "\t\t\t// " + oldLine .replaceFirst(BEGIN_SELENESE, "") .replaceFirst(END_SELENESE, "") .replaceAll(SELENESE_TOKEN_DI...
public PartManager( PartsClient pc ){ myClient = pc; pName = new JLabel("Part Name: "); pNumber = new JLabel("Part Number: "); pInfo = new JLabel("Part Info: "); pEdit = new JLabel("Number of part to be changed/deleted: "); pEdit2 = new JLabel("Part will be changed to new part above"); tName = new JTe...
public PartManager( PartsClient pc ){ myClient = pc; pName = new JLabel("Part Name: "); pNumber = new JLabel("Part Number: "); pInfo = new JLabel("Part Info: "); pEdit = new JLabel("Number of part to be changed/deleted: "); pEdit2 = new JLabel("Part will be changed to new part above"); tName = new JTe...
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages msgs = new ActionMessages(); ActionMessages errors = new ActionMessages(); int page; long id; try { id = Long.parseLong( request.ge...
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages msgs = new ActionMessages(); ActionMessages errors = new ActionMessages(); int page; long id; try { id = Long.parseLong( request.ge...
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (hasArguments) { boldCondensed = Typeface.createFromAsset(getSherlockActivity().getAssets(), "Roboto-BoldCondensed.ttf"); black = Typeface.createFromAsset(getSherlockActivity().getAss...
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (hasArguments) { boldCondensed = Typeface.createFromAsset(getSherlockActivity().getAssets(), "Roboto-BoldCondensed.ttf"); black = Typeface.createFromAsset(getSherlockActivity().getAss...
public void getRootFactory(RootLayoutFactory factory) { factory.setCompositionPage(new Button("test")); InputStream is = getClass().getResourceAsStream("/img/logo.png"); factory.customizeLogo(is); CssLayout comp = new CssLayout(new Label("MenuItem")); comp.setStyleName("us-me...
public void getRootFactory(RootLayoutFactory factory) { factory.setCompositionPage(new Button("test")); InputStream is = getClass().getResourceAsStream("/img/logo.png"); factory.customizeLogo(is); CssLayout comp = new CssLayout(new Label("MenuItem")); comp.setStyleName("us-me...
public static void startEmbeddedJetty(final boolean startJabox) throws MalformedURLException { // (1) Optional step to install the container from a URL pointing to its // distribution Installer installer; installer = new ZipURLInstaller( new URL( "http://archive.apache.org/dist/tomcat/tomcat-6/v6....
public static void startEmbeddedJetty(final boolean startJabox) throws MalformedURLException { // (1) Optional step to install the container from a URL pointing to its // distribution Installer installer; installer = new ZipURLInstaller( new URL( "http://archive.apache.org/dist/tomcat/tomcat-6/v6....
public void verify( String file ) throws Exception { HtmlPage page = htmlPage( file ); assertNotNull( page ); HtmlElement element = page.getHtmlElementById( "contentBox" ); assertNotNull( element ); HtmlDivision division = (HtmlDivision) element; asse...
public void verify( String file ) throws Exception { HtmlPage page = htmlPage( file ); assertNotNull( page ); HtmlElement element = page.getHtmlElementById( "contentBox" ); assertNotNull( element ); HtmlDivision division = (HtmlDivision) element; asse...
public static boolean integrate(final Plugin plugin) { if (new File("plugins/QuarterBukkit_extract").exists()) { deleteRecursive(new File("plugins/QuarterBukkit_extract")); } final File installConfigFile = new File("plugins/QuarterBukkit", "install.yml"); try { ...
public static boolean integrate(final Plugin plugin) { if (new File("plugins/QuarterBukkit_extract").exists()) { deleteRecursive(new File("plugins/QuarterBukkit_extract")); } final File installConfigFile = new File("plugins/QuarterBukkit", "install.yml"); try { ...
public Document sendMessage(Document requestDocument, SoapAction soapAction) { Document responseDocument = null; try { final URLConnection urlConnection = targetURL.openConnection(); HttpURLConnection con = (HttpURLConnection) urlConnection; con.setDoInput(true); con.setDoOutput(true); con.setReque...
public Document sendMessage(Document requestDocument, SoapAction soapAction) { Document responseDocument = null; try { final URLConnection urlConnection = targetURL.openConnection(); HttpURLConnection con = (HttpURLConnection) urlConnection; con.setDoInput(true); con.setDoOutput(true); con.setReque...
public String getValue(MarkerItem item) { return item.getMarker().getAttribute("rulename", ""); }
public String getValue(MarkerItem item) { if (item == null || item.getMarker() == null) { return null; } return item.getMarker().getAttribute("rulename", ""); }
public Edit makeObject(Element el) throws LoadFailedException { cycleCheck(); String replacement = getAttributeNS(el, EDIT, "src"); if (replacement != null) return loadRelative(replacement, Edit.class, new EditXMLLoader(this)); Edit ed = new Edit(); int index = 0; for (Element i : forNodeLis...
public Edit makeObject(Element el) throws LoadFailedException { cycleCheck(); String replacement = getAttributeNS(el, EDIT, "src"); if (replacement != null) return loadRelative(replacement, Edit.class, new EditXMLLoader(this)); Edit ed = new Edit(); int index = 0; for (Element i : forNodeLis...
public BooleanWrapper terminate(final boolean freeResources) { isTerminated = true; if (logger.isDebugEnabled()) { logger.debug("Terminating WorkerManager..."); } try { // we shutdown the thread pool, no new thread will be accepted threadPool.shu...
public BooleanWrapper terminate(final boolean freeResources) { isTerminated = true; if (logger.isDebugEnabled()) { logger.debug("Terminating WorkerManager..."); } try { // we shutdown the thread pool, no new thread will be accepted threadPool.shu...
public void onComplexInputFormRemove(ComplexInputFormRemoveEvent event) { complexInputFormRemoveEvent = event; ComplexInputFormConfirmationEvent.fire(true, this, new AsyncCallback<T>() { /** * The onfailure method that will not do anything * * @aut...
public void onComplexInputFormRemove(ComplexInputFormRemoveEvent event) { complexInputFormRemoveEvent = event; ComplexInputFormConfirmationEvent.fire(true, this, new AsyncCallback<T>() { /** * The onfailure method that will not do anything * * @aut...
private void generateDecodeStringForCustomType(SourcePrinter srcWriter, JClassType objectType, String jsonValueVar, String resultObjectVar, String resultSourceName) { JsonSubTypes jsonSubTypesClass = objectType.getAnnotation(JsonSubTypes.class); boolean hasJsonSubTypes = jsonSubTypesClass != null && jsonSubTypesC...
private void generateDecodeStringForCustomType(SourcePrinter srcWriter, JClassType objectType, String jsonValueVar, String resultObjectVar, String resultSourceName) { JsonSubTypes jsonSubTypesClass = objectType.getAnnotation(JsonSubTypes.class); boolean hasJsonSubTypes = jsonSubTypesClass != null && jsonSubTypesC...
public ProcessWrapper launchTranscode(String fileName, DLNAResource dlna, DLNAMediaInfo media, OutputParams params) throws IOException { boolean isWindows = Platform.isWindows(); // Make sure we can play this CodecConfig config = genConfig(params.mediaRenderer); PipeProcess tsPipe = new PipeProcess("VLC" + S...
public ProcessWrapper launchTranscode(String fileName, DLNAResource dlna, DLNAMediaInfo media, OutputParams params) throws IOException { boolean isWindows = Platform.isWindows(); // Make sure we can play this CodecConfig config = genConfig(params.mediaRenderer); PipeProcess tsPipe = new PipeProcess("VLC" + S...
public TeamsPanel(String wicketId, final boolean showAdmin) { super(wicketId); Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this); adminLinks.add(new BookmarkablePageLink<Void>("newTeam", EditTeamPage.class)); add(adminLinks.setVisible(showAdmin)); final List<TeamModel> teams = GitBlit.se...
public TeamsPanel(String wicketId, final boolean showAdmin) { super(wicketId); Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this); adminLinks.add(new BookmarkablePageLink<Void>("newTeam", EditTeamPage.class)); add(adminLinks.setVisible(showAdmin && GitBlit.self().supportsTeamMembershipChange...
protected TextureSequence.TextureFrame getNextTextureImpl(GL gl, boolean blocking) { if(0==moviePtr) { throw new GLException("FFMPEG native instance null"); } if(null != lastTex) { psm.setUnpackAlignment(gl, 1); // RGBA ? 4 : 1 try { ...
protected TextureSequence.TextureFrame getNextTextureImpl(GL gl, boolean blocking) { if(0==moviePtr) { throw new GLException("FFMPEG native instance null"); } if(null != lastTex) { psm.setUnpackAlignment(gl, 1); // RGBA ? 4 : 1 try { ...
public String evaluate(String uriString) { HttpURLConnection con; int responseCode = 0; String location = null; try { // thanks to StackExchange user syb0rg con = (HttpURLConnection) (new URL(uriString).openConnection()); con.setInstanceFollowRedirects(false); con.setRequestMethod("HEAD"); con.c...
public String evaluate(String uriString) { HttpURLConnection con; int responseCode = 0; String location = null; try { // thanks to StackExchange user syb0rg con = (HttpURLConnection) (new URL(uriString).openConnection()); con.setInstanceFollowRedirects(false); con.setRequestMethod("HEAD"); // Th...
private static Integer[] chooseShift(Integer capacity, Double costsFirstShift, Double costsSecondShift, Double costsThirdShift) { Integer[] result = new Integer[3]; if (costsFirstShift < costsSecondShift && costsFirstShift < costsThirdShift) { result[0] = 1; if (capacity > FIRST_SHIFT) { resul...
private static Integer[] chooseShift(Integer capacity, Double costsFirstShift, Double costsSecondShift, Double costsThirdShift) { Integer[] result = new Integer[3]; if (costsFirstShift < costsSecondShift && costsFirstShift < costsThirdShift) { result[0] = 1; if (capacity > FIRST_SHIFT) { resul...
private GdcDI(CommandLine ln, Properties defaults) { try { cliParams = parse(ln, defaults); cliParams.setHttpConfig(new NamePasswordConfiguration( cliParams.containsKey(CLI_PARAM_INSECURE[0]) ? "http" : "https", cliParams.get(CLI_PARAM_HOST[0])...
private GdcDI(CommandLine ln, Properties defaults) { try { cliParams = parse(ln, defaults); cliParams.setHttpConfig(new NamePasswordConfiguration( cliParams.containsKey(CLI_PARAM_INSECURE[0]) ? "http" : "https", cliParams.get(CLI_PARAM_HOST[0])...
public String addHistory(@RequestParam int contestSequence, @RequestParam String problemId, @RequestParam String submissionHistory, HttpServletRequest req) throws ParseException { String[] splitSubmissionHistory = submissionHistory.split("[\t ]+"); String submitId = splitSubmissionHistory[INDEX_SUBMIT_ID]...
public String addHistory(@RequestParam int contestSequence, @RequestParam String problemId, @RequestParam String submissionHistory, HttpServletRequest req) throws ParseException { String[] splitSubmissionHistory = submissionHistory.split("[\t ]+"); String submitId = splitSubmissionHistory[INDEX_SUBMIT_ID]...
public WarningsResult build(final AbstractBuild<?, ?> build, final JavaProject project) { Object previous = build.getPreviousBuild(); if (previous instanceof AbstractBuild<?, ?>) { AbstractBuild<?, ?> previousBuild = (AbstractBuild<?, ?>)previous; WarningsResultAction previou...
public WarningsResult build(final AbstractBuild<?, ?> build, final JavaProject project) { Object previous = build.getPreviousBuild(); while (previous instanceof AbstractBuild<?, ?> && previous != null) { AbstractBuild<?, ?> previousBuild = (AbstractBuild<?, ?>)previous; Warni...
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { if (Utils.isMonkeyRunning()) { return false; } if (preference == mEnableAdb) { if (mEnableAdb.isChecked()) { mDialogClicked = false; if (...
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { if (Utils.isMonkeyRunning()) { return false; } if (preference == mEnableAdb) { if (mEnableAdb.isChecked()) { mDialogClicked = false; if (...
public void render(@Nonnull final GameContainer container) { try { if (clearMap) { clearMap = false; if (offScreenGraphics == null) { offScreenGraphics = worldMapImage.getGraphics(); } offScreenGraphics.setColor(...
public void render(@Nonnull final GameContainer container) { try { if (clearMap) { clearMap = false; if (offScreenGraphics == null) { offScreenGraphics = worldMapImage.getGraphics(); } offScreenGraphics.setColor(...
public void ask(){ if(status == STATES.WHAT_TO_DO){ System.out.println("What do you want to do?"); System.out.println("1) Look for products matching a search string"); System.out.println("2) Look for search strings matching an artist"); System.out.println("Q) Quit"); String input = in.nextLine(); ...
public void ask(){ if(status == STATES.WHAT_TO_DO){ System.out.println("What do you want to do?"); System.out.println("1) Look for products matching a search string"); System.out.println("2) Look for search strings matching an artist"); System.out.println("Q) Quit"); String input = in.nextLine(); ...
public void doUpload(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); ToolSession toolSession = SessionManager.getCurrentToolSession(); MultiFileUploadPipe mfp = (MultiFileUploadPipe...
public void doUpload(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); ToolSession toolSession = SessionManager.getCurrentToolSession(); MultiFileUploadPipe mfp = (MultiFileUploadPipe...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ContentResolver resolver = getActivity().getContentResolver(); addPreferencesFromResource(R.xml.display_settings); mDisplayRotationPreference = (PreferenceScreen) findPreference(KEY_DISPLAY_ROTATI...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ContentResolver resolver = getActivity().getContentResolver(); addPreferencesFromResource(R.xml.display_settings); mDisplayRotationPreference = (PreferenceScreen) findPreference(KEY_DISPLAY_ROTATI...
private static void updateNotification( Context context, boolean isNew, int uniqueThreadCount) { // If the user has turned off notifications in settings, don't do any notifying. if (!MessagingPreferenceActivity.getNotificationEnabled(context)) { if (DE...
private static void updateNotification( Context context, boolean isNew, int uniqueThreadCount) { // If the user has turned off notifications in settings, don't do any notifying. if (!MessagingPreferenceActivity.getNotificationEnabled(context)) { if (DE...
public static Object zeroValue(Type<?> rtt) { Type<?>[] typeParams = null; if (rtt instanceof ParameterizedType) { ParameterizedType<?> pt = (ParameterizedType<?>) rtt; rtt = pt.getRuntimeType(); typeParams = pt.getParams(); } if (isStructType(rtt...
public static Object zeroValue(Type<?> rtt) { Type<?>[] typeParams = null; if (rtt instanceof ParameterizedType) { ParameterizedType<?> pt = (ParameterizedType<?>) rtt; rtt = pt.getRuntimeType(); typeParams = pt.getParams(); } if (isStructType(rtt...
TCFNodeExpression(final TCFNode parent, final String script, final String field_id, final String var_id, final String reg_id, final int index, final boolean deref) { super(parent, var_id != null ? var_id : "Expr" + expr_cnt++); this.script = script; this.field_id = fi...
TCFNodeExpression(final TCFNode parent, final String script, final String field_id, final String var_id, final String reg_id, final int index, final boolean deref) { super(parent, var_id != null ? var_id : "Expr" + expr_cnt++); this.script = script; this.field_id = fi...
protected void dispatchDraw(Canvas canvas) { if (showcaseX < 0 || showcaseY < 0 || isRedundant) { super.dispatchDraw(canvas); return; } //Draw the semi-transparent background canvas.drawColor(backColor); //Draw to the scale specified Matrix m...
protected void dispatchDraw(Canvas canvas) { if (showcaseX < 0 || showcaseY < 0 || isRedundant) { super.dispatchDraw(canvas); return; } //Draw the semi-transparent background canvas.drawColor(backColor); //Draw to the scale specified Matrix m...
public static void write( Element rootElement, OutputStream outputStream ) throws IOException { DOMDocument domDocument = new DOMDocument(); domDocument.setRootElement( rootElement ); domDocument.write( new OutputStreamWriter( outputStream ) ); outputStream.flush(); }
public static void write( Element rootElement, OutputStream outputStream ) throws IOException { DOMDocument domDocument = new DOMDocument(); domDocument.setRootElement( rootElement ); OutputStreamWriter out = new OutputStreamWriter( outputStream ); domDocument.write( out ); ...
private String edit() throws SessionInternalError, RemoteException { String retValue = "edit"; String messageKey = null; // create a dto with the info from the form and call // the remote session ItemTypeDTOEx typeDto = null; ItemDTOEx itemDto = null; ItemUse...
private String edit() throws SessionInternalError, RemoteException { String retValue = "edit"; String messageKey = null; // create a dto with the info from the form and call // the remote session ItemTypeDTOEx typeDto = null; ItemDTOEx itemDto = null; ItemUse...
static boolean compareVersion(String old, String newer) { ArrayList<Integer> oldValues = new ArrayList<Integer>(); ArrayList<Integer> newValues = new ArrayList<Integer>(); String at = ""; for (char c : old.toCharArray()) { if (c != '.') { at += c; } else { try { oldValues.add(Integer.pars...
static boolean compareVersion(String old, String newer) { ArrayList<Integer> oldValues = new ArrayList<Integer>(); ArrayList<Integer> newValues = new ArrayList<Integer>(); String at = ""; for (char c : old.toCharArray()) { if (c != '.') { at += c; } else { try { oldValues.add(Integer.pars...
protected boolean shouldAlwaysShow(ITask task) { return task.isActive() || (MylarTaskListPlugin.getTaskListManager().isReminderToday(task) && !task.isCompleted()) || (task.isPastReminder() && !task.isCompleted()) || NewLocalTaskAction.DESCRIPTION_DEFAULT.equals(task.getDescription()); }
protected boolean shouldAlwaysShow(ITask task) { return task.isActive() || (MylarTaskListPlugin.getTaskListManager().isReminderToday(task) && !task.isCompleted()) || (MylarTaskListPlugin.getTaskListManager().isCompletedToday(task)) || (task.isPastReminder() && !task.isCompleted()) || NewLocalTaskAction....
public synchronized Instance createInstance(String name, int port, String location) throws Exception { if (instances.get(name) != null) { throw new IllegalArgumentException("Instance '" + name + "' already exists"); } File serviceMixBase = new File(location != null ? location : (...
public synchronized Instance createInstance(String name, int port, String location) throws Exception { if (instances.get(name) != null) { throw new IllegalArgumentException("Instance '" + name + "' already exists"); } File serviceMixBase = new File(location != null ? location : (...
public void keyPressed(KeyEvent ke) { switch (ProjectToolbar.getToolId()) { case ProjectToolbar.PEN: case ProjectToolbar.BRUSH: break; default: // Reject return; } Object source = ke.getSource(); if (! (source instanceof DisplayCanvas)) return; final int keyCode = ke.getKeyCode(); f...
public void keyPressed(KeyEvent ke) { switch (ProjectToolbar.getToolId()) { case ProjectToolbar.PEN: case ProjectToolbar.BRUSH: break; default: // Reject return; } Object source = ke.getSource(); if (! (source instanceof DisplayCanvas)) return; final int keyCode = ke.getKeyCode(); f...
protected void onPostExecute(PhoneNumberFormattingTextWatcher watcher) { if (watcher == null || isCancelled()) { return; // May happen if we cancel the task. } if (mTextView.getHandler() == null) { return; // View is already detached. ...
protected void onPostExecute(PhoneNumberFormattingTextWatcher watcher) { if (watcher == null || isCancelled()) { return; // May happen if we cancel the task. } // Setting a text changed listener is safe even after the view is detached. mTextView.ad...
public ZSliderWidget(int min, int max) { setMaximum(max); setMinimum(min); setValue(0); out.set((double) 0); addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { out.set((double) getValue()); } }); }
public ZSliderWidget() { setMaximum(1000); setMinimum(0); setValue(0); out.set((double) 0); addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { out.set((double) getValue()/1000.0); } }); }
private void pulse() { primaryThread = Thread.currentThread(); // Process player packets server.getSessionRegistry().pulse(); // Run the relevant tasks. for (Iterator<GlowTask> it = tasks.values().iterator(); it.hasNext(); ) { GlowTask task = it.next(); ...
private void pulse() { primaryThread = Thread.currentThread(); // Process player packets server.getSessionRegistry().pulse(); // Run the relevant tasks. for (Iterator<GlowTask> it = tasks.values().iterator(); it.hasNext(); ) { GlowTask task = it.next(); ...
private void initialize() { grpSignatures = new Group(this, SWT.NONE); grpSignatures.setText(Messages.SignatureWizard_grpSignatures); grpSignatures.setBounds(10, 10, 300, 151); rdo1 = new Button(grpSignatures, SWT.RADIO); rdo1.setSelection(true); rdo1.setBounds(10, 19, 118, 18); rdo1.setText(Messages....
private void initialize() { grpSignatures = new Group(this, SWT.NONE); grpSignatures.setText(Messages.SignatureWizard_grpSignatures); grpSignatures.setBounds(10, 10, 300, 151); rdo1 = new Button(grpSignatures, SWT.RADIO); rdo1.setSelection(true); rdo1.setBounds(10, 19, 118, 18); rdo1.setText(Messages....
public void format() throws IOException, InterruptedException, SavantFileFormattingException{ // set the input file size (for tracking progress) this.totalBytes = new File(inFilePath).length(); // open the input file inFileReader = this.openInputFile(); DataOutputStream ou...
public void format() throws IOException, InterruptedException, SavantFileFormattingException{ // set the input file size (for tracking progress) this.totalBytes = new File(inFilePath).length(); // open the input file inFileReader = this.openInputFile(); DataOutputStream ou...
private DataSource getDataSource() { if (pds != null) return pds; gop = new GenericObjectPool(null); gop.setTestOnBorrow(true); gop.setTestWhileIdle(true); cf = new DriverManagerConnectionFactory(this.protocol + this.dbName, this.username, this.password); pcf = new PoolableConnectionFactory(cf, gop,...
private DataSource getDataSource() { if (pds != null) return pds; gop = new GenericObjectPool(null); gop.setTestOnBorrow(true); gop.setTestWhileIdle(true); cf = new DriverManagerConnectionFactory(this.protocol + this.dbName, this.username, this.password); pcf = new PoolableConnectionFactory(cf, gop,...
public <T> List<T> getServices( Class<T> type ) { synchronized ( instances ) { @SuppressWarnings( "unchecked" ) List<T> objs = (List<T>) instances.get( type ); if ( objs == null ) { Iterator<T> it; Collection<Class<...
public <T> List<T> getServices( Class<T> type ) { synchronized ( instances ) { @SuppressWarnings( "unchecked" ) List<T> objs = (List<T>) instances.get( type ); if ( objs == null ) { Iterator<T> it; Collection<Class<...
protected Result tryLoadProtection(Block block, boolean noAutoCache) { if (matchedProtection != null) { return Result.E_FOUND; } LWC lwc = LWC.getInstance(); ProtectionCache cache = lwc.getProtectionCache(); // Check the cache if ((matchedProtection = ca...
protected Result tryLoadProtection(Block block, boolean noAutoCache) { if (matchedProtection != null) { return Result.E_FOUND; } LWC lwc = LWC.getInstance(); ProtectionCache cache = lwc.getProtectionCache(); // Check the cache if ((matchedProtection = ca...
private void checkElementExistence(IWorkingSet workingSet) { ArrayList<IAdaptable> list = new ArrayList<IAdaptable>(Arrays.asList(workingSet.getElements())); boolean changed = false; for (Iterator<IAdaptable> iter = list.iterator(); iter.hasNext();) { IAdaptable adaptable = iter.next(); boolean remove = fa...
private void checkElementExistence(IWorkingSet workingSet) { ArrayList<IAdaptable> list = new ArrayList<IAdaptable>(Arrays.asList(workingSet.getElements())); boolean changed = false; for (Iterator<IAdaptable> iter = list.iterator(); iter.hasNext();) { IAdaptable adaptable = iter.next(); boolean remove = fa...
protected void createActions() { super.createActions(); proposalsAction = new ContentAssistProposalsAction(getViewer()); proposalsAction = new ContentAssistProposalsAction(getViewer()); SaveConsoleSessionAction saveSessionAction = new SaveConsoleSessionAction( (ScriptConsole) getConsole(), ScriptCons...
protected void createActions() { super.createActions(); proposalsAction = new ContentAssistProposalsAction(getViewer()); proposalsAction = new ContentAssistProposalsAction(getViewer()); SaveConsoleSessionAction saveSessionAction = new SaveConsoleSessionAction( (ScriptConsole) getConsole(), ScriptCons...
public void move(Entity e, double t, double dt) { State currentXState = e.getXState(); State currentYState = e.getYState(); e.setPrevXState(currentXState); e.setPrevYState(currentYState); // All of the solid tiles we can collide with: List<Rectangle2D> levelHitBoxes ...
public void move(Entity e, double t, double dt) { State currentXState = e.getXState(); State currentYState = e.getYState(); e.setPrevXState(currentXState); e.setPrevYState(currentYState); // All of the solid tiles we can collide with: List<Rectangle2D> levelHitBoxes ...
protected Boolean doInBackground(Void... v) { InputStream is = null; OutputStream os = null; try { Log.i(LOGTAG, "Srart downloading url(" + url + ") to file(" + file + ")"); URLConnection c = url.openConnection(); c.connect(); is = ...
protected Boolean doInBackground(Void... v) { InputStream is = null; OutputStream os = null; try { Log.i(LOGTAG, "Srart downloading url(" + url + ") to file(" + file + ")"); URLConnection c = url.openConnection(); c.connect(); is = ...
public void onBlockBreak(BlockBreakEvent event) { Block block = event.getBlock(); Player player = event.getPlayer(); if (!BlockUtils.isTombStone(block.getLocation()) && Ghosts.p.ghostManager.isGhost(player)) { event.setCancelled(true); return; } if (...
public void onBlockBreak(BlockBreakEvent event) { Block block = event.getBlock(); Player player = event.getPlayer(); if (!BlockUtils.isTombStone(block.getLocation())) { if (Ghosts.p.ghostManager.isGhost(player)) { event.setCancelled(true); } ...
protected LocalCleanupStats _cleanUp() throws Exception { final LocalCleanupStats stats = new LocalCleanupStats(); if (_entryStore.isClosed()) { if (!_isTesting) { LOG.warn("LocalEntryCleanup task cancelled: Entry DB has been closed"); } retur...
protected LocalCleanupStats _cleanUp() throws Exception { final LocalCleanupStats stats = new LocalCleanupStats(); if (_entryStore.isClosed()) { if (!_isTesting) { LOG.warn("LocalEntryCleanup task cancelled: Entry DB has been closed"); } retur...
public boolean answer() { _console.println(FormattedConsole.OutputLevel.HEADING, "----" + _id + "----"); List<Directive> incList = _conf.getDirectiveIgnoreCase("Include"); if(!incList.isEmpty()) { _console.printAnswer(_level, false, "There are Include-directives in your apache configuration:"); for (...
public boolean answer() { _console.println(FormattedConsole.OutputLevel.HEADING, "----" + _id + "----"); List<Directive> incList = _conf.getAllDirectivesIgnoreCase("Include"); if(!incList.isEmpty()) { _console.printAnswer(_level, false, "There are Include-directives in your apache configuration:"); f...
public void testPlay30sMP3() throws Exception { // Launch the songs list. Pick the fisrt song and play try { Instrumentation inst = getInstrumentation(); inst.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_DOWN); mTrackList = getActivity().getListView(); int ...
public void testPlay30sMP3() throws Exception { // Launch the songs list. Pick the fisrt song and play try { Instrumentation inst = getInstrumentation(); //Make sure the song list shown up Thread.sleep(2000); inst.sendKeyDownUpSync(KeyEvent.KEYCODE_DPA...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.lockscreen_prefs); PreferenceScreen prefSet = getPreferenceScreen(); /* Rotary lockscreen */ mUseRotaryLockPref = (CheckBoxPreference)prefSet.findPreference(LOCKSCREEN_ROTARY_LOCK); ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.lockscreen_prefs); PreferenceScreen prefSet = getPreferenceScreen(); /* Rotary lockscreen */ mUseRotaryLockPref = (CheckBoxPreference)prefSet.findPreference(LOCKSCREEN_ROTARY_LOCK); ...
protected void signalCheck(Data data) { if (!inUtterance) { if (data != null) { if (data.hasSignal(Signal.UTTERANCE_START)) { inUtterance = true; } else { throw new Error(getName() + ": no UTTERANCE_START"); } } } else { if (data == null) { throw new Error(getName() + ": null da...
protected void signalCheck(Data data) { if (!inUtterance) { if (data != null) { if (data.hasSignal(Signal.UTTERANCE_START)) { inUtterance = true; } else { throw new Error(getName() + ": no UTTERANCE_START"); } } } else { if (data == null) { throw new Error (g...
public void setColor(Color color) { int red = (color.getRed()*100)/255; int green = (color.getGreen()*100)/255; int blue = (color.getBlue()*100)/255; int min = Math.min(Math.min(red, green), blue); String message = "SC"+1+" R "+(red>min?(int)(red*2):(int)(red*0.5))+"; G "+(green>min?(int)(green*2):(int)(gree...
public void setColor(Color color) { int red = (color.getRed()*100)/255; int green = (color.getGreen()*100)/255; int blue = (color.getBlue()*100)/255; int min = Math.min(Math.min(red, green), blue); String message = "SC"+1+" R "+red+"; G "+green+"; B "+blue+";"; //System.out.println(message); IOController...
private synchronized void getDisplayItems() { if (allValues.isEmpty() && config != null) { int countRuleSet = config.getMaxIndex("ruleSet"); for (int i = 0; i <= countRuleSet; i++) { int projectContext = config.getMaxIndex("ruleSet(" + i + ").context"); for (int j = 0; j <= projectContext; j++) { ...
private synchronized void getDisplayItems() { if (allValues.isEmpty() && config != null) { int countRuleSet = config.getMaxIndex("ruleSet"); for (int i = 0; i <= countRuleSet; i++) { int projectContext = config.getMaxIndex("ruleSet(" + i + ").context"); for (int j = 0; j <= projectContext; j++) { ...
private void setAttributeTextColor(TextPresentation tp, int sline, int eline, int start, int end, RGB colorKey, boolean fg) {//, TextPresentation tp){ System.out.println("startline: "+sline+" soffset: "+start+" endoffset: "+end); //System.out.println("setting text color"); Display display = getEditorPart()...
private void setAttributeTextColor(TextPresentation tp, int sline, int eline, int start, int end, RGB colorKey, boolean fg) {//, TextPresentation tp){ System.out.println("startline: "+sline+" soffset: "+start+" endoffset: "+end); //System.out.println("setting text color"); Display display = getEditorPart()...
private void updateDropDown(){ // Update Shown selection in grid updateSelectedDropWidget(); // Update popup panel, // Calculate the size of the largest list item. popupVbox.clear(); maxWidth = 0; averageHeight = 0; // Actually used to set the width of the arrow popupHeight = null; ...
private void updateDropDown(){ // Update Shown selection in grid updateSelectedDropWidget(); // Update popup panel, // Calculate the size of the largest list item. popupVbox.clear(); maxWidth = 0; averageHeight = 0; // Actually used to set the width of the arrow popupHeight = null; ...
public void setPass(String pass) throws MyException { if (pass==null || pass.length()==0) throw new MyException(TTypMyException.EPassInvalid); mPass = pass; try { if (mKey!=null) getKey(); } catch (MyException e) { Log.e("!!!", "Invalid pass: "+e.getId()); mPass=null; throw e; } ...
public void setPass(String pass) throws MyException { if (pass==null || pass.length()==0) throw new MyException(TTypMyException.EPassInvalid); mPass = pass; mTimExpire = null; //for pass check in getKey(); try { if (mKey!=null) getKey(); } catch (MyException e) { Log.e("!!!", "Invalid pass...
private IAttributeDefinition<?,?,?> parseAttributeDefinition(String[] attrs, int start, int end) { int pos = start; IAttributeDefinition<?,?,?> attrDef = null; String attrId = attrs[pos++]; String attrType = attrs[pos++]; String attrName = attrs[pos++]; String attrDesc = attrs[pos++]; boolean attrDisp...
private IAttributeDefinition<?,?,?> parseAttributeDefinition(String[] attrs, int start, int end) { int pos = start; IAttributeDefinition<?,?,?> attrDef = null; String attrId = attrs[pos++]; String attrType = attrs[pos++]; String attrName = attrs[pos++]; String attrDesc = attrs[pos++]; boolean attrDisp...
public void launchNewUI(String datasourceType) { IUIDatasourceAdminService service = manager.getService(datasourceType); String newUI = service.getNewUI(); if(newUI != null && newUI.length() > 0) { if(newUI.indexOf("builtin:") >= 0) { if(service.getType().equals(JdbcDatasourceServi...
public void launchNewUI(String datasourceType) { IUIDatasourceAdminService service = manager.getService(datasourceType); String newUI = service.getNewUI(); if(newUI != null && newUI.length() > 0) { if(newUI.indexOf("builtin:") >= 0) { if(service.getType().equals(JdbcDatasourceServi...
public synchronized CopyOnWriteArrayList<Layer> layers() { if (layerList == null) { layerList = new CopyOnWriteArrayList<Layer>() { private static final long serialVersionUID = 8011733882551971475L; public void add(int index, Layer element) { ...
public synchronized CopyOnWriteArrayList<Layer> layers() { if (layerList == null) { layerList = new CopyOnWriteArrayList<Layer>() { private static final long serialVersionUID = 8011733882551971475L; public void add(int index, Layer element) { ...
public static void main(String[] args) { // Path of the trace final String TRACE_PATH = "/home/william/trace-614601events-nolost-newformat"; // *** Change this to run several time over the same trace final int NB_OF_PASS = 1; // *** Change this to true...
public static void main(String[] args) { // Path of the trace final String TRACE_PATH = "/home/william/trace-614601events-nolost-newformat"; // *** Change this to run several time over the same trace final int NB_OF_PASS = 1; // *** Change this to true...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.uv_feedback_forum); suggestions = new ArrayList<Suggestion>(); getListView().setDivider(null); setListAdapter(new PaginatedAdapter<Suggestion>(this, R.layout.uv_sugges...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.uv_feedback_forum); suggestions = new ArrayList<Suggestion>(); getListView().setDivider(null); setListAdapter(new PaginatedAdapter<Suggestion>(this, R.layout.uv_sugges...
protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition( "org.springframework.integration.jms.JmsOutboundGateway"); builder.addPropertyReference("connectionFactory", element.getAttribute("connection...
protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition( "org.springframework.integration.jms.JmsOutboundGateway"); builder.addPropertyReference("connectionFactory", element.getAttribute("connection...
protected Configuration() { try { InputStream in = null; Properties properties; try { String configurationFilename = System.getProperty("bitronix.tm.configuration"); if (configurationFilename != null) { if (log.isDebugEn...
protected Configuration() { try { InputStream in = null; Properties properties; try { String configurationFilename = System.getProperty("bitronix.tm.configuration"); if (configurationFilename != null) { if (log.isDebugEn...
private static void writeZipEntry(ZipOutputStream zipOutputStream, OpenDocumentArchive archive, String entryName, int method) throws IOException { ZipEntry zipEntry = new ZipEntry(entryName); zipOutputStream.putNextEntry(zipEntry); InputStream entryInputStream = archive.getEntryInputStream(entryName); zipEntry...
private static void writeZipEntry(ZipOutputStream zipOutputStream, OpenDocumentArchive archive, String entryName, int method) throws IOException { ZipEntry zipEntry = new ZipEntry(entryName); InputStream entryInputStream = archive.getEntryInputStream(entryName); zipEntry.setMethod(method); if (method == ZipEnt...
public void run(IAction action) { AutoLayout autoLayout = new AutoLayout(testEditor); Test test = testEditor.getTest(); if (test.getStartPoint() instanceof SubTestStartPoint) { ErrorHandler.logAndShowErrorDialog("It is not possible to record from tests that start with a SubTest start point. "); return; ...
public void run(IAction action) { AutoLayout autoLayout = new AutoLayout(testEditor); Test test = testEditor.getTest(); if (test.getStartPoint() instanceof SubTestStartPoint) { ErrorHandler.logAndShowErrorDialog("It is not possible to record from tests that start with a SubTest start point. "); return; ...
public void start() { final Logger logger = container.logger(); final Long reaperTimeout = container.config().getLong("reaperTimeout", 300000); logger.info("Started UserAgent Reaper with timeout of [" + reaperTimeout + "]"); final ConcurrentMap<String, Long> lastAccessedMap = vertx.s...
public void start() { final Logger logger = container.logger(); final Long reaperTimeout = container.config().getLong("reaperTimeout", 300000); logger.info("Started UserAgent Reaper with timeout of [" + reaperTimeout + "]"); final ConcurrentMap<String, Long> lastAccessedMap = vertx.s...
public PropertyDialog() { setTitle("Property dialog"); setSize(560, 200); setLocationRelativeTo(null); setResizable(false); setLayout(gbl); PropertyData.load(); // ���x���̔z�u Label fontLabel = new Label("Font"); Label sizeLabel = new ...
public PropertyDialog() { setTitle("Property dialog"); setSize(560, 200); setLocationRelativeTo(null); setResizable(false); setLayout(gbl); PropertyData.load(); // ���x���̔z�u Label fontLabel = new Label("Font"); Label sizeLabel = new ...
public void execute() throws MojoExecutionException, MojoFailureException { logGroovyVersion("execute"); try { // get classes we need with reflection Class<?> groovyShellClass = Class.forName("groovy.lang.GroovyShell"); // create a GroovyShell to run scripts in ...
public void execute() throws MojoExecutionException, MojoFailureException { logGroovyVersion("execute"); try { // get classes we need with reflection Class<?> groovyShellClass = Class.forName("groovy.lang.GroovyShell"); // create a GroovyShell to run scripts in ...
public void reduce(Object key, Iterator values, OutputCollector output, Reporter reporter) throws IOException { if(oc == null) { // propagete reporter and output collector to all operators oc = output; rp = reporter; reducer.setOutputCollector(oc)...
public void reduce(Object key, Iterator values, OutputCollector output, Reporter reporter) throws IOException { if(oc == null) { // propagete reporter and output collector to all operators oc = output; rp = reporter; reducer.setOutputCollector(oc)...
public void test() { runTests(); if (testsRun != testsPlanned) System.out.printf( "Warning: %d tests planned but %d run.\n", testsPlanned, testsRun ); System.out.printf( "%d tests successful (%d%%)", successfulTests, 100*successfulTests...
public void test() { runTests(); if (testsRun != testsPlanned) System.out.printf( "Warning: %d tests planned but %d run.\n", testsPlanned, testsRun ); System.out.printf( "%d tests successful (%d%%)", successfulTests, ...
public static String getCheapAzureAccessToken (String sUral, String sClientID, String sEcret) { String sResult=null; // String sStuff=null; // String sAddress; String sContent; HttpURLConnection conn; // sAddress = String.format(sUral); URL url; try { sContent = String.format("grant_type=client_c...
public static String getCheapAzureAccessToken (String sUral, String sClientID, String sEcret) { String sResult=null; // String sStuff=null; // String sAddress; String sContent; HttpURLConnection conn; // sAddress = String.format(sUral); URL url; try { sContent = String.format("grant_type=client_c...
private void initComponents() { jSplitPane1 = new javax.swing.JSplitPane(); jPanel1 = new javax.swing.JPanel(); orderFormat = new javax.swing.JTextField(); orderFormatInsert = new javax.swing.JButton(); orderFormatInfo = new javax.swing.JButton(); jSeparator1 = new j...
private void initComponents() { jSplitPane1 = new javax.swing.JSplitPane(); jPanel1 = new javax.swing.JPanel(); orderFormat = new javax.swing.JTextField(); orderFormatInsert = new javax.swing.JButton(); orderFormatInfo = new javax.swing.JButton(); jSeparator1 = new j...
public SimpleFieldSet handle(SimpleFieldSet input) { final String trusterID = input.get("Truster"); final String partialNickname = input.get("PartialNickname").trim(); final String partialID = input.get("PartialID").trim(); final String context = input.get("Context"); int maxIdentities = 0; try { maxI...
public SimpleFieldSet handle(SimpleFieldSet input) { final String trusterID = input.get("Truster"); final String partialNickname = input.get("PartialNickname").trim(); final String partialID = input.get("PartialID").trim(); final String context = input.get("Context"); int maxIdentities = 0; try { maxI...
protected void write(ByteBuffer data) throws IOException { ByteBuffer plain; if (engine != null) { plain = ByteBuffer.allocate(engine.getSession().getPacketBufferSize()); plain.clear(); engine.wrap(data, plain); plain.flip(); } else { ...
protected void write(ByteBuffer data) throws IOException { ByteBuffer plain; if (engine != null) { plain = ByteBuffer.allocate(engine.getSession().getPacketBufferSize()); plain.clear(); engine.wrap(data, plain); plain.flip(); } else { ...
public void adjustChannels(final Patch p, final int old_channels) { /* if (0xffffffff == old_channels) { // reuse any loaded mipmaps Hashtable<Integer,Image> ht = null; synchronized (db_lock) { lock(); ht = mawts.getAll(p.getId()); unlock(); } for (Map.Entry<Integer,Image> entry : ht.ent...
public void adjustChannels(final Patch p, final int old_channels) { /* if (0xffffffff == old_channels) { // reuse any loaded mipmaps Hashtable<Integer,Image> ht = null; synchronized (db_lock) { lock(); ht = mawts.getAll(p.getId()); unlock(); } for (Map.Entry<Integer,Image> entry : ht.ent...
static public void openFile(IFile jf) { if (jf != null) { try { IEditorDescriptor editor = IDE.getDefaultEditor(jf); if (editor == null) { editor = PlatformUI.getWorkbench().getEditorRegistry() .findEditor(EditorsUI.DEFAULT_TEXT_EDITOR_ID); } if (editor.getId().equals("org.ow2.mindEd.a...
static public void openFile(IFile jf) { if (jf != null) { try { IEditorDescriptor editor = IDE.getDefaultEditor(jf); if (editor == null) { editor = PlatformUI.getWorkbench().getEditorRegistry() .findEditor(EditorsUI.DEFAULT_TEXT_EDITOR_ID); } if (editor.getId().equals("org.ow2.mindEd.a...
private void writeClass(ClassInfo<TypeT,ClassDeclT> c, TypeHost parent) { // special handling for value properties if (containsValueProp(c)) { if (c.getProperties().size() == 1) { // [RESULT 2 - simpleType if the value prop is the only prop] ...
private void writeClass(ClassInfo<TypeT,ClassDeclT> c, TypeHost parent) { // special handling for value properties if (containsValueProp(c)) { if (c.getProperties().size() == 1) { // [RESULT 2 - simpleType if the value prop is the only prop] ...
public synchronized Data getData(int[] pos, int dim, DataCache cache) { if (dim != 3) { System.err.println(name + ": invalid dimensionality (" + dim + ")"); return null; } // get some info from the parent transform ImageTransform it = (ImageTransform) parent; int w = it.getImageWidth(...
public synchronized Data getData(int[] pos, int dim, DataCache cache) { if (dim != 3) { System.err.println(name + ": invalid dimensionality (" + dim + ")"); return null; } // get some info from the parent transform ImageTransform it = (ImageTransform) parent; int w = it.getImageWidth(...
private void updateUI() { if (mPolicyThreshold == 0) return; int dataUsedPercent = (int) ((mDataUsed * 100) / mPolicyThreshold); long cycleTime = mEnd.getTimeInMillis() - mStart.getTimeInMillis(); long currentTime = GregorianCalendar.getInstance().getTimeInMillis() ...
private void updateUI() { if (mPolicyThreshold == 0) return; int dataUsedPercent = (int) ((mDataUsed * 100) / mPolicyThreshold); long cycleTime = mEnd.getTimeInMillis() - mStart.getTimeInMillis(); long currentTime = GregorianCalendar.getInstance().getTimeInMillis() ...
public boolean equals(Object aLecturer) { if (!(aLecturer instanceof Lecturer)) return false; return ((Lecturer) aLecturer).name == this.name; }
public boolean equals(Object aLecturer) { if (!(aLecturer instanceof Lecturer)) return false; return ((Lecturer) aLecturer).name.equals(this.name); }
private void launch() { ContactManagerUtilities.displayWelcome(); loadData(); boolean finished = false; while (!finished) { int userSelection = ContactManagerUtilities.chooseMainMenuOption(); switch (userSelection) { case 1: System.out.println("\n"); System.out.println("*** ADD A...
private void launch() { ContactManagerUtilities.displayWelcome(); loadData(); boolean finished = false; while (!finished) { int userSelection = ContactManagerUtilities.chooseMainMenuOption(); switch (userSelection) { case 1: System.out.println("\n"); System.out.println("*** ADD A...
private static void logSystemEnvironment() { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) log("Missing currentThread context ClassLoader"); else log("Using context ClassLoader : " + cl.toString()); log("Program environme...
private static void logSystemEnvironment() { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) log("Missing currentThread context ClassLoader"); else log("Using context ClassLoader : " + cl.toString()); log("Program environme...
protected void configure() { bind(BillServiceAsync.class).asEagerSingleton(); bind(BillTypeServiceAsync.class).asEagerSingleton(); bind(CategoryServiceAsync.class).asEagerSingleton(); bind(ChamberServiceAsync.class).asEagerSingleton(); bind(CommissionServiceAsync.class).asEagerSingleton(); bind(DistrictSer...
protected void configure() { bind(BillServiceAsync.class).asEagerSingleton(); bind(BillTypeServiceAsync.class).asEagerSingleton(); bind(CategoryServiceAsync.class).asEagerSingleton(); bind(ChamberServiceAsync.class).asEagerSingleton(); bind(CommissionServiceAsync.class).asEagerSingleton(); bind(DistrictSer...
protected String parseLine(final String mot, final String name, final String longName, final String noTrainName) { if (mot == null) { if (noTrainName != null) { final String str = name != null ? name : ""; if (noTrainName.equals("S-Bahn")) return 'S' + str; if (noTrainName.equals("U-Bahn"))...
protected String parseLine(final String mot, final String name, final String longName, final String noTrainName) { if (mot == null) { if (noTrainName != null) { final String str = name != null ? name : ""; if (noTrainName.equals("S-Bahn")) return 'S' + str; if (noTrainName.equals("U-Bahn"))...