buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
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 void openWithUserDefinedProgram() throws CoreException {
// We need to determine if the command refers to a program in the plugin
// install directory. Otherwise we assume the program is on the path.
String programFileName = null;
IConfigurationElement configurationElement = ... | public void openWithUserDefinedProgram() throws CoreException {
// We need to determine if the command refers to a program in the plugin
// install directory. Otherwise we assume the program is on the path.
String programFileName = null;
IConfigurationElement configurationElement = ... |
protected ActionSaveProjectAs() {
super("Save Project As...", NO_ICON);
}
| protected ActionSaveProjectAs() {
super("action.save-project-as", NO_ICON);
}
|
public String getText(Object element) {
String label = WorkbenchMessages.getString("ViewLabel.unknown"); //$NON-NLS-1$
if (element instanceof Category)
label = ((Category) element).getLabel();
else if (element instanceof IViewDescriptor)
label = ((ViewDescriptor) elem... | public String getText(Object element) {
String label = WorkbenchMessages.ViewLabel_unknown;
if (element instanceof Category)
label = ((Category) element).getLabel();
else if (element instanceof IViewDescriptor)
label = ((ViewDescriptor) element).getLabel();
re... |
private boolean selectDeclaration(TypeDeclaration typeDeclaration, char[] assistIdentifier, char[] packageName){
if (typeDeclaration.name == assistIdentifier){
char[] qualifiedSourceName = null;
TypeDeclaration enclosingType = typeDeclaration;
while(enclosingType != null) {
qualifiedSourceName = C... | private boolean selectDeclaration(TypeDeclaration typeDeclaration, char[] assistIdentifier, char[] packageName){
if (typeDeclaration.name == assistIdentifier){
char[] qualifiedSourceName = null;
TypeDeclaration enclosingType = typeDeclaration;
while(enclosingType != null) {
qualifiedSourceName = C... |
public static void main(String[] args) {
RuleTest test =
new RuleTest(
"( level ~= deb ) && ( logger like logger[1-2] || MDC.entry1 >= 234 )");
test.pack();
test.setVisible(true);
}
| public static void main(String[] args) {
RuleTest test =
new RuleTest(
"( level ~= deb ) && ( logger like logger[1-2] || PROP.entry1 >= 234 )");
test.pack();
test.setVisible(true);
}
|
public
void tearDown() {
// Regular users should not use the clear method lightly!
Hierarchy.getDefaultHierarchy().clear();
BasicConfigurator.resetConfiguration();
a1 = null;
a2 = null;
}
| public
void tearDown() {
// Regular users should not use the clear method lightly!
Category.getDefaultHierarchy().clear();
BasicConfigurator.resetConfiguration();
a1 = null;
a2 = null;
}
|
public TypeBinding getOtherFieldBindings(BlockScope scope) {
// At this point restrictiveFlag may ONLY have two potential value : FIELD LOCAL (i.e cast <<(VariableBinding) binding>> is valid)
int length = this.tokens.length;
FieldBinding field;
if ((this.bits & Binding.FIELD) != 0) {
field = (FieldBinding) this.b... | public TypeBinding getOtherFieldBindings(BlockScope scope) {
// At this point restrictiveFlag may ONLY have two potential value : FIELD LOCAL (i.e cast <<(VariableBinding) binding>> is valid)
int length = this.tokens.length;
FieldBinding field;
if ((this.bits & Binding.FIELD) != 0) {
field = (FieldBinding) this.b... |
public OpenInNewWindowAction(IWorkbenchWindow window) {
this(window, ((Workbench) window.getWorkbench()).getDefaultPageInput());
setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_NEWWINDOW);
}
| public OpenInNewWindowAction(IWorkbenchWindow window) {
this(window, ((Workbench) window.getWorkbench()).getDefaultPageInput());
setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_NEW_WINDOW);
}
|
public void execute() {
getLogger().info("DBReceiverJob.execute() called");
Connection connection = null;
try {
Logger logger;
LoggerRepository loggerRepository = parentDBReceiver
.getLoggerRepository();
connection = parentDBReceiver.connectionSource.getConnection();
S... | public void execute() {
getLogger().debug("DBReceiverJob.execute() called");
Connection connection = null;
try {
Logger logger;
LoggerRepository loggerRepository = parentDBReceiver
.getLoggerRepository();
connection = parentDBReceiver.connectionSource.getConnection();
... |
private boolean allowCompatibleReturnTypes;
/*
Binding creation is responsible for reporting all problems with types:
- all modifier problems (duplicates & multiple visibility modifiers + incompatible combinations - abstract/final)
- plus invalid modifiers given the context (the verifier did not do this before)
- ... | private boolean allowCompatibleReturnTypes;
/*
Binding creation is responsible for reporting all problems with types:
- all modifier problems (duplicates & multiple visibility modifiers + incompatible combinations - abstract/final)
- plus invalid modifiers given the context (the verifier did not do this before)
- ... |
private
UNKRecord() {}
UNKRecord(Name _name, short _type, short _dclass, int _ttl, int length,
DataByteInputStream in, Compression c) throws IOException
{
super(_name, _type, _dclass, _ttl);
if (in == null)
return;
if (length > 0) {
data = new byte[length];
in.read(data);
}
else
data = null;
}
UNKReco... | private
UNKRecord() {}
UNKRecord(Name _name, short _type, short _dclass, int _ttl, int length,
DataByteInputStream in, Compression c) throws IOException
{
super(_name, _type, _dclass, _ttl);
if (in == null)
return;
if (length > 0) {
data = new byte[length];
in.read(data);
}
else
data = null;
}
UNKReco... |
public boolean isDragAllowed(Point p) {
// See also similar restrictions in addMoveItems method
if (workbook.overImage(this, p.x))
return false;
int wbCount = workbook.getEditorArea().getEditorWorkbookCount();
int editorCount = workbook.getItemCount();
if (isZoomed())
return editorCount > 1;
else
retur... | public boolean isDragAllowed(Point p) {
// See also similar restrictions in addMoveItems method
if (workbook.isDragAllowed(this, p))
return false;
int wbCount = workbook.getEditorArea().getEditorWorkbookCount();
int editorCount = workbook.getItemCount();
if (isZoomed())
return editorCount > 1;
else
ret... |
public void runInDialog(Shell shell, Job job, boolean runImmediately);
} | public void showInDialog(Shell shell, Job job, boolean runImmediately);
} |
package org.eclipse.ui.commands;
/*******************************************************************************
* 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 License v1.0
* which... | package org.eclipse.ui.commands;
/*******************************************************************************
* 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 License v1.0
* which... |
public boolean equals(Object object) {
if (!(object instanceof Assignment))
return false;
Assignment assignment = (Assignment) object;
boolean equals = true;
equals &= hasPreferenceCommandIdInFirstKeyConfiguration == assignment.hasPreferenceCommandIdInFirstKeyConfiguration;
equals &= hasPreferenc... | public boolean equals(Object object) {
if (!(object instanceof Assignment))
return false;
Assignment assignment = (Assignment) object;
boolean equals = true;
equals &= hasPreferenceCommandIdInFirstKeyConfiguration == assignment.hasPreferenceCommandIdInFirstKeyConfiguration;
equals &= hasPreferenc... |
public IEntryResult[] queryEntriesPrefixedBy(char[] prefix, boolean isCaseSensitive) throws IOException {
open();
int blockLoc = summary.getFirstBlockLocationForPrefix(prefix);
if (blockLoc < 0) return null;
IEntryResult[] entries = new IEntryResult[5];
int count = 0;
while(blockLoc >= 0){
IndexB... | public IEntryResult[] queryEntriesPrefixedBy(char[] prefix, boolean isCaseSensitive) throws IOException {
open();
int blockLoc = summary.getFirstBlockLocationForPrefix(prefix, isCaseSensitive);
if (blockLoc < 0) return null;
IEntryResult[] entries = new IEntryResult[5];
int count = 0;
while(blockLoc... |
private void checkAndSetModifiersForVariable(LocalVariableBinding varBinding) {
int modifiers = varBinding.modifiers;
if ((modifiers & AccAlternateModifierProblem) != 0 && varBinding.declaration != null){
problemReporter().duplicateModifierForVariable(varBinding.declaration, this instanceof MethodScope);
}
... | private void checkAndSetModifiersForVariable(LocalVariableBinding varBinding) {
int modifiers = varBinding.modifiers;
if ((modifiers & AccAlternateModifierProblem) != 0 && varBinding.declaration != null){
problemReporter().duplicateModifierForVariable(varBinding.declaration, this instanceof MethodScope);
}
... |
import org.apache.torque.om.Persistent;
package org.tigris.scarab.om;
/* ================================================================
* Copyright (c) 2000-2001 CollabNet. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... | import org.apache.torque.om.Persistent;
package org.tigris.scarab.om;
/* ================================================================
* Copyright (c) 2000-2001 CollabNet. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... |
public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope);
checkModifiers();
if (variableType != null) {
if (variableType == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
return;
}
if (vari... | 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 == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
... |
private void addActionSetPartAssociations(IExtensionTracker tracker, IExtension extension) {
IConfigurationElement [] elements = extension.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
if (element.getName(... | private void addActionSetPartAssociations(IExtensionTracker tracker, IExtension extension) {
IConfigurationElement [] elements = extension.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
if (element.getName(... |
public void done(IJobChangeEvent event) {
JobInfo info = getJobInfo(event.getJob());
if (event.getResult().getCode() == IStatus.ERROR) {
info.setError(event.getResult());
} else
jobs.remove(event.getJob());
//Only refresh if we are showing it
if (!isNonDisplayableJob(event.getJob()))
remove(info);
... | public void done(IJobChangeEvent event) {
JobInfo info = getJobInfo(event.getJob());
if (event.getResult().getSeverity() == IStatus.ERROR) {
info.setError(event.getResult());
} else
jobs.remove(event.getJob());
//Only refresh if we are showing it
if (!isNonDisplayableJob(event.getJob()))
remove(inf... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
SimpleType(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(a... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
SimpleType(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(a... |
public
static
void main(String argv[]) {
if(argv.length == 1)
init(argv[0]);
else
usage("Wrong number of arguments.");
NDC.push("some context");
test();
}
static
void usage(String msg) {
System.err.println(msg);
System.err.println("Usage: java " + SMTPMin.class.getName(... | public
static
void main(String argv[]) {
if(argv.length == 1)
init(argv[0]);
else
usage("Wrong number of arguments.");
NDC.push("some context");
test();
}
static
void usage(String msg) {
System.err.println(msg);
System.err.println("Usage: java " + SMTPMin.class.getName(... |
public static CompilationUnit convertCompilationUnit(
int level,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration,
char[] source,
Map options,
boolean isResolved,
WorkingCopyOwner workingCopyOwner,
IProgressMonitor monitor) {
ASTConverter converter = new AS... | public static CompilationUnit convertCompilationUnit(
int level,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration,
char[] source,
Map options,
boolean isResolved,
WorkingCopyOwner workingCopyOwner,
IProgressMonitor monitor) {
ASTConverter converter = new AS... |
public void actionPerformed(ActionEvent evt) {
//MainInterface.frameModel.saveAll();
//MainInterface.addressbookModel.saveAll();
FrameModel.saveAll();
MainInterface.shutdownManager.shutdown();
}
| public void actionPerformed(ActionEvent evt) {
//MainInterface.frameModel.saveAll();
//MainInterface.addressbookModel.saveAll();
FrameModel.saveAndCloseAll();
MainInterface.shutdownManager.shutdown();
}
|
public void run() {
if (workbenchWindow != null) {
setChecked(((WorkbenchWindow) workbenchWindow)
.isCoolBarLocked());
}
}
});
window.getWorkbench().getHelpSystem().setHelp(this,
IWorkbenchHelpCon... | public void run() {
if (workbenchWindow instanceof WorkbenchWindow) {
setChecked(((WorkbenchWindow) workbenchWindow)
.isCoolBarLocked());
}
}
});
window.getWorkbench().getHelpSystem().setHelp(this,
... |
public static List getAllScopes()
throws Exception
{
return doSelect(new Criteria());
}
| public static List getAllScopes()
throws Exception
{
return doSelect(new Criteria(0));
}
|
public SelectionOptionsPlugin(MailFrameMediator mediator) {
super("selection", mediator);
}
| public SelectionOptionsPlugin(MailFrameMediator mediator) {
super("selection", "SelectionOptions", mediator);
}
|
public void setHandlersByCommandId(Map handlersByCommandId) {
handlersByCommandId =
Util.safeCopy(handlersByCommandId, String.class, IHandler.class);
boolean commandHandlerServiceChanged = false;
Map commandEventsByCommandId = null;
if (!this.handlersByCommandId.equals(handlersByCommandId)) {
this.handl... | public void setHandlersByCommandId(Map handlersByCommandId) {
handlersByCommandId =
Util.safeCopy(handlersByCommandId, String.class, IHandler.class, false, true);
boolean commandHandlerServiceChanged = false;
Map commandEventsByCommandId = null;
if (!this.handlersByCommandId.equals(handlersByCommandId)) {
... |
public interface IImageBindingDefinition extends Comparable {
/*******************************************************************************
* 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 interface IImageBindingDefinition extends Comparable {
/*******************************************************************************
* 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 StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnJavadocSingleTypeReference:"); //$NON-NLS-1$
if (this.token != null) super.printExpression(indent, output);
return output.append('>');
}
| public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnJavadocTypeParamReference:"); //$NON-NLS-1$
if (this.token != null) super.printExpression(indent, output);
return output.append('>');
}
|
private boolean checkResponse(boolean testCondition)
throws Exception
{
String responseLine=response.getResponseLine();
Hashtable headers=response.getHeaders();
boolean responseStatus = true;
getExpectHeaders();
if( expectHeaders.size() > 0 ) {
// Check if we got the expected headers
... | private boolean checkResponse(boolean testCondition)
throws Exception
{
String responseLine=response.getResponseLine();
Hashtable headers=response.getHeaders();
boolean responseStatus = true;
getExpectHeaders();
if( expectHeaders.size() > 0 ) {
// Check if we got the expected headers
... |
private String action="start";
String home=null;
String args[];
ClassLoader parentClassLoader;
boolean sandbox=false;
// null means user didn't set one
String configFile=null;
// relative to TOMCAT_HOME
static final String DEFAULT_CONFIG="conf/server.xml";
SimpleHashtable a... | private String action="start";
String home=null;
String args[];
ClassLoader parentClassLoader;
boolean sandbox=false;
// null means user didn't set one
String configFile=null;
// relative to TOMCAT_HOME
static final String DEFAULT_CONFIG="conf/server.xml";
SimpleHashtable a... |
public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "throw ";
s = s + exception.toStringExpression() ;
return s;
}
| public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "throw "/*nonNLS*/;
s = s + exception.toStringExpression() ;
return s;
}
|
protected void matchReportReference(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {
MethodBinding methodBinding = (reference instanceof MessageSend) ? ((MessageSend)reference).binding: ((elementBinding instanceof MethodBinding) ? (MethodBindin... | protected void matchReportReference(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {
MethodBinding methodBinding = (reference instanceof MessageSend) ? ((MessageSend)reference).binding: ((elementBinding instanceof MethodBinding) ? (MethodBindin... |
public void execute(IWorkerStatusController worker) throws Exception {
// get references
IMailFolderCommandReference r = (IMailFolderCommandReference) getReference();
imapFolder = (IMAPFolder) r.getSourceFolder();
// register for status events
((StatusObservableImpl) imapFolder.getObservable()).setWorker... | public void execute(IWorkerStatusController worker) throws Exception {
// get references
IMailFolderCommandReference r = (IMailFolderCommandReference) getReference();
imapFolder = (IMAPFolder) r.getSourceFolder();
// register for status events
((StatusObservableImpl) imapFolder.getObservable()).setWorker... |
@version $Id: ScarabUserPeer.java,v 1.2 2001/03/03 00:07:12 jmcnally dead $
package org.tigris.scarab.om.peer;
/* ================================================================
* Copyright (c) 2000 Collab.Net. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modifi... | @version $Id: ScarabUserPeer.java,v 1.2 2001/03/03 00:07:12 jmcnally dead $
package org.tigris.scarab.om.peer;
/* ================================================================
* Copyright (c) 2000 Collab.Net. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modifi... |
public int getNodeType() {
return EXPRESSION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ExpressionStatement result = new ExpressionStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setLeadingComme... | public int getNodeType() {
return EXPRESSION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ExpressionStatement result = new ExpressionStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComm... |
public void execute(ContextManager cm) throws TomcatException {
try {
String tomcatHome= cm.getHome();
String apacheHome=findApache();
System.out.println("Tomcat home= " + tomcatHome);
FileWriter configW=new FileWriter( tomcatHome + APACHE_CONFIG);
PrintWriter pw=new PrintWrite... | public void execute(ContextManager cm) throws TomcatException {
try {
String tomcatHome= cm.getHome();
String apacheHome=findApache();
//System.out.println("Tomcat home= " + tomcatHome);
FileWriter configW=new FileWriter( tomcatHome + APACHE_CONFIG);
PrintWriter pw=new PrintWri... |
public String getFederatedId()
throws TorqueException
{
if ( getIdDomain() != null )
{
return getIdDomain() + getUniqueId();
}
return getUniqueId();
}
| public String getFederatedId()
throws TorqueException
{
if ( getIdDomain() != null )
{
return getIdDomain() + '-' + getUniqueId();
}
return getUniqueId();
}
|
public int contextMap( Request request ) {
Context ctx=request.getContext();
if( ctx==null) return 0;
// XXX This interceptor will be added per/context.
if( ! ctx.getReloadable() ) return 0;
if( ! ctx.shouldReload() ) return 0;
try {
// Reload context.
ContextManager cm=ctx.getContextManager();... | public int contextMap( Request request ) {
Context ctx=request.getContext();
if( ctx==null) return 0;
// XXX This interceptor will be added per/context.
if( ! ctx.getReloadable() ) return 0;
if( ! ctx.shouldReload() ) return 0;
try {
// Reload context.
ContextManager cm=ctx.getContextManager();... |
public PropPanelDataType() {
super("DataType", _dataTypeIcon,3);
Class mclass = MDataType.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(new UMLTextField(this,new UMLTextProperty(mclass,"name","getName","setName")),1,0,0);
addCaption(Argo.localize("UMLMenu", "label.s... | public PropPanelDataType() {
super("DataType", _dataTypeIcon,3);
Class mclass = MDataType.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo.localize("UMLMenu", "label.stereotype"),2,0,0);
addField(new UMLComboBoxNavigator(this, Argo... |
private Object resolveObject(Object o) {
try {
if (o instanceof Reference) {
// build of the Referenceable object with is Reference
Reference objRef = (Reference)o;
ObjectFactory objFact = (ObjectFactory)(Class.forName(objRef.getFactoryClassName())).newInstance();
return (Referenceable)objFact.getObj... | private Object resolveObject(Object o) {
try {
if (o instanceof Reference) {
// build of the Referenceable object with is Reference
Reference objRef = (Reference)o;
ObjectFactory objFact = (ObjectFactory)(Class.forName(objRef.getFactoryClassName())).newInstance();
return (Referenceable)objFact.getObj... |
private TypeBinding internalResolveType(Scope scope) {
this.constant = NotAConstant;
if (this.receiver == null) {
this.receiverType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.receiverType = this.receiver.resolveType((ClassScope) scope);
} else {
this.receiverTyp... | private TypeBinding internalResolveType(Scope scope) {
this.constant = NotAConstant;
if (this.receiver == null) {
this.receiverType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.receiverType = this.receiver.resolveType((ClassScope) scope);
} else {
this.receiverTyp... |
void roleRegistryChanged(RoleRegistryEvent roleRegistryEvent);
/*******************************************************************************
* 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 Commo... | void roleRegistryChanged(RoleRegistryEvent roleRegistryEvent);
/*******************************************************************************
* 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 Commo... |
public TypeBinding substitute(TypeBinding originalType) {
switch (originalType.bindingType()) {
case Binding.TYPE_PARAMETER:
TypeVariableBinding originalVariable = (TypeVariableBinding) originalType;
TypeVariableBinding[] variables = this.originalMethod.typeVariables;
int l... | public TypeBinding substitute(TypeBinding originalType) {
switch (originalType.kind()) {
case Binding.TYPE_PARAMETER:
TypeVariableBinding originalVariable = (TypeVariableBinding) originalType;
TypeVariableBinding[] variables = this.originalMethod.typeVariables;
int length =... |
public void contextInit(Context ctx) {
if( ctx.getWorkDir() == null)
setWorkDir(ctx);
if (! ctx.getWorkDir().exists()) {
//log System.out.println("Creating work dir " + ctx.getWorkDir() );
ctx.getWorkDir().mkdirs();
}
ctx.setAttribute(Constants.ATTRIB_WORKDIR1, ctx.getWorkDir());
ctx.setAttrib... | public void contextInit(Context ctx) {
if( ctx.getWorkDir() == null)
setWorkDir(ctx);
if (! ctx.getWorkDir().exists()) {
log("Creating work dir " + ctx.getWorkDir());
ctx.getWorkDir().mkdirs();
}
ctx.setAttribute(Constants.ATTRIB_WORKDIR1, ctx.getWorkDir());
ctx.setAttribute(Constants.ATTRIB_WO... |
public String[] getPluginIdList() {
int count = parentNode.count();
//String[] list = new String[count];
List list = new Vector();
for (int i = 0; i < count; i++) {
XmlElement action = parentNode.getElement(i);
String s = action.getAttribute("name");
XmlElement element = MainInterface.pluginManager... | public String[] getPluginIdList() {
int count = parentNode.count();
//String[] list = new String[count];
List list = new Vector();
for (int i = 0; i < count; i++) {
XmlElement action = parentNode.getElement(i);
String s = action.getAttribute("name");
XmlElement element = PluginManager.getInstance()... |
public void actionPerformed(ActionEvent evt) {
ListIterator iterator = MainInterface.popServerCollection.getServerIterator();
while (iterator.hasNext()) {
POP3ServerController controller =
(POP3ServerController) iterator.next();
boolean excludeFromCheckAll = controller.getAccountItem().getPopItem().ge... | public void actionPerformed(ActionEvent evt) {
ListIterator iterator = MainInterface.popServerCollection.getServerIterator();
while (iterator.hasNext()) {
POP3ServerController controller =
(POP3ServerController) iterator.next();
boolean excludeFromCheckAll = controller.getAccountItem().getPopItem().ge... |
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
// various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
int pc = codeStream.posit... | public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
// various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
int pc = codeStream.posit... |
public SimpleName getName() {
if (this.variableName == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.variableName == null) {
preLazyInit();
this.variableName = new SimpleName(this.ast);
postLazyInit(this.variableName, NAME_PROPERTY);
}
}
}
... | public SimpleName getName() {
if (this.variableName == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.variableName == null) {
preLazyInit();
this.variableName = new SimpleName(this.ast);
postLazyInit(this.variableName, NAME_PROPERTY);
}
}
}
ret... |
private static void init() {
try {
Class c=Class.forName(JSSE_SUPPORT);
compat=(CertCompat)c.newInstance();
} catch( Exception ex ) {
compat=new CertCompat();
}
}
| private static void init() {
try {
Class c=Class.forName(JSSE_SUPPORT);
compat=(CertCompat)c.newInstance();
} catch ( Throwable t ) {
compat=new CertCompat();
}
}
|
public
SIGRecord(Name _name, short _dclass, int _ttl, int _covered, int _alg,
int _origttl, Date _expire, Date _timeSigned,
int _footprint, Name _signer, byte [] _signature)
{
super(_name, Type.SIG, _dclass, _ttl);
covered = (short) _covered;
alg = (byte) _alg;
labels = name.labels();
origttl = _origttl;
ex... | public
SIGRecord(Name _name, short _dclass, int _ttl, int _covered, int _alg,
int _origttl, Date _expire, Date _timeSigned,
int _footprint, Name _signer, byte [] _signature)
{
super(_name, Type.SIG, _dclass, _ttl);
covered = (short) _covered;
alg = (byte) _alg;
labels = name.labels();
origttl = _origttl;
ex... |
// public boolean equalTo(Object other) { return true; }
// }
// interface Equivalent<T> { boolean equalTo(T other); }
// interface EqualityComparable { boolean equalTo(Object other); }
// class A<T extends Number> { void m(T t) {} }
// class B<S extends Integer> extends A<S> { void m(S t) {}}
// class ... | // public boolean equalTo(Object other) { return true; }
// }
// interface Equivalent<T> { boolean equalTo(T other); }
// interface EqualityComparable { boolean equalTo(Object other); }
// class A<T extends Number> { void m(T t) {} }
// class B<S extends Integer> extends A<S> { void m(S t) {}}
// class ... |
protected char[] getElementContentCharArray(SourceEntry entry) {
// TBD: need proper byte->char conversion
byte[] bytes= getElementContentBytes(entry);
InputStream stream = null;
try {
stream = new ByteArrayInputStream(bytes);
return org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(s... | protected char[] getElementContentCharArray(SourceEntry entry) {
// TBD: need proper byte->char conversion
byte[] bytes= getElementContentBytes(entry);
InputStream stream = null;
try {
stream = new ByteArrayInputStream(bytes);
return org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(s... |
public IType createType(String content, IJavaElement sibling, boolean force, IProgressMonitor monitor) throws JavaModelException {
if (!exists()) {
//autogenerate this compilation unit
IPackageFragment pkg = (IPackageFragment) getParent();
String source = ""; //$NON-NLS-1$
if (pkg.getElementName().length() > 0... | public IType createType(String content, IJavaElement sibling, boolean force, IProgressMonitor monitor) throws JavaModelException {
if (!exists()) {
//autogenerate this compilation unit
IPackageFragment pkg = (IPackageFragment) getParent();
String source = ""; //$NON-NLS-1$
if (pkg.getElementName().length() > 0... |
private void build() {
if (tree == null) {
tree = new TreeMap();
for (int i = 0; i < keyBindings.length; i++) {
Iterator iterator = keyBindings[i].iterator();
while (iterator.hasNext()) {
IKeyBindingDefinition keyBindingDefinition = (IKeyBindingDefinition) iterator.next();
KeyBinding... | private void build() {
if (tree == null) {
tree = new TreeMap();
for (int i = 0; i < keyBindings.length; i++) {
Iterator iterator = keyBindings[i].iterator();
while (iterator.hasNext()) {
IKeyBindingDefinition keyBindingDefinition = (IKeyBindingDefinition) iterator.next();
KeyBinding... |
public void launchWizard() {
DataModel data = new DataModel();
Step[] steps;
if (MailConfig.getAccountList().count() == 0) {
steps = new Step[]{
new WelcomeStep(),
new IdentityStep(data),
new IncomingServerStep(data),
... | public void launchWizard() {
DataModel data = new DataModel();
Step[] steps;
if (MailConfig.getAccountList().count() == 0) {
steps = new Step[]{
new WelcomeStep(),
new IdentityStep(data),
new IncomingServerStep(data),
... |
public FlowInfo analyseAssignment(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
Assignment assignment,
boolean isCompound) {
// compound assignment extra work
if (isCompound) { // check the variable part is initialized if blank final
if (binding.isBlankFinal()
&& receiver.... | public FlowInfo analyseAssignment(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
Assignment assignment,
boolean isCompound) {
// compound assignment extra work
if (isCompound) { // check the variable part is initialized if blank final
if (binding.isBlankFinal()
&& receiver.... |
public static String getAttribute(IConfigurationElement element, String attributeId) throws CoreException {
String result = element.getAttribute(attributeId);
if (result == null) {
throw new CoreException(new Status(IStatus.ERROR, element.getDeclaringExtension().getNamespace(),
... | public static String getAttribute(IConfigurationElement element, String attributeId) throws CoreException {
String result = element.getAttribute(attributeId);
if (result == null) {
throw new CoreException(new Status(IStatus.ERROR, element.getNamespace(),
IStatus.OK, N... |
public final String toString() {
// allocate a buffer that is large enough to hold an average compilation unit
StringBuffer buffer = new StringBuffer(6000);
int p = buffer.length();
try {
appendDebugString(buffer);
} catch (RuntimeException e) {
// since debugger sometimes call toString methods, proble... | public final String toString() {
// allocate a buffer that is large enough to hold an average compilation unit
StringBuffer buffer = new StringBuffer(6000);
int p = buffer.length();
try {
appendDebugString(buffer);
} catch (RuntimeException e) {
// since debugger sometimes call toString methods, proble... |
public PropertyDialog(JFrame frame, PropertyEditor pe, int x, int y) {
super(pe.getClass().getName());
//new WindowCloser(this);
getContentPane().setLayout(new BorderLayout());
body = pe.getCustomEditor();
//System.out.println("got custom editor!!");
getContentPane().add(body, BorderLayou... | public PropertyDialog(JFrame frame, PropertyEditor pe, int x, int y) {
super(pe.getClass().getName());
//new WindowCloser(this);
getContentPane().setLayout(new BorderLayout());
body = pe.getCustomEditor();
//System.out.println("got custom editor!!");
getContentPane().add(body, BorderLayou... |
public void setOutputLocation(IPath path, IProgressMonitor monitor)
throws JavaModelException {
if (path == null) {
throw new IllegalArgumentException(Util.bind("path.nullpath")); //$NON-NLS-1$
}
if (path.equals(getOutputLocation())) {
return;
}
this.setRawClasspath(SetClasspathOperation.ReuseClassp... | public void setOutputLocation(IPath path, IProgressMonitor monitor)
throws JavaModelException {
if (path == null) {
throw new IllegalArgumentException(Util.bind("path.nullPath")); //$NON-NLS-1$
}
if (path.equals(getOutputLocation())) {
return;
}
this.setRawClasspath(SetClasspathOperation.ReuseClassp... |
protected void groupElements() throws JavaModelException {
fChildrenToRemove = new HashMap(1);
int uniqueCUs = 0;
for (int i = 0, length = fElementsToProcess.length; i < length; i++) {
IJavaElement e = fElementsToProcess[i];
ICompilationUnit cu = getCompilationUnitFor(e);
if (cu == null) {
throw new... | protected void groupElements() throws JavaModelException {
fChildrenToRemove = new HashMap(1);
int uniqueCUs = 0;
for (int i = 0, length = fElementsToProcess.length; i < length; i++) {
IJavaElement e = fElementsToProcess[i];
ICompilationUnit cu = getCompilationUnitFor(e);
if (cu == null) {
throw new... |
public static void inherit(Stack stack) {
if (stack != null) {
ht.put(Thread.currentThread(), stack);
}
}
/**
<font color="#FF4040"><b>Never use this method directly, use the {@link
org.apache.log4j.spi.LoggingEvent#getNDC} method instead.</b></font>
*/
| public static void inherit(Stack stack) {
if (stack != null) {
ht.put(Thread.currentThread(), stack);
}
}
/**
<font color="#FF4040"><b>Never use this method directly, use the {@link
org.apache.log4j.spi.LoggingEvent#getNDC} method instead</b></font>.
*/
|
public void add(JavaProject project, int includeMask, HashSet visitedProject) throws JavaModelException {
add(project, null, includeMask, visitedProject, null);
}
/**
* Add a path to current java search scope or all project fragment roots if null.
* Use project resolved classpath to retrieve and store access restric... | public void add(JavaProject project, int includeMask, HashSet visitedProject) throws JavaModelException {
add(project, null, includeMask, visitedProject, null);
}
/**
* Add a path to current java search scope or all project fragment roots if null.
* Use project resolved classpath to retrieve and store access restric... |
public String toString(int tab) {
return tabString(tab) + "Recovered import: " + importReference.toString();
}
| public String toString(int tab) {
return tabString(tab) + "Recovered import: "/*nonNLS*/ + importReference.toString();
}
|
public void computePackageFragmentRoots(
IClasspathEntry resolvedEntry,
ObjectVector accumulatedRoots,
HashSet rootIDs,
IClasspathEntry referringEntry,
boolean checkExistency,
boolean retrieveExportedRoots,
Map rootToResolvedEntries) throws JavaModelException {
String rootID = ((ClasspathEntry)re... | public void computePackageFragmentRoots(
IClasspathEntry resolvedEntry,
ObjectVector accumulatedRoots,
HashSet rootIDs,
IClasspathEntry referringEntry,
boolean checkExistency,
boolean retrieveExportedRoots,
Map rootToResolvedEntries) throws JavaModelException {
String rootID = ((ClasspathEntry)re... |
public static List getAllIssueTypes()
throws Exception
{
Criteria c = new Criteria();
c.add(IssueTypePeer.TEMPLATE, 0);
return doSelect(c);
}
| public static List getAllIssueTypes()
throws Exception
{
Criteria c = new Criteria();
c.add(IssueTypePeer.PARENT_ID, 0);
return doSelect(c);
}
|
protected void pushText(int start, int end) {
if (start <= this.cursorLocation && this.cursorLocation <= end) {
this.scanner.resetTo(start, end);
boolean tokenizeWhiteSpace = this.scanner.tokenizeWhiteSpace;
this.scanner.tokenizeWhiteSpace = true;
try {
Object typeRef = null;
this.pushText = true... | protected void pushText(int start, int end) {
if (start <= this.cursorLocation && this.cursorLocation <= end) {
this.scanner.resetTo(start, end);
boolean tokenizeWhiteSpace = this.scanner.tokenizeWhiteSpace;
this.scanner.tokenizeWhiteSpace = true;
try {
Object typeRef = null;
this.pushText = true... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = expression.analyseCode(currentScope, flowContext, flowInfo);
SwitchFlowContext switchContext =
new SwitchFlowContext(flowContext, this, (breakLabel = new Label()));
// analyse the block... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = expression.analyseCode(currentScope, flowContext, flowInfo);
SwitchFlowContext switchContext =
new SwitchFlowContext(flowContext, this, (breakLabel = new Label()));
// analyse the block... |
private void computeValue() {
//The source is a char[3] first and last char are '
//This is true for both regular char AND unicode char
//BUT not for escape char like '\b' which are char[4]....
if ((value = source[1]) != '\\')
return;
char digit;
switch (digit = source[2]) {
case 'b' :
value = '\b';
b... | private void computeValue() {
//The source is a char[3] first and last char are '
//This is true for both regular char AND unicode char
//BUT not for escape char like '\b' which are char[4]....
if ((value = source[1]) != '\\')
return;
char digit;
switch (digit = source[2]) {
case 'b' :
value = '\b';
b... |
public void selectType(ISourceType sourceType, char[] typeName, ISourceType[] topLevelTypes, boolean searchInEnvironment) {
try {
acceptedAnswer = false;
// find the outer most type
ISourceType outerType = sourceType;
ISourceType parent = sourceType.getEnclosingType();
while (parent != null) {
ou... | public void selectType(ISourceType sourceType, char[] typeName, ISourceType[] topLevelTypes, boolean searchInEnvironment) {
try {
acceptedAnswer = false;
// find the outer most type
ISourceType outerType = sourceType;
ISourceType parent = sourceType.getEnclosingType();
while (parent != null) {
ou... |
public static Record []
getRecords(String namestr, short type, short dclass, byte cred) {
Message query;
Message response;
Record question;
Record [] answers;
int answerCount = 0, i = 0;
Enumeration e;
Name name = new Name(namestr);
/*System.out.println("lookup of " + name + " " + Type.string(type));*/
if (!Ty... | public static Record []
getRecords(String namestr, short type, short dclass, byte cred) {
Message query;
Message response;
Record question;
Record [] answers;
int answerCount = 0, i = 0;
Enumeration e;
Name name = new Name(namestr);
/*System.out.println("lookup of " + name + " " + Type.string(type));*/
if (!Ty... |
public void synchronizeHeaderlist() throws Exception, IOException,
CommandCancelledException, IMAPException {
headerList = super.getHeaderList();
// Check if the mailbox has changed
MailboxStatus status = getServer().getStatus(this);
List localUids = extractUids(headerList);
// Sort the uid list
Colle... | public void synchronizeHeaderlist() throws Exception, IOException,
CommandCancelledException, IMAPException {
headerList = super.getHeaderList();
// Check if the mailbox has changed
MailboxStatus status = getServer().getStatus(this);
List localUids = extractUids(headerList);
// Sort the uid list
Colle... |
public HelpSearchAction(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELPSEARCH);
// support for allowing a product to override the te... | public HelpSearchAction(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELP_SEARCH);
// support for allowing a product to override the t... |
private int
verifySIG(RRset set, RRSIGRecord sigrec, Cache cache) {
PublicKey key = findKey(cache, sigrec.getSigner(),
sigrec.getAlgorithm(), sigrec.getFootprint());
if (key == null)
return DNSSEC.Insecure;
Date now = new Date();
if (now.compareTo(sigrec.getExpire()) > 0 ||
now.compareTo(sigrec.getTimeS... | private int
verifySIG(RRset set, RRSIGRecord sigrec, Cache cache) {
PublicKey key = findKey(cache, sigrec.getSigner(),
sigrec.getAlgorithm(), sigrec.getFootprint());
if (key == null)
return DNSSEC.Insecure;
Date now = new Date();
if (now.compareTo(sigrec.getExpire()) > 0 ||
now.compareTo(sigrec.getTimeS... |
public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (enclosingSourceType() != binding.declaringClass)
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
return methodScope.isInsideInitializer() // inside initia... | public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (enclosingReceiverType() != binding.declaringClass)
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
return methodScope.isInsideInitializer() // inside init... |
private boolean isLocal(ReferenceBinding binding) {
if(binding instanceof ParameterizedTypeBinding) {
return isLocal(((ParameterizedTypeBinding)binding).type);
}
if (!(binding instanceof SourceTypeBinding)) return false;
if (binding instanceof LocalTypeBinding) return true;
if (binding instanceof MemberTy... | private boolean isLocal(ReferenceBinding binding) {
if(binding instanceof ParameterizedTypeBinding) {
return isLocal(((ParameterizedTypeBinding)binding).genericType());
}
if (!(binding instanceof SourceTypeBinding)) return false;
if (binding instanceof LocalTypeBinding) return true;
if (binding instanceof... |
protected Image getImage() {
return JFaceResources.getImageRegistry().get(Dialog.DLG_IMG_LOCKED);
}
| protected Image getImage() {
return JFaceResources.getImageRegistry().get(Dialog.DLG_IMG_INFO);
}
|
public ShowContextSpecificHelpAction(AbstractFrameController frameController) {
super(
frameController,
GlobalResourceLoader.getString(null, null, "Context Specific Help"));
setSmallIcon(ImageLoader.getSmallImageIcon("stock_extended-help-16.png"));
setLargeIcon(ImageLoader.getImageIcon("stock_extend... | public ShowContextSpecificHelpAction(AbstractFrameController frameController) {
super(
frameController,
GlobalResourceLoader.getString(null, null, "Context Specific Help"));
setSmallIcon(ImageLoader.getSmallImageIcon("stock_extended-help-16.png"));
setLargeIcon(ImageLoader.getImageIcon("stock_extend... |
public void begin(
ExecutionContext ec, String localName, Attributes attributes) {
String name = attributes.getValue(NAME_ATTRIBUTE);
String value = attributes.getValue(VALUE_ATTRIBUTE);
if (name == null) {
inError = true;
getLogger().error(NO_NAME);
ec.addError(new ErrorItem(NO_NAM... | public void begin(
ExecutionContext ec, String localName, Attributes attributes) {
String name = attributes.getValue(NAME_ATTRIBUTE);
String value = attributes.getValue(VALUE_ATTRIBUTE);
if (name == null) {
inError = true;
getLogger().error(NO_NAME);
ec.addError(new ErrorItem(NO_NAM... |
protected char[] getClassName() {
return CharOperation.concat(EvaluationContext.GLOBAL_VARS_CLASS_NAME_PREFIX, Integer.toString(EvaluationContext.VAR_CLASS_COUNTER + 1).toCharArray());
}
| protected char[] getClassName() {
return CharOperation.concat(EvaluationConstants.GLOBAL_VARS_CLASS_NAME_PREFIX, Integer.toString(EvaluationContext.VAR_CLASS_COUNTER + 1).toCharArray());
}
|
public void generateSyntheticEnclosingInstanceValues(
BlockScope currentScope,
ReferenceBinding targetType,
Expression enclosingInstance,
ASTNode invocationSite) {
// supplying enclosing instance for the anonymous type's superclass
ReferenceBinding checkedTargetType = targetType.isAnonymousType() ? target... | public void generateSyntheticEnclosingInstanceValues(
BlockScope currentScope,
ReferenceBinding targetType,
Expression enclosingInstance,
ASTNode invocationSite) {
// supplying enclosing instance for the anonymous type's superclass
ReferenceBinding checkedTargetType = targetType.isAnonymousType() ? (Refer... |
protected void drawOverlays(ImageDescriptor[] overlays) {
Point size = getSize();
for (int i = 0; i < overlays.length; i++) {
ImageDescriptor overlay = overlays[i];
if (overlay == null)
break;
ImageData overlayData = overlay.getImageData();
switch (i) {
case TOP_LEFT :
drawImage(overlayDat... | protected void drawOverlays(ImageDescriptor[] overlays) {
Point size = getSize();
for (int i = 0; i < overlays.length; i++) {
ImageDescriptor overlay = overlays[i];
if (overlay == null)
continue;
ImageData overlayData = overlay.getImageData();
switch (i) {
case TOP_LEFT :
drawImage(overlay... |
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
receiverType = receiver.resolveType(scope);
if (receiverType == null){
constant = Not... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
receiverType = receiver.resolveType(scope);
if (receiverType == null){
constant = Not... |
extends org.tigris.scarab.om.BaseAttachmentPeer
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Village classes
import com.workingdogs.village.*;
// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache.turbi... | extends org.tigris.scarab.om.BaseAttachmentPeer
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Village classes
import com.workingdogs.village.*;
// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache.turbi... |
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel,
boolean expanded,
boolean leaf, int row,
boolean hasFocus) {
Component r = super.getTreeCellRendererComponent(tree, value, sel,
... | public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel,
boolean expanded,
boolean leaf, int row,
boolean hasFocus) {
Component r = super.getTreeCellRendererComponent(tree, value, sel,
... |
public static String[] loadMessageTemplates(Locale loc) {
ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.jdt.internal.compiler.problem.Messages", loc); //$NON-NLS-1$
String[] templates = new String[500];
| public static String[] loadMessageTemplates(Locale loc) {
ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.jdt.internal.compiler.problem.messages", loc); //$NON-NLS-1$
String[] templates = new String[500];
|
@Test public void overloaded() {
MethodValidator validator= new MethodValidator(Confused.class);
List<Throwable> errors= validator.validateAllMethods();
assertEquals(1, errors.size());
| @Test public void overloaded() {
MethodValidator validator= new MethodValidator(Confused.class);
List<Throwable> errors= validator.validateMethodsForDefaultRunner();
assertEquals(1, errors.size());
|
protected ActionImportFromSources() {
super("Import sources...", NO_ICON);
}
| protected ActionImportFromSources() {
super("Import sources...");
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
breakLabel = new Label();
continueLabel = new Label();
// process the initializations
if (initializations != null) {
int count = initializations.length, i = 0;
while (i < count) {
flowInfo =... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
breakLabel = new Label();
continueLabel = new Label();
// process the initializations
if (initializations != null) {
int count = initializations.length, i = 0;
while (i < count) {
flowInfo =... |
public PackageReferencePattern(char[] pkgName, int matchRule) {
this(matchRule);
if (pkgName == null || pkgName.length == 0) {
this.pkgName = null;
this.segments = new char[][] {CharOperation.NO_CHAR};
((InternalSearchPattern)this).mustResolve = false;
} else {
this.pkgName = isCaseSensitive() ? pkgName : C... | public PackageReferencePattern(char[] pkgName, int matchRule) {
this(matchRule);
if (pkgName == null || pkgName.length == 0) {
this.pkgName = null;
this.segments = new char[][] {CharOperation.NO_CHAR};
((InternalSearchPattern)this).mustResolve = false;
} else {
this.pkgName = (isCaseSensitive() || isCamelCa... |
private void setAllBackgrounds(Color color) {
setBackground(color);
progressLabel.setBackground(color);
actionBar.setBackground(color);
jobImageLabel.setBackground(color);
Iterator taskEntryIterator = taskEntries.iterator();
while (taskEntryIterator.hasNext()) {
((Link) taskEntryIterator.next()).setBac... | private void setAllBackgrounds(Color color) {
setBackground(color);
progressLabel.setBackground(color);
actionBar.setBackground(color);
jobImageLabel.setBackground(color);
Iterator taskEntryIterator = taskEntries.iterator();
while (taskEntryIterator.hasNext()) {
((Link) taskEntryIterator.next()).setBac... |
public Object[] getUids(WorkerStatusController worker) throws Exception {
int count = getHeaderCacheInstance().count();
Object[] uids = new Object[count];
int i = 0;
for (Enumeration e = getCachedHeaderList(worker).keys();
e.hasMoreElements();
) {
uids[i++] = e.nextElement();
}
return uids;
}... | public Object[] getUids(WorkerStatusController worker) throws Exception {
int count = getCachedHeaderList(worker).count();
Object[] uids = new Object[count];
int i = 0;
for (Enumeration e = getCachedHeaderList(worker).keys();
e.hasMoreElements();
) {
uids[i++] = e.nextElement();
}
return uids;... |
public SortedSet getMatchSetForMode() {
if (matchSetForMode == null) {
SortedSet matchSetForMode = new TreeSet();
Iterator iterator = getMatchSet().iterator();
while (iterator.hasNext()) {
Match match = (Match) iterator.next();
if (match.getBinding().getKeySequence().isChildOf(mode))
match... | public SortedSet getMatchSetForMode() {
if (matchSetForMode == null) {
SortedSet matchSetForMode = new TreeSet();
Iterator iterator = getMatchSet().iterator();
while (iterator.hasNext()) {
Match match = (Match) iterator.next();
if (match.getBinding().getKeySequence().isChildOf(mode, false))
... |
private void synchronizeHeaderlist() throws Exception, IOException,
CommandCancelledException, IMAPException {
// Check if the mailbox has changed
MailboxStatus status = getServer().getStatus(this);
if( status.getMessages() == 0 ) {
headerList.clear();
syncMailboxInfo(status);
return;
}
L... | private void synchronizeHeaderlist() throws Exception, IOException,
CommandCancelledException, IMAPException {
// Check if the mailbox has changed
MailboxStatus status = getServer().getStatus(this);
if( status.getMessages() == 0 ) {
headerList.clear();
syncMailboxInfo(status);
return;
}
L... |
public char[] getFileName() {
return CompilationUnit.this.getFileName();
}
}, true /*full parse to find local elements*/);
// update timestamp (might be IResource.NULL_STAMP if original does not exist)
if (underlyingResource == null) {
underlyingResource = getResource();
}
unitInfo.timestamp = ((IFi... | public char[] getFileName() {
return CompilationUnit.this.getFileName();
}
}, true /*full parse to find local elements*/);
// update timestamp (might be IResource.NULL_STAMP if original does not exist)
if (underlyingResource == null) {
underlyingResource = getResource();
}
unitInfo.timestamp = ((IFi... |
public Object getWrappedConstantValue() {
if (this.wrappedConstantValue == null) {
if (hasConstant()) {
Constant fieldConstant = getConstant();
switch (fieldConstant.typeID()) {
case T_int :
this.wrappedConstantValue = new Integer(fieldConstant.intValue());
break;
case T_byte :
this.wra... | public Object getWrappedConstantValue() {
if (this.wrappedConstantValue == null) {
if (hasConstant()) {
Constant fieldConstant = getConstant();
switch (fieldConstant.typeID()) {
case T_int :
this.wrappedConstantValue = new Integer(fieldConstant.intValue());
break;
case T_byte :
this.wra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.