buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected Seq instantiate(ClassLoader envLoader) { if (NAME_SYSTEM.equals(_name)) return _repos.getConfiguration().getSequenceInstance(); try { PluginValue plugin = newPluginValue("sequence-plugin"); plugin.setString(_plugin); String clsName = plugin....
protected Seq instantiate(ClassLoader envLoader) { if (NAME_SYSTEM.equals(_name)) return _repos.getConfiguration().getSequenceInstance(); try { PluginValue plugin = newPluginValue("sequence-plugin"); plugin.setString(_plugin); String clsName = plugin....
public Id(String str, ClassLoader loader) { if (loader == null) loader = (ClassLoader) AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); if (str == null) _id = 0L; else { int dash = str.indexOf('-'); ...
public Id(String str, ClassLoader loader) { if (loader == null) loader = AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); if (str == null) _id = 0L; else { int dash = str.indexOf('-'); try { ...
protected String getInternalString() { return (value == null) ? null : (String) AccessController.doPrivileged( J2DoPrivHelper.getAbsolutePathAction(value)); }
protected String getInternalString() { return (value == null) ? null : AccessController.doPrivileged( J2DoPrivHelper.getAbsolutePathAction(value)); }
public void setFile(String file) { if (STDOUT.equals(file)) _out = System.out; else if (STDERR.equals(file)) _out = System.err; else { File f = Files.getFile(file, null); try { _out = new PrintStream((FileOutputStream) ...
public void setFile(String file) { if (STDOUT.equals(file)) _out = System.out; else if (STDERR.equals(file)) _out = System.err; else { File f = Files.getFile(file, null); try { _out = new PrintStream((FileOutputStream) ...
protected String currentPackage() { return _package; } /** * Helper method to create the {@link Class} for the given name, * taking into account the package currently being parsed for relative * class names. */ protected Class classForName(String name, boolean resolve) ...
protected String currentPackage() { return _package; } /** * Helper method to create the {@link Class} for the given name, * taking into account the package currently being parsed for relative * class names. */ protected Class classForName(String name, boolean resolve) ...
public static String getSourceLocationMessage(SourceTracker[] trackers) { StringBuffer buf = new StringBuffer(20 * (trackers.length + 1)); buf.append(_loc.get("source-trackers-location-header")).append(SEP); String sourceFilePath; for (int i = 0; i < trackers.length; i++) { ...
public static String getSourceLocationMessage(SourceTracker[] trackers) { StringBuffer buf = new StringBuffer(20 * (trackers.length + 1)); buf.append(_loc.get("source-trackers-location-header")).append(SEP); String sourceFilePath; for (int i = 0; i < trackers.length; i++) { ...
private static Method INIT_CAUSE = null; static { String specVersion = (String) AccessController.doPrivileged( J2DoPrivHelper.getPropertyAction("java.specification.version")); if ("1.2".equals(specVersion)) VERSION = 2; else if ("1.3".equals(specVersion)) ...
private static Method INIT_CAUSE = null; static { String specVersion = AccessController.doPrivileged( J2DoPrivHelper.getPropertyAction("java.specification.version")); if ("1.2".equals(specVersion)) VERSION = 2; else if ("1.3".equals(specVersion)) VER...
public static Localizer forPackage(Class cls, Locale locale) { if (locale == null) locale = Locale.getDefault(); int dot = (cls == null) ? -1 : cls.getName().lastIndexOf('.'); String pkg; String file; if (dot == -1) { pkg = ""; file = "loc...
public static Localizer forPackage(Class cls, Locale locale) { if (locale == null) locale = Locale.getDefault(); int dot = (cls == null) ? -1 : cls.getName().lastIndexOf('.'); String pkg; String file; if (dot == -1) { pkg = ""; file = "loc...
public String toString() { if (_buf.length() == 0 || _params.isEmpty()) return _buf.toString(); StringBuffer copy = new StringBuffer(); StringBuffer param = null; char ch, last = 0; for (int i = 0; i < _buf.length(); i++) { ch = _buf.charAt(i); ...
public String toString() { if (_buf.length() == 0 || _params.isEmpty()) return _buf.toString(); StringBuffer copy = new StringBuffer(); StringBuffer param = null; char ch, last = 0; for (int i = 0; i < _buf.length(); i++) { ch = _buf.charAt(i); ...
public ResourceBundle findResource(String name, Locale locale, ClassLoader loader) { String rsrc = name.replace('.', '/') + ".properties"; if (loader == null) loader = (ClassLoader) AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); ...
public ResourceBundle findResource(String name, Locale locale, ClassLoader loader) { String rsrc = name.replace('.', '/') + ".properties"; if (loader == null) loader = AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); InputStre...
public ResourceBundle findResource(String name, Locale locale, ClassLoader loader) { String rsrc = name.replace('.', '/') + ".properties"; if (loader == null) loader = (ClassLoader) AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); ...
public ResourceBundle findResource(String name, Locale locale, ClassLoader loader) { String rsrc = name.replace('.', '/') + ".properties"; if (loader == null) loader = AccessController.doPrivileged( J2DoPrivHelper.getContextClassLoaderAction()); InputStre...
protected void parseColumns(FieldMapping fm, javax.persistence.Column... pcols) { if (pcols.length == 0) return; // might already have some column information from mapping annotation List cols = fm.getValueInfo().getColumns(); if (!cols.isEmpty() && cols.size() !...
protected void parseColumns(FieldMapping fm, javax.persistence.Column... pcols) { if (pcols.length == 0) return; // might already have some column information from mapping annotation List cols = fm.getValueInfo().getColumns(); if (!cols.isEmpty() && cols.size() !...
public void serialize(File file, int flags) throws IOException { try { FileWriter out = new FileWriter((String) AccessController .doPrivileged(J2DoPrivHelper.getCanonicalPathAction(file)), (flags & APPEND) > 0); serialize(out, flags); out.c...
public void serialize(File file, int flags) throws IOException { try { FileWriter out = new FileWriter(AccessController .doPrivileged(J2DoPrivHelper.getCanonicalPathAction(file)), (flags & APPEND) > 0); serialize(out, flags); out.close(); ...
private List<ICompletionProposal> computeCompletionProposals(JavaContentAssistInvocationContext context) { CompletionContext completionContext = context.getCoreContext(); int tokenStart = completionContext.getOffset(); ICompilationUnit source = context.getCompilationUnit(); try { IJavaE...
private List<ICompletionProposal> computeCompletionProposals(JavaContentAssistInvocationContext context) { CompletionContext completionContext = context.getCoreContext(); int tokenStart = completionContext.getOffset(); ICompilationUnit source = context.getCompilationUnit(); try { IJavaE...
protected boolean parseSelection(final String textSelection) { if (textSelection == null || textSelection.length() == 0) { return false; } Pattern p = Pattern.compile("[^<>]+"); Matcher m = p.matcher(textSelection); // a tag (or parts of it) are selected ...
protected boolean parseSelection(final String textSelection) { if (textSelection == null || textSelection.trim().length() == 0) { return false; } Pattern p = Pattern.compile("[^<>]+"); Matcher m = p.matcher(textSelection); // a tag (or parts of it) are selected ...
public void destroyWidget () { int hwnd = hwndScrollBar (), type = scrollBarType (); if (OS.IsWinCE) { SCROLLINFO info = new SCROLLINFO (); info.cbSize = SCROLLINFO.sizeof; info.fMask = OS.SIF_RANGE | OS.SIF_PAGE; info.nPage = 101; info.nMax = 100; info.nMin = 0; OS.SetScrollInfo (hwnd, type, info, true...
public void addSelectionListener (SelectionListener listener) { checkWidget(); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener(listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } static int checkStyle (int...
public void paint(GC gc, int width, int height) { int centerX = width / 2; int centerY = height / 2; int pos = 0; for (int i = 0; i < POINTS; ++i) { double r = Math.PI*2 * pos/POINTS; radial[i*2] = (int)((1+Math.cos(r))*centerX); radial[i*2+1] = (int)((1+Math.sin(r))*centerY); ...
public void paint(GC gc, int width, int height) { int centerX = width / 2; int centerY = height / 2; int pos = 0; for (int i = 0; i < POINTS; ++i) { double r = Math.PI*2 * pos/POINTS; radial[i*2] = (int)((1+Math.cos(r))*centerX); radial[i*2+1] = (int)((1+Math.sin(r))*centerY); ...
public static void writeXml( XMLWriter out, IMessage message) { // XXX short form only, no files if ((null == out) || (null == message)) { return; } Throwable thrown = message.getThrown(); if (null != thrown) { String m = "unable to write " + message + " thrown not permitted"; throw new IllegalArg...
public static void writeXml( XMLWriter out, IMessage message) { // XXX short form only, no files if ((null == out) || (null == message)) { return; } Throwable thrown = message.getThrown(); if (null != thrown) { String m = "unable to write " + message + " thrown not permitted"; throw new IllegalArg...
(2) We carry around a few protected methods that work on basedirs and arrays of names. To optimize stuff, all resources with the same basedir get collected in separate lists and then each list is handled in one go. */ HashMap filesByB...
(2) We carry around a few protected methods that work on basedirs and arrays of names. To optimize stuff, all resources with the same basedir get collected in separate lists and then each list is handled in one go. */ HashMap filesByB...
public void executeMain() throws BuildException { if (baseDir == null & resources.size() == 0 && groupfilesets.size() == 0 && "zip".equals(archiveType)) { throw new BuildException("basedir attribute must be set, " + "or at least one " ...
public void executeMain() throws BuildException { if (baseDir == null && resources.size() == 0 && groupfilesets.size() == 0 && "zip".equals(archiveType)) { throw new BuildException("basedir attribute must be set, " + "or at least one " ...
public void setLastModifiedTime(Time time) { if (time != null) { // If time is set also set cache headers. httpServletResponse.setDateHeader("Expires", time.getMilliseconds() * 1000 + 3600); httpServletResponse.setHeader("Cache-Control", "max-age=" + 3600); httpServletResponse.setDateHeader("Last-Modi...
public void setLastModifiedTime(Time time) { if (time != null) { // If time is set also set cache headers. httpServletResponse.setDateHeader("Expires", time.getMilliseconds() + (3600 * 1000)); httpServletResponse.setHeader("Cache-Control", "max-age=" + 3600); httpServletResponse.setDateHeader("Last-Mo...
private void setExecutableCommandLine() { String[] commands = commandLine.getCommandline(); //always trigger file mode if commands are big enough if (automaticResponseFileThreshold > 0 && commands.length > automaticResponseFileThreshold) { useResponseFile = true; ...
private void setExecutableCommandLine() { String[] commands = commandLine.getCommandline(); //always trigger file mode if commands are big enough if (automaticResponseFileThreshold > 0 && commands.length > automaticResponseFileThreshold) { useResponseFile = true; ...
public void handleEvent(Event event) { if((event.detail & SWT.SELECTED) != 0) { GC gc = event.gc; Rectangle area = table.getClientArea(); /* * If you wish to paint the selection beyond the end of * last column, you must change the clipping region. */ int columnCount = table.getCol...
public void handleEvent(Event event) { if((event.detail & SWT.SELECTED) != 0) { GC gc = event.gc; Rectangle area = table.getClientArea(); /* * If you wish to paint the selection beyond the end of * last column, you must change the clipping region. */ int columnCount = table.getCol...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } int callWindowProc (in...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } int callWindowProc (in...
public DBDictionary() { fixedSizeTypeNameSet.addAll(Arrays.asList(new String[]{ "BIGINT", "BIT", "BLOB", "CLOB", "DATE", "DECIMAL", "DISTINCT", "DOUBLE", "FLOAT", "INTEGER", "JAVA_OBJECT", "NULL", "NUMERIC", "OTHER", "REAL", "REF", "SMALLINT", "STRUCT", "TIME", "TIMESTAMP...
public DBDictionary() { fixedSizeTypeNameSet.addAll(Arrays.asList(new String[]{ "BIGINT", "BIT", "BLOB", "CLOB", "DATE", "DECIMAL", "DISTINCT", "DOUBLE", "FLOAT", "INTEGER", "JAVA_OBJECT", "NULL", "OTHER", "REAL", "REF", "SMALLINT", "STRUCT", "TIME", "TIMESTAMP", ...
public void execute() throws BuildException { File savedFile = myFile; // may be altered in validate validate(); final Properties properties = loadProperties(); final int buildNumber = getBuildNumber(properties); properties.put(DEFAULT_PROPERTY_NAME, S...
public void execute() throws BuildException { File savedFile = myFile; // may be altered in validate validate(); final Properties properties = loadProperties(); final int buildNumber = getBuildNumber(properties); properties.put(DEFAULT_PROPERTY_NAME, S...
private static Vector addVMSLogicals(Vector environment, BufferedReader in) throws IOException { HashMap logicals = new HashMap(); String logName = null, logValue = null, newLogName; String line, lineSep = System.getProperty("line.separator"); while ((line = in.readLine()) !=...
private static Vector addVMSLogicals(Vector environment, BufferedReader in) throws IOException { HashMap logicals = new HashMap(); String logName = null, logValue = null, newLogName; String line = null; while ((line = in.readLine()) != null) { // parse the VMS log...
public void setExecutable(String e) { throw new BuildException(taskType + " doesn\'t support the executable" + " attribute", getLocation()); }
public void setExecutable(String e) { throw new BuildException(getTaskType() + " doesn\'t support the executable" + " attribute", getLocation()); }
public RegexpMatcher newRegexpMatcher(Project p) throws BuildException { String systemDefault = null; if (p == null) { systemDefault = System.getProperty("ant.regexp.regexpimpl"); } else { systemDefault = p.getProperty("ant.regexp.regexpimpl"); } ...
public RegexpMatcher newRegexpMatcher(Project p) throws BuildException { String systemDefault = null; if (p == null) { systemDefault = System.getProperty("ant.regexp.regexpimpl"); } else { systemDefault = p.getProperty("ant.regexp.regexpimpl"); } ...
IWrapModel wrapOnAssignment(Component component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
IWrapModel wrapOnAssignment(Component component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
IWrapModel wrapOnInheritance(Component component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
IWrapModel wrapOnInheritance(Component component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {canvas}; } /** * Returns a list of set/get API method names (without the set/get pref...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {canvas}; } /** * Returns a list of set/get API method names (without the set/get pref...
public void widgetSelected(SelectionEvent event) { if (!((Button) event.widget).getSelection ()) return; recreateExampleWidgets (); } }; shadowEtchedInButton.addSelectionListener (selectionListener); shadowEtchedOutButton.addSelectionListener (selectionListener); shadowInButton.addSelectionListene...
public void widgetSelected(SelectionEvent event) { if (!((Button) event.widget).getSelection ()) return; recreateExampleWidgets (); } }; shadowEtchedInButton.addSelectionListener (selectionListener); shadowEtchedOutButton.addSelectionListener (selectionListener); shadowInButton.addSelectionListene...
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.lo...
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.lo...
public int validateContent(QName children[], int offset, int length) throws CMException { if (DEBUG_VALIDATE_CONTENT) System.out.println("DFAContentModel#validateContent"); // // A DFA content model must *always* have at least 1 child // so a failure is given if no chi...
public int validateContent(QName children[], int offset, int length) throws CMException { if (DEBUG_VALIDATE_CONTENT) System.out.println("DFAContentModel#validateContent"); // // A DFA content model must *always* have at least 1 child // so a failure is given if no chi...
public GuestBook2Application() { getPages().setHomePage(Home.class); }
public GuestBook2Application() { getPages().setHomePage(GuestBook2.class); }
public int getRowCount () { checkWidget(); /* On GTK, toolbars cannot wrap */ return 1; } int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { if (!hasFocus ()) return 0; int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; ToolItem [] i...
public int getRowCount () { checkWidget(); /* On GTK, toolbars cannot wrap */ return 1; } int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { if (!hasFocus ()) return 0; int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; ToolItem [] i...
public void run() { urlshare.sendURL(entry.getUser().getID()); } }; action .setText(Messages.URLShareRosterEntryContributionItem_SEND_URL_MENU_TEXT); action.setImageDescriptor(Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID, Messages.URLShareRosterContributionIte...
public void run() { urlshare.sendURL(entry.getRoster().getUser().getName(),entry.getUser().getID()); } }; action .setText(Messages.URLShareRosterEntryContributionItem_SEND_URL_MENU_TEXT); action.setImageDescriptor(Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID, ...
public void setNode(JMeterTreeNode node) { namePanel.setNode(node); }
public void setNode(JMeterTreeNode node) { getNamePanel().setNode(node); }
public Session newSession(Request request, Response response) { return new QuickStartSession(QuickStartApplication.this, request, response); }
public Session newSession(Request request, Response response) { return new QuickStartSession(QuickStartApplication.this, request); }
protected void openStreams() throws IncomingFileTransferException { try { setupAuthentication(); connect(); setRequestHeaderValues(); // Make actual GET request setInputStream(urlConnection.getInputStream()); getResponseHeaderValues(); fireReceiveStartEvent(); } catch (final Exception e) { ...
protected void openStreams() throws IncomingFileTransferException { try { setupAuthentication(); connect(); setRequestHeaderValues(); // Make actual GET request setInputStream(urlConnection.getInputStream()); getResponseHeaderValues(); fireReceiveStartEvent(); } catch (final Exception e) { ...
public void run() { // Check which HTTPSampler class we should use String httpSamplerName = target.getSamplerTypeName(); HttpRequestHdr request = new HttpRequestHdr(httpSamplerName); SampleResult result = null; HeaderManager headers = null; HTTPSamplerBase sampler = ...
public void run() { // Check which HTTPSampler class we should use String httpSamplerName = target.getSamplerTypeName(); HttpRequestHdr request = new HttpRequestHdr(httpSamplerName); SampleResult result = null; HeaderManager headers = null; HTTPSamplerBase sampler = ...
private TokenizedPattern(String pattern, String[] tokens) { this.pattern = pattern; this.tokenizedPattern = tokens; }
public TokenizedPattern(String pattern) { this(pattern, SelectorUtils.tokenizePathAsArray(pattern)); } TokenizedPattern(String pattern, String[] tokens) { this.pattern = pattern; this.tokenizedPattern = tokens; }
public AjConstructorDeclaration(CompilationResult compilationResult) { super(compilationResult); } /* (non-Javadoc) * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile) */ protected int generateInfoAttributes(ClassFile clas...
public AjConstructorDeclaration(CompilationResult compilationResult) { super(compilationResult); } /* (non-Javadoc) * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile) */ protected int generateInfoAttributes(ClassFile clas...
public AjMethodDeclaration(CompilationResult compilationResult) { super(compilationResult); } /* (non-Javadoc) * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile) */ protected int generateInfoAttributes(ClassFile classFile...
public AjMethodDeclaration(CompilationResult compilationResult) { super(compilationResult); } /* (non-Javadoc) * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile) */ protected int generateInfoAttributes(ClassFile classFile...
public void parseStatements( Parser parser, CompilationUnitDeclaration unit) { // do nothing, we're already fully parsed } protected int generateInfoAttributes(ClassFile classFile) { return classFile.generateMethodInfoAttribute(binding, AstUtil.getAjSyntheticAttribute()); }
public void parseStatements( Parser parser, CompilationUnitDeclaration unit) { // do nothing, we're already fully parsed } protected int generateInfoAttributes(ClassFile classFile) { return classFile.generateMethodInfoAttribute(binding, false, AstUtil.getAjSyntheticAttribute()); }
private MethodDeclaration makePreMethod(ClassScope scope, ExplicitConstructorCall explicitConstructorCall) { EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(scope); TypeX aspectTypeX = EclipseFactory.fromBinding(binding.declaringClass); TypeX targetTypeX = EclipseFactory.fromBind...
private MethodDeclaration makePreMethod(ClassScope scope, ExplicitConstructorCall explicitConstructorCall) { EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(scope); TypeX aspectTypeX = EclipseFactory.fromBinding(binding.declaringClass); TypeX targetTypeX = EclipseFactory.fromBind...
private void generateDispatchMethod( EclipseFactory world, ResolvedMember sig, TypeX aspectType, ClassScope classScope, ClassFile classFile, boolean isGetter) { MethodBinding binding; if (isGetter) { binding = world.makeMethodBinding(AjcMemberMaker.interFieldGetDispatcher(sig, aspectType)); } els...
private void generateDispatchMethod( EclipseFactory world, ResolvedMember sig, TypeX aspectType, ClassScope classScope, ClassFile classFile, boolean isGetter) { MethodBinding binding; if (isGetter) { binding = world.makeMethodBinding(AjcMemberMaker.interFieldGetDispatcher(sig, aspectType)); } els...
private void replaceEffectivelyStaticRef(MessageSend call) { NameReference receiver = (NameReference) call.receiver; // Don't continue if the call binding is null, as we are going to report an error about this line of code! if (call.binding==null) return; //System.err.println("replace static ref: " + re...
private void replaceEffectivelyStaticRef(MessageSend call) { NameReference receiver = (NameReference) call.receiver; // Don't continue if the call binding is null, as we are going to report an error about this line of code! if (call.binding==null) return; //System.err.println("replace static ref: " + re...
public void test002_decpOnAnnotationNotAllowed_errors() { CompilationResult cR = binaryWeave("testcode.jar","AnnotationAspect04.aj",3,0,true); IMessage msg = (IMessage)cR.getErrorMessages().get(1); assertTrue("Expected a message about can't use decp to alter supertype of an annotation: "+msg, msg.toStri...
public void test002_decpOnAnnotationNotAllowed_errors() { CompilationResult cR = binaryWeave("testcode.jar","AnnotationAspect04.aj",3,0,true,new String[]{"-source","1.5"}); IMessage msg = (IMessage)cR.getErrorMessages().get(1); assertTrue("Expected a message about can't use decp to alter supertype of an anno...
private boolean enforceDecpRule1_abstractMethodsImplemented(BcelClassWeaver weaver, ISourceLocation mungerLoc,LazyClassGen newParentTarget, ResolvedTypeX newParent) { boolean ruleCheckingSucceeded = true; if (!(newParentTarget.isAbstract() || newParentTarget.isInterface())) { // Ignore abstract clas...
private boolean enforceDecpRule1_abstractMethodsImplemented(BcelClassWeaver weaver, ISourceLocation mungerLoc,LazyClassGen newParentTarget, ResolvedTypeX newParent) { boolean ruleCheckingSucceeded = true; if (!(newParentTarget.isAbstract() || newParentTarget.isInterface())) { // Ignore abstract clas...
public void setExpanded (boolean value) { checkWidget (); if (expanded == value) return; if (items.length == 0) return; if (parent.inExpand) return; if ((parent.style & SWT.VIRTUAL) != 0) cached = true; if (value) { expanded = value; if (availableIndex == -1) return; TreeItem[] availableDescendents = compu...
public void setExpanded (boolean value) { checkWidget (); if (expanded == value) return; if (items.length == 0) return; if (parent.inExpand) return; if ((parent.style & SWT.VIRTUAL) != 0) cached = true; if (value) { expanded = value; if (availableIndex == -1) return; TreeItem[] availableDescendents = compu...
protected void cleanUp() { if (addedWebXmlFile == null && deploymentDescriptor == null && needxmlfile && !isInUpdateMode()) { throw new BuildException("No WEB-INF/web.xml file was added.\n" + "If this is your intent, set needxml='false' ");...
protected void cleanUp() { if (addedWebXmlFile == null && deploymentDescriptor == null && needxmlfile && !isInUpdateMode()) { throw new BuildException("No WEB-INF/web.xml file was added.\n" + "If this is your intent, set needxmlfile='false'...
public void run(IAction action) { if (file == null) { return; } IProject project = file.getProject(); ClientEntry entry = isConnected(project); if (entry == null) { MessageDialog .openInformation( targetPart.getSite().getWorkbenchWindow() .getShell(), "Project Not Connected ...
public void run(IAction action) { if (file == null) { return; } IProject project = file.getProject(); ClientEntry entry = isConnected(project); if (entry == null) { MessageDialog .openInformation( targetPart.getSite().getWorkbenchWindow() .getShell(), "Project Not Connected ...
public void close () { checkWidget (); closeWidget (); } void createBalloonTipHandle () { balloonTipHandle = OS.CreateWindowEx ( 0, new TCHAR (0, OS.TOOLTIPS_CLASS, true), null, OS.TTS_ALWAYSTIP | OS.TTS_BALLOON, OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0, handle, 0, OS.GetModuleHandle (null), null)...
public void close () { checkWidget (); closeWidget (); } void createBalloonTipHandle () { balloonTipHandle = OS.CreateWindowEx ( 0, new TCHAR (0, OS.TOOLTIPS_CLASS, true), null, OS.TTS_ALWAYSTIP | OS.TTS_BALLOON, OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0, handle, 0, OS.GetModuleHandle (null), null)...
protected final void checkRequired() { if (isRequired()) { final String input = getInput(); // when null, check whether this is natural for that component, or // whether - as is the case with text fields - this can only happen // when the component was disabled if (input == null && (isInputNullabl...
protected final void checkRequired() { if (isRequired()) { final String input = getInput(); // when null, check whether this is natural for that component, or // whether - as is the case with text fields - this can only happen // when the component was disabled if (input == null && !isInputNullabl...
public TreeRow(String componentName, Tree tree, TreeNodeModel nodeModel) { super(componentName); if(nodeModel != null) { TreeNodeLink link = new TreeNodeLink("link", tree, nodeModel); link.add(new Label("label", String.valueOf(nodeModel.getUserObject()))); ...
public TreeRow(String componentName, AbstractTree tree, TreeNodeModel nodeModel) { super(componentName); if(nodeModel != null) { TreeNodeLink link = new TreeNodeLink("link", tree, nodeModel); link.add(new Label("label", String.valueOf(nodeModel.getUserObject())));...
public static String[] getAllFlags() { return new String[]{FLAG_NO_GEN, FLAG_ADDRESS, FLAG_CONST, FLAG_DYNAMIC, FLAG_JNI, FLAG_CPP, FLAG_NEW, FLAG_DELETE, FLAG_GCNEW, FLAG_GCOBJECT, FLAG_SETTER, FLAG_GETTER, FLAG_ADDER}; }
public static String[] getAllFlags() { return new String[]{FLAG_NO_GEN, FLAG_ADDRESS, FLAG_CONST, FLAG_DYNAMIC, FLAG_JNI, FLAG_CAST, FLAG_CPP, FLAG_NEW, FLAG_DELETE, FLAG_GCNEW, FLAG_GCOBJECT, FLAG_SETTER, FLAG_GETTER, FLAG_ADDER}; }
public final static OsFamily OS_FAMILY_DOS = new OsFamily( "dos", new OsFamily[]{OS_FAMILY_WINDOWS} );
public final static OsFamily OS_FAMILY_DOS = new OsFamily( "dos" );
public void invokeAction(int action) { checkWidget(); if (blockSelection && invokeBlockAction(action)) return; updateCaretDirection = true; switch (action) { // Navigation case ST.LINE_UP: doLineUp(false); clearSelection(true); break; case ST.LINE_DOWN: doLineDown(false); clearSelection(true); ...
public void invokeAction(int action) { checkWidget(); if (blockSelection && invokeBlockAction(action)) return; updateCaretDirection = true; switch (action) { // Navigation case ST.LINE_UP: doLineUp(false); clearSelection(true); break; case ST.LINE_DOWN: doLineDown(false); clearSelection(true); ...
private static void checkVersions() { versionsOK = true; checkVersion(BooleanPropertyConverter.class, "1.4"); checkVersion(HashTreeConverter.class, "1.2"); checkVersion(IntegerPropertyConverter.class, "1.3"); checkVersion(LongPropertyConverter.class, "1.3"); checkVersion(MultiP...
private static void checkVersions() { versionsOK = true; checkVersion(BooleanPropertyConverter.class, "1.4"); checkVersion(HashTreeConverter.class, "1.2"); checkVersion(IntegerPropertyConverter.class, "1.3"); checkVersion(LongPropertyConverter.class, "1.3"); checkVersion(MultiP...
private Number executeBulkOperation(Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params, Map updates) { // we cannot execute a bulk delete statement when have mappings in // multiple tables, s...
private Number executeBulkOperation(Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params, Map updates) { // we cannot execute a bulk delete statement when have mappings in // multiple tables, s...
protected void setUp() throws Exception { org.apache.xml.security.Init.init(); Keystore sampleKeyStore = new Keystore(XMLSecurityToolsTestPlugin.getTestFileLocation(KEYSTORE_PATH), KEYSTORE_PASSWORD, Globals.KEYSTORE_TYPE); sampleKeyStore.load(); signature = new Sig...
protected void setUp() throws Exception { org.apache.xml.security.Init.init(); Keystore sampleKeyStore = new Keystore(XMLSecurityToolsTestPlugin.getTestFileLocation(KEYSTORE_PATH), KEYSTORE_PASSWORD, Globals.KEYSTORE_TYPE); sampleKeyStore.load(); signature = new Sig...
public RuntimeInvisibleAnnotations(int nameIndex, int len, byte[] rvaData,ConstantPool cpool) { super(Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS,true,nameIndex,len,rvaData,cpool); }
public RuntimeInvisibleAnnotations(int nameIndex, int len, byte[] rvaData,ConstantPool cpool) { super(Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS,false,nameIndex,len,rvaData,cpool); }
private XSSimpleType getSimpleType(String name, Element simpleTypeDecl, Object[] attrValues, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { XInt finalAttr = (XInt)attrValues[XSAttributeChecker.ATTIDX_FINAL]; int finalProperty = finalAttr == null ? schemaDoc.fFinalDefault : finalAttr.intValue(); ...
private XSSimpleType getSimpleType(String name, Element simpleTypeDecl, Object[] attrValues, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { XInt finalAttr = (XInt)attrValues[XSAttributeChecker.ATTIDX_FINAL]; int finalProperty = finalAttr == null ? schemaDoc.fFinalDefault : finalAttr.intValue(); ...
public void showSelection () { checkWidget (); int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED); if (index != -1) showItem (index); } String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip == hdr.hwndFrom && toolTi...
public void showSelection () { checkWidget (); int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED); if (index != -1) showItem (index); } String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip == hdr.hwndFrom && toolTi...
public Object nativeToJava(TransferData transferData){ if (!isSupportedType(transferData) || transferData.pValue == 0) return null; /* Ensure byteCount is a multiple of 2 bytes */ int size = (transferData.format * transferData.length / 8) / 2 * 2; if (size <= 0) return null; byte[] chars = new byte [size]; OS...
public Object nativeToJava(TransferData transferData){ if (!isSupportedType(transferData) || transferData.pValue == 0) return null; /* Ensure byteCount is a multiple of 2 bytes */ int size = (transferData.format * transferData.length / 8) / 2 * 2; if (size <= 0) return null; char[] chars = new char [size/2]; ...
private void internalAdd(final Behavior behavior) { component.data_add(behavior); if (!behavior.getStatelessHint(component)) { getBehaviorId(behavior); } }
private void internalAdd(final Behavior behavior) { component.data_add(behavior); if (behavior.getStatelessHint(component)) { getBehaviorId(behavior); } }
String substitute(String string, Map<String, String> vars) throws IllegalStateException; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF li...
String substitute(String string, Map<String, String> vars) throws IllegalStateException; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF li...
public ConstantThroughputTimerBeanInfo() { super(ConstantThroughputTimer.class); ResourceBundle rb = (ResourceBundle) getBeanDescriptor().getValue(RESOURCE_BUNDLE); // These must agree with the Timer resources tags[0] = rb.getString("calcMode.1"); //$NON-NLS-1$ tags[1] = rb.ge...
public ConstantThroughputTimerBeanInfo() { super(ConstantThroughputTimer.class); ResourceBundle rb = (ResourceBundle) getBeanDescriptor().getValue(RESOURCE_BUNDLE); // These must agree with the Timer resources tags[0] = rb.getString("calcMode.1"); //$NON-NLS-1$ tags[1] = rb.ge...
public Object getObjectValue() { return new Double(value); }
public Object getObjectValue() { return Double.valueOf(value); }
public Object getObjectValue() { return new Float(value); }
public Object getObjectValue() { return Float.valueOf(value); }
private boolean dontAddTwice(DeclareAnnotation decaF, Annotation [] dontAddMeTwice){ for (int i = 0; i < dontAddMeTwice.length; i++){ Annotation ann = dontAddMeTwice[i]; if (ann != null && decaF.getAnnotationX().getTypeName().equals(ann.getTypeName())){ dontAddMeTwice[i] = null; // incase it really has bee...
private boolean dontAddTwice(DeclareAnnotation decaF, Annotation [] dontAddMeTwice){ for (int i = 0; i < dontAddMeTwice.length; i++){ Annotation ann = dontAddMeTwice[i]; if (ann != null && decaF.getAnnotationX().getTypeName().equals(ann.getTypeName())){ //dontAddMeTwice[i] = null; // incase it really has b...
public String toString() { StringBuffer sb = new StringBuffer("XMPPSID["); //$NON-NLS-1$ sb.append(uri.toString()).append("]"); //$NON-NLS-1$ return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer("XMPPSID["); //$NON-NLS-1$ sb.append(toExternalForm()).append("]"); //$NON-NLS-1$ return sb.toString(); }
private void doValidate( File afile ) throws TaskException { try { getLogger().debug( "Validating " + afile.getName() + "... " ); m_errorHandler.init( afile ); InputSource is = new InputSource( new FileReader( afile ) ); String uri = "file:...
private void doValidate( File afile ) throws TaskException { try { getLogger().debug( "Validating " + afile.getName() + "... " ); m_errorHandler.reset(); InputSource is = new InputSource( new FileReader( afile ) ); String uri = "file:" + af...
Class resolveClass(final String classname); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy o...
Class resolveClass(final String classname); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy o...
public void init(Application application); }
void init(Application application); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * th...
public void onRedirect(); }
void onRedirect(); /* * $Id$ * $Revision$ * $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at *...
public RequestCycle newRequestCycle(final Session session, final Request request, final Response response);
RequestCycle newRequestCycle(final Session session, final Request request, /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the ...
public Resource newResource(final String specification, final Locale locale, final String style); }
Resource newResource(final String specification, final Locale locale, final String style); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in comp...
public Session newSession(); }
Session newSession(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at ...
public boolean accept(FeedbackMessage message); } No newline at end of file
boolean accept(FeedbackMessage message); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of ...
public void onFormSubmitted(); }
void onFormSubmitted(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at...
public void validate(final FormComponent component); }
void validate(final FormComponent component); /* * $Id$ $Revision: * 1.8 $ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain...
public void onLinkClicked(); }
void onLinkClicked(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at ...
public void detach(); }
void detach(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * h...
public void evict(PageMap pageMap); }
void evict(PageMap pageMap); /* * $Id: IPageMapEvictionStrategy.java,v 1.1 2005/12/29 05:30:24 jonathanlocke * Exp $ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file ...
public Object convert(Object value, Class c); } No newline at end of file
Object convert(Object value, Class c); /* * $Id$ $Revision$ * $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of *...
public IConverter newConverter(final Locale locale); } No newline at end of file
IConverter newConverter(final Locale locale); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a cop...
public void onChange(); }
void onChange(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * *...
public Page getTestPage(); }
Page getTestPage(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * ...
public void run(Log log); }
void run(Log log); /* * $Id$ $Revision$ * $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * ...
public TimeFrame getTimeFrame(); }
TimeFrame getTimeFrame(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License ...
public Time lastModifiedTime(); }
Time lastModifiedTime(); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License a...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Disposes the "Example" widgets. */ void disposeExampleWidgets () { /* store the state of the styledText if applicable */ if (styledText != null) { styleRanges = styledText.getStyleRa...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Disposes the "Example" widgets. */ void disposeExampleWidgets () { /* store the state of the styledText if applicable */ if (styledText != null) { styleRanges = styledText.getStyleRa...
public Set<Type> getSuperTypes() { if (superTypes == null) { superTypes = new HashSet<Type>(); List<Classifier> all = new ArrayList<Classifier>(stereoType.getExtendedMetaclasses()); all.addAll(stereoType.getSuperClasses()); for (Classifier classifier : all) {...
public Set<Type> getSuperTypes() { if (superTypes == null) { superTypes = new HashSet<Type>(); List<Classifier> all = new ArrayList<Classifier>(stereoType.getExtendedMetaclasses()); all.addAll(stereoType.getSuperClasses()); for (Classifier classifier : all) {...
public void execute() throws TaskException { if( ( sourceFileSets.size() == 0 ) && ( sourceFileLists.size() == 0 ) ) { throw new TaskException( "At least one <srcfileset> or <srcfilelist> element must be set" ); } if( ( targetFileSets.size() == 0 ) && ( targe...
public void execute() throws TaskException { if( ( sourceFileSets.size() == 0 ) && ( sourceFileLists.size() == 0 ) ) { throw new TaskException( "At least one <srcfileset> or <srcfilelist> element must be set" ); } if( ( targetFileSets.size() == 0 ) && ( targe...
public String[] restrict( String[] files, File srcDir, File destDir, FileNameMapper mapper ) throws TaskException { long now = ( new Date() ).getTime(); StringBuffer targetList = new StringBuffer(); /* * If we're on Windows, we have to mun...
public String[] restrict( String[] files, File srcDir, File destDir, FileNameMapper mapper ) throws TaskException { long now = ( new Date() ).getTime(); StringBuffer targetList = new StringBuffer(); /* * If we're on Windows, we have to mun...
public void testWindowsLineSeparator2() throws IOException { reg.setPattern("end of text\r$"); assertTrue("Windows line separator", reg.matches("end of text\r\n")); }
public void testWindowsLineSeparator2() throws IOException { reg.setPattern("end of text\r$"); // assertTrue("Windows line separator", reg.matches("end of text\r\n")); }
public void test() { tester.startPage(new TestPage()); // check everything was detached for (TestComponent c : components) { assertTrue(c.detached); } round++; tester.startPage(tester.getLastRenderedPage()); // check everything was detached for (TestComponent c : components) { assertTrue(...
public void test() { tester.startPage(new TestPage()); // check everything was detached for (TestComponent c : components) { assertTrue("Component " + c + " is not detached.", c.detached); } round++; tester.startPage(tester.getLastRenderedPage()); // check everything was detached for (TestComp...