buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public IJavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (cu.isPrimary()) return this;
}
IJavaElement parent = fParent.getPrimaryElement(false);
return ((IType)parent).getInitializer(this.occurrenceCount);
}
| public IJavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (cu == null || cu.isPrimary()) return this;
}
IJavaElement parent = fParent.getPrimaryElement(false);
return ((IType)parent).getInitializer(this.occurrenceCount);... |
public void setVisible(boolean visible) {
this.visible = visible;
}
| public void setVisible(boolean visible) {
// this.visible = visible;
}
|
public void open() throws IOException {
if (!opened) {
summary= new IndexSummary();
numFiles= 0;
numWords= 0;
blockNum= 1;
firstInBlock= true;
firstIndexBlock= true;
firstFileListBlock= true;
indexOut= new SafeRandomAccessFile(this.indexFile, "rw"/*nonNLS*/);
opened= true;
}
}
| public void open() throws IOException {
if (!opened) {
summary= new IndexSummary();
numFiles= 0;
numWords= 0;
blockNum= 1;
firstInBlock= true;
firstIndexBlock= true;
firstFileListBlock= true;
indexOut= new SafeRandomAccessFile(this.indexFile, "rw"); //$NON-NLS-1$
opened= true;
}
}
|
public void launchWizard(boolean firstStart) {
DataModel data = new DataModel();
Step[] steps;
if (firstStart) {
steps = new Step[] {
new WelcomeStep(), new IdentityStep(data),
new IncomingServerStep(data),
new Outgoing... | public void launchWizard(boolean firstStart) {
DataModel data = new DataModel();
Step[] steps;
if (firstStart) {
steps = new Step[] {
new WelcomeStep(), new IdentityStep(data),
new IncomingServerStep(data),
new Outgoing... |
private static HashMap workingCopiesThatCanSeeFocus(org.eclipse.jdt.core.ICompilationUnit[] copies, IJavaElement focus, boolean isPolymorphicSearch, SearchParticipant participant) {
if (copies == null) return new HashMap();
if (focus != null) {
while (!(focus instanceof IJavaProject) && !(focus instanceof JarPackag... | private static HashMap workingCopiesThatCanSeeFocus(org.eclipse.jdt.core.ICompilationUnit[] copies, IJavaElement focus, boolean isPolymorphicSearch, SearchParticipant participant) {
if (copies == null) return new HashMap();
if (focus != null) {
while (!(focus instanceof IJavaProject) && !(focus instanceof JarPackag... |
public void extendToolBar(ExtendableToolBar toolBar, InputStream is) {
// add cancel button
AbstractColumbaAction cancelAction = getAction("Cancel", mediator);
JButton button = ToolBarButtonFactory.createButton(cancelAction);
toolBar.add(button);
// toolBar.add(Box.createHorizontalGlue());
//
// // add bus... | public void extendToolBar(ExtendableToolBar toolBar, InputStream is) {
// add cancel button
AbstractColumbaAction cancelAction = getAction("Cancel", mediator);
JButton button = ToolBarButtonFactory.createButton(cancelAction);
toolBar.add(button);
// toolBar.add(Box.createHorizontalGlue());
//
// // add bus... |
public short
getWireLength() {
return (short) wireLength;
}
/**
* Converts the type-specific RR to wire format - must be overriden
*/
abstract void rrToWire(DataByteOutputStream out, Compression c) throws IOException;
/**
* Converts the type-specific RR to canonical wire format - must be overriden
* if the type-... | public short
getWireLength() {
return (short) wireLength;
}
/**
* Converts the type-specific RR to wire format - must be overriden
*/
abstract void rrToWire(DataByteOutputStream out, Compression c) throws IOException;
/**
* Converts the type-specific RR to canonical wire format - must be overriden
* if the type-... |
public ClasspathJar getClasspathJar(File file) throws IOException {
try {
ZipFile zipFile = JavaModelManager.getJavaModelManager().getZipFile(new Path(file.getPath()));
return new ClasspathJar(zipFile, false);
} catch (CoreException e) {
return super.getClasspathJar(file, true);
}
}
| public ClasspathJar getClasspathJar(File file) throws IOException {
try {
ZipFile zipFile = JavaModelManager.getJavaModelManager().getZipFile(new Path(file.getPath()));
return new ClasspathJar(zipFile, false);
} catch (CoreException e) {
return super.getClasspathJar(file);
}
}
|
final static public String toString(char[][] array) {
char[] result = concatWith(array, '.');
if (result == null)
return ""; //$NON-NLS-1$
return new String(result);
}
| final static public String toString(char[][] array) {
char[] result = concatWith(array, '.');
if (result == null)
return ""/*nonNLS*/;
return new String(result);
}
|
activePage.showView(ProgressManager.PROGRESS_VIEW_NAME);
/*******************************************************************************
* Copyright (c) 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public Lic... | activePage.showView(ProgressManager.PROGRESS_VIEW_NAME);
/*******************************************************************************
* Copyright (c) 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public Lic... |
public void add(Indictment i) {
// allow null, since certain methods are not indicted (class initializers)
if (i != null) {
switch (i.getKind()) {
case Indictment.K_HIERARCHY:
fHierarchyChange = true;
break;
case Indictment.K_TYPE:
if (fTypesTable == null)
fTypesTable = new Hashtab... | public void add(Indictment i) {
// allow null, since certain methods are not indicted (class initializers)
if (i != null) {
switch (i.getKind()) {
case Indictment.K_HIERARCHY:
fHierarchyChange = true;
break;
case Indictment.K_TYPE:
if (fTypesTable == null)
fTypesTable = new Hashtab... |
private boolean readDeprecatedAccelerator(IConfigurationElement element) {
if (keyConfiguration == null || scope == null)
return false;
String id = element.getAttribute(Persistence.TAG_ID);
String key = element.getAttribute(DEPRECATED_TAG_KEY);
if (key != null) {
List keySequences = new ArrayLis... | private boolean readDeprecatedAccelerator(IConfigurationElement element) {
if (keyConfiguration == null || scope == null)
return false;
String id = element.getAttribute(Persistence.TAG_ID);
String key = element.getAttribute(DEPRECATED_TAG_KEY);
if (key != null) {
List keySequences = new ArrayLis... |
public String getType() {
String extension= file.getFileExtension();
if (extension == null)
return ""/*nonNLS*/;
return extension;
}
| public String getType() {
String extension= file.getFileExtension();
if (extension == null)
return ""; //$NON-NLS-1$
return extension;
}
|
private boolean selectDeclaration(CompilationUnitDeclaration compilationUnit){
// the selected identifier is not identical to the parser one (equals but not identical),
// for traversing the parse tree, the parser assist identifier is necessary for identitiy checks
char[] assistIdentifier = this.getParser().ass... | private boolean selectDeclaration(CompilationUnitDeclaration compilationUnit){
// the selected identifier is not identical to the parser one (equals but not identical),
// for traversing the parse tree, the parser assist identifier is necessary for identitiy checks
char[] assistIdentifier = this.getParser().ass... |
public
dnsNS_CNAME_PTRRecord(dnsName _name, short _type, short _dclass, int _ttl,
StringTokenizer st)
throws IOException
| public
dnsNS_CNAME_PTRRecord(dnsName _name, short _type, short _dclass, int _ttl,
MyStringTokenizer st)
throws IOException
|
protected boolean parseTag(int previousPosition) throws InvalidInputException {
int startPosition = this.inlineTagStarted ? this.inlineTagStart : previousPosition;
boolean newLine = !this.lineStarted;
boolean valid = super.parseTag(previousPosition);
boolean inCompletion = (this.tagSourceStart <= (this.cursorL... | protected boolean parseTag(int previousPosition) throws InvalidInputException {
int startPosition = this.inlineTagStarted ? this.inlineTagStart : previousPosition;
boolean newLine = !this.lineStarted;
boolean valid = super.parseTag(previousPosition);
boolean inCompletion = (this.tagSourceStart <= (this.cursorL... |
protected String getURLContents(String docUrlValue) throws JavaModelException {
InputStream stream = null;
JarURLConnection connection2 = null;
try {
URL docUrl = new URL(docUrlValue);
URLConnection connection = docUrl.openConnection();
if (connection instanceof JarURLConnection) {
connection2 = (Ja... | protected String getURLContents(String docUrlValue) throws JavaModelException {
InputStream stream = null;
JarURLConnection connection2 = null;
try {
URL docUrl = new URL(docUrlValue);
URLConnection connection = docUrl.openConnection();
if (connection instanceof JarURLConnection) {
connection2 = (Ja... |
public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
// only at the -end- like new int [4][][]. The parser allows new int[][4][]
// so this must be checked here......(this comes fro... | public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
// only at the -end- like new int [4][][]. The parser allows new int[][4][]
// so this must be checked here......(this comes fro... |
public String
toString() {
StringBuffer sb = new StringBuffer();
sb.append(getHeader());
for (int i = 0; i < 4; i++)
sb.append(sectionToString(i) + "\n");
sb.append(";; done (" + numBytes() + " bytes)");
return sb.toString();
}
| public String
toString() {
StringBuffer sb = new StringBuffer();
sb.append(getHeader() + "\n");
for (int i = 0; i < 4; i++)
sb.append(sectionToString(i) + "\n");
sb.append(";; done (" + numBytes() + " bytes)");
return sb.toString();
}
|
public
dnsSIGRecord(dnsName _name, short _dclass, int _ttl, StringTokenizer st)
throws IOException
| public
dnsSIGRecord(dnsName _name, short _dclass, int _ttl, MyStringTokenizer st)
throws IOException
|
protected ClassLoader parent2;
final static int debug=10;
DependManager dependM;
| protected ClassLoader parent2;
final static int debug=0;
DependManager dependM;
|
protected void initializeDefaultPluginPreferences() {
Preferences preferences = getPluginPreferences();
HashSet optionNames = JavaModelManager.OptionNames;
// Compiler settings
preferences.setDefault(COMPILER_LOCAL_VARIABLE_ATTR, GENERATE);
optionNames.add(COMPILER_LOCAL_VARIABLE_ATTR);
preferences.... | protected void initializeDefaultPluginPreferences() {
Preferences preferences = getPluginPreferences();
HashSet optionNames = JavaModelManager.OptionNames;
// Compiler settings
preferences.setDefault(COMPILER_LOCAL_VARIABLE_ATTR, GENERATE);
optionNames.add(COMPILER_LOCAL_VARIABLE_ATTR);
preferences.... |
public PartTabFolderPresentation(Composite parent, IStackPresentationSite newSite, int flags) {
super(new CTabFolder(parent, SWT.BORDER), newSite);
CTabFolder tabFolder = getTabFolder();
preferenceStore.addPropertyChangeListener(propertyChangeListener);
int tabLocation = preferenceStore.getInt(IPreferenc... | public PartTabFolderPresentation(Composite parent, IStackPresentationSite newSite, int flags) {
super(new CTabFolder(parent, SWT.BORDER), newSite);
CTabFolder tabFolder = getTabFolder();
preferenceStore.addPropertyChangeListener(propertyChangeListener);
int tabLocation = preferenceStore.getInt(IPreferenc... |
final int AccPrivateUsed = ASTNode.Bit28; // used to diagnose unused private members
final int AccVisibilityMASK = AccPublic | AccProtected | AccPrivate;
final int AccOverriding = ASTNode.Bit29; // record fact a method overrides another one
final int AccImplementing = ASTNode.Bit30; // record fact a method implem... | final int AccLocallyUsed = ASTNode.Bit28; // used to diagnose unused private/local members
final int AccVisibilityMASK = AccPublic | AccProtected | AccPrivate;
final int AccOverriding = ASTNode.Bit29; // record fact a method overrides another one
final int AccImplementing = ASTNode.Bit30; // record fact a method ... |
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position;
targetLabel.place();
codeStream.recordPositionsFrom(pc, this);
}
| public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position;
targetLabel.place();
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
|
private void
follow(Name name, Name oldname) {
foundAlias = true;
badresponse = false;
networkerror = false;
timedout = false;
nxdomain = false;
referral = false;
iterations++;
if (iterations >= 6 || name.equals(oldname)) {
result = UNRECOVERABLE;
error = "CNAME loop";
done = true;
return;
}
if (alias... | private void
follow(Name name, Name oldname) {
foundAlias = true;
badresponse = false;
networkerror = false;
timedout = false;
nxdomain = false;
referral = false;
iterations++;
if (iterations >= 6 || name.equals(oldname)) {
result = UNRECOVERABLE;
error = "CNAME loop";
done = true;
return;
}
if (alias... |
public String toString() {
return "FlowInfo<true: " + initsWhenTrue.toString() + ", false: " + initsWhenFalse.toString() + ">";
}
| public String toString() {
return "FlowInfo<true: "/*nonNLS*/ + initsWhenTrue.toString() + ", false: "/*nonNLS*/ + initsWhenFalse.toString() + ">"/*nonNLS*/;
}
|
public boolean isEquivalentTo(TypeBinding otherType) {
if (this == otherType) return true;
if (otherType == null) return false;
switch(otherType.bindingType()) {
case Binding.WILDCARD_TYPE :
return ((WildcardBinding) otherType).boundCheck(this);
case Binding.PARAMETERIZED_TYPE :
i... | public boolean isEquivalentTo(TypeBinding otherType) {
if (this == otherType) return true;
if (otherType == null) return false;
switch(otherType.bindingType()) {
case Binding.WILDCARD_TYPE :
return ((WildcardBinding) otherType).boundCheck(this);
case Binding.PARAMETERIZED_TYPE :
i... |
public SystemMenuPinEditor(EditorPane pane) {
setText(WorkbenchMessages.getString("EditorPane.pinEditor")); //$NON-NLS-1$
setPane(pane);
}
| public SystemMenuPinEditor(EditorPane pane) {
setText(WorkbenchMessages.EditorPane_pinEditor);
setPane(pane);
}
|
protected void setNameLookup(NameLookup newNameLookup) {
fNameLookup = newNameLookup;
// Reinitialize the searchable name environment since it caches
// the name lookup.
fSearchableEnvironment = null;
}
/**
* Set the fNonJavaResources to res value
*/
synchronized void setNonJavaResources(Object[] re... | protected void setNameLookup(NameLookup newNameLookup) {
fNameLookup = newNameLookup;
// Reinitialize the searchable name environment since it caches
// the name lookup.
fSearchableEnvironment = null;
}
/**
* Set the fNonJavaResources to res value
*/
void setNonJavaResources(Object[] resources) {
... |
protected StringBuffer print(StringBuffer output) {
output.append(", "); //$NON-NLS-1$
if (hasTypeArguments() && hasSignatures()) {
output.append("signature:\""); //$NON-NLS-1$
output.append(this.typeSignatures[0]);
output.append("\", "); //$NON-NLS-1$
}
if (this.isCamelCase) {
output.append("camel... | protected StringBuffer print(StringBuffer output) {
output.append(", "); //$NON-NLS-1$
if (hasTypeArguments() && hasSignatures()) {
output.append("signature:\""); //$NON-NLS-1$
output.append(this.typeSignatures[0]);
output.append("\", "); //$NON-NLS-1$
}
if (this.isCamelCase) {
output.append("camel... |
public void setPattern(String patternString) {
cache.clear();
if (patternString == null || patternString.equals("")) //$NON-NLS-1$
matcher = null;
else
matcher = new StringMatcher(patternString + "*", true, false); //$NON-NLS-1$
}
| public void setPattern(String patternString) {
cache.clear();
if (patternString == null || patternString.equals("")) //$NON-NLS-1$
matcher = null;
else
matcher = new StringMatcher("*" + patternString + "*", true, false); //$NON-NLS-1$ //$NON-NLS-2$
}
|
public SavePerspectiveAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("SavePerspective.text")); //$NON-NLS-1$
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId("org.eclipse.ui.win... | public SavePerspectiveAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("SavePerspective.text")); //$NON-NLS-1$
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId("org.eclipse.ui.win... |
public String toStringExpression(int tab) {
return "<CompleteOnException:"/*nonNLS*/ + new String(token) + ">"/*nonNLS*/;
}
| public String toStringExpression(int tab) {
return "<CompleteOnException:" + new String(token) + ">"; //$NON-NLS-2$ //$NON-NLS-1$
}
|
public void mapActionSetsToCategories() {
// Create "other" category.
ActionSetCategory cat = new ActionSetCategory(OTHER_CATEGORY,
WorkbenchMessages.getString("ActionSetRegistry.otherCategory")); //$NON-NLS-1$
categories.add(cat);
// Add everything to it.
It... | public void mapActionSetsToCategories() {
// Create "other" category.
ActionSetCategory cat = new ActionSetCategory(OTHER_CATEGORY,
WorkbenchMessages.ActionSetRegistry_otherCategory);
categories.add(cat);
// Add everything to it.
Iterator i = children.iterato... |
public void handleStatus( Request req, Response res, int code ) {
String errorPath=null;
Handler errorServlet=null;
res.resetBuffer();
if( code==0 )
code=res.getStatus();
else
res.setStatus(code);
Context ctx = req.getContext();
if(ctx==null) ctx=getContext("");
// don't log normal cases ( red... | public void handleStatus( Request req, Response res, int code ) {
String errorPath=null;
Handler errorServlet=null;
res.resetBuffer();
if( code==0 )
code=res.getStatus();
else
res.setStatus(code);
Context ctx = req.getContext();
if(ctx==null) ctx=getContext("");
// don't log normal cases ( red... |
private ClusterId(byte id[]) {
if (id.length > Short.MAX_VALUE) {
throw new IllegalArgumentException("Too long array");
}
this.id = id;
redoHash();
}
| private ClusterId(byte id[]) {
if (id.length > Short.MAX_VALUE) {
throw new IllegalArgumentException("Too long array for a cluster ID");
}
this.id = id;
redoHash();
}
|
public Type getType() {
if (this.baseType == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.baseType == null) {
preLazyInit();
this.baseType = this.ast.newPrimitiveType(PrimitiveType.INT);
postLazyInit(this.baseType, TYPE_PROPERTY);
}
}
}
r... | public Type getType() {
if (this.baseType == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.baseType == null) {
preLazyInit();
this.baseType = this.ast.newPrimitiveType(PrimitiveType.INT);
postLazyInit(this.baseType, TYPE_PROPERTY);
}
}
}
retur... |
public void resolve(BlockScope scope) {
super.resolve(scope);
// tolerate some error cases
if (binding == null ||
!(binding.isValidBinding() ||
binding.problemId() == ProblemReasons.NotVisible))
throw new SelectionNodeFound();
else
throw new SelectionNodeFound(binding);
}
| public void resolve(BlockScope scope) {
super.resolve(scope);
// tolerate some error cases
if (binding == null ||
!(binding.isValidBinding() ||
binding.problemId() == ProblemReasons.NotVisible))
throw new SelectionNodeFound();
else
throw new SelectionNodeFound(this, binding);
}
|
public TypeDeclaration referenceType() {
return (TypeDeclaration) ((ClassScope) parent).referenceContext;
}
| public TypeDeclaration referenceType() {
return ((ClassScope) parent).referenceContext;
}
|
public void resolve(MethodScope initializationScope) {
// the two <constant = Constant.NotAConstant> could be regrouped into
// a single line but it is clearer to have two lines while the reason of their
// existence is not at all the same. See comment for the second one.
//----------------------------------... | public void resolve(MethodScope initializationScope) {
// the two <constant = Constant.NotAConstant> could be regrouped into
// a single line but it is clearer to have two lines while the reason of their
// existence is not at all the same. See comment for the second one.
//----------------------------------... |
private boolean isOnClasspath() throws JavaModelException {
IPath path = this.getPath();
IJavaProject project = this.getJavaProject();
// special permission granted to project binary output (when using old builder)
if (!JavaModelManager.USING_NEW_BUILDER && project.getOutputLocation().equals(path)) {
return tru... | private boolean isOnClasspath() throws JavaModelException {
IPath path = this.getPath();
IJavaProject project = this.getJavaProject();
// special permission granted to project binary output (when using old builder)
if (!JavaModelManager.USING_NEW_BUILDER && project.getOutputLocation().equals(path)) {
return tru... |
protected void updateState() {
WorkbenchPage page = (WorkbenchPage)getActivePage();
if (page == null) {
setEnabled(false);
return;
}
// enable iff there is at least one other part to switch to
// (the editor area counts as one entry)
int count = page.getViews().length;
if (page.getSortedEditors().length > 0)... | protected void updateState() {
WorkbenchPage page = (WorkbenchPage)getActivePage();
if (page == null) {
setEnabled(false);
return;
}
// enable iff there is at least one other part to switch to
// (the editor area counts as one entry)
int count = page.getViewReferences().length;
if (page.getSortedEditors().le... |
private void refreshThemeCombo() {
themeCombo.removeAll();
ITheme currentTheme = PlatformUI.getWorkbench().getThemeManager()
.getCurrentTheme();
IThemeDescriptor[] descs = WorkbenchPlugin.getDefault()
.getThemeRegistry().getThemes();
int selection = 0... | private void refreshThemeCombo() {
themeCombo.removeAll();
ITheme currentTheme = PlatformUI.getWorkbench().getThemeManager()
.getCurrentTheme();
IThemeDescriptor[] descs = WorkbenchPlugin.getDefault()
.getThemeRegistry().getThemes();
int selection = 0... |
private void buildResourceVector() throws JavaModelException {
Hashtable resources = new Hashtable();
Hashtable paths = new Hashtable();
fTypes = fHierarchy.getAllTypes();
for (int i = 0; i < fTypes.length; i++) {
IType type = fTypes[i];
IResource resource = type.getUnderlyingResource();
if (resource != null ... | private void buildResourceVector() throws JavaModelException {
Hashtable resources = new Hashtable();
Hashtable paths = new Hashtable();
fTypes = fHierarchy.getAllTypes();
for (int i = 0; i < fTypes.length; i++) {
IType type = fTypes[i];
IResource resource = type.getUnderlyingResource();
if (resource != null ... |
public void addSearchToHistory() {
/*
//System.out.println("selectedfolder:"+ MainInterface.treeViewer.getSelected().getName());
VirtualFolder folder =
(VirtualFolder) MainInterface.treeModel.getFolder(106);
if (folder.getChildCount() >= 10)
{
Folder child = (Folder) folder.getChildAt(0);
... | public void addSearchToHistory() {
/*
//System.out.println("selectedfolder:"+ MainInterface.treeViewer.getSelected().getName());
VirtualFolder folder =
(VirtualFolder) MainInterface.treeModel.getFolder(106);
if (folder.getChildCount() >= 10)
{
MessageFolder child = (MessageFolder) folder.ge... |
private IStatus proceedWithOperation(IUndoableOperation operation,
String message, String discardButton) {
// if the operation cannot tell us about its modified elements, there's
// nothing we can do.
if (!(operation instanceof IAdvancedUndoableOperation))
return Status.OK_STATUS;
// Obtain the operati... | private IStatus proceedWithOperation(IUndoableOperation operation,
String message, String discardButton) {
// if the operation cannot tell us about its modified elements, there's
// nothing we can do.
if (!(operation instanceof IAdvancedUndoableOperation))
return Status.OK_STATUS;
// Obtain the operati... |
public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRuleSet access) {
SuperTypeReferencePattern record = (SuperTypeReferencePattern)indexRecord;
boolean isLocalOrAnonymous = record.enclosingTypeName == IIndexConstants.ONE_ZERO;
pathRequestor.ac... | public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRuleSet access) {
SuperTypeReferencePattern record = (SuperTypeReferencePattern)indexRecord;
boolean isLocalOrAnonymous = record.enclosingTypeName == IIndexConstants.ONE_ZERO;
pathRequestor.ac... |
protected void initComponents() {
label = new JLabel("Sending message...");
label.setIcon(ImageLoader.getSmallImageIcon("sending.png"));
progressBar = new JProgressBar();
progressBar.setPreferredSize(new Dimension(300, 20));
cancelButton = new ButtonWithMnemonic("&Cancel");
cancelButton.setActionCommand(... | protected void initComponents() {
label = new JLabel("Sending message...");
label.setIcon(ImageLoader.getIcon("send.png"));
progressBar = new JProgressBar();
progressBar.setPreferredSize(new Dimension(300, 20));
cancelButton = new ButtonWithMnemonic("&Cancel");
cancelButton.setActionCommand("CANCEL");
... |
public ReferenceBinding getAnnotationType() {
if (this.typeUnresolved) { // the type is resolved when requested
this.type = BinaryTypeBinding.resolveType(this.type, this.env, false);
// annotation type are never parameterized
this.typeUnresolved = false;
}
return this.type;
}
| public ReferenceBinding getAnnotationType() {
if (this.typeUnresolved) { // the type is resolved when requested
this.type = (ReferenceBinding) BinaryTypeBinding.resolveType(this.type, this.env, false /* no raw conversion for now */);
// annotation type are never parameterized
this.typeUnresolved = false;
}
re... |
private DimensionUtility() {
throw new Error("ActionUtility is just a container for static methods");
}
| private DimensionUtility() {
throw new UnsupportedOperationException("DimensionUtility is just a container for static methods");
}
|
public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = this.manager.getIndex(this.containerPath, true /*reuse index file*/, false /*don't create if no... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = this.manager.getIndex(this.containerPath, true /*reuse index file*/, false /*don't create if no... |
public StatusDialog(Shell parentShell, StatusInfo statusInfo,
int displayMask, boolean modal) {
super(parentShell, (String)statusInfo.getStatus().getProperty(
StatusAdapter.TITLE_PROPERTY), statusInfo.getStatus()
.getStatus().getMessage(), statusInfo.getStatus().getStatus(),
displayMask);
setShellSt... | public StatusDialog(Shell parentShell, StatusInfo statusInfo,
int displayMask, boolean modal) {
super(parentShell, (String)statusInfo.getStatus().getProperty(
StatusAdapter.TITLE_PROPERTY), statusInfo.getStatus()
.getStatus().getMessage(), statusInfo.getStatus().getStatus(),
displayMask);
setShellSt... |
protected String
modeString() {
switch (mode) {
case SERVERASSIGNED: return "SERVERASSIGNED";
case DIFFIEHELLMAN: return "DIFFIEHELLMAN";
case GSSAPI: return "GSSAPRESOLVERASSIGNED";
case RESOLVERASSIGNED: return "RESOLVERASSIGNED";
case DELETE: return "DELETE";
default: return Integer.toString(mode);
... | protected String
modeString() {
switch (mode) {
case SERVERASSIGNED: return "SERVERASSIGNED";
case DIFFIEHELLMAN: return "DIFFIEHELLMAN";
case GSSAPI: return "GSSAPI";
case RESOLVERASSIGNED: return "RESOLVERASSIGNED";
case DELETE: return "DELETE";
default: return Integer.toString(mode);
}
}
|
public static void main( String[] argv) {
String configFile = null;
if(argv.length == 1)
configFile = argv[0];
else
Usage("Wrong number of arguments.");
DOMConfigurator.configure(configFile);
Category.getDefaultHierarchy().enable(Level.WARN);
CAT.debug("Hello world"... | public static void main( String[] argv) {
String configFile = null;
if(argv.length == 1)
configFile = argv[0];
else
Usage("Wrong number of arguments.");
DOMConfigurator.configure(configFile);
Category.getDefaultHierarchy().setThreshold(Level.WARN);
CAT.debug("Hello world")... |
public void testForewardWithAttachement() throws Exception {
String input = FolderTstHelper.getString("0_attachment.eml");
System.out.println("input=" + input);
// create stream from string
InputStream inputStream =
FolderTstHelper.getByteArrayInputStream(input);
... | public void testForewardWithAttachment() throws Exception {
String input = FolderTstHelper.getString("0_attachment.eml");
System.out.println("input=" + input);
// create stream from string
InputStream inputStream =
FolderTstHelper.getByteArrayInputStream(input);
/... |
public String getFullyQualifiedParameterizedName() throws JavaModelException {
return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.uniqueKey);
}
| public String getFullyQualifiedParameterizedName() throws JavaModelException {
return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.uniqueKey);
}
|
import org.eclipse.ui.commands.NotDefinedException;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public Li... | import org.eclipse.ui.commands.NotDefinedException;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public Li... |
public SoccerExample() {
try {
model = new Model("default");
playerClass = new MMClass("Player");
yearClass = new MMClass("Year");
teamClass = new MMClass("Team");
recordAC = new AssociationClass("Record");
recordAC.addStructuralFeature(new Attribute("goals for"));
recor... | public SoccerExample() {
try {
model = new Model("SoccerExample");
playerClass = new MMClass("Player");
yearClass = new MMClass("Year");
teamClass = new MMClass("Team");
recordAC = new AssociationClass("Record");
recordAC.addStructuralFeature(new Attribute("goals for"));
... |
public void initializeContents() {
if (!resource.isLocal(IResource.DEPTH_ZERO)) {
return;
} else {
try {
IPath location = resource.getLocation();
if (location != null) {
this.contents =
org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(
location.toFile());
}
} ca... | public void initializeContents() {
if (!resource.isLocal(IResource.DEPTH_ZERO)) {
return;
} else {
try {
IPath location = resource.getLocation();
if (location != null) {
this.contents =
org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(
location.toFile(), null);
}
... |
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if method from parameterized type got found, use the original method at codegen time
this.codegenBinding = this.binding.original();
if (this.codegenBinding != this.binding) {
// ... | public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if method from parameterized type got found, use the original method at codegen time
this.codegenBinding = this.binding.original();
if (this.codegenBinding != this.binding) {
// ... |
public int getNodeType() {
return ARRAY_CREATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ArrayCreation result = new ArrayCreation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setType((ArrayType) getType().clo... | public int getNodeType() {
return ARRAY_CREATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
ArrayCreation result = new ArrayCreation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setType((ArrayType) getType().cl... |
public static String id() {
return "4.5-SNAPSHOT-20080715-1721";
}
| public static String id() {
return "4.5-SNAPSHOT-20080722-1051";
}
|
private void processPackageFragmentResource(IPackageFragment source, IPackageFragmentRoot root, String newName) throws JavaModelException {
try {
String newFragName = (newName == null) ? source.getElementName() : newName;
IPackageFragment newFrag = root.getPackageFragment(newFragName);
IResource[] resources = co... | private void processPackageFragmentResource(IPackageFragment source, IPackageFragmentRoot root, String newName) throws JavaModelException {
try {
String newFragName = (newName == null) ? source.getElementName() : newName;
IPackageFragment newFrag = root.getPackageFragment(newFragName);
IResource[] resources = co... |
public AddressbookTreeNode add(XmlElement childNode,
AddressbookTreeNode parentFolder) {
FolderItem item = new FolderItem(childNode);
if (item == null) {
return null;
}
// i18n stuff
String name = item.get("property", "name");
//XmlElement.printNode(item.getRoot(), "");
int uid = item.getInteger... | public AddressbookTreeNode add(XmlElement childNode,
AddressbookTreeNode parentFolder) {
FolderItem item = new FolderItem(childNode);
if (item == null) {
return null;
}
// i18n stuff
String name = item.getString("property", "name");
//XmlElement.printNode(item.getRoot(), "");
int uid = item.getI... |
protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("operation.sortelements"), getMainAmountOfWork()); //$NON-NLS-1$
CompilationUnit copy = (CompilationUnit) fElementsToProcess[0];
ICompilationUnit unit = (ICompilationUnit) copy.getOriginalElement();
IBuffer buffer = c... | protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("operation.sortelements"), getMainAmountOfWork()); //$NON-NLS-1$
CompilationUnit copy = (CompilationUnit) fElementsToProcess[0];
ICompilationUnit unit = copy.getPrimary();
IBuffer buffer = copy.getBuffer();
if (buf... |
// public X(int i) {
// this(new Object() { Object obj = X.this; });
// }
// }
MethodScope methodScope = scope.methodScope();
while (methodScope != null) {
if (methodScope.enclosingSourceType() == currentCompatibleType) {
if (!this.checkAccess(methodScope, qualificationTb))
return ... | // public X(int i) {
// this(new Object() { Object obj = X.this; });
// }
// }
MethodScope methodScope = scope.methodScope();
while (methodScope != null) {
if (methodScope.enclosingSourceType() == currentCompatibleType) {
if (!this.checkAccess(methodScope, qualificationTb))
return ... |
public static IStatus validatePackageName(String name) {
if (name == null) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Util.bind("convention.package.nullName"), null); //$NON-NLS-1$
}
int length;
if ((length = name.length()) == 0) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1,... | public static IStatus validatePackageName(String name) {
if (name == null) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Util.bind("convention.package.nullName"), null); //$NON-NLS-1$
}
int length;
if ((length = name.length()) == 0) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1,... |
public char[] findSource(String fullName) {
char[] source = null;
if (Util.isArchiveFileName(this.sourcePath.lastSegment())) {
// try to get the entry
ZipEntry entry = null;
ZipFile zip = null;
JavaModelManager manager = JavaModelManager.getJavaModelManager();
try {
zip = manager.getZipFile(this... | public char[] findSource(String fullName) {
char[] source = null;
if (Util.isArchiveFileName(this.sourcePath.lastSegment())) {
// try to get the entry
ZipEntry entry = null;
ZipFile zip = null;
JavaModelManager manager = JavaModelManager.getJavaModelManager();
try {
zip = manager.getZipFile(this... |
public String individualToString(){
return "Looping flow context"/*nonNLS*/;
}
| public String individualToString(){
return "Looping flow context"; //$NON-NLS-1$
}
|
protected
Client(SelectableChannel channel, long endTime) throws IOException {
boolean done = false;
Selector selector = null;
this.endTime = endTime;
try {
selector = Selector.open();
channel.configureBlocking(false);
key = channel.register(selector, 0);
done = true;
}
finally {
if (!done && selector !... | protected
Client(SelectableChannel channel, long endTime) throws IOException {
boolean done = false;
Selector selector = null;
this.endTime = endTime;
try {
selector = Selector.open();
channel.configureBlocking(false);
key = channel.register(selector, SelectionKey.OP_READ);
done = true;
}
finally {
if (... |
public String operatorToString() {
switch (operator) {
case PLUS :
return "+="; //$NON-NLS-1$
case MINUS :
return "-="; //$NON-NLS-1$
case MULTIPLY :
return "*="; //$NON-NLS-1$
case DIVIDE :
return "/="; //$NON-NLS-1$
case AND :
return "&="; //$NON-NLS-1$
case OR :
return "|... | public String operatorToString() {
switch (operator) {
case PLUS :
return "+="; //$NON-NLS-1$
case MINUS :
return "-="; //$NON-NLS-1$
case MULTIPLY :
return "*="; //$NON-NLS-1$
case DIVIDE :
return "/="; //$NON-NLS-1$
case AND :
return "&="; //$NON-NLS-1$
case OR :
return "|... |
public void addSearchToHistory() {
/*
//System.out.println("selectedfolder:"+ MainInterface.treeViewer.getSelected().getName());
VirtualFolder folder =
(VirtualFolder) MainInterface.treeModel.getFolder(106);
if (folder.getChildCount() >= 10)
{
MessageFolder child = (MessageFolder) folder.ge... | public void addSearchToHistory() {
/*
//System.out.println("selectedfolder:"+ MainInterface.treeViewer.getSelected().getName());
VirtualFolder folder =
(VirtualFolder) MainInterface.treeModel.getFolder(106);
if (folder.getChildCount() >= 10)
{
AbstractMessageFolder child = (AbstractMessageF... |
public static boolean isWhitespace(char c) {
return c < ScannerHelper.MAX_OBVIOUS && ScannerHelper.C_SPACE == ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[c];
}
| public static boolean isWhitespace(char c) {
return c < ScannerHelper.MAX_OBVIOUS && ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[c] & ScannerHelper.C_JLS_SPACE) != 0);
}
|
public SelectionJavadocParser(SelectionParser sourceParser) {
super(sourceParser);
this.kind = SELECTION_PARSER;
}
| public SelectionJavadocParser(SelectionParser sourceParser) {
super(sourceParser);
this.kind = SELECTION_PARSER | TEXT_PARSE;
}
|
public String toString() {
return Localizer.localize ("Tree", "Namespace->Owned Element");
}
| public String toString() {
return Localizer.localize ("Tree", "misc.namespace.owned-element");
}
|
public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) {
ParameterizedGenericMethodBinding methodSubstitute;
TypeVariableBinding[] typeVariables = originalMethod.typeVariables;
TypeBinding[] substitutes = invocatio... | public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) {
ParameterizedGenericMethodBinding methodSubstitute;
TypeVariableBinding[] typeVariables = originalMethod.typeVariables;
TypeBinding[] substitutes = invocatio... |
public
void setLogger(String loggerName) {
}
| public
void setLogger(Logger logger) {
}
|
private CompilationUnitScope scope;
/**
* The working copy owner that defines the context in which this resolver is creating the bindings.
*/
WorkingCopyOwner workingCopyOwner;
/**
* Constructor for DefaultBindingResolver.
*/
DefaultBindingResolver(CompilationUnitScope scope, WorkingCopyOwner workingCo... | private CompilationUnitScope scope;
/**
* The working copy owner that defines the context in which this resolver is creating the bindings.
*/
WorkingCopyOwner workingCopyOwner;
/**
* Constructor for DefaultBindingResolver.
*/
DefaultBindingResolver(CompilationUnitScope scope, WorkingCopyOwner workingCo... |
public String getDeclaredName() throws NotPresentException {
return ""; //$NON-NLS-1$
}
| public String getDeclaredName() throws NotPresentException {
return ""/*nonNLS*/;
}
|
public static void createProblemType(
TypeDeclaration typeDeclaration,
CompilationResult unitResult) {
SourceTypeBinding typeBinding = typeDeclaration.binding;
ClassFile classFile = new ClassFile(typeBinding, null, true);
// inner attributes
if (typeBinding.isMemberType())
classFile.recordEnclosingType... | public static void createProblemType(
TypeDeclaration typeDeclaration,
CompilationResult unitResult) {
SourceTypeBinding typeBinding = typeDeclaration.binding;
ClassFile classFile = new ClassFile(typeBinding, null, true);
// inner attributes
if (typeBinding.isMemberType())
classFile.recordEnclosingType... |
public ArrayType getType() {
if (this.arrayType == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.arrayType == null) {
preLazyInit();
this.arrayType = this.ast.newArrayType(
this.ast.newPrimitiveType(PrimitiveType.INT));
postLazyInit(this.array... | public ArrayType getType() {
if (this.arrayType == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.arrayType == null) {
preLazyInit();
this.arrayType = this.ast.newArrayType(
this.ast.newPrimitiveType(PrimitiveType.INT));
postLazyInit(this.arrayType... |
public String individualToString(){
return "Label flow context [label:"+String.valueOf(labelName)+"]"; //$NON-NLS-2$ //$NON-NLS-1$
}
| public String individualToString(){
return "Label flow context [label:"/*nonNLS*/+String.valueOf(labelName)+"]"/*nonNLS*/;
}
|
public void setComment(String comment) {
becomeDetailed();
fComment= comment;
fragment();
setHasComment(comment != null);
/* see 1FVIJAH */
if (comment != null) {
String commentString = new String(comment);
if (commentString.indexOf("@deprecated") >= 0) { //$NON-NLS-1$
fFlags= fFlags | IConstants.AccDeprec... | public void setComment(String comment) {
becomeDetailed();
fComment= comment;
fragment();
setHasComment(comment != null);
/* see 1FVIJAH */
if (comment != null) {
String commentString = new String(comment);
if (commentString.indexOf("@deprecated"/*nonNLS*/) >= 0) {
fFlags= fFlags | IConstants.AccDeprecated... |
protected String shortenText(String textValue) {
if (textValue == null)
return null;
Display display = control.getDisplay();
GC gc = new GC(display);
int maxWidth = control.getBounds().width;
if (gc.textExtent(textValue).x < maxWidth) {
gc.dispose();
return textValue;
}
int length = textValue.le... | protected String shortenText(String textValue) {
if (textValue == null)
return null;
Display display = control.getDisplay();
GC gc = new GC(display);
int maxWidth = control.getBounds().width - 5;
if (gc.textExtent(textValue).x < maxWidth) {
gc.dispose();
return textValue;
}
int length = textValu... |
public void actionPerformed(ActionEvent evt) {
ColumbaLogger.log.debug("start encryption...");
ComposerModel model = (ComposerModel) ((ComposerController)getFrameController()).getModel();
model.setEncryptMessage( getCheckBoxMenuItem().isSelected() );
}
| public void actionPerformed(ActionEvent evt) {
ColumbaLogger.log.debug("start encryption...");
ComposerModel model = (ComposerModel) ((ComposerController)getFrameMediator()).getModel();
model.setEncryptMessage( getCheckBoxMenuItem().isSelected() );
}
|
public void acceptPackage(char[] packageName){}
}
TypeResolveRequestor requestor = new TypeResolveRequestor();
SelectionEngine engine =
new SelectionEngine(environment, requestor, JavaModelManager.convertConfigurableOptions(JavaCore.getOptions()));
engine.selectType(info, typeName.toCharArray());
return r... | public void acceptPackage(char[] packageName){}
}
TypeResolveRequestor requestor = new TypeResolveRequestor();
SelectionEngine engine =
new SelectionEngine(environment, requestor, JavaModelManager.getOptions());
engine.selectType(info, typeName.toCharArray());
return requestor.answers;
}
|
public CodeFormatterVisitor() {
this(new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getJavaConventionsSetttings()), JavaCore.getDefaultOptions(), 0, -1);
}
| public CodeFormatterVisitor() {
this(new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getJavaConventionsSettings()), JavaCore.getDefaultOptions(), 0, -1);
}
|
private ArrayList getPerspectiveShortcuts() {
ArrayList list = new ArrayList();
IWorkbenchPage page = window.getActivePage();
if (page == null)
return list;
ArrayList ids = new ArrayList(((WorkbenchPage) page).getPerspectiveActionIds());
if (ids == null)
return list;
IObjectActivityManager a... | private ArrayList getPerspectiveShortcuts() {
ArrayList list = new ArrayList();
IWorkbenchPage page = window.getActivePage();
if (page == null)
return list;
ArrayList ids = new ArrayList(((WorkbenchPage) page).getPerspectiveActionIds());
if (ids == null)
return list;
IObjectActivityManager a... |
public boolean visit(IResourceProxy proxy) /* throws CoreException */{
switch(proxy.getType()) {
case IResource.FILE :
if (Util.isJavaFileName(proxy.getName())) {
IResource resource = proxy.requestResource();
if (pattern == null || !Util.isExcluded(resource, pattern))
... | public boolean visit(IResourceProxy proxy) /* throws CoreException */{
switch(proxy.getType()) {
case IResource.FILE :
if (org.eclipse.jdt.internal.compiler.util.Util.isJavaFileName(proxy.getName())) {
IResource resource = proxy.requestResource();
if (pattern == null || !Util... |
private void cleanUp(TypeDeclaration type) {
if (type.memberTypes != null) {
for (int i = 0, max = type.memberTypes.length; i < max; i++){
cleanUp(type.memberTypes[i]);
}
}
if (type.binding != null && type.binding.isAnnotationType())
compilationResult.declaresAnnotations = true;
if (type.binding !... | private void cleanUp(TypeDeclaration type) {
if (type.memberTypes != null) {
for (int i = 0, max = type.memberTypes.length; i < max; i++){
cleanUp(type.memberTypes[i]);
}
}
if (type.binding != null && type.binding.isAnnotationType())
compilationResult.hasAnnotations = true;
if (type.binding != nul... |
public String toString() {
StringBuffer buf = new StringBuffer("MethodIndictment("/*nonNLS*/);
buf.append(fName);
buf.append('/');
buf.append(fParmCount);
buf.append(')');
return buf.toString();
}
| public String toString() {
StringBuffer buf = new StringBuffer("MethodIndictment("); //$NON-NLS-1$
buf.append(fName);
buf.append('/');
buf.append(fParmCount);
buf.append(')');
return buf.toString();
}
|
public void figureInvalidated(FigureChangeEvent e) {
Rectangle rect = e.getInvalidatedRectangle();
rect.grow(getBorderOffset().x, getBorderOffset().y);
super.figureInvalidated(new FigureChangeEvent(e.getFigure(), rect));
}
| public void figureInvalidated(FigureChangeEvent e) {
Rectangle rect = e.getInvalidatedRectangle();
rect.grow(getBorderOffset().x, getBorderOffset().y);
super.figureInvalidated(new FigureChangeEvent(this, rect, e));
}
|
public void setActiveContextIds(SortedSet activeContextIds) {
activeContextIds = Util.safeCopy(activeContextIds, String.class);
if (activeContextIds.equals(this.activeContextIds)) {
this.activeContextIds = activeContextIds;
fireContextManagerChanged();
}
}
| public void setActiveContextIds(SortedSet activeContextIds) {
activeContextIds = Util.safeCopy(activeContextIds, String.class);
if (!activeContextIds.equals(this.activeContextIds)) {
this.activeContextIds = activeContextIds;
fireContextManagerChanged();
}
}
|
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired)
if ((implicitConversion >> 4) == T_float)
codeStream.generateInlinedValue(value);
else
codeStream.generateConstant(constant, implicitConversion);
codeStream.rec... | public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired)
if ((implicitConversion >> 4) == T_float)
codeStream.generateInlinedValue(value);
else
codeStream.generateConstant(constant, implicitConversion);
codeStream.rec... |
private ProblemFactory(Locale locale) {
fLocale = locale;
fCompilerResources = ResourceBundle.getBundle("org.eclipse.jdt.internal.compiler.problem.Messages", locale); //$NON-NLS-1$
initializeMessageTemplates();
}
| private ProblemFactory(Locale locale) {
fLocale = locale;
fCompilerResources = ResourceBundle.getBundle("org.eclipse.jdt.internal.compiler.problem.messages", locale); //$NON-NLS-1$
initializeMessageTemplates();
}
|
public void handleEvent(Event event) {
closeMultiKeyAssistShell();
}
});
// Open the shell.
workbench.getContextSupport().registerShell(multiKeyAssistShell,
IWorkbenchContextSupport.TYPE_NONE);
multiKeyAssistShell.open();
}
| public void handleEvent(Event event) {
closeMultiKeyAssistShell();
}
});
// Open the shell.
workbench.getContextSupport().registerShell(multiKeyAssistShell,
IWorkbenchContextSupport.TYPE_WINDOW);
multiKeyAssistShell.open();
}
|
public int getNodeType() {
return ANONYMOUS_CLASS_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
AnonymousClassDeclaration result = new AnonymousClassDeclaration(target);
result.setSourceRange(getStartPosition(), getLength());
result.bodyDe... | public int getNodeType() {
return ANONYMOUS_CLASS_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
AnonymousClassDeclaration result = new AnonymousClassDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
res... |
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding tb = type.resolveTypeExpecting(scope, scope.getJavaLangThrowabl... | public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding tb = type.resolveTypeExpecting(scope, scope.getJavaLangThrowabl... |
public void actionPerformed(ActionEvent evt) {
MessageFrameController c = new MessageFrameController();
FolderCommandReference[] r = ((MailFrameMediator) getFrameMediator()).getTableSelection();
c.setTreeSelection(r);
c.setTableSelection(r);
/*
c.treeController.se... | public void actionPerformed(ActionEvent evt) {
MessageFrameController c = new MessageFrameController();
FolderCommandReference[] r = ((MailFrameMediator) getFrameMediator()).getTableSelection();
c.setTreeSelection(r);
c.setTableSelection(r);
/*
c.treeController.se... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.