buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void createControl(Composite parent) {
Font font = parent.getFont();
// create composite for page.
Composite outerContainer = new Composite(parent, SWT.NONE);
outerContainer.setLayout(new GridLayout());
outerContainer.setLayoutData(new GridData(
GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_... | public void createControl(Composite parent) {
Font font = parent.getFont();
// create composite for page.
Composite outerContainer = new Composite(parent, SWT.NONE);
outerContainer.setLayout(new GridLayout());
outerContainer.setLayoutData(new GridData(
GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_... |
protected void buildStructure(OpenableElementInfo info, IProgressMonitor monitor) throws JavaModelException {
if (monitor != null && monitor.isCanceled()) return;
// remove existing (old) infos
removeInfo();
HashMap newElements = new HashMap(11);
info.setIsStructureKnown(generateInfos(info, monitor, newElements... | protected void buildStructure(OpenableElementInfo info, IProgressMonitor monitor) throws JavaModelException {
if (monitor != null && monitor.isCanceled()) return;
// remove existing (old) infos
removeInfo();
HashMap newElements = new HashMap(11);
info.setIsStructureKnown(generateInfos(info, monitor, newElements... |
public PrintAction(AbstractFrameController controller) {
super(
controller,
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_message_print"),
null,
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_message_print_tooltip"),
"PRINT",
ImageLoader.getSmallImageIco... | public PrintAction(AbstractFrameController controller) {
super(
controller,
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_message_print"),
null,
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_message_print_tooltip"),
"PRINT",
ImageLoader.getSmallImageIco... |
public abstract void run(EachTestNotifier context) throws Throwable;
} | public abstract void run(EachTestNotifier context);
} |
public void saveIndexes(){
Enumeration indexList = indexes.elements();
while (indexList.hasMoreElements()){
IIndex index = (IIndex)indexList.nextElement();
if (index == null) continue; // index got deleted since acquired
ReadWriteMonitor monitor = getMonitorFor(index);
if (monitor == null) continue; // index ... | public void saveIndexes(){
Enumeration indexList = indexes.elements();
while (indexList.hasMoreElements()){
IIndex index = (IIndex)indexList.nextElement();
if (index == null) continue; // index got deleted since acquired
ReadWriteMonitor monitor = getMonitorFor(index);
if (monitor == null) continue; // index ... |
public void execute(Worker worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Folder folder = (Folder) r[0].getFolder();
Object[] uids = r[0].getUids();
Integer[] address = r[0].getAddress();
part = folder.getMimePart(uids[0], address, worker);
Decoder de... | public void execute(Worker worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Folder folder = (Folder) r[0].getFolder();
Object[] uids = r[0].getUids();
Integer[] address = r[0].getAddress();
part = folder.getMimePart(uids[0], address, worker);
Decoder de... |
public IEclipsePreferences preApply(IEclipsePreferences node) {
Preferences instance = node.node(InstanceScope.SCOPE);
cleanJavaCore(instance.node(JavaCore.PLUGIN_ID));
return super.preApply(node);
}
/**
* Clean imported preferences from obsolete keys.
*
* @param preferences JavaCore preferences.
*/
... | public IEclipsePreferences preApply(IEclipsePreferences node) {
Preferences instance = node.node(InstanceScope.SCOPE);
cleanJavaCore(instance.node(JavaCore.PLUGIN_ID));
return super.preApply(node);
}
/**
* Clean imported preferences from obsolete keys.
*
* @param preferences JavaCore preferences.
*/
... |
public TypeBinding resolveType(BlockScope scope) {
// the format may be incorrect while the scanner could detect
// such error only on painfull tests...easier and faster here
TypeBinding tb = super.resolveType(scope);
if (constant == FORMAT_ERROR) {
constant = NotAConstant;
scope.problemReporter().constantOutO... | public TypeBinding resolveType(BlockScope scope) {
// the format may be incorrect while the scanner could detect
// such error only on painfull tests...easier and faster here
TypeBinding tb = super.resolveType(scope);
if (constant == FORMAT_ERROR) {
constant = Constant.NotAConstant;
scope.problemReporter().con... |
public void fillFullName(String fullName)
{
String[] names = tryBreakName(fullName);
set(VCARD.N_GIVEN,names[0]);
set(VCARD.N_MIDDLE,names[1]);
set(VCARD.N_FAMILY,names[2]);
}
| public void fillFullName(String fullName)
{
String[] names = tryBreakName(fullName);
set(VCARD.N_GIVEN,names[0]);
set(VCARD.N_ADDITIONALNAMES,names[1]);
set(VCARD.N_FAMILY,names[2]);
}
|
protected static PrintWriter defaultSink =
new PrintWriter( new OutputStreamWriter(System.err));
| protected static PrintWriter defaultSink =
new PrintWriter( new OutputStreamWriter(System.err), true);
|
private String getPerspectiveId(IPerspectiveDescriptor perspective) {
if (perspective == null) {
return "null";
}
return perspective.getId();
}
| private String getPerspectiveId(IPerspectiveDescriptor perspective) {
if (perspective == null) {
return "null"; //$NON-NLS-1$
}
return perspective.getId();
}
|
public void inaccessibleBaseClassIsCaughtAtValidation() throws InitializationError {
MethodValidator methodValidator= new MethodValidator(Sub.class);
methodValidator.validateAllMethods();
methodValidator.assertValid();
}
| public void inaccessibleBaseClassIsCaughtAtValidation() throws InitializationError {
MethodValidator methodValidator= new MethodValidator(Sub.class);
methodValidator.validateMethodsForDefaultRunner();
methodValidator.assertValid();
}
|
public void execute(WorkerStatusController worker) throws Exception {
SubscribeCommandReference subscribeReference = (SubscribeCommandReference) getReference();
root = (IMAPRootFolder) subscribeReference.getFolder();
store = root.getServer();
store.subscribeFolder(subscribeReference.getMailbox());
}
| public void execute(WorkerStatusController worker) throws Exception {
SubscribeCommandReference subscribeReference = (SubscribeCommandReference) getReference();
root = (IMAPRootFolder) subscribeReference.getSourceFolder();
store = root.getServer();
store.subscribeFolder(subscribeReference.getMailbox());
}
|
public String decode( String input, String charset) throws UnsupportedEncodingException {
if( charset != null ) {
return new String( input.getBytes(), charset );
}
return input;
}
| public String decode( String input, String charset) throws UnsupportedEncodingException {
if( charset != null ) {
return new String( input.getBytes(charset), charset );
}
return input;
}
|
public void cleanup() {
this.initialTypeNames = null;
this.additionalUnits = null;
for (int i = 0, l = sourceLocations.length; i < l; i++)
sourceLocations[i].cleanup();
for (int i = 0, l = binaryLocations.length; i < l; i++)
binaryLocations[i].cleanup();
}
void createFolder(IContainer folder, IProject p) throw... | public void cleanup() {
this.initialTypeNames = null;
this.additionalUnits = null;
for (int i = 0, l = sourceLocations.length; i < l; i++)
sourceLocations[i].cleanup();
for (int i = 0, l = binaryLocations.length; i < l; i++)
binaryLocations[i].cleanup();
}
void createFolder(IContainer folder, IProject p) throw... |
public boolean search(IIndex index) {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
if (index == null) return COMPLETE;
ReadWriteMonitor monitor = indexManager.getMonitorFor(index);
if (monitor == null) return COMPLETE; // index got deleted since acquired
... | public boolean search(IIndex index) {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
if (index == null) return COMPLETE;
ReadWriteMonitor monitor = indexManager.getMonitorFor(index);
if (monitor == null) return COMPLETE; // index got deleted since acquired
... |
public
update(InputStream in) throws IOException {
List inputs = new LinkedList();
List istreams = new LinkedList();
query = new Message();
query.getHeader().setOpcode(Opcode.UPDATE);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
inputs.add(br);
istreams.add(... | public
update(InputStream in) throws IOException {
List inputs = new LinkedList();
List istreams = new LinkedList();
query = new Message();
query.getHeader().setOpcode(Opcode.UPDATE);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
inputs.add(br);
istreams.add(... |
public HierarchyBuilder(TypeHierarchy hierarchy) throws JavaModelException {
this.hierarchy = hierarchy;
JavaProject project = (JavaProject) hierarchy.javaProject();
IType focusType = hierarchy.getType();
org.eclipse.jdt.core.ICompilationUnit unitToLookInside = focusType == null ? null : focusType.getCom... | public HierarchyBuilder(TypeHierarchy hierarchy) throws JavaModelException {
this.hierarchy = hierarchy;
JavaProject project = (JavaProject) hierarchy.javaProject();
IType focusType = hierarchy.getType();
org.eclipse.jdt.core.ICompilationUnit unitToLookInside = focusType == null ? null : focusType.getCom... |
public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope, true /* check bounds*/);
checkModifiers();
if (variableType != null) {
if (variableType == TypeBinding.VOID) {
scope.problemReporter().variableTypeCannotBeVoid(this);
... | public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope, true /* check bounds*/);
checkModifiers();
if (variableType != null) {
if (variableType == TypeBinding.VOID) {
scope.problemReporter().variableTypeCannotBeVoid(this);
... |
public TypeBinding resolveType(BlockScope scope) {
// handle the error here
constant = NotAConstant;
if (this.resolvedType != null) { // is a shared type reference which was already resolved
if (!this.resolvedType.isValidBinding())
return null; // already reported error
} else {
this.resolvedType = getTypeBi... | public TypeBinding resolveType(BlockScope scope) {
// handle the error here
constant = NotAConstant;
if (this.resolvedType != null) { // is a shared type reference which was already resolved
if (!this.resolvedType.isValidBinding())
return null; // already reported error
} else {
this.resolvedType = getTypeBi... |
public String getName() {
return name;
}
/*
* load the name if it is not already set.
*/
void extractName(IConfigurationElement configElement) {
if (name == null) {
name = configElement.getAttribute(ATT_NAME);
}
}
/**
* Set the description.
*
* @p... | public String getName() {
return name;
}
/*
* load the name if it is not already set.
*/
void extractName(IConfigurationElement configElement) {
if (name == null) {
name = configElement.getAttribute(ATT_NAME);
}
}
/**
* Set the description.
*
* @p... |
public IEditorDescriptor[] getEditors(String fileName, IContentType contentType) {
IEditorDescriptor[] editors = new IEditorDescriptor[0];
IEditorDescriptor[] filenameEditors = editors;
IEditorDescriptor[] extensionEditors = editors;
FileEditorMapping mapping[] = getMappingForFilename(... | public IEditorDescriptor[] getEditors(String fileName, IContentType contentType) {
IEditorDescriptor[] editors = new IEditorDescriptor[0];
IEditorDescriptor[] filenameEditors = editors;
IEditorDescriptor[] extensionEditors = editors;
FileEditorMapping mapping[] = getMappingForFilename(... |
private Block optionalBody = null;
/**
* Creates a new AST node for a method declaration owned
* by the given AST. By default, the declaration is for a method of an
* unspecified, but legal, name; no modifiers; no javadoc; no type
* parameters; void return type; no parameters; no array dimensions after
... | private Block optionalBody = null;
/**
* Creates a new AST node for a method declaration owned
* by the given AST. By default, the declaration is for a method of an
* unspecified, but legal, name; no modifiers; no javadoc; no type
* parameters; void return type; no parameters; no array dimensions after
... |
private void doForward(ServletRequest request, ServletResponse response)
throws ServletException, IOException
{
/** We need to find the request/response. The servlet API
* guarantees that we will receive the original request as parameter.
*/
Request realRequest = ((HttpServletRequestFacade)request).
... | private void doForward(ServletRequest request, ServletResponse response)
throws ServletException, IOException
{
/** We need to find the request/response. The servlet API
* guarantees that we will receive the original request as parameter.
*/
Request realRequest = ((HttpServletRequestFacade)request).
... |
private void reportDeclaration(FieldBinding fieldBinding, MatchLocator locator) throws CoreException {
// ignore length field
if (fieldBinding == ArrayBinding.LengthField) return;
ReferenceBinding declaringClass = fieldBinding.declaringClass;
IType type = locator.lookupType(declaringClass);
if (type == null) ret... | private void reportDeclaration(FieldBinding fieldBinding, MatchLocator locator) throws CoreException {
// ignore length field
if (fieldBinding == ArrayBinding.ArrayLength) return;
ReferenceBinding declaringClass = fieldBinding.declaringClass;
IType type = locator.lookupType(declaringClass);
if (type == null) ret... |
private final static void declareImages() {
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR, PATH_ETOOL+"pin_editor.gif", false); //$NON-NLS-1$
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR_DISABLED, PATH_DTOOL+"pin_editor.gif", false); //$NON-NLS-1$
// other toolbar buttons
dec... | private final static void declareImages() {
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR, PATH_ETOOL+"pin_editor.gif", false); //$NON-NLS-1$
declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR_DISABLED, PATH_DTOOL+"pin_editor.gif", false); //$NON-NLS-1$
// other toolbar buttons
dec... |
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.
//----------------------------------------... |
public ConfigurationDialog(String pluginId)
throws PluginHandlerNotFoundException, PluginLoadingFailedException {
// modal dialog
super((JFrame) null, true);
IExtensionHandler h = PluginManager
.getInstance().getHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_CONFIG);
IExtension extension = h.getExten... | public ConfigurationDialog(String pluginId)
throws PluginHandlerNotFoundException, PluginLoadingFailedException {
// modal dialog
super((JFrame) null, true);
IExtensionHandler h = PluginManager
.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_CONFIG);
IExtension extension = h... |
public LogViewer()
{
super(new BorderLayout());
JPanel caption = new JPanel();
caption.setLayout(new BoxLayout(caption,BoxLayout.X_AXIS));
caption.setBorder(new EmptyBorder(6,6,6,6));
String settingsDirectory = jEdit.getSettingsDirectory();
if(settingsDirectory != null)
{
String[] args = { MiscUtil... | public LogViewer()
{
super(new BorderLayout());
JPanel caption = new JPanel();
caption.setLayout(new BoxLayout(caption,BoxLayout.X_AXIS));
caption.setBorder(new EmptyBorder(6,6,6,6));
String settingsDirectory = jEdit.getSettingsDirectory();
if(settingsDirectory != null)
{
String[] args = { MiscUtil... |
public void updateEditorTab(PartPane pane,String title,boolean isDirty,Image image,String toolTip) {
// Get tab.
CTabItem tab = getTab(pane);
if(tab == null) return;
// Update title.
if (isDirty)
title = "*" + title;//$NON-NLS-1$
tab.setText(title);
// Update the tab image
if (image == null) {
// Normal ... | public void updateEditorTab(PartPane pane,String title,boolean isDirty,Image image,String toolTip) {
// Get tab.
CTabItem tab = getTab(pane);
if(tab == null) return;
// Update title.
if (isDirty)
title = "*" + title;//$NON-NLS-1$
tab.setText(title);
// Update the tab image
if (image == null || image.isDisp... |
public boolean predicate(Object dm, Designer dsgr) {
if (!(dm instanceof MMClass)) return NO_PROBLEM;
MMClass cls = (MMClass) dm;
Vector ends = cls.getAssociationEnd();
if (ends == null || ends.size() != 1) return NO_PROBLEM;
AssociationEnd myEnd = (AssociationEnd) ends.elementAt(0);
IAssociat... | public boolean predicate2(Object dm, Designer dsgr) {
if (!(dm instanceof MMClass)) return NO_PROBLEM;
MMClass cls = (MMClass) dm;
Vector ends = cls.getAssociationEnd();
if (ends == null || ends.size() != 1) return NO_PROBLEM;
AssociationEnd myEnd = (AssociationEnd) ends.elementAt(0);
IAssocia... |
protected FolderFactory() throws PluginHandlerNotFoundException {
// Get the handler
handler = PluginManager.getInstance().getHandler(
IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDER);
}
| protected FolderFactory() throws PluginHandlerNotFoundException {
// Get the handler
handler = PluginManager.getInstance().getExtensionHandler(
IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDER);
}
|
public void execute(Worker worker) throws Exception {
// get selected folder
Folder folder = (Folder) ((FolderCommandReference) getReferences()[0]).getFolder();
// get first selected message
Object[] uids = ((FolderCommandReference) getReferences()[0]).getUids();
// create ... | public void execute(Worker worker) throws Exception {
// get selected folder
Folder folder = (Folder) ((FolderCommandReference) getReferences()[0]).getFolder();
// get first selected message
Object[] uids = ((FolderCommandReference) getReferences()[0]).getUids();
// create ... |
protected ActionGenerateOne() {
super("Generate Selected Classes", NO_ICON);
}
| protected ActionGenerateOne() {
super("action.generate-selected-classes", NO_ICON);
}
|
this.binding = privateBinding;
}
} else {
if (this.binding.declaringClass == null) {
this.binding.declaringClass = allocatedType;
}
scope.problemReporter().invalidConstructor(this, this.binding);
return this.resolvedType;
}
}
if (isMethodUseDeprecated(this.binding, scope)) {
scope.pro... | this.binding = privateBinding;
}
} else {
if (this.binding.declaringClass == null) {
this.binding.declaringClass = allocatedType;
}
scope.problemReporter().invalidConstructor(this, this.binding);
return this.resolvedType;
}
}
if (isMethodUseDeprecated(this.binding, scope)) {
scope.pro... |
public Class getDefaultChild() {
return null;
}
} | public String getDefaultChild() {
return null;
}
} |
public boolean process(MessageFolder folder, Object uid) throws Exception {
Header header = folder.getHeaderFields(uid, new String[] { "From"});
String from = header.get("From");
Address address = null;
try {
address = AddressParser.parseAddress(from);
} catch (E... | public boolean process(MessageFolder folder, Object uid) throws Exception {
Header header = folder.getHeaderFields(uid, new String[] { "From"});
String from = header.get("From");
Address address = null;
try {
address = AddressParser.parseAddress(from);
} catch (E... |
protected Object createEvent() {
return StateMachinesFactory.getFactory().createChangeEvent();
}
| protected Object createEvent() {
return StateMachinesFactory.getFactory().buildChangeEvent();
}
|
protected void traverseDelta(
IJavaElementDelta delta,
IPackageFragmentRoot root,
IJavaProject project) {
boolean processChildren = true;
Openable element = (Openable) delta.getElement();
switch (element.getElementType()) {
case IJavaElement.JAVA_PROJECT :
project = (IJavaProject) element;
bre... | protected void traverseDelta(
IJavaElementDelta delta,
IPackageFragmentRoot root,
IJavaProject project) {
boolean processChildren = true;
Openable element = (Openable) delta.getElement();
switch (element.getElementType()) {
case IJavaElement.JAVA_PROJECT :
project = (IJavaProject) element;
bre... |
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnJavadocSingleNameReference:"); //$NON-NLS-1$
if (this.token != null) super.printExpression(indent, output);
return output.append('>');
}
| public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnJavadocParamNameReference:"); //$NON-NLS-1$
if (this.token != null) super.printExpression(indent, output);
return output.append('>');
}
|
private void setDefaults( Context ctx )
throws TomcatException
{
// addServlet( ctx, "default", "org.apache.tomcat.servlets.DefaultServlet");
// addServlet( ctx, "invoker", "org.apache.tomcat.servlets.InvokerServlet");
ServletWrapper sw=addServlet( ctx, "jsp", "org.apache.jasper.runtime.JspServlet");
// sw... | private void setDefaults( Context ctx )
throws TomcatException
{
// addServlet( ctx, "default", "org.apache.tomcat.servlets.DefaultServlet");
// addServlet( ctx, "invoker", "org.apache.tomcat.servlets.InvokerServlet");
ServletWrapper sw=addServlet( ctx, "jsp", "org.apache.jasper.servlet.JspServlet");
// sw... |
public void run() {
// Collect dirtyParts
ArrayList dirtyParts = new ArrayList();
ArrayList dirtyEditorsInput = new ArrayList();
IWorkbenchWindow windows[] = getWorkbenchWindows();
for (int i = 0; i < windows.length; i++) {
IWorkbenchPage pages[] = windows[i].getPages();
for (int j = 0;... | public void run() {
// Collect dirtyParts
ArrayList dirtyParts = new ArrayList();
ArrayList dirtyEditorsInput = new ArrayList();
IWorkbenchWindow windows[] = getWorkbenchWindows();
for (int i = 0; i < windows.length; i++) {
IWorkbenchPage pages[] = windows[i].getPages();
for (int j = 0;... |
public ActionImportFromSources() {
super("Import sources...");
}
| public ActionImportFromSources() {
super("Import sources...", NO_ICON);
}
|
private void adaptRegions() {
this.adaptedRegions = new Region[this.regions.length];
for (int i = 0, max = this.regions.length; i < max; i++) {
IRegion aRegion = this.regions[i];
int offset = aRegion.getOffset();
if (offset > 0) {
int length = aRegion.getLength();
if (isAdaptableRegion(offset, len... | private void adaptRegions() {
this.adaptedRegions = new IRegion[this.regions.length];
for (int i = 0, max = this.regions.length; i < max; i++) {
IRegion aRegion = this.regions[i];
int offset = aRegion.getOffset();
if (offset > 0) {
int length = aRegion.getLength();
if (isAdaptableRegion(offset, le... |
public MessageFolder createFolder(int folderId) {
return new TempFolder(FolderTstHelper.homeDirectory + "/folders/"
+ folderId);
}
} | public AbstractMessageFolder createFolder(int folderId) {
return new TempFolder(FolderTstHelper.homeDirectory + "/folders/"
+ folderId);
}
} |
protected void handlePerspectiveChange(IWorkbenchPage changedPage,
IPerspectiveDescriptor changedPerspective,
IWorkbenchPartReference partRef, String changeId) {
// Only handle changes for our perspective
if (changedPage != page && perspective.getDesc() != changedPerspective)
return;
if (changeId.equal... | protected void handlePerspectiveChange(IWorkbenchPage changedPage,
IPerspectiveDescriptor changedPerspective,
IWorkbenchPartReference partRef, String changeId) {
// Only handle changes for our perspective
if (changedPage != page && perspective.getDesc() != changedPerspective)
return;
if (changeId.equal... |
public String toString(){
return this.leftPattern.toString() + "\n| " + this.rightPattern.toString();
}
| public String toString(){
return this.leftPattern.toString() + "\n| "/*nonNLS*/ + this.rightPattern.toString();
}
|
public QuickAccessEntry match(String filter, AbstractProvider providerForMatching) {
String sortLabel = getSortLabel().toLowerCase();
int index = sortLabel.indexOf(filter);
if (index != -1) {
return new QuickAccessEntry(this, providerForMatching, new int[][] { {
index, index + filter.length() - 1 } }, EM... | public QuickAccessEntry match(String filter, AbstractProvider providerForMatching) {
String sortLabel = getSortLabel().toLowerCase();
int index = sortLabel.indexOf(filter);
if (index != -1) {
return new QuickAccessEntry(this, providerForMatching, new int[][] { {
index, index + filter.length() - 1 } }, EM... |
IContextHandle getContextHandle(String contextId)
/*******************************************************************************
* 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 Lice... | IContextHandle getContextHandle(String contextId)
/*******************************************************************************
* 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 Lice... |
public char charAt(int index)
{
if (reverse)
index = -index;
return seg.array[seg.offset + offset + index];
}
| public char charAt(int index)
{
if (reverse)
index = length - index - 1;
return seg.array[seg.offset + offset + index];
}
|
public void printEndOfCompilationUnit() {
try {
// if we have a space between two tokens we ensure it will be dumped in the formatted string
int currentTokenStartPosition = this.scanner.currentPosition;
boolean hasComment = false;
boolean hasLineComment = false;
boolean hasWhitespace = false;
int c... | public void printEndOfCompilationUnit() {
try {
// if we have a space between two tokens we ensure it will be dumped in the formatted string
int currentTokenStartPosition = this.scanner.currentPosition;
boolean hasComment = false;
boolean hasLineComment = false;
boolean hasWhitespace = false;
int c... |
public
String convert(LoggingEvent event) {
switch(type) {
case RELATIVE_TIME_CONVERTER:
return (Long.toString(event.timeStamp - LoggingEvent.getStartTime()));
case THREAD_CONVERTER:
return event.getThreadName();
case PRIORITY_CONVERTER:
return event.priority.toString();
case N... | public
String convert(LoggingEvent event) {
switch(type) {
case RELATIVE_TIME_CONVERTER:
return (Long.toString(event.timeStamp - LoggingEvent.getStartTime()));
case THREAD_CONVERTER:
return event.getThreadName();
case PRIORITY_CONVERTER:
return event.priority.toString();
case N... |
public int hashCode() {
int hash = super.hashCode();
for (int i = 0, length = parameterTypes.length; i < length; i++) {
hash = Util.combineHashCodes(parameterTypes[i].hashCode(), hash);
}
| public int hashCode() {
int hash = super.hashCode();
for (int i = 0, length = parameterTypes.length; i < length; i++) {
hash = Util.combineHashCodes(hash, parameterTypes[i].hashCode());
}
|
public EmptyProject() {
super("Untitled");
Model m1 = new Model("UntitledPackage");
try {
addDiagram(makeDiagram(m1));
addModel(m1);
}
catch (PropertyVetoException pve) { }
}
| public EmptyProject() {
super("Untitled");
Model m1 = new Model("untitledpackage");
try {
addDiagram(makeDiagram(m1));
addModel(m1);
}
catch (PropertyVetoException pve) { }
}
|
public WorkbenchWizardSelectionPage(String name, IWorkbench aWorkbench,
IStructuredSelection currentSelection, AdaptableList elements) {
super(name);
this.wizardElements = elements;
this.currentResourceSelection = currentSelection;
this.workbench = aWorkbench;
set... | public WorkbenchWizardSelectionPage(String name, IWorkbench aWorkbench,
IStructuredSelection currentSelection, AdaptableList elements) {
super(name);
this.wizardElements = elements;
this.currentResourceSelection = currentSelection;
this.workbench = aWorkbench;
set... |
protected BaseRule(ImportBean ib)
{
super(ib.getDigester());
this.ib = ib;
}
| protected BaseRule(ImportBean ib)
{
super();
this.ib = ib;
}
|
public TypeBinding resolveType(BlockScope scope) {
// for code gen, harm the restrictiveFlag
this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
if ((this.codegenBinding = this.binding = scope.getBinding(token, bits & RestrictiveFlagMASK, this)).isValidBinding()) {
switch (bits &... | public TypeBinding resolveType(BlockScope scope) {
// for code gen, harm the restrictiveFlag
this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
if ((this.codegenBinding = this.binding = scope.getBinding(token, bits & RestrictiveFlagMASK, this)).isValidBinding()) {
switch (bits &... |
public boolean isParameterized() {
return this.typeSignatures != null && this.typeArguments != null;
}
/* (non-Javadoc)
* Compute a IJavaElement signature or a string pattern signature to store
* its type arguments. Recurse when signature is qualified to store signatures and
* type arguments also for of all... | public boolean isParameterized() {
return this.typeSignatures != null && this.typeArguments != null;
}
/* (non-Javadoc)
* Compute a IJavaElement signature or a string pattern signature to store
* its type arguments. Recurse when signature is qualified to store signatures and
* type arguments also for of all... |
private AbstractMethodDeclaration convert(SourceMethod methodHandle, SourceMethodElementInfo methodInfo, CompilationResult compilationResult) throws JavaModelException {
AbstractMethodDeclaration method;
/* only source positions available */
int start = methodInfo.getNameSourceStart();
int end = methodInfo.ge... | private AbstractMethodDeclaration convert(SourceMethod methodHandle, SourceMethodElementInfo methodInfo, CompilationResult compilationResult) throws JavaModelException {
AbstractMethodDeclaration method;
/* only source positions available */
int start = methodInfo.getNameSourceStart();
int end = methodInfo.ge... |
public static char[] getResourceContentsAsCharArray(IFile file) throws JavaModelException {
InputStream stream= null;
try {
stream = new BufferedInputStream(file.getContents(true));
} catch (CoreException e) {
throw new JavaModelException(e);
}
try {
return org.eclipse.jdt.internal.compiler.util.Util.getInpu... | public static char[] getResourceContentsAsCharArray(IFile file) throws JavaModelException {
InputStream stream= null;
try {
stream = new BufferedInputStream(file.getContents(true));
} catch (CoreException e) {
throw new JavaModelException(e);
}
try {
return org.eclipse.jdt.internal.compiler.util.Util.getInpu... |
public String getJdkLevel() {
try {
switch(getKind()) {
case IPackageFragmentRoot.K_BINARY:
ClassFileReader reader = null;
if (isArchive()) {
// root is a jar file or a zip file
JarPackageFragmentRoot jarPackageFragmentRoot = (JarPackageFragmentRoot) this;
ZipFile jar = null;
try {
... | public String getJdkLevel() {
try {
switch(getKind()) {
case IPackageFragmentRoot.K_BINARY:
ClassFileReader reader = null;
if (isArchive()) {
// root is a jar file or a zip file
JarPackageFragmentRoot jarPackageFragmentRoot = (JarPackageFragmentRoot) this;
ZipFile jar = null;
try {
... |
protected void executeOperation() throws JavaModelException {
checkCanceled();
try {
beginTask("", 1); //$NON-NLS-1$
if (JavaModelManager.CP_RESOLVE_VERBOSE)
verbose_set_variables();
JavaModelManager manager = JavaModelManager.getJavaModelManager();
if (manager.variablePutIfInitializingWithSameVal... | protected void executeOperation() throws JavaModelException {
checkCanceled();
try {
beginTask("", 1); //$NON-NLS-1$
if (JavaModelManager.CP_RESOLVE_VERBOSE)
verbose_set_variables();
JavaModelManager manager = JavaModelManager.getJavaModelManager();
if (manager.variablePutIfInitializingWithSameVal... |
public void dispose() {
if (!active)
return;
DragUtil.removeDragTarget(parent, this);
DragUtil.removeDragTarget(parent.getShell(), this);
// remove all Listeners
if (resizeListener != null && parent != null){
parent.removeControlListener(resizeListener);
}
resizeSashes(new Rectangle(-200, -200, 0, 0));
... | public void dispose() {
if (!active)
return;
DragUtil.removeDragTarget(parent, this);
DragUtil.removeDragTarget(parent.getShell(), this);
// remove all Listeners
if (resizeListener != null && parent != null){
parent.removeControlListener(resizeListener);
}
resizeSashes(new Rectangle(-200, -200, 0, 0));
... |
public void consumeType() {
// remove main type if needed
if (this.mainTypeStart != -1) {
this.signature.replace(this.mainTypeStart, this.mainTypeEnd, ""); //$NON-NLS-1$
}
// parameter types
int length = this.typeParameters.size();
if (length > 0) {
StringBuffer typeParametersSig = new StringBuffer()... | public void consumeType() {
// remove main type if needed
if (this.mainTypeStart != -1) {
this.signature.replace(this.mainTypeStart, this.mainTypeEnd, ""); //$NON-NLS-1$
}
// parameter types
int length = this.typeParameters.size();
if (length > 0) {
StringBuffer typeParametersSig = new StringBuffer()... |
public void testRetrieveQueryColumnIDs()
{
AttributeAccess aa = DAFactory.getAttributeAccess();
String userID = "1";
String listID = "1";
String moduleID = "5";
String artifactTypeID = "1";
List ids = aa.retrieveQueryColumnIDs(userID, listID,
... | public void testRetrieveQueryColumnIDs()
{
AttributeAccess aa = DAFactory.getAttributeAccess();
String userID = "1";
String listID = "1";
String moduleID = "5";
String artifactTypeID = "1";
List ids = aa.retrieveQueryColumnIDs(userID, listID,
... |
public ChAssociation() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the class?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Should {name} be its own c... | public ChAssociation() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the class?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Should {name} be its own c... |
public String getLabel() {
boolean dirty = editorReference.isDirty();
return (dirty ? DIRTY_MARK : "") + editorReference.getName() + separator + editorReference.getTitleToolTip(); //$NON-NLS-1$
}
| public String getLabel() {
boolean dirty = editorReference.isDirty();
return (dirty ? DIRTY_MARK : "") + editorReference.getTitle() + separator + editorReference.getTitleToolTip(); //$NON-NLS-1$
}
|
public int getNodeType() {
return CAST_EXPRESSION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
CastExpression result = new CastExpression(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setType((Type) getType().clone... | public int getNodeType() {
return CAST_EXPRESSION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
CastExpression result = new CastExpression(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setType((Type) getType().clon... |
public void appendRow() {
int rowCount = getRowCount();
int selected = getSelectedRow();
if (emptyRowExists() == false) {
addEmptyRow();
editLastRow();
} else
editLastRow();
}
| public void appendRow() {
int rowCount = getRowCount();
int selected = getSelectedRow();
if (emptyRowExists() == false) {
addEmptyRow();
//editLastRow();
} else
editLastRow();
}
|
public static String id() {
return "56.2";
}
| public static String id() {
return "4.0";
}
|
public final boolean isFieldUseDeprecated(FieldBinding field, Scope scope, boolean isStrictlyAssigned) {
if (!isStrictlyAssigned && (field.isPrivate() || (field.declaringClass != null && field.declaringClass.isLocalType())) && !scope.isDefinedInField(field)) {
// ignore cases where field is used from within ins... | public final boolean isFieldUseDeprecated(FieldBinding field, Scope scope, boolean isStrictlyAssigned) {
if (!isStrictlyAssigned && (field.isPrivate() || (field.declaringClass != null && field.declaringClass.isLocalType())) && !scope.isDefinedInField(field)) {
// ignore cases where field is used from within ins... |
public
String format(LoggingEvent event) {
// Reset buf
buf.setLength(0);
dateFormat(buf, event);
if(this.threadPrinting) {
buf.append('[');
buf.append(event.getThreadName());
buf.append("] ");
}
buf.append(event.level.toString());
buf.append(' ');
if(this.c... | public
String format(LoggingEvent event) {
// Reset buf
buf.setLength(0);
dateFormat(buf, event);
if(this.threadPrinting) {
buf.append('[');
buf.append(event.getThreadName());
buf.append("] ");
}
buf.append(event.level.toString());
buf.append(' ');
if(this.c... |
public void setCollection(MimePartTree collection) {
this.collection = collection;
// Get all MimeParts
displayedMimeParts = collection.getAllLeafs();
// Remove the BodyPart(s) if any
MimePart bodyPart = collection.getFirstTextPart("plain");
if (bodyPart != null) {
MimePart bodyParent = (MimePart) bod... | public void setCollection(MimePartTree collection) {
this.collection = collection;
// Get all MimeParts
displayedMimeParts = collection.getAllLeafs();
// Remove the BodyPart(s) if any
MimePart bodyPart = collection.getFirstTextPart("plain");
if (bodyPart != null) {
MimePart bodyParent = (MimePart) bod... |
public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRestriction access) {
SuperTypeReferencePattern record = (SuperTypeReferencePattern)indexRecord;
pathRequestor.acceptPath(documentPath, record.enclosingTypeName == IIndexConstants.ONE_ZERO);
c... | public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRestriction access) {
SuperTypeReferencePattern record = (SuperTypeReferencePattern)indexRecord;
pathRequestor.acceptPath(documentPath, record.enclosingTypeName == IIndexConstants.ONE_ZERO);
c... |
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("CLOSE")) //$NON-NLS-1$
{
try {
Config.save();
} catch (Exception ex) {
ex.printStackTrace();
}
dialog.setVisible(false);
} else if (action.equals("ADD")) //$NON-NLS-1$
{
System.ou... | public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("CLOSE")) //$NON-NLS-1$
{
try {
Config.save();
} catch (Exception ex) {
ex.printStackTrace();
}
dialog.setVisible(false);
} else if (action.equals("ADD")) //$NON-NLS-1$
{
System.ou... |
public String debugName() {
return toString();
}
ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) {
ReferenceBinding targetType = this.resolvedType;
if (targetType == null) {
targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]);
if (targe... | public String debugName() {
return toString();
}
ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) {
ReferenceBinding targetType = this.resolvedType;
if (targetType == null) {
targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]);
if (targe... |
public void update(Scribe scribe, int sourceRestart){
this.outputColumn = scribe.column;
this.outputLine = scribe.line;
this.inputOffset = sourceRestart;
this.inputColumn = scribe.getCurrentIndentation(sourceRestart);
this.outputIndentationLevel = scribe.indentationLevel;
this.lastNumberOfNewLines = scribe... | public void update(Scribe scribe, int sourceRestart){
this.outputColumn = scribe.column;
this.outputLine = scribe.line;
this.inputOffset = sourceRestart;
this.inputColumn = scribe.getCurrentColumn(sourceRestart);
this.outputIndentationLevel = scribe.indentationLevel;
this.lastNumberOfNewLines = scribe.last... |
public Name
getPrefix() {
return prefix;
}
void
rrToWire(DataByteOutputStream out, Compression c) throws IOException {
if (suffix == null)
return;
out.write(prefixBits);
int suffixbits = 128 - prefixBits;
int suffixbytes = (suffixbits + 7) / 8;
byte [] data = suffix.toBytes();
out.write(data, 16 - suffixbytes... | public Name
getPrefix() {
return prefix;
}
void
rrToWire(DataByteOutputStream out, Compression c) {
if (suffix == null)
return;
out.write(prefixBits);
int suffixbits = 128 - prefixBits;
int suffixbytes = (suffixbits + 7) / 8;
byte [] data = suffix.toBytes();
out.write(data, 16 - suffixbytes, suffixbytes);
if... |
public void execute(WorkerStatusController worker)
throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
folder = (MessageFolder) r[0].getFolder();
// register for status events
((StatusObservableImpl) folder.getObservable()).setWorker... | public void execute(WorkerStatusController worker)
throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
folder = (MessageFolder) r[0].getFolder();
// register for status events
((StatusObservableImpl) folder.getObservable()).setWorker... |
public TreeController(
MailFrameController mailFrameController,
TreeModel model) {
this.model = model;
this.mailFrameController = mailFrameController;
view = new TreeView(model);
actionListener = new FolderTreeActionListener(this);
treeSelectionManager = new TreeSelectionManager();
view.addTreeSel... | public TreeController(
MailFrameController mailFrameController,
TreeModel model) {
this.model = model;
this.mailFrameController = mailFrameController;
view = new TreeView(model);
actionListener = new FolderTreeActionListener(this);
treeSelectionManager = new TreeSelectionManager();
view.addTreeSel... |
public IToolBarManager getToolBarManager() {
return window.getToolsManager();
}
| public IToolBarManager getToolBarManager() {
return window.getCoolBarManager();
}
|
public void activityManagerChanged(ActivityManagerEvent activityManagerEvent) {
ActivityManagerEvent proxyActivityManagerEvent =
new ActivityManagerEvent(
ProxyActivityManager.this.activityManager,
activityManagerEvent.haveDefinedActivityIdsChanged(),
activityManagerEvent.haveEnabledActivi... | public void activityManagerChanged(ActivityManagerEvent activityManagerEvent) {
ActivityManagerEvent proxyActivityManagerEvent =
new ActivityManagerEvent(
ProxyActivityManager.this,
activityManagerEvent.haveDefinedActivityIdsChanged(),
activityManagerEvent.haveEnabledActivityIdsChanged());... |
public boolean boundCheck(Substitution substitution, TypeBinding argumentType) {
if (argumentType == NullBinding || this == argumentType)
return true;
if (!(argumentType instanceof ReferenceBinding || argumentType.isArrayType()))
return false;
if (argumentType.isWildcard()) {
WildcardBindi... | public boolean boundCheck(Substitution substitution, TypeBinding argumentType) {
if (argumentType == NullBinding || this == argumentType)
return true;
if (!(argumentType instanceof ReferenceBinding || argumentType.isArrayType()))
return false;
if (argumentType.isWildcard()) {
WildcardBindi... |
protected Control createDialogArea(Composite parent) {
Font font = parent.getFont();
// Run super.
Composite composite = (Composite)super.createDialogArea(parent);
// description
Label descLabel = new Label(composite, SWT.WRAP);
descLabel.setText(WorkbenchMessages.getString("SavePerspectiveDialog.description"));... | protected Control createDialogArea(Composite parent) {
Font font = parent.getFont();
// Run super.
Composite composite = (Composite)super.createDialogArea(parent);
// description
Label descLabel = new Label(composite, SWT.WRAP);
descLabel.setText(WorkbenchMessages.getString("SavePerspectiveDialog.description"));... |
public static String createTypeSignature(String typeName, boolean isResolved) {
try {
Scanner scanner = new Scanner();
scanner.setSourceBuffer(typeName.toCharArray());
int token = scanner.getNextToken();
StringBuffer sig = new StringBuffer();
int arrayCount = 0;
boolean primitive = true;
switch (token) {... | public static String createTypeSignature(String typeName, boolean isResolved) {
try {
Scanner scanner = new Scanner();
scanner.setSource(typeName.toCharArray());
int token = scanner.getNextToken();
StringBuffer sig = new StringBuffer();
int arrayCount = 0;
boolean primitive = true;
switch (token) {
ca... |
public void recycle() {
if( debug > 0 ) log("recycle()");
state=INITIAL_STATE;
bytesWritten=0;
charsWritten=0;
ccount=0;
count=0;
closed=false;
if( conv!= null ) {
conv.reset(); // reset ?
} else {
log( "Recycle without conv ??");
}
}
| public void recycle() {
if( debug > 0 ) log("recycle()");
state=INITIAL_STATE;
bytesWritten=0;
charsWritten=0;
ccount=0;
count=0;
closed=false;
if( conv!= null ) {
conv.reset(); // reset ?
} else {
// log( "Recycle without conv ??");
}
}
|
public void generateCompoundAssignment(
BlockScope currentScope,
CodeStream codeStream,
Expression expression,
int operator,
int assignmentImplicitConversion,
boolean valueRequired) {
boolean isStatic;
receiver.generateCode(
currentScope,
codeStream,
!(isStatic = this.codegenBinding.isStatic(... | public void generateCompoundAssignment(
BlockScope currentScope,
CodeStream codeStream,
Expression expression,
int operator,
int assignmentImplicitConversion,
boolean valueRequired) {
boolean isStatic;
receiver.generateCode(
currentScope,
codeStream,
!(isStatic = this.codegenBinding.isStatic(... |
public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path, AccessRestriction access) {
if (excludePath != null && excludePath.equals(path))
return;
if (!findMembers && enclosingTypeNames != null && enclosingTypeNames.length > 0)
r... | public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path, AccessRestriction access) {
if (excludePath != null && excludePath.equals(path))
return;
if (!findMembers && enclosingTypeNames != null && enclosingTypeNames.length > 0)
r... |
public int requestMap(Request req) {
// No op. All mapping is done in the first step - it's better because
// the alghoritm is more efficient. The only case where those 2 are
// not called togheter is in getContext( "path" ).
//
// We can split it again later if that creates problems - but right
// now it's... | public int requestMap(Request req) {
// No op. All mapping is done in the first step - it's better because
// the alghoritm is more efficient. The only case where those 2 are
// not called togheter is in getContext( "path" ).
//
// We can split it again later if that creates problems - but right
// now it's... |
protected void readContributions(String id, String tag, String extensionPoint) {
cache = null;
targetID = id;
targetContributionTag = tag;
IPluginRegistry registry = Platform.getPluginRegistry();
readRegistry(registry, IWorkbenchConstants.PLUGIN_ID, extensionPoint);
}
| protected void readContributions(String id, String tag, String extensionPoint) {
cache = null;
targetID = id;
targetContributionTag = tag;
IPluginRegistry registry = Platform.getPluginRegistry();
readRegistry(registry, PlatformUI.PLUGIN_ID, extensionPoint);
}
|
public ChAttribute() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the attribute?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Is the type ... | public ChAttribute() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the attribute?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Is the type ... |
private static JRMPInitInfoImpl jrmpInfo = new JRMPInitInfoImpl();
/**
* Intialize interceptors for a carol server
*/
static {
if (!init) {
// Load the Interceptors
try {
JInitInfo jrmpInfo = new JRMPInitInfoImpl();
String [] ins = getJRMPInitializers();
for (int i = 0; i < ins... | private static JRMPInitInfoImpl jrmpInfo = new JRMPInitInfoImpl();
/**
* Intialize interceptors for a carol server
*/
static {
if (!init) {
// Load the Interceptors
try {
JInitInfo jrmpInfo = new JRMPInitInfoImpl();
String [] ins = getJRMPInitializers();
for (int i = 0; i < ins... |
private String[] convertTypeNamesToSigs(char[][] typeNames) {
if (typeNames == null)
return fgEmptyStringArray;
int n = typeNames.length;
if (n == 0)
return fgEmptyStringArray;
String[] typeSigs = new String[n];
for (int i = 0; i < n; ++i) {
String typeSig = Signature.createTypeSignature(typeNames[i... | private String[] convertTypeNamesToSigs(char[][] typeNames) {
if (typeNames == null)
return fgEmptyStringArray;
int n = typeNames.length;
if (n == 0)
return fgEmptyStringArray;
String[] typeSigs = new String[n];
for (int i = 0; i < n; ++i) {
String typeSig = Signature.createTypeSignature(typeNames[i... |
private void printBlockComment(boolean isJavadoc) {
int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1;
boolean includesBlockComments = includesBlockComments();
this.scanner.resetTo(currentTokenStartPosition,... | private void printBlockComment(boolean isJavadoc) {
int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1;
boolean includesBlockComments = !isJavadoc && includesBlockComments();
this.scanner.resetTo(currentToken... |
protected void storeTasksFor(SourceFile sourceFile, IProblem[] tasks) throws CoreException {
if (sourceFile == null || tasks == null || tasks.length == 0) return;
IResource resource = sourceFile.resource;
for (int i = 0, l = tasks.length; i < l; i++) {
IProblem task = tasks[i];
if (task.getID() == IProblem.Task... | protected void storeTasksFor(SourceFile sourceFile, IProblem[] tasks) throws CoreException {
if (sourceFile == null || tasks == null || tasks.length == 0) return;
IResource resource = sourceFile.resource;
for (int i = 0, l = tasks.length; i < l; i++) {
IProblem task = tasks[i];
if (task.getID() == IProblem.Task... |
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException {
ClassFile classFile = (ClassFile) binaryMember.getClassFile();
ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper... | protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException {
ClassFile classFile = (ClassFile) binaryMember.getClassFile();
ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper... |
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.
//----------------------------------... |
public boolean hasUnsavedChanges() throws JavaModelException{
if (isReadOnly() || !isOpen()) {
return false;
}
if (getBuffer() != null && getBuffer().hasUnsavedChanges()) {
return true;
}
// for package fragments, package fragment roots, and projects must check open buffers
// to see if they have an child w... | public boolean hasUnsavedChanges() throws JavaModelException{
if (isReadOnly() || !isOpen()) {
return false;
}
if (getBuffer() != null && getBuffer().hasUnsavedChanges()) {
return true;
}
// for package fragments, package fragment roots, and projects must check open buffers
// to see if they have an child w... |
public void shutdown() {
try {
Thread t = null;
synchronized (this) {
if (this.processingThread != null) {
t = this.processingThread;
this.processingThread = null;
notifyAll();
}
}
if (t != null)
t.join();
} catch (InterruptedException ignored) {
// ignore
}
}
| public void shutdown() {
try {
Thread t = null;
synchronized (this) {
if (this.processingThread != null) {
t = this.processingThread;
this.processingThread = null;
notifyAll();
}
}
if (t != null)
t.join(250); // do not wait forever
} catch (InterruptedException ignored) {
// ignore
}
}... |
private static void updateVariableValue(
String variableName,
IPath path,
IProgressMonitor monitor)
throws JavaModelException {
// gather classpath information for updating
HashMap affectedProjects = new HashMap(5);
JavaModelManager manager = JavaModelManager.getJavaModelManager();
try {
IJavaModel... | private static void updateVariableValue(
String variableName,
IPath path,
IProgressMonitor monitor)
throws JavaModelException {
// gather classpath information for updating
HashMap affectedProjects = new HashMap(5);
JavaModelManager manager = JavaModelManager.getJavaModelManager();
try {
IJavaModel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.