buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public ActionComboBoxRenderer() { super(); try { pluginHandler = PluginManager .getInstance().getHandler(IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FILTERACTION); } catch (PluginHandlerNotFoundException ex) { ErrorDialog.createDialog(ex.getMessage(), ex); } }
public ActionComboBoxRenderer() { super(); try { pluginHandler = PluginManager .getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FILTERACTION); } catch (PluginHandlerNotFoundException ex) { ErrorDialog.createDialog(ex.getMessage(), ex); } }
public boolean addItem(ColumbaHeader header) { boolean result = true; boolean result2 = false; //boolean result3 = true; boolean flags1 = false; boolean flags2 = false; Flags flags = ((ColumbaHeader) header).getFlags(); if (flags == null) { Syst...
public boolean addItem(ColumbaHeader header) { boolean result = true; boolean result2 = false; //boolean result3 = true; boolean flags1 = false; boolean flags2 = false; Flags flags = ((ColumbaHeader) header).getFlags(); if (flags == null) { Syst...
public String toStringExpression(int tab){ return "<CompleteOnType:"/*nonNLS*/ + new String(token) + ">"/*nonNLS*/ ; }
public String toStringExpression(int tab){ return "<CompleteOnType:" + new String(token) + ">" ; //$NON-NLS-2$ //$NON-NLS-1$ }
public IAdaptable createElement(IMemento memento) { String workingSetName = memento.getString(IWorkbenchConstants.TAG_NAME); String workingSetEditPageId = memento.getString(IWorkbenchConstants.TAG_EDIT_PAGE_ID); if (workingSetName == null) return null; WorkingSet workingSet = new WorkingSet(workingSetNa...
public IAdaptable createElement(IMemento memento) { String workingSetName = memento.getString(IWorkbenchConstants.TAG_NAME); String workingSetEditPageId = memento.getString(IWorkbenchConstants.TAG_EDIT_PAGE_ID); if (workingSetName == null) return null; WorkingSet workingSet = new WorkingSet(workingSetNa...
public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) { ParameterizedGenericMethodBinding methodSubstitute; TypeVariableBinding[] typeVariables = originalMethod.typeVariables; TypeBinding[] substitutes = invocationSi...
public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) { ParameterizedGenericMethodBinding methodSubstitute; TypeVariableBinding[] typeVariables = originalMethod.typeVariables; TypeBinding[] substitutes = invocationSi...
public void removeElement() { Object target = getTarget(); if(target instanceof ArgoDiagram) { try { ArgoDiagram diagram = (ArgoDiagram) target; Project project = ProjectBrowser.TheInstance.getProject(); // // can't easily find owner of diag...
public void removeElement() { Object target = getTarget(); if(target instanceof ArgoDiagram) { try { ArgoDiagram diagram = (ArgoDiagram) target; Project project = ProjectManager.getManager().getCurrentProject(); // // can't easily find owner...
IMethodBinding resolveMember(AnnotationTypeMemberDeclaration member) { /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of t...
IMethodBinding resolveMember(AnnotationTypeMemberDeclaration member) { /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of t...
protected void ensureSpaceLimit(Object info, IJavaElement parent) { // ensure the children can be put without closing other elements int childrenSize = ((JavaElementInfo) info).children.length; int spaceNeeded = 1 + (int)((1 + this.loadFactor) * (childrenSize + this.overflow)); if (this.spaceLimit < spaceNeeded) { ...
protected void ensureSpaceLimit(Object info, IJavaElement parent) { // ensure the children can be put without closing other elements int childrenSize = ((JavaElementInfo) info).getChildren().length; int spaceNeeded = 1 + (int)((1 + this.loadFactor) * (childrenSize + this.overflow)); if (this.spaceLimit < spaceNeede...
extends org.tigris.scarab.om.BaseRModuleUserRolePeer package org.tigris.scarab.om; // JDK classes import java.util.*; // Village classes import com.workingdogs.village.*; // Turbine classes import org.apache.turbine.om.peer.*; import org.apache.turbine.util.*; import org.apache.turbine.util.db.*; import org.apache....
extends org.tigris.scarab.om.BaseRModuleUserRolePeer package org.tigris.scarab.om; // JDK classes import java.util.*; // Village classes import com.workingdogs.village.*; // Turbine classes import org.apache.turbine.om.peer.*; import org.apache.turbine.util.*; import org.apache.turbine.util.db.*; import org.apache....
public String getAddress() { return byteArrayToString(address, false); } void rrToWire(DNSOutput out, Compression c, boolean canonical) { out.writeCountedString(address); } String rrToString() { return byteArrayToString(address, false); }
public String getAddress() { return byteArrayToString(address, false); } void rrToWire(DNSOutput out, Compression c, boolean canonical) { out.writeCountedString(address); } String rrToString() { return byteArrayToString(address, true); }
protected void locatePackageDeclarations(SearchPattern searchPattern, SearchParticipant participant) throws CoreException { if (searchPattern instanceof OrPattern) { SearchPattern[] patterns = ((OrPattern) searchPattern).patterns; for (int i = 0, length = patterns.length; i < length; i++) locatePackageDeclarati...
protected void locatePackageDeclarations(SearchPattern searchPattern, SearchParticipant participant) throws CoreException { if (searchPattern instanceof OrPattern) { SearchPattern[] patterns = ((OrPattern) searchPattern).patterns; for (int i = 0, length = patterns.length; i < length; i++) locatePackageDeclarati...
public int getExtendedLength(ASTNode node) { return getExtendedEnd(node) - getExtendedStartPosition(node) + 1; } /* * Initialize leading and trailing comments tables in whole nodes hierarchy of a compilation * unit. * Scanner is necessary to scan between nodes and comments and verify if there's * nothing ...
public int getExtendedLength(ASTNode node) { return getExtendedEnd(node) - getExtendedStartPosition(node) + 1; } /* * Initialize leading and trailing comments tables in whole nodes hierarchy of a compilation * unit. * Scanner is necessary to scan between nodes and comments and verify if there's * nothing ...
protected final MethodBinding mostSpecificClassMethodBinding(MethodBinding[] visible, int visibleSize, InvocationSite invocationSite) { MethodBinding problemMethod = null; MethodBinding previous = null; nextVisible : for (int i = 0; i < visibleSize; i++) { MethodBinding method = visible[i]; if (previous !=...
protected final MethodBinding mostSpecificClassMethodBinding(MethodBinding[] visible, int visibleSize, InvocationSite invocationSite) { MethodBinding problemMethod = null; MethodBinding previous = null; nextVisible : for (int i = 0; i < visibleSize; i++) { MethodBinding method = visible[i]; if (previous !=...
public void setFlag(int bit) { flags[bit] = true; } void setFlags(boolean [] _flags) { flags = flags; }
public void setFlag(int bit) { flags[bit] = true; } void setFlags(boolean [] _flags) { flags = _flags; }
public String toString() { if (startPosition == source.length) return "EOF\n\n" + new String(source); //$NON-NLS-1$ if (currentPosition > source.length) return "behind the EOF :-( ....\n\n" + new String(source); //$NON-NLS-1$ char front[] = new char[startPosition]; System.arraycopy(source, 0, front, 0, startPo...
public String toString() { if (startPosition == source.length) return "EOF\n\n" + new String(source); //$NON-NLS-1$ if (currentPosition > source.length) return "behind the EOF\n\n" + new String(source); //$NON-NLS-1$ char front[] = new char[startPosition]; System.arraycopy(source, 0, front, 0, startPosition); ...
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) { if (runtimeTimeType == null || compileTimeType == null) return; // set the generic cast after the fact, once the type expectation is fully known (no need for strict cast) if (this.binding != null && this.b...
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) { if (runtimeTimeType == null || compileTimeType == null) return; // set the generic cast after the fact, once the type expectation is fully known (no need for strict cast) if (this.binding != null && this.b...
public void codeComplete(String codeSnippet, int position, ICodeCompletionRequestor requestor) throws JavaModelException { this.context.complete( codeSnippet.toCharArray(), position, this.project.getSearchableNameEnvironment(), new CompletionRequestorWrapper(requestor), JavaCore.getOptions() ); }
public void codeComplete(String codeSnippet, int position, ICodeCompletionRequestor requestor) throws JavaModelException { this.context.complete( codeSnippet.toCharArray(), position, this.project.getSearchableNameEnvironment(), new CompletionRequestorWrapper(requestor,this.project.getNameLookup()), JavaCore....
public IClasspathEntry findSourceAttachmentRecommendation() { try { IPath rootPath = this.getPath(); IClasspathEntry entry; IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); // try on enclosing project first JavaProject parentProject = (JavaProject) getJavaProject(); try { entr...
public IClasspathEntry findSourceAttachmentRecommendation() { try { IPath rootPath = this.getPath(); IClasspathEntry entry; IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); // try on enclosing project first JavaProject parentProject = (JavaProject) getJavaProject(); try { entr...
public void checkTaskTag(int commentStart, int commentEnd) throws InvalidInputException { char[] src = this.source; // only look for newer task: tags if (this.foundTaskCount > 0 && this.foundTaskPositions[this.foundTaskCount - 1][0] >= commentStart) { return; } int foundTaskIndex = this.foundTaskCount; char...
public void checkTaskTag(int commentStart, int commentEnd) throws InvalidInputException { char[] src = this.source; // only look for newer task: tags if (this.foundTaskCount > 0 && this.foundTaskPositions[this.foundTaskCount - 1][0] >= commentStart) { return; } int foundTaskIndex = this.foundTaskCount; char...
public DeclarationOfAccessedFieldsPattern(IJavaElement enclosingElement) { super(null, null, null, null, null, IJavaSearchConstants.REFERENCES, R_PATTERN_MATCH); this.enclosingElement = enclosingElement; this.knownFields = new SimpleSet(); ((InternalSearchPattern)this).mustResolve = true; }
public DeclarationOfAccessedFieldsPattern(IJavaElement enclosingElement) { super(null, null, null, null, null, IJavaSearchConstants.REFERENCES, R_PATTERN_MATCH); this.enclosingElement = enclosingElement; this.knownFields = new SimpleSet(); this.mustResolve = true; }
public boolean execute(IProgressMonitor progressMonitor) { if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE; try { if (this.resource != null) { if (!this.resource.isLocal(IResource.DEPTH_ZERO)) { return FAILED; } } IPath indexedPath = this.path; // if index a...
public boolean execute(IProgressMonitor progressMonitor) { if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE; try { if (this.resource != null) { if (!this.resource.isLocal(IResource.DEPTH_ZERO)) { return FAILED; } } IPath indexedPath = this.path; // if index a...
public Object getValue(String fieldName, LoggingEvent event) { String upperField = fieldName.toUpperCase(); LocationInfo info = null; if (event.locationInformationExists()) { info = event.getLocationInformation(); } if (LOGGER_FIELD.equals(upperField)) { return event.getLoggerName();...
public Object getValue(String fieldName, LoggingEvent event) { String upperField = fieldName.toUpperCase(); LocationInfo info = null; if (event.locationInformationExists()) { info = event.getLocationInformation(); } if (LOGGER_FIELD.equals(upperField)) { return event.getLoggerName();...
public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window, IAdaptable input) throws WorkbenchException { Assert.isNotNull(perspectiveId); // If the specified window has the requested perspective open and the // same requested // inpu...
public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window, IAdaptable input) throws WorkbenchException { Assert.isNotNull(perspectiveId); // If the specified window has the requested perspective open and the // same requested // inpu...
public IStatus runInUIThread(IProgressMonitor monitor) { if (fTable.isDisposed()) return Status.CANCEL_STATUS; int itemCount = fTable.getItemCount(); //Remove excess items if (fCount < itemCount) { fTable.setRedraw(false); fTable.remove(fCount, itemCount - 1); fTable.setRedraw(true);...
public IStatus runInUIThread(IProgressMonitor monitor) { if (fTable.isDisposed()) return Status.CANCEL_STATUS; int itemCount = fTable.getItemCount(); //Remove excess items if (fCount < itemCount) { fTable.setRedraw(false); fTable.remove(fCount, itemCount - 1); fTable.setRedraw(true);...
extends BaseDepend package org.tigris.scarab.om; // JDK classes import java.util.*; // Turbine classes import org.apache.turbine.om.*; import org.apache.turbine.om.peer.BasePeer; import org.apache.turbine.util.db.Criteria; import org.apache.turbine.util.ObjectUtils; import org.apache.turbine.util.StringUtils; import...
extends BaseDepend package org.tigris.scarab.om; // JDK classes import java.util.*; // Turbine classes import org.apache.turbine.om.*; import org.apache.turbine.om.peer.BasePeer; import org.apache.turbine.util.db.Criteria; import org.apache.turbine.util.ObjectUtils; import org.apache.turbine.util.StringUtils; import...
protected boolean checkEntryConditions() { if(this.msg == null) { errorHandler.error("Message object not configureed."); return false; } if(this.evaluator == null) { errorHandler.error("No TriggeringEventEvaluator is set for appender ["+ name+"]."); return false; } ...
protected boolean checkEntryConditions() { if(this.msg == null) { errorHandler.error("Message object not configured."); return false; } if(this.evaluator == null) { errorHandler.error("No TriggeringEventEvaluator is set for appender ["+ name+"]."); return false; } ...
public void manageSyntheticAccessIfNecessary( BlockScope currentScope, FieldBinding fieldBinding, TypeBinding lastReceiverType, int index, FlowInfo flowInfo) { if (!flowInfo.isReachable()) return; // if the binding declaring class is not visible, need special action // for runtime compatibility on 1...
public void manageSyntheticAccessIfNecessary( BlockScope currentScope, FieldBinding fieldBinding, TypeBinding lastReceiverType, int index, FlowInfo flowInfo) { if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return; // if the binding declaring class is not visible, need special action // for run...
public void highlightHits(String text) { Iterator pagesIterator = pages.iterator(); Pattern pattern = Pattern.compile( ".*" +text + ".*");//$NON-NLS-1$//$NON-NLS-2$ while(pagesIterator.hasNext()){ WorkbenchPreferenceNode node = (WorkbenchPreferenceNode) pagesIterator.next(); matchNode(pattern, node);...
public void highlightHits(String text) { Iterator pagesIterator = pages.iterator(); Pattern pattern = Pattern.compile( ".*" +text + ".*");//$NON-NLS-1$//$NON-NLS-2$ while(pagesIterator.hasNext()){ WorkbenchPreferenceNode node = (WorkbenchPreferenceNode) pagesIterator.next(); matchNode(pattern, node);...
protected void saveHeader(ColumbaHeader h) throws Exception { // save boolean headerfields, compressing them to one int value Boolean[] b = new Boolean[CachedHeaderfields.INTERNAL_COMPRESSED_HEADERFIELDS.length]; for (int i = 0; i < b.length; i++) { b[i] = (Boolean) h .get(CachedHeaderfields.INTERNAL_CO...
protected void saveHeader(ColumbaHeader h) throws Exception { // save boolean headerfields, compressing them to one int value Boolean[] b = new Boolean[CachedHeaderfields.INTERNAL_COMPRESSED_HEADERFIELDS.length]; for (int i = 0; i < b.length; i++) { b[i] = (Boolean) h .get(CachedHeaderfields.INTERNAL_CO...
public void setNamespace(MNamespace m) { super.setNamespace(m); DeploymentDiagramGraphModel gm = new DeploymentDiagramGraphModel(); gm.setNamespace(m); setGraphModel(gm); LayerPerspective lay = new LayerPerspective(m.getName(), gm); setLayer(lay); DeploymentDiagramRenderer rend = new D...
public void setNamespace(MNamespace m) { super.setNamespace(m); DeploymentDiagramGraphModel gm = new DeploymentDiagramGraphModel(); gm.setNamespace(m); setGraphModel(gm); LayerPerspective lay = new LayerPerspectiveMutable(m.getName(), gm); setLayer(lay); DeploymentDiagramRenderer rend = n...
public static IJavaSearchScope createWorkspaceScope() { return new JavaWorkspaceScope(); }
public static IJavaSearchScope createWorkspaceScope() { return JavaWorkspaceScope.createScope(); }
public static String id() { return "4.5-SNAPSHOT-20071207-1023"; }
public static String id() { return "4.5-SNAPSHOT-20080110-0022"; }
public void consumeFullyQualifiedName(char[] fullyQualifiedName) { try { this.element = this.project.findType(new String(CharOperation.replaceOnCopy(fullyQualifiedName, '/', '.')), owner); } catch (JavaModelException e) { this.exception = e; } }
public void consumeFullyQualifiedName(char[] fullyQualifiedName) { try { this.element = this.project.findType(new String(CharOperation.replaceOnCopy(fullyQualifiedName, '/', '.')), this.owner); } catch (JavaModelException e) { this.exception = e; } }
public int contextMap( Request request ) { Context ctx=request.getContext(); if( ctx==null) return 0; // XXX This interceptor will be added per/context. if( ! ctx.getReloadable() ) return 0; if( ! ctx.shouldReload() ) return 0; if( debug> 0 ) log( "Detected changes in " + ctx.toString()); try { ...
public int contextMap( Request request ) { Context ctx=request.getContext(); if( ctx==null) return 0; // XXX This interceptor will be added per/context. if( ! ctx.getReloadable() ) return 0; if( ! ctx.shouldReload() ) return 0; if( debug> 0 ) log( "Detected changes in " + ctx.toString()); try { ...
public Vector getAvailability() { return (Vector) _availability.clone(); }
public Vector getAvailability() { return (Vector) _availability; }
private static String[] allModelElements = { "ElementImport", "Model", "Package", "Subsystem" };
public void testDeleteComplete() { CheckUMLModelHelper.deleteComplete(this, ModelManagementFactory.getFactory(), allModelElements); } }
public String toString() { return "Unresolved type " + ((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED"); //$NON-NLS-1$ //$NON-NLS-2$ }
public String toString() { return "Unresolved type "/*nonNLS*/ + ((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED"/*nonNLS*/); }
public dnsMessage sendAXFR(dnsMessage query) throws IOException { byte [] out, in; Socket s; int inLength; DataInputStream dataIn; int soacount = 0; dnsMessage response; boolean first = true; try { s = new Socket(addr, dns.PORT); } catch (SocketException e) { System.out.println(e); return null; } if...
public dnsMessage sendAXFR(dnsMessage query) throws IOException { byte [] out, in; Socket s; int inLength; DataInputStream dataIn; int soacount = 0; dnsMessage response; boolean first = true; try { s = new Socket(addr, port); } catch (SocketException e) { System.out.println(e); return null; } if (TS...
protected void append(LoggingEvent event) { try { Connection connection = connectionSource.getConnection(); connection.setAutoCommit(false); // sequence_number BIGINT NOT NULL, // timestamp BIGINT NOT NULL, // rendered_message TEXT NOT NULL, // logger_name VARCHAR...
protected void append(LoggingEvent event) { try { Connection connection = connectionSource.getConnection(); connection.setAutoCommit(false); // sequence_number BIGINT NOT NULL, // timestamp BIGINT NOT NULL, // rendered_message TEXT NOT NULL, // logger_name VARCHAR...
private void readLevel(ObjectInputStream ois) throws java.io.IOException, ClassNotFoundException { int p = ois.readInt(); try { String className = (String) ois.readObject(); if(className == null) { level = Level.toLevel(p); } else { Method m = (Method) meth...
private void readLevel(ObjectInputStream ois) throws java.io.IOException, ClassNotFoundException { int p = ois.readInt(); try { String className = (String) ois.readObject(); if(className == null) { level = Level.toLevel(p); } else { Method m = (Method) meth...
public String individualToString(){ return "Flow context"/*nonNLS*/; }
public String individualToString(){ return "Flow context"; //$NON-NLS-1$ }
public HINFORecord(Name _name, short _dclass, int _ttl, int length, CountedDataInputStream in, Compression c) throws IOException
public HINFORecord(Name _name, short _dclass, int _ttl, int length, DataByteInputStream in, Compression c) throws IOException
public String toString() { return Localizer.localize ("Tree", "Project->Diagram"); }
public String toString() { return Localizer.localize ("Tree", "misc.project.diagram"); }
public TypeBinding resolveType(BlockScope scope) { // added for code assist...cannot occur with 'normal' code if (this.anonymousType == null && this.enclosingInstance == null) { return super.resolveType(scope); } // Propagate the type checking to the arguments, and checks if the constructor is defined. ...
public TypeBinding resolveType(BlockScope scope) { // added for code assist...cannot occur with 'normal' code if (this.anonymousType == null && this.enclosingInstance == null) { return super.resolveType(scope); } // Propagate the type checking to the arguments, and checks if the constructor is defined. ...
public CmdLineArgumentHandler(String[] args) { //this.mainInterface = mainInterface; ColumbaCmdLineArgumentParser cmdLineParser = new ColumbaCmdLineArgumentParser(); try { cmdLineParser.parse(args); } catch (CmdLineArgumentParser.UnknownOptionException e) { System.err.println(e.getMessage()); Col...
public CmdLineArgumentHandler(String[] args) { //this.mainInterface = mainInterface; ColumbaCmdLineArgumentParser cmdLineParser = new ColumbaCmdLineArgumentParser(); try { cmdLineParser.parse(args); } catch (CmdLineArgumentParser.UnknownOptionException e) { System.err.println(e.getMessage()); Col...
public String toString() { return getClass().getName() + "[" + physicalLine + "," + scrollLine + "]"; } //}}} //{{{ contentInserted() method void contentInserted(int startLine, int numLines) { if(this.physicalLine >= startLine) { if(this.physicalLine != startLine) this.physicalLine += numLines; ...
public String toString() { return getClass().getName() + "[" + physicalLine + "," + scrollLine + "]"; } //}}} //{{{ contentInserted() method void contentInserted(int startLine, int numLines) { if(this.physicalLine >= startLine) { if(this.physicalLine != startLine) this.physicalLine += numLines; ...
public void acceptMethod(IMethod method) { try { if (!Signature.getReturnType(method.getSignature()).equals("V")) { //$NON-NLS-1$ super.acceptMethod(method); } } catch (JavaModelException npe) { } }
public void acceptMethod(IMethod method) { try { if (!Signature.getReturnType(method.getSignature()).equals("V"/*nonNLS*/)) { super.acceptMethod(method); } } catch (JavaModelException npe) { } }
public String getKey(boolean forceOpen) throws JavaModelException { return getKey(this, true/*with access flags*/, forceOpen); }
public String getKey(boolean forceOpen) throws JavaModelException { return getKey(this, forceOpen); }
public String toString(){ return "removing from index "/*nonNLS*/ + resourceName; }
public String toString(){ return "removing from index " + resourceName; //$NON-NLS-1$ }
public TypeDeclaration updatedTypeDeclaration(){ /* update member types */ if (memberTypeCount > 0){ int existingCount = typeDeclaration.memberTypes == null ? 0 : typeDeclaration.memberTypes.length; MemberTypeDeclaration[] memberTypeDeclarations = new MemberTypeDeclaration[existingCount + memberTypeCount]; if ...
public TypeDeclaration updatedTypeDeclaration(){ /* update member types */ if (memberTypeCount > 0){ int existingCount = typeDeclaration.memberTypes == null ? 0 : typeDeclaration.memberTypes.length; MemberTypeDeclaration[] memberTypeDeclarations = new MemberTypeDeclaration[existingCount + memberTypeCount]; if ...
public IStatus restoreState(IMemento memento) { IMemento mem[] = memento.getChildren(IWorkbenchConstants.TAG_VIEW); for (int i = 0; i < mem.length; i++) { //for dynamic UI - add the next line to replace subsequent code that is commented out restoreViewState(mem[i]); }...
public IStatus restoreState(IMemento memento) { IMemento mem[] = memento.getChildren(IWorkbenchConstants.TAG_VIEW); for (int i = 0; i < mem.length; i++) { //for dynamic UI - add the next line to replace subsequent code that is commented out restoreViewState(mem[i]); }...
public int getID() { return id; }
public int getID() { return id & 0xFFFF; }
public static final String ATTRKEYWORDS[] = { "None", "static", "final", "static final", "synchronized", "static synchronized", "final synchronized", "static final synchronized" }; //////////////////////////////////////////////////////////////// // instance vars JLabel _visLabel = new JLabel("Visi...
public static final String ATTRKEYWORDS[] = { "None", "static", "final", "static final", "synchronized", "static synchronized", "final synchronized", "static final synchronized" }; //////////////////////////////////////////////////////////////// // instance vars JLabel _visLabel = new JLabel("Visi...
public void roleAdded(MElementEvent e) { if (isValidEvent(e)) { Object o = getChangedElement(e); if (o instanceof Collection) { // this should not happen but // you never know with NSUML log.warn("Collection added via roleAdded! The correct element...
public void roleAdded(MElementEvent e) { if (getTarget() != null && isValidEvent(e)) { Object o = getChangedElement(e); if (o instanceof Collection) { // this should not happen but // you never know with NSUML log.warn("Collection added via roleAdd...
public void execute(Worker worker) throws Exception { ColumbaLogger.log.debug("reference="+getReferences(Command.UNDOABLE_OPERATION)); FolderCommandReference[] r = (FolderCommandReference[]) getReferences(Command.FIRST_EXECUTION); if ( r == null ) return; treeNode = (FolderTreeNode) r[0].getFolder(); ...
public void execute(Worker worker) throws Exception { ColumbaLogger.log.debug("reference="+getReferences(Command.UNDOABLE_OPERATION)); FolderCommandReference[] r = (FolderCommandReference[]) getReferences(Command.FIRST_EXECUTION); if ( r == null ) return; treeNode = (FolderTreeNode) r[0].getFolder(); ...
public int getNodeType() { return METHOD_REF_PARAMETER; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone(AST target) { MethodRefParameter result = new MethodRefParameter(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setType((Type) AS...
public int getNodeType() { return METHOD_REF_PARAMETER; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone0(AST target) { MethodRefParameter result = new MethodRefParameter(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setType((Type) A...
public void resolve(BlockScope scope) { this.exceptionType = this.exception.resolveType(scope); if (this.exceptionType != null && this.exceptionType.isValidBinding()) { if (this.exceptionType == TypeBinding.NULL) { if (scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3){ // if compliant wit...
public void resolve(BlockScope scope) { this.exceptionType = this.exception.resolveType(scope); if (this.exceptionType != null && this.exceptionType.isValidBinding()) { if (this.exceptionType == TypeBinding.NULL) { if (scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3){ // if compliant wit...
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value == null) { setIcon(null); ...
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value == null) { setIcon(null); ...
public void actionPerformed(ActionEvent e) { String action = e.getActionCommand(); if (action.equals("CLOSE")) //$NON-NLS-1$ { try { MainInterface.config.save(); } catch (Exception ex) { ex.printStackTrace(); } ...
public void actionPerformed(ActionEvent e) { String action = e.getActionCommand(); if (action.equals("CLOSE")) //$NON-NLS-1$ { try { MainInterface.config.save(); } catch (Exception ex) { ex.printStackTrace(); } ...
public String get(String key) { String value = null; try { super.get(key); if (value == null) { value = super.get(DEFAULT_SCOPE + '.', key); } if (value == null) { value = "ERROR! Mi...
public String get(String key) { String value = null; try { value = super.get(key); if (value == null) { value = super.get(DEFAULT_SCOPE + '.', key); } if (value == null) { value = "E...
public void updateActionBars() { if (isvMenuMgr != null) { isvMenuMgr.updateAll(false); } if (isvToolBarMgr != null) { isvToolBarMgr.update(false); } }
public void updateActionBars() { if (isvMenuMgr != null) { isvMenuMgr.update(false); } if (isvToolBarMgr != null) { isvToolBarMgr.update(false); } }
public TypeBinding resolveType(BlockScope scope) { // Propagate the type checking to the arguments, and check if the constructor is defined. constant = Constant.NotAConstant; if (this.type == null) { // initialization of an enum constant this.resolvedType = scope.enclosingReceiverType(); } else { thi...
public TypeBinding resolveType(BlockScope scope) { // Propagate the type checking to the arguments, and check if the constructor is defined. constant = Constant.NotAConstant; if (this.type == null) { // initialization of an enum constant this.resolvedType = scope.enclosingReceiverType(); } else { thi...
protected int matchLevelAsSubtype(ReferenceBinding type, char[] simpleNamePattern, char[] qualificationPattern) { if (type == null) return INACCURATE_MATCH; int level; // matches type if ((level = this.matchLevelForType(simpleNamePattern, qualificationPattern, type)) != IMPOSSIBLE_MATCH) return level; // m...
protected int matchLevelAsSubtype(ReferenceBinding type, char[] simpleNamePattern, char[] qualificationPattern) { if (type == null) return INACCURATE_MATCH; int level; // matches type if ((level = this.matchLevelForType(simpleNamePattern, qualificationPattern, type)) != IMPOSSIBLE_MATCH) return level; // m...
public int hashCode() { int hashCode = getName().hashCode() & getElementsArray().hashCode(); if (editPageId != null) { hashCode &= editPageId.hashCode(); } return hashCode; }
public int hashCode() { int hashCode = getName().hashCode(); if (editPageId != null) { hashCode &= editPageId.hashCode(); } return hashCode; }
public String getKey() { return null; }
public String getKey() { return getName(); }
private TypeBinding internalResolveType(Scope scope, boolean checkBounds) { // handle the error here this.constant = Constant.NotAConstant; if (this.didResolve) { // is a shared type reference which was already resolved if (this.resolvedType != null && !this.resolvedType.isValidBinding()) return null; //...
private TypeBinding internalResolveType(Scope scope, boolean checkBounds) { // handle the error here this.constant = Constant.NotAConstant; if (this.didResolve) { // is a shared type reference which was already resolved if (this.resolvedType != null && !this.resolvedType.isValidBinding()) return null; //...
public void addFlatChildren(Object node) { if (node == null) return; System.out.println("addFlatChildren"); // hack for to do items only, should check isLeaf(node), but that // includes empty folders. Really I need alwaysLeaf(node). if ((node instanceof ToDoItem) && !_flatChildren.contains(node)) ...
public void addFlatChildren(Object node) { if (node == null) return; //System.out.println("addFlatChildren"); // hack for to do items only, should check isLeaf(node), but that // includes empty folders. Really I need alwaysLeaf(node). if ((node instanceof ToDoItem) && !_flatChildren.contains(node)...
public void createPartControl(Composite parent) { try { FactoryMap args = new FactoryMap(); args.addInstance(services); args.addInstance(getPropertyProvider()); addServices(args); args.mapInstance(Composite.class, parent); parent.setLayout...
public void createPartControl(Composite parent) { try { FactoryMap args = new FactoryMap(); args.addInstance(services); args.addInstance(getPropertyProvider()); addServices(args); args.mapInstance(Composite.class, parent); parent.setLayout...
public ObjectName getObjectName( MBeanServer server, ObjectName name ) throws javax.management.MalformedObjectNameException { this.server = server; return new ObjectName( OBJECT_NAME ); }
public ObjectName getObjectName( MBeanServer server, ObjectName name ) throws javax.management.MalformedObjectNameException { this.server = server; return OBJECT_NAME; }
@Test(timeout= 100) public void success() throws InterruptedException { Thread.sleep(200); }
@Test(timeout= 100) public void success() throws InterruptedException { Thread.sleep(40000); }
public ActionPluginHandler() { super("action", "org/columba/core/action/action.xml"); parentNode = getConfig().getRoot().getElement("actionlist"); }
public ActionPluginHandler() { super("org.columba.core.action", "org/columba/core/action/action.xml"); parentNode = getConfig().getRoot().getElement("actionlist"); }
public String toStringExpression(int tab) { return "<CompleteOnException:" + new String(token) + ">"; //$NON-NLS-2$ //$NON-NLS-1$ }
public String toStringExpression(int tab) { return "<CompleteOnException:"/*nonNLS*/ + new String(token) + ">"/*nonNLS*/; }
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove) { if (first == null || last == null) { throw new IllegalArgumentException(); } //validateIsInsideAST(node); CopySourceInfo info= getRewriteStore().markAsRangeCopySource(parent, childProperty, first, last, isMove); NodeInfoStor...
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove) { if (first == null || last == null) { throw new IllegalArgumentException(); } //validateIsInsideAST(node); CopySourceInfo info= getRewriteStore().markAsRangeCopySource(this.parent, this.childProperty, first, last, isMove); No...
public void widgetDisposed(DisposeEvent e) { dimmedForeground.dispose(); } }); treeViewer.setLabelProvider(new ViewLabelProvider(window, dimmedForeground)); treeViewer.setContentProvider(new ViewContentProvider()); treeViewer.setComparator(new ViewSorter((ViewRegistry) viewReg)); treeViewer.setIn...
public void widgetDisposed(DisposeEvent e) { dimmedForeground.dispose(); } }); treeViewer.setLabelProvider(new ViewLabelProvider(window, dimmedForeground)); treeViewer.setContentProvider(new ViewContentProvider()); treeViewer.setComparator(new ViewComparator((ViewRegistry) viewReg)); treeViewer.s...
private boolean hasStructuralFieldChanges(FieldInfo currentFieldInfo, FieldInfo otherFieldInfo) { if (currentFieldInfo.getModifiers() != otherFieldInfo.getModifiers()) return true; if (!CharOperation.equals(currentFieldInfo.getName(), otherFieldInfo.getName())) return true; if (!CharOperation.equals(currentField...
private boolean hasStructuralFieldChanges(FieldInfo currentFieldInfo, FieldInfo otherFieldInfo) { if (currentFieldInfo.getModifiers() != otherFieldInfo.getModifiers()) return true; if (!CharOperation.equals(currentFieldInfo.getName(), otherFieldInfo.getName())) return true; if (!CharOperation.equals(currentField...
public String getDescription() { return "Argo v0.5 file format"; }
public String getDescription() { return "Argo v0.5.2 file format (*.argo)"; }
public static String typeSignature(TypeReference type) { char[][] compoundName = type.getTypeName(); char[] typeName =CharOperation.concatWith(compoundName, '.');
public static String typeSignature(TypeReference type) { char[][] compoundName = type.getParameterizedTypeName(); char[] typeName =CharOperation.concatWith(compoundName, '.');
static private void failNotSame(String message, Object expected, Object actual) { String formatted= ""; if (message != null) formatted= message+" "; fail(formatted+"expected same"); }
static private void failNotSame(String message, Object expected, Object actual) { String formatted= ""; if (message != null) formatted= message+" "; fail(formatted+"expected same:<"+expected+"> was not:<"+actual+">"); }
public String[] getContextInfo(String contextName) { Enumeration enum; String key; Context context; Vector v = new Vector(); context = cm.getContext(contextName); v.addElement("DOC BASE: " + context.getDocBase()); v.addElement("FULL DOC BASE: " + context.getDocumentBase().toString()); v.add...
public String[] getContextInfo(String contextName) { Enumeration enum; String key; Context context; Vector v = new Vector(); context = cm.getContext(contextName); v.addElement("DOC BASE: " + context.getDocBase()); v.addElement("FULL DOC BASE: " + context.getAbsolutePath()); v.addElement("PA...
public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; lineCount += unitLineCount; lineDelta += unitLineCount; if (showProgress && lineDelta > 2000) { //...
public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; lineCount += unitLineCount; lineDelta += unitLineCount; if (showProgress && lineDelta > 2000) { //...
public Object getDetailsTarget() { Iterator it = detailsPanesByCompassPoint.values().iterator(); if (it.hasNext()) { DetailsPane detailsPane = (DetailsPane) it.next(); return detailsPane.getTarget(); } throw new IllegalStateException("No detailspane present");...
public Object getDetailsTarget() { Iterator it = detailsPanesByCompassPoint.values().iterator(); if (it.hasNext()) { DetailsPane detailsPane = (DetailsPane) it.next(); return TargetManager.getInstance().getTarget(); } throw new IllegalStateException("No detail...
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) { if (match == castType) { if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds tagAsUnnecessaryCa...
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) { if (match == castType) { if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds tagAsUnnecessaryCa...
public void targetChanged(Object newTarget) { if ((_target != null) && (newTarget != null) && (newTarget.getClass().equals(_target.getClass()))) setTarget(newTarget); }
public void targetChanged(Object newTarget) { if (_target != newTarget) setTarget(newTarget); }
protected void doInsertionAtEnd() throws Exception { ActivityInfo activityInfo = (ActivityInfo)digester.pop(); Transaction transaction = (Transaction)digester.pop(); Issue issue = (Issue)digester.pop(); Attribute attribute = Attribute.getInstance(activityInfo.get...
protected void doInsertionAtEnd() throws Exception { ActivityInfo activityInfo = (ActivityInfo)digester.pop(); Transaction transaction = (Transaction)digester.pop(); Issue issue = (Issue)digester.pop(); Attribute attribute = Attribute.getInstance(activityInfo.get...
public String toString() { // don't use + with char[] return new StringBuffer("FieldIndictment("/*nonNLS*/).append(fName).append(")"/*nonNLS*/).toString(); }
public String toString() { // don't use + with char[] return new StringBuffer("FieldIndictment(").append(fName).append(")").toString(); //$NON-NLS-1$ //$NON-NLS-2$ }
protected void loadHeader(ObjectInputStream p, HeaderInterface h) throws Exception { int compressedFlags = p.readInt(); h.set( "columba.flags.seen", BooleanCompressor.decompress(compressedFlags, 0)); h.set( "columba.flags.answered", BooleanCompressor.decompress(compressedFlags, 1)); h.set( "c...
protected void loadHeader(ObjectInputStream p, HeaderInterface h) throws Exception { int compressedFlags = p.readInt(); h.set( "columba.flags.seen", BooleanCompressor.decompress(compressedFlags, 0)); h.set( "columba.flags.answered", BooleanCompressor.decompress(compressedFlags, 1)); h.set( "c...
public StackPresentation createViewPresentation(Composite parent, IStackPresentationSite site) { DefaultTabFolder folder = new DefaultTabFolder(parent, viewTabPosition | SWT.BORDER, site.supportsState(IStackPresentationSite.STATE_MINIMIZED), site.suppor...
public StackPresentation createViewPresentation(Composite parent, IStackPresentationSite site) { DefaultTabFolder folder = new DefaultTabFolder(parent, viewTabPosition | SWT.BORDER, site.supportsState(IStackPresentationSite.STATE_MINIMIZED), site.suppor...
public boolean performConcurrentJob(IJob searchJob, int waitingPolicy, IProgressMonitor progress) { if (VERBOSE) Util.verbose("STARTING concurrent job - " + searchJob); //$NON-NLS-1$ searchJob.ensureReadyToRun(); int concurrentJobWork = 100; if (progress != null) progress.beginTask("", concurrentJobWo...
public boolean performConcurrentJob(IJob searchJob, int waitingPolicy, IProgressMonitor progress) { if (VERBOSE) Util.verbose("STARTING concurrent job - " + searchJob); //$NON-NLS-1$ searchJob.ensureReadyToRun(); int concurrentJobWork = 100; if (progress != null) progress.beginTask("", concurrentJobWo...
public void testNamespace() { Object o = getFactory().create(Uml.MODEL); assertNotNull("Didn't create object", o); assertTrue("Should be a base", ModelFacade.isABase(o)); assertTrue("Should be a model", ModelFacade.isAModel(o)); runTruthTests(o); }
public void testNamespace() { Object o = ModelFacade.getFacade().create(Uml.MODEL); assertNotNull("Didn't create object", o); assertTrue("Should be a base", ModelFacade.isABase(o)); assertTrue("Should be a model", ModelFacade.isAModel(o)); runTruthTests(o); }
public String guessTomcatHome() { // If -Dtomcat.home is used - Great String h=System.getProperty( "tomcat.home" ); if( h!=null ) return h; // Find the directory where tomcat.jar is located String cpath=System.getProperty( "java.class.path"); String pathSep=System.getProperty( "path.separator"); StringTok...
public String guessTomcatHome() { // If -Dtomcat.home is used - Great String h=System.getProperty( "tomcat.home" ); if( h!=null ) return h; // Find the directory where tomcat.jar is located String cpath=System.getProperty( "java.class.path"); String pathSep=System.getProperty( "path.separator"); StringTok...
private static final void readContextsFromExtensionPoint( final IConfigurationElement[] configurationElements, final int configurationElementCount, final ContextManager contextManager) { /* * If necessary, this list of status items will be constructed. It will * only contains instances of <code>IStatu...
private static final void readContextsFromExtensionPoint( final IConfigurationElement[] configurationElements, final int configurationElementCount, final ContextManager contextManager) { /* * If necessary, this list of status items will be constructed. It will * only contains instances of <code>IStatu...
public CERTRecord(Name _name, short _dclass, int _ttl, int length, CountedDataInputStream in, Compression c) throws IOException
public CERTRecord(Name _name, short _dclass, int _ttl, int length, DataByteInputStream in, Compression c) throws IOException
public CompilationUnitDeclaration resolve( org.eclipse.jdt.internal.compiler.env.ICompilationUnit compilationUnit, NodeSearcher nodeSearcher, boolean verifyMethods, boolean analyzeCode, boolean generateCode) { CompilationUnitDeclaration unit = null; try { parseThreshold = 0; // will request a d...
public CompilationUnitDeclaration resolve( org.eclipse.jdt.internal.compiler.env.ICompilationUnit compilationUnit, NodeSearcher nodeSearcher, boolean verifyMethods, boolean analyzeCode, boolean generateCode) { CompilationUnitDeclaration unit = null; try { parseThreshold = 0; // will request a d...
public void generateCode( BlockScope currentScope, CodeStream codeStream, boolean valueRequired) { int pc = codeStream.position; if (binding.canBeSeenBy(receiverType, this, currentScope)) { // generate receiver/enclosing instance access boolean isStatic = binding.isStatic(); // outer access ? if (!isStat...
public void generateCode( BlockScope currentScope, CodeStream codeStream, boolean valueRequired) { int pc = codeStream.position; if (binding.canBeSeenBy(receiverType, this, currentScope)) { // generate receiver/enclosing instance access boolean isStatic = binding.isStatic(); // outer access ? if (!isStat...
public PluginManagerDialog() { // modal JDialog super((JFrame) null, GlobalResourceLoader.getString(RESOURCE_PATH, "pluginmanager", "title"), true); try { configHandler = PluginManager.getInstance() .getHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_CONFIG); } catch (Exception ex) { ex.printSt...
public PluginManagerDialog() { // modal JDialog super((JFrame) null, GlobalResourceLoader.getString(RESOURCE_PATH, "pluginmanager", "title"), true); try { configHandler = PluginManager.getInstance() .getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_CONFIG); } catch (Exception ex) { e...
public int getNodeType() { return SIMPLE_TYPE; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone(AST target) { SimpleType result = new SimpleType(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setName((Name) (getName()).clone(target));...
public int getNodeType() { return SIMPLE_TYPE; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone0(AST target) { SimpleType result = new SimpleType(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setName((Name) (getName()).clone(target))...
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) { if (!flowInfo.isReachable()) return; // if field from parameterized type got found, use the original field at codegen time this.codegenBinding = this.binding.original(); if (binding.isPrivate())...
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) { if (!flowInfo.isReachable()) return; // if field from parameterized type got found, use the original field at codegen time this.codegenBinding = this.binding.original(); if (binding.isPrivate())...
* N.B. This constructor is package-private. * </p> * * @param ast the AST that is to own this node */ ParameterizedType(AST ast) { super(ast); unsupportedIn2(); } /* (omit javadoc for this method) * Method declared on ASTNode. */ final List internalStructuralPropertiesForType(int apiLevel) { ...
* N.B. This constructor is package-private. * </p> * * @param ast the AST that is to own this node */ ParameterizedType(AST ast) { super(ast); unsupportedIn2(); } /* (omit javadoc for this method) * Method declared on ASTNode. */ final List internalStructuralPropertiesForType(int apiLevel) { ...
public String toStringExpression(){ char[] declaringType = this.evaluationContext.declaringTypeName; return "("/*nonNLS*/ + (declaringType == null ? "<NO DECLARING TYPE>"/*nonNLS*/ : new String(declaringType)) + ")this"/*nonNLS*/; }
public String toStringExpression(){ char[] declaringType = this.evaluationContext.declaringTypeName; return "(" + (declaringType == null ? "<NO DECLARING TYPE>" : new String(declaringType)) + ")this"; //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$ }
public void runWithEvent(Event event) { if (partHandler != null) { IHandler oldHandler = getParameterizedCommand().getCommand() .getHandler(); try { getParameterizedCommand().getCommand().setHandler(partHandler); getParameterizedCommand().executeWithChecks(event, appContext); } catch (Execution...
public void runWithEvent(Event event) { if (partHandler != null && getParameterizedCommand() != null) { IHandler oldHandler = getParameterizedCommand().getCommand() .getHandler(); try { getParameterizedCommand().getCommand().setHandler(partHandler); getParameterizedCommand().executeWithChecks(even...