buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public String toString() {
if (string == null) {
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("[activePartId="); //$NON-NLS-1$
stringBuffer.append(activePartId);
stringBuffer.append("activeShell="); //$NON-NLS-1$
string... | public String toString() {
if (string == null) {
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("[activePartId="); //$NON-NLS-1$
stringBuffer.append(activePartId);
stringBuffer.append(",activeShell="); //$NON-NLS-1$
strin... |
public int getContentLength() {
if( contentLength > -1 ) return contentLength;
MessageBytes clB=headers.getValue("content-length");
contentLength = (clB==null) ? -1 : clB.getInt();
return contentLength;
}
| public int getContentLength() {
if( contentLength > -1 ) return contentLength;
MessageBytes clB=headers.getValue("content-length");
contentLength = (clB==null || clB.isNull() ) ? -1 : clB.getInt();
return contentLength;
}
|
public Context addContext( String ctxPath, URL docRoot, String hosts[] )
throws TomcatException
{
if(debug>0) log( "add context \"" + hosts[0] + ":" + ctxPath + "\" " +
docRoot );
if( ! initialized ) {
initContextManager();
}
// tomcat supports only file-based contexts
if( ! "file".equals( doc... | public Context addContext( String ctxPath, URL docRoot, String hosts[] )
throws TomcatException
{
if(debug>0) log( "add context \"" + hosts[0] + ":" + ctxPath + "\" " +
docRoot );
if( ! initialized ) {
initContextManager();
}
// tomcat supports only file-based contexts
if( ! "file".equals( doc... |
public char[] getCharContent() throws IOException {
return org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(file);
}
| public char[] getCharContent() throws IOException {
return org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(file, null);
}
|
public final boolean equals(final Object object) {
if (object instanceof SchemeListenerWrapper) {
final CommandListenerWrapper wrapper = (CommandListenerWrapper) object;
return listener.equals(wrapper.listener);
}
if (object instanceof org.eclipse.ui.commands.ICommandListener) {
final org.eclipse.ui.co... | public final boolean equals(final Object object) {
if (object instanceof CommandListenerWrapper) {
final CommandListenerWrapper wrapper = (CommandListenerWrapper) object;
return listener.equals(wrapper.listener);
}
if (object instanceof org.eclipse.ui.commands.ICommandListener) {
final org.eclipse.ui.c... |
public void compose(String address) {
ComposerController controller = new ComposerController(null);
controller.getModel().setTo(address);
controller.showComposerWindow();
}
| public void compose(String address) {
ComposerController controller = new ComposerController();
controller.getModel().setTo(address);
controller.showComposerWindow();
}
|
public void setInitializationData(IConfigurationElement cfig,
String propertyName, Object data) {
// Save config element.
configElement = cfig;
// Icon.
String strIcon = cfig.getAttribute("icon");//$NON-NLS-1$
if (strIcon == null)
return;
im... | public void setInitializationData(IConfigurationElement cfig,
String propertyName, Object data) {
// Save config element.
configElement = cfig;
// Icon.
String strIcon = cfig.getAttribute("icon");//$NON-NLS-1$
if (strIcon == null)
return;
im... |
private ASTNode.NodeList arguments =
new ASTNode.NodeList(ARGUMENTS_PROPERTY);
/**
* Creates a new AST node for an alternate constructor invocation statement
* owned by the given AST. By default, an empty list of arguments.
*
* @param ast the AST that is to own this node
*/
ConstructorInvocation(AST as... | private ASTNode.NodeList arguments =
new ASTNode.NodeList(ARGUMENTS_PROPERTY);
/**
* Creates a new AST node for an alternate constructor invocation statement
* owned by the given AST. By default, an empty list of arguments.
*
* @param ast the AST that is to own this node
*/
ConstructorInvocation(AST as... |
public void execute(ContextManager cm) throws TomcatException {
try {
String tomcatHome = cm.getHome();
String apacheHome = findApache();
//log("Tomcat home= " + tomcatHome);
FileWriter configW=new FileWriter(tomcatHome + APACHE_CONFIG);
PrintWriter pw=new PrintWriter(configW);
P... | public void execute(ContextManager cm) throws TomcatException {
try {
String tomcatHome = cm.getHome();
String apacheHome = findApache();
//log("Tomcat home= " + tomcatHome);
FileWriter configW=new FileWriter(tomcatHome + APACHE_CONFIG);
PrintWriter pw=new PrintWriter(configW);
P... |
public TypeBinding resolveType(BlockScope scope) {
// added for code assist...cannot occur with 'normal' code
if (this.anonymousType == null && this.enclosingInstance == null) {
return super.resolveType(scope);
}
// Propagate the type checking to the arguments, and checks if the constructor is defined.
... | public TypeBinding resolveType(BlockScope scope) {
// added for code assist...cannot occur with 'normal' code
if (this.anonymousType == null && this.enclosingInstance == null) {
return super.resolveType(scope);
}
// Propagate the type checking to the arguments, and checks if the constructor is defined.
... |
public void flush(Control dirtyControl) {
flushCache();
}
}
| public void flush(Control dirtyControl) {
CacheWrapper.this.flushCache();
}
}
|
protected boolean outputLocationChanged(IState lastBuiltState) throws CoreException {
try {
IPath oldOutputLocation = ((StateImpl) lastBuiltState).getOutputLocation();
IPath newOutputLocation = getJavaProject().getOutputLocation();
return !oldOutputLocation.equals(newOutputLocation);
} catch (JavaModelException... | protected boolean outputLocationChanged(IState lastBuiltState) throws CoreException {
try {
IPath oldOutputLocation = ((StateImpl) lastBuiltState).getOutputLocation();
IPath newOutputLocation = getJavaProject().getOutputLocation();
return !oldOutputLocation.equals(newOutputLocation);
} catch (JavaModelException... |
private JavaElement getUnresolvedJavaElement(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding ) {
if (typeBinding == null)
return null;
switch (typeBinding.kind()) {
case Binding.ARRAY_TYPE :
typeBinding = ((ArrayBinding) typeBinding).leafComponentType();
return getUnresolvedJavaElem... | private JavaElement getUnresolvedJavaElement(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding ) {
if (typeBinding == null)
return null;
switch (typeBinding.kind()) {
case Binding.ARRAY_TYPE :
typeBinding = ((ArrayBinding) typeBinding).leafComponentType();
return getUnresolvedJavaElem... |
public static IJavaSearchScope createWorkspaceScope() {
return JavaWorkspaceScope.createScope();
}
| public static IJavaSearchScope createWorkspaceScope() {
return JavaModelManager.getJavaModelManager().getWorkspaceScope();
}
|
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(WorkbenchMessages.getString("ShowView.shellTitle")); //$NON-NLS-1$
PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
IWorkbenchHelpContextIds.SHOW_VIEW_DIALOG);
}
| protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(WorkbenchMessages.ShowView_shellTitle);
PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
IWorkbenchHelpContextIds.SHOW_VIEW_DIALOG);
}
|
public void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0)) {
printUsage();
return;
}
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog = 8;
final int InsideRepetition = 16;
fin... | public void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0)) {
printUsage();
return;
}
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog = 8;
final int InsideRepetition = 16;
fin... |
public DialogConstraint(MModelElement me, JFrame parentFrame) {
super(parentFrame, true);
setTitle("Enter new OCL constraint");
ace=new ArgoConstraintEvaluation(this);
ace.setConstraint("context " + me.getName());
getContentPane().add(ace);
pack();
}
| public DialogConstraint(MModelElement me, JFrame parentFrame) {
super(parentFrame, true);
setTitle("Enter new OCL constraint");
ace=new ArgoConstraintEvaluation(this, me);
ace.setConstraint("context " + me.getName());
getContentPane().add(ace);
pack();
}
|
public void completeCodeAttributeForProblemMethod(
AbstractMethodDeclaration method,
MethodBinding binding,
int codeAttributeOffset,
int[] exceptionHandler,
int[] startLineIndexes) {
// reinitialize the localContents with the byte modified by the code stream
byte[] localContents = contents = codeStream.b... | public void completeCodeAttributeForProblemMethod(
AbstractMethodDeclaration method,
MethodBinding binding,
int codeAttributeOffset,
int[] exceptionHandler,
int[] startLineIndexes) {
// reinitialize the localContents with the byte modified by the code stream
byte[] localContents = contents = codeStream.b... |
protected BuildContext[] notifyParticipants(SourceFile[] unitsAboutToCompile) {
BuildContext[] results = new BuildContext[unitsAboutToCompile.length];
for (int i = unitsAboutToCompile.length; --i >= 0;)
results[i] = new BuildContext(unitsAboutToCompile[i]);
// TODO (kent) do we expect to have more than one partic... | protected BuildContext[] notifyParticipants(SourceFile[] unitsAboutToCompile) {
BuildContext[] results = new BuildContext[unitsAboutToCompile.length];
for (int i = unitsAboutToCompile.length; --i >= 0;)
results[i] = new BuildContext(unitsAboutToCompile[i]);
// TODO (kent) do we expect to have more than one partic... |
public HierarchyBuilder(TypeHierarchy hierarchy) throws JavaModelException {
this.hierarchy = hierarchy;
JavaProject project = (JavaProject)hierarchy.javaProject();
this.searchableEnvironment = (SearchableEnvironment)project.getSearchableNameEnvironment();
this.nameLookup = project.getNameLookup();
this.hierarchyR... | public HierarchyBuilder(TypeHierarchy hierarchy) throws JavaModelException {
this.hierarchy = hierarchy;
JavaProject project = (JavaProject)hierarchy.javaProject();
this.searchableEnvironment = (SearchableEnvironment)project.getSearchableNameEnvironment();
this.nameLookup = project.getNameLookup();
this.hierarchyR... |
public OSTask[] getOSTasks(Install installer)
{
return new OSTask[] { new JEditLauncherOSTask(installer) };
}
}
| public OSTask[] getOSTasks(Install installer)
{
return new OSTask[] { /* new JEditLauncherOSTask(installer) */ };
}
}
|
public DefaultStackMapFrame(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
// FULL_FRAME
this.offsetDelta = u2At(classFileBytes, 0, offset);
int tempLocals = u2At(classFileBytes, 2, offset);
this.numberOfLocals = tempLocals;
this.readOffset = 4;
if (t... | public DefaultStackMapFrame(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
// FULL_FRAME
this.offsetDelta = u2At(classFileBytes, 0, offset);
int tempLocals = u2At(classFileBytes, 2, offset);
this.numberOfLocals = tempLocals;
this.readOffset = 4;
if (t... |
public FilterOptionsPlugin(MailFrameMediator mediator) {
super("filter", mediator);
}
| public FilterOptionsPlugin(MailFrameMediator mediator) {
super("filter", "FilterOptions", mediator);
}
|
public void body(String text) throws Exception
{
log().debug("(" + getState() + ") activity attribute type body: " + text);
AttributeType issueType = AttributeType.getInstance(attributeTypeName);
ActivityInfo activityInfo = (ActivityInfo)digester.pop();
activityInfo.setType(issue... | public void body(String text) throws Exception
{
log().debug("(" + getState() + ") activity attribute type body: " + text);
AttributeType issueType = AttributeType.getInstance(text);
ActivityInfo activityInfo = (ActivityInfo)digester.pop();
activityInfo.setType(issueType);
... |
public TypeBinding resolveType(BlockScope scope) {
this.constant = NotAConstant;
TypeBinding typeBinding = this.type.resolveType(scope);
if (typeBinding == null)
return null;
this.resolvedType = typeBinding;
// ensure type refers to an annotation type
if (!typeBinding.isAnnotationType()) {
scop... | public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
TypeBinding typeBinding = this.type.resolveType(scope);
if (typeBinding == null)
return null;
this.resolvedType = typeBinding;
// ensure type refers to an annotation type
if (!typeBinding.isAnnotationType()) ... |
public int match(ASTNode node, MatchingNodeSet nodeSet) {
int declarationsLevel = IMPOSSIBLE_MATCH;
if (this.pattern.findReferences) {
if (node instanceof ImportReference) {
// With static import, we can have static method reference in import reference
ImportReference importRef = (ImportReference) node;
in... | public int match(ASTNode node, MatchingNodeSet nodeSet) {
int declarationsLevel = IMPOSSIBLE_MATCH;
if (this.pattern.findReferences) {
if (node instanceof ImportReference) {
// With static import, we can have static method reference in import reference
ImportReference importRef = (ImportReference) node;
in... |
private Object[] computeNonJavaResources(JavaProject project) {
// determine if src == project and/or if bin == project
IPath projectPath = project.getProject().getFullPath();
boolean srcIsProject = false;
boolean binIsProject = false;
char[][] exclusionPatterns = null;
IClasspathEntry[] classpath = nul... | private Object[] computeNonJavaResources(JavaProject project) {
// determine if src == project and/or if bin == project
IPath projectPath = project.getProject().getFullPath();
boolean srcIsProject = false;
boolean binIsProject = false;
char[][] exclusionPatterns = null;
IClasspathEntry[] classpath = nul... |
private void connectMemberTypes() {
SourceTypeBinding sourceType = referenceContext.binding;
ReferenceBinding[] memberTypes = sourceType.memberTypes;
if (memberTypes != null && memberTypes != NoMemberTypes) {
for (int i = 0, size = memberTypes.length; i < size; i++)
((SourceTypeBinding) memberTypes[i]).s... | private void connectMemberTypes() {
SourceTypeBinding sourceType = referenceContext.binding;
ReferenceBinding[] memberTypes = sourceType.memberTypes;
if (memberTypes != null && memberTypes != NoMemberTypes) {
for (int i = 0, size = memberTypes.length; i < size; i++)
((SourceTypeBinding) memberTypes[i]).s... |
public int compare(Viewer testViewer, Object e1, Object e2) {
return ((Comparable) e1).compareTo(e2);
}
};
}
/**
* Open the progress view in the supplied window.
* @param window
*/
static void openProgressView(WorkbenchWindow window) {
IWorkbenchPage page = window.getActivePage();
if (page ==... | public int compare(Viewer testViewer, Object e1, Object e2) {
return ((Comparable) e1).compareTo(e2);
}
};
}
/**
* Open the progress view in the supplied window.
* @param window
*/
static void openProgressView(WorkbenchWindow window) {
IWorkbenchPage page = window.getActivePage();
if (page ==... |
private static Map map = new HashMap();
static {
put("blank", "$nl$/icons/full/obj16/blank.gif"); //$NON-NLS-1$//$NON-NLS-2$
put("change", "$nl$/icons/full/obj16/change_obj.gif"); //$NON-NLS-1$//$NON-NLS-2$
/*
* TODO Remove these images from the registry if they are no longer
* needed.
*/
put("mi... | private static Map map = new HashMap();
static {
put("blank", "$nl$/icons/full/obj16/blank.gif"); //$NON-NLS-1$//$NON-NLS-2$
put("change", "$nl$/icons/full/obj16/change_obj.gif"); //$NON-NLS-1$//$NON-NLS-2$
/*
* TODO Remove these images from the registry if they are no longer
* needed.
*/
put("mi... |
public void start() throws Exception {
EmbededTomcat tcat=new EmbededTomcat();
PathSetter pS=new PathSetter();
tcat.addInterceptor( pS );
ServerXmlInterceptor sxmlConf=new ServerXmlInterceptor();
sxmlConf.setConfig( configFile );
tcat.addInterceptor( sxmlConf );
tcat.initContextManager();
tcat.start()... | public void start() throws Exception {
EmbededTomcat tcat=new EmbededTomcat();
PathSetter pS=new PathSetter();
tcat.addInterceptor( pS );
ServerXmlReader sxmlConf=new ServerXmlReader();
sxmlConf.setConfig( configFile );
tcat.addInterceptor( sxmlConf );
tcat.initContextManager();
tcat.start();
}
|
protected void initialize() {
subverticesList = new UMLCompositeStateSubvertexList(this, new UMLCompositeStateSubvertexListModel());
}
| protected void initialize() {
subverticesList = new UMLCompositeStateSubvertexList(new UMLCompositeStateSubvertexListModel());
}
|
@Test/*(timeout=1500)*/ public void testsRunInParallel() {
long start= System.currentTimeMillis();
Result result= JUnitCore.runClasses(ParallelExecutioner.methods(), Example.class);
assertTrue(result.wasSuccessful());
| @Test/*(timeout=1500)*/ public void testsRunInParallel() {
long start= System.currentTimeMillis();
Result result= JUnitCore.runClasses(ParallelComputer.methods(), Example.class);
assertTrue(result.wasSuccessful());
|
public void close() {
ColumbaLogger.log.info("Closing FrameController: " +
this.getClass().getName());
view.saveWindowPosition(); // ask view to store current pos and size
view.setVisible(false);
/*
* Tell frame model that frame is closing.
* If this fr... | public void close() {
ColumbaLogger.log.fine("Closing FrameController: " +
this.getClass().getName());
view.saveWindowPosition(); // ask view to store current pos and size
view.setVisible(false);
/*
* Tell frame model that frame is closing.
* If this fr... |
protected void executeOperation() throws JavaModelException {
// open the working copy now to ensure contents are that of the current state of this element
CompilationUnit workingCopy = getWorkingCopy();
JavaModelManager.getJavaModelManager().getPerWorkingCopyInfo(workingCopy, true/*create if needed*/, true/*re... | protected void executeOperation() throws JavaModelException {
// open the working copy now to ensure contents are that of the current state of this element
CompilationUnit workingCopy = getWorkingCopy();
JavaModelManager.getJavaModelManager().getPerWorkingCopyInfo(workingCopy, true/*create if needed*/, true/*re... |
public void actionPerformed(ActionEvent arg0) {
// add current selection to clipboard
// copy action
ClipboardManager.getInstance().setOperation(ClipboardManager.COPY_ACTION);
ClipboardManager.getInstance().setMessageSelection((FolderCommandReference) ((MailFrameMediator)frameController).... | public void actionPerformed(ActionEvent arg0) {
// add current selection to clipboard
// copy action
ClipboardManager.getInstance().setOperation(ClipboardManager.COPY_ACTION);
ClipboardManager.getInstance().setSelection((FolderCommandReference) ((MailFrameMediator)frameController).getTabl... |
public void parse(String until, Class[] accept) throws JasperException {
boolean noJspElement = false;
while (reader.hasMoreInput()) {
if (until != null && reader.matches(until))
return;
// If the file has changed because of a 'push' or a 'pop'
// we must flush the charact... | public void parse(String until, Class[] accept) throws JasperException {
boolean noJspElement = false;
while (reader.hasMoreInput()) {
if (until != null && reader.matches(until))
return;
// If the file has changed because of a 'push' or a 'pop'
// we must flush the charact... |
public Object execute(Map parameterValuesByName) throws ExecutionException {
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (activeWorkbenchWindow == null)
return null;
IWorkbenchPage activePage = activeWorkbench... | public Object execute(Map parameterValuesByName) throws ExecutionException {
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (activeWorkbenchWindow == null)
return null;
IWorkbenchPage activePage = activeWorkbench... |
protected void executeOperation() throws JavaModelException {
ICompilationUnit cu = getCompilationUnit();
WorkingCopy workingCopy = new WorkingCopy((IPackageFragment)cu.getParent(), cu.getElementName(), this.factory, this.problemRequestor);
// open the working copy now to ensure contents are that of the current... | protected void executeOperation() throws JavaModelException {
ICompilationUnit cu = getCompilationUnit();
WorkingCopy workingCopy = new WorkingCopy((IPackageFragment)cu.getParent(), cu.getElementName(), this.factory, this.problemRequestor);
// open the working copy now to ensure contents are that of the current... |
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
//always ignore receiver cast, since may affect constant pool reference
boolean receiverCast = false;
if (this... | 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
//always ignore receiver cast, since may affect constant pool reference
boolean receiverCast = false;
if (this... |
public void mouseClicked(MouseEvent e) {
if (e.getSource() == this) {
if (e.getClickCount() >=2 && SwingUtilities.isLeftMouseButton(e)) {
Object o = getSelectedValue();
if (o instanceof MModelElement) {
ProjectBrowser.TheIns... | public void mouseClicked(MouseEvent e) {
if (e.getSource() == this) {
if (e.getClickCount() >=2 && SwingUtilities.isLeftMouseButton(e)) {
Object o = getSelectedValue();
if (o instanceof MModelElement) {
ProjectBrowser.getIns... |
public final void runWithEvent(final Event event) {
final Command baseCommand = command.getCommand();
final ExecutionEvent executionEvent = new ExecutionEvent(command
.getParameterMap(), event, null);
try {
baseCommand.execute(executionEvent);
firePropertyChange(IAction.RESULT, null, Boolean.TRUE);
... | public final void runWithEvent(final Event event) {
final Command baseCommand = command.getCommand();
final ExecutionEvent executionEvent = new ExecutionEvent(command
.getCommand(), command.getParameterMap(), event, null);
try {
baseCommand.execute(executionEvent);
firePropertyChange(IAction.RESULT, nu... |
private void resolveTypeParameterTags(Scope scope, boolean reportMissing) {
int paramTypeParamLength = this.paramTypeParameters == null ? 0 : this.paramTypeParameters.length;
// Get declaration infos
TypeParameter[] parameters = null;
TypeVariableBinding[] typeVariables = null;
int modifiers = -1;
switch ... | private void resolveTypeParameterTags(Scope scope, boolean reportMissing) {
int paramTypeParamLength = this.paramTypeParameters == null ? 0 : this.paramTypeParameters.length;
// Get declaration infos
TypeParameter[] parameters = null;
TypeVariableBinding[] typeVariables = null;
int modifiers = -1;
switch ... |
public String getDeclaredName() throws NotPresentException {
return "";
}
| public String getDeclaredName() throws NotPresentException {
return ""/*nonNLS*/;
}
|
public boolean isSelected() {
IDefaultItem item = new DefaultItem(element);
return item.getBoolean("overwrite", false);
}
| public boolean isSelected() {
IDefaultItem item = new DefaultItem(element);
return item.getBooleanWithDefault("overwrite", false);
}
|
private IContributionItem getContributionItem(IViewDescriptor viewDescriptor) {
CommandContributionItemParameter parm = new CommandContributionItemParameter(
locator, viewDescriptor.getId(), IWorkbenchCommandConstants.NAVIGATE_SHOWIN,
CommandContributionItem.STYLE_PUSH);
HashMap targetId = new HashMap();
... | private IContributionItem getContributionItem(IViewDescriptor viewDescriptor) {
CommandContributionItemParameter parm = new CommandContributionItemParameter(
locator, viewDescriptor.getId(), IWorkbenchCommandConstants.NAVIGATE_SHOW_IN,
CommandContributionItem.STYLE_PUSH);
HashMap targetId = new HashMap();
... |
protected ISchedulingRule getSchedulingRule() {
// returns the folder corresponding to the package of the cu
return getParentElement().getSchedulingRule();
}
| protected ISchedulingRule getSchedulingRule() {
// returns the folder corresponding to the package of the cu
return getCompilationUnit().getParent().getSchedulingRule();
}
|
private RepairCandidate errorRecovery(int error_token, boolean forcedError) {
this.errorToken = error_token;
this.errorTokenStart = lexStream.start(error_token);
int prevtok = lexStream.previous(error_token);
int prevtokKind = lexStream.kind(prevtok);
if(forcedError) {
int name_index = Parser.termin... | private RepairCandidate errorRecovery(int error_token, boolean forcedError) {
this.errorToken = error_token;
this.errorTokenStart = lexStream.start(error_token);
int prevtok = lexStream.previous(error_token);
int prevtokKind = lexStream.kind(prevtok);
if(forcedError) {
int name_index = Parser.termin... |
public Name getName() {
if (this.packageName == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.packageName == null) {
preLazyInit();
this.packageName = new SimpleName(this.ast);
postLazyInit(this.packageName, NAME_PROPERTY);
}
}
}
return th... | public Name getName() {
if (this.packageName == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.packageName == null) {
preLazyInit();
this.packageName = new SimpleName(this.ast);
postLazyInit(this.packageName, NAME_PROPERTY);
}
}
}
return this.p... |
public Argument(char[] name, long posNom, TypeReference tr, int modifiers) {
super(name, (int) (posNom >>> 32), (int) posNom);
this.declarationSourceEnd = (int) posNom;
this.modifiers = modifiers;
type = tr;
this.bits |= IsLocalDeclarationReachableMASK;
}
| public Argument(char[] name, long posNom, TypeReference tr, int modifiers) {
super(name, (int) (posNom >>> 32), (int) posNom);
this.declarationSourceEnd = (int) posNom;
this.modifiers = modifiers;
type = tr;
this.bits |= IsLocalDeclarationReachable;
}
|
public void record(IProblem problem, CompilationResult unitResult) {
requestor.acceptProblem(problem);
}
},
false,
options.sourceLevel >= CompilerOptions.JDK1_4);
this.requestor = requestor;
intArrayStack = new int[30][];
this.options = options;
}
| public void record(IProblem problem, CompilationResult unitResult) {
requestor.acceptProblem(problem);
}
},
false,
options.sourceLevel);
this.requestor = requestor;
intArrayStack = new int[30][];
this.options = options;
}
|
public
static
void main(String argv[]) {
if(argv.length == 1)
init(argv[0]);
else
Usage("Wrong number of arguments.");
test();
}
static
void Usage(String msg) {
System.err.println(msg);
System.err.println( "Usage: java " + Finalize.class.getName() +
" configFile");
... | public
static
void main(String argv[]) {
if(argv.length == 1)
init(argv[0]);
else
Usage("Wrong number of arguments.");
test();
}
static
void Usage(String msg) {
System.err.println(msg);
System.err.println( "Usage: java " + Finalize.class.getName() +
" configFile");
... |
public boolean isConsistent() {
return JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().get(this) == null;
}
| public boolean isConsistent() {
return !JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().contains(this);
}
|
public IPerspectiveFactory createFactory() throws CoreException {
if (className == null)
return null;
Object obj = WorkbenchPlugin.createExtension(configElement, ATT_CLASS);
return (IPerspectiveFactory) obj;
}
| public IPerspectiveFactory createFactory() throws CoreException {
if (className == null || configElement == null)
return null;
Object obj = WorkbenchPlugin.createExtension(configElement, ATT_CLASS);
return (IPerspectiveFactory) obj;
}
|
private Object getAnnotationMemberValue(MemberValuePair memberValuePair, Expression expression, JavaElement parentElement) {
if (expression instanceof Literal) {
((Literal) expression).computeConstant();
return Util.getAnnotationMemberValue(memberValuePair, expression.constant);
} else if (expression instanc... | private Object getAnnotationMemberValue(MemberValuePair memberValuePair, Expression expression, JavaElement parentElement) {
if (expression instanceof Literal) {
((Literal) expression).computeConstant();
return Util.getAnnotationMemberValue(memberValuePair, expression.constant);
} else if (expression instanc... |
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (constant != Constant.NotAConstant) {
// inlined value
if (valueRequired)
codeStream.generateConstant(constant, implicitConversion);
codeStream.recordPositionsFrom(pc, th... | public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (constant != Constant.NotAConstant) {
// inlined value
if (valueRequired)
codeStream.generateConstant(constant, implicitConversion);
codeStream.recordPositionsFrom(pc, th... |
public final static boolean isExcluded(char[] path, char[][] inclusionPatterns, char[][] exclusionPatterns, boolean isFolderPath) {
if (inclusionPatterns == null && exclusionPatterns == null) return false;
inclusionCheck: if (inclusionPatterns != null) {
for (int i = 0, length = inclusionPatterns.length; i < l... | public final static boolean isExcluded(char[] path, char[][] inclusionPatterns, char[][] exclusionPatterns, boolean isFolderPath) {
if (inclusionPatterns == null && exclusionPatterns == null) return false;
inclusionCheck: if (inclusionPatterns != null) {
for (int i = 0, length = inclusionPatterns.length; i < l... |
public void notifySourceElementRequestor(TypeDeclaration typeDeclaration, boolean notifyTypePresence, TypeDeclaration declaringType) {
if (CharOperation.equals(TypeConstants.PACKAGE_INFO_NAME, typeDeclaration.name)) return;
// range check
boolean isInRange =
scanner.initialPosition <= typeDeclaration.declarati... | public void notifySourceElementRequestor(TypeDeclaration typeDeclaration, boolean notifyTypePresence, TypeDeclaration declaringType) {
if (CharOperation.equals(TypeConstants.PACKAGE_INFO_NAME, typeDeclaration.name)) return;
// range check
boolean isInRange =
scanner.initialPosition <= typeDeclaration.declarati... |
public int getNodeType() {
return ASSERT_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
AssertStatement result = new AssertStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
... | public int getNodeType() {
return ASSERT_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
AssertStatement result = new AssertStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
... |
protected ActionNavigability(String label, MAssociationEnd start, MAssociationEnd end, int nav) {
super(label);
this.nav = nav;
this.start = start;
this.end = end;
}
| protected ActionNavigability(String label, MAssociationEnd start, MAssociationEnd end, int nav) {
super(label, NO_ICON);
this.nav = nav;
this.start = start;
this.end = end;
}
|
protected void consumeFormalParameter(boolean isVarArgs) {
// FormalParameter ::= Type VariableDeclaratorId ==> false
// FormalParameter ::= Modifiers Type VariableDeclaratorId ==> true
/*
astStack :
identifierStack : type identifier
intStack : dim dim
==>
astStack : Argument
identifierStack :
intStack : ... | protected void consumeFormalParameter(boolean isVarArgs) {
// FormalParameter ::= Type VariableDeclaratorId ==> false
// FormalParameter ::= Modifiers Type VariableDeclaratorId ==> true
/*
astStack :
identifierStack : type identifier
intStack : dim dim
==>
astStack : Argument
identifierStack :
intStack : ... |
public TypeReferencePattern(char[] qualification, char[] simpleName, int matchRule) {
this(matchRule);
this.qualification = this.isCaseSensitive ? qualification : CharOperation.toLowerCase(qualification);
this.simpleName = this.isCaseSensitive ? simpleName : CharOperation.toLowerCase(simpleName);
if (simpleName =... | public TypeReferencePattern(char[] qualification, char[] simpleName, int matchRule) {
this(matchRule);
this.qualification = this.isCaseSensitive ? qualification : CharOperation.toLowerCase(qualification);
this.simpleName = this.isCaseSensitive ? simpleName : CharOperation.toLowerCase(simpleName);
if (simpleName =... |
public Rectangle displayBox() {
return myDisplayBox;
}
| public Rectangle displayBox() {
return new Rectangle(myDisplayBox);
}
|
public boolean isUserInRole(String role) {
// if (userRoles != null) {
// if( SecurityTools.haveRole( role, userRoles ))
// return true;
// }
String checkRoles[]=new String[1];
checkRoles[0]=role;
int status=contextM.doAuthorize(this, response, checkRoles);
return status==200;
}
| public boolean isUserInRole(String role) {
// if (userRoles != null) {
// if( SecurityTools.haveRole( role, userRoles ))
// return true;
// }
String checkRoles[]=new String[1];
checkRoles[0]=role;
int status=contextM.doAuthorize(this, response, checkRoles);
return status==0;
}
|
public AnnotationComponent(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int nameIndex = u2At(classFileBytes, 0, offset);
this.componentNameIndex = nameIndex;
if (nameIndex != 0) {
IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(na... | public AnnotationComponent(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int nameIndex = u2At(classFileBytes, 0, offset);
this.componentNameIndex = nameIndex;
if (nameIndex != 0) {
IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(na... |
public
void addHierarchyEventListener(HierarchyEventListener listener) {
if(listeners.contains(listener)) {
LogLog.warn("Ignoring attempt to add an existent listener.");
} else {
listeners.add(listener);
}
}
| public
void addHierarchyEventListener(HierarchyEventListener listener) {
if(listeners.contains(listener)) {
LogLog.warn("Ignoring attempt to add an existent listener.");
} else {
listeners.addElement(listener);
}
}
|
public void restoreState() {
File stateFile = getWorkingSetStateFile();
if (stateFile.exists()) {
try {
FileInputStream input = new FileInputStream(stateFile);
InputStreamReader reader = new InputStreamReader(input, "utf-8"); //$NON-NLS-1$
IMemento memento = XMLMemento.createReadRoot(reader);
... | public void restoreState() {
File stateFile = getWorkingSetStateFile();
if (stateFile.exists()) {
try {
FileInputStream input = new FileInputStream(stateFile);
BufferedReader reader = new BufferedReader(new InputStreamReader(input, "utf-8")); //$NON-NLS-1$
IMemento memento = XMLMemento.createReadR... |
private Openable createElement(IResource resource, int elementType, RootInfo rootInfo) {
if (resource == null) return null;
IPath path = resource.getFullPath();
IJavaElement element = null;
switch (elementType) {
case IJavaElement.JAVA_PROJECT:
// note that non-java resources rooted at the pr... | private Openable createElement(IResource resource, int elementType, RootInfo rootInfo) {
if (resource == null) return null;
IPath path = resource.getFullPath();
IJavaElement element = null;
switch (elementType) {
case IJavaElement.JAVA_PROJECT:
// note that non-java resources rooted at the pr... |
public IWorkbenchPart part;
};
| public IWorkbenchPart part;
}
|
public int compare(Viewer testViewer, Object e1, Object e2) {
return ((Comparable) e1).compareTo(e2);
}
});
ProgressTreeContentProvider provider = new ProgressTreeContentProvider(
viewer, !Policy.DEBUG_SHOW_SYSTEM_JOBS);
... | public int compare(Viewer testViewer, Object e1, Object e2) {
return ((Comparable) e1).compareTo(e2);
}
});
ProgressTreeContentProvider provider = new ProgressTreeContentProvider(
viewer, !Policy.DEBUG_SHOW_SYSTEM_JOBS);
... |
import org.tigris.scarab.om.*;
package org.tigris.scarab.attribute;
/* ================================================================
* Copyright (c) 2000 Collab.Net. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the fol... | import org.tigris.scarab.om.*;
package org.tigris.scarab.attribute;
/* ================================================================
* Copyright (c) 2000 Collab.Net. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the fol... |
public void resolve() {
if (this.binding == null) {
this.ignoreFurtherInvestigation = true;
return;
}
try {
if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd+1);
}
// check superclass & interfaces
if (thi... | public void resolve() {
if (this.binding == null) {
this.ignoreFurtherInvestigation = true;
return;
}
try {
if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd);
}
// check superclass & interfaces
if (this.... |
public static void readAdditions(IMenuService menuService) {
final IExtensionRegistry registry = Platform.getExtensionRegistry();
final IConfigurationElement[] menusExtensionPoint = registry
.getConfigurationElementsFor(COMMON_MENU_ADDITIONS);
// Create a cache entry for every menu addition
for (int i = 0... | public static void readAdditions(IMenuService menuService) {
final IExtensionRegistry registry = Platform.getExtensionRegistry();
final IConfigurationElement[] menusExtensionPoint = registry
.getConfigurationElementsFor(COMMON_MENU_ADDITIONS);
// Create a cache entry for every menu addition
for (int i = 0... |
public int match(MethodDeclaration node, MatchingNodeSet nodeSet) {
if (!this.pattern.findDeclarations) return IMPOSSIBLE_MATCH;
// Verify method name
if (!matchesName(this.pattern.selector, node.selector)) return IMPOSSIBLE_MATCH;
// Verify parameters types
boolean resolve = ((InternalSearchPattern)this.patter... | public int match(MethodDeclaration node, MatchingNodeSet nodeSet) {
if (!this.pattern.findDeclarations) return IMPOSSIBLE_MATCH;
// Verify method name
if (!matchesName(this.pattern.selector, node.selector)) return IMPOSSIBLE_MATCH;
// Verify parameters types
boolean resolve = ((InternalSearchPattern)this.patter... |
import javax.swing.tree.*;
// Copyright (c) 1996-99 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// ... | import javax.swing.tree.*;
// Copyright (c) 1996-99 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// ... |
protected void initializeDefaultPreferences(IPreferenceStore store) {
JFacePreferences.setPreferenceStore(store);
// new generic workbench preferences (for RCP APIs in org.eclipse.ui.application)
store.setDefault(IWorkbenchPreferences.SHOULD_SAVE_WORKBENCH_STATE, false);
store.setDefault(IWorkbenchPreferen... | protected void initializeDefaultPreferences(IPreferenceStore store) {
JFacePreferences.setPreferenceStore(store);
// new generic workbench preferences (for RCP APIs in org.eclipse.ui.application)
store.setDefault(IWorkbenchPreferences.SHOULD_SAVE_WORKBENCH_STATE, false);
store.setDefault(IWorkbenchPreferen... |
private void showStatusAdapter(StatusAdapter statusAdapter, boolean block) {
if (!PlatformUI.isWorkbenchRunning()) {
// we are shutting down, so just log
WorkbenchPlugin.log(statusAdapter.getStatus());
return;
}
getStatusDialogManager().addStatusAdapter(statusAdapter, block);
if (block) {
Shell s... | private void showStatusAdapter(StatusAdapter statusAdapter, boolean block) {
if (!PlatformUI.isWorkbenchRunning()) {
// we are shutting down, so just log
WorkbenchPlugin.log(statusAdapter.getStatus());
return;
}
getStatusDialogManager().addStatusAdapter(statusAdapter, block);
if (block) {
Shell s... |
public void codeComplete(char[] snippet,int insertion,int position,char[][] localVariableTypeNames,char[][] localVariableNames,int[] localVariableModifiers,boolean isStatic,ICompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException {
if (requestor == null) {
Assert.isTrue(false, "Completion re... | public void codeComplete(char[] snippet,int insertion,int position,char[][] localVariableTypeNames,char[][] localVariableNames,int[] localVariableModifiers,boolean isStatic,ICompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException {
if (requestor == null) {
Assert.isTrue(false, "completion re... |
public boolean subtreeMatch(ASTMatcher matcher, Object other) {
// dispatch to correct overloaded match method
return matcher.match(this, other);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
void accept0(ASTVisitor visitor) {
boolean visitChildren = visitor.visit(this);
visitor.... | public boolean subtreeMatch(ASTMatcher matcher, Object other) {
// dispatch to correct overloaded match method
return matcher.match(this, other);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
void accept0(ASTVisitor visitor) {
visitor.visit(this);
visitor.endVisit(this);
|
void setLogger(String loggerName);
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software
* License version 1.1, a copy of which has been included with this
* distribution in the LICENSE.txt file. */
package org.apache.log4j.... | void setLogger(String loggerName);
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software
* License version 1.1, a copy of which has been included with this
* distribution in the LICENSE.txt file. */
package org.apache.log4j.... |
public int getDedupeSequence(ScarabModule module)
throws Exception
{
int sequence = 1;
Vector groups = getAttributeGroups(module);
for (int i=1; i<groups.size(); i++)
{
int order = ((AttributeGroup)groups.get(i)).getOrder();
int previousOrder = ((Att... | public int getDedupeSequence(ScarabModule module)
throws Exception
{
int sequence = 1;
Vector groups = getAttributeGroups(module);
for (int i=1; i<=groups.size(); i++)
{
int order = ((AttributeGroup)groups.get(i)).getOrder();
int previousOrder = ((At... |
public StickyViewDescriptor(IConfigurationElement element)
throws CoreException {
this.configurationElement = element;
id = configurationElement.getAttribute(ATT_ID);;
if (id == null)
throw new CoreException(new Status(IStatus.ERROR, element
.getDeclarin... | public StickyViewDescriptor(IConfigurationElement element)
throws CoreException {
this.configurationElement = element;
id = configurationElement.getAttribute(ATT_ID);
if (id == null)
throw new CoreException(new Status(IStatus.ERROR, element
.getDeclaring... |
private void getProblemsForPath(IPath path, Vector vResults) {
for (Enumeration e = fState.getProblemReporter().getProblemKeys(); e.hasMoreElements();) {
SourceEntry sEntry = (SourceEntry)e.nextElement();
IPath sEntryPath = sEntry.getPath();
if (path.isPrefixOf(sEntryPath)) {
String extension = sEntryPath.get... | private void getProblemsForPath(IPath path, Vector vResults) {
for (Enumeration e = fState.getProblemReporter().getProblemKeys(); e.hasMoreElements();) {
SourceEntry sEntry = (SourceEntry)e.nextElement();
IPath sEntryPath = sEntry.getPath();
if (path.isPrefixOf(sEntryPath)) {
String extension = sEntryPath.get... |
public
update(InputStream in) throws IOException {
Vector inputs = new Vector();
Vector istreams = new Vector();
query = new Message();
query.getHeader().setOpcode(Opcode.UPDATE);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
inputs.addElement(br);
istreams.a... | public
update(InputStream in) throws IOException {
Vector inputs = new Vector();
Vector istreams = new Vector();
query = new Message();
query.getHeader().setOpcode(Opcode.UPDATE);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
inputs.addElement(br);
istreams.a... |
public ImageDescriptor getImageDescriptor() {
if (image == null) {
if (configElement != null) {
String icon = configElement.getAttribute(ATT_ICON);
if (icon != null) {
image = AbstractUIPlugin.imageDescriptorFromPlugin(
... | public ImageDescriptor getImageDescriptor() {
if (image == null) {
if (configElement != null) {
String icon = configElement.getAttribute(ATT_ICON);
if (icon != null) {
image = AbstractUIPlugin.imageDescriptorFromPlugin(
... |
public void setActionSets(IActionSetDescriptor[] newArray) {
// Convert array to list.
HashSet newList = new HashSet();
for (int i = 0; i < newArray.length; i++) {
IActionSetDescriptor descriptor = newArray[i];
newList.add(descriptor);
}
... | public void setActionSets(IActionSetDescriptor[] newArray) {
// Convert array to list.
HashSet newList = new HashSet();
for (int i = 0; i < newArray.length; i++) {
IActionSetDescriptor descriptor = newArray[i];
newList.add(descriptor);
}
... |
public boolean shouldBeVisible() {
if (editorPane == null) {
return false;
}
IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
boolean reuseEditor = store
.getBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)
| ((TabBehaviour)Tweaklets.get(T... | public boolean shouldBeVisible() {
if (editorPane == null) {
return false;
}
IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
boolean reuseEditor = store
.getBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)
| ((TabBehaviour)Tweaklets.get(T... |
public IClasspathEntry[] getResolvedClasspathContainer(IPath containerPath){
Map projectContainers = (Map)JavaModelManager.Containers.get(this);
if (projectContainers == null){
projectContainers = new HashMap(1);
JavaModelManager.Containers.put(this, projectContainers);
}
IClasspathEntry[] entries = (IC... | public IClasspathEntry[] getResolvedClasspathContainer(IPath containerPath){
Map projectContainers = (Map)JavaModelManager.Containers.get(this);
if (projectContainers == null){
projectContainers = new HashMap(1);
JavaModelManager.Containers.put(this, projectContainers);
}
IClasspathEntry[] entries = (IC... |
public void convert( CharChunk mb )
throws IOException
{
log( "Converting a char chunk ");
int start=mb.getOffset();
char buff[]=mb.getBuffer();
int cend=mb.getEnd();
int idx= mb.indexOf( buff, start, cend, '%' );
int idx2= mb.indexOf( buff, start, cend, '+' );
if( idx<0 && idx2<0 ) {
return;
}
... | public void convert( CharChunk mb )
throws IOException
{
// log( "Converting a char chunk ");
int start=mb.getOffset();
char buff[]=mb.getBuffer();
int cend=mb.getEnd();
int idx= mb.indexOf( buff, start, cend, '%' );
int idx2= mb.indexOf( buff, start, cend, '+' );
if( idx<0 && idx2<0 ) {
return;
... |
protected ShowInAction(IWorkbenchWindow window, IViewDescriptor desc) {
super(desc.getLabel());
setImageDescriptor(desc.getImageDescriptor());
window.getWorkbench().getHelpSystem().setHelp(this,
IWorkbenchHelpContextIds.SHOW_IN_ACTION);
this.window = window;
this.desc = d... | protected ShowInAction(IWorkbenchWindow window, IViewDescriptor desc) {
super('&' + desc.getLabel());
setImageDescriptor(desc.getImageDescriptor());
window.getWorkbench().getHelpSystem().setHelp(this,
IWorkbenchHelpContextIds.SHOW_IN_ACTION);
this.window = window;
this.de... |
private static int consumeWhitespace(char[] typeName, int pos, int length) {
while (pos < length) {
char currentChar = typeName[pos];
if (currentChar != ' ' && !CharOperation.isWhitespace(currentChar)) {
break;
}
pos++;
}
return pos;
}
| private static int consumeWhitespace(char[] typeName, int pos, int length) {
while (pos < length) {
char currentChar = typeName[pos];
if (currentChar != ' ' && !ScannerHelper.isWhitespace(currentChar)) {
break;
}
pos++;
}
return pos;
}
|
private XHTMLPanel panel = new XHTMLPanel();
URL baseUrl = DiskIO.getResourceURL("org/columba/core/images/");
| private XHTMLPanel panel = new XHTMLPanel();
URL baseUrl = DiskIO.getResourceURL("org/columba/core/icons/MISC/");
|
protected boolean readElement(IConfigurationElement element) {
if (element.getName().equals(TAG_LAYOUT)) {
try {
PerspectiveDescriptor desc = new PerspectiveDescriptor(element.getAttribute(PerspectiveDescriptor.ATT_ID), element);
registry.addPerspective(desc);
... | protected boolean readElement(IConfigurationElement element) {
if (element.getName().equals(TAG_LAYOUT)) {
try {
PerspectiveDescriptor desc = new PerspectiveDescriptor(element.getAttribute(IWorkbenchRegistryConstants.ATT_ID), element);
registry.addPerspective(desc... |
GestureSequence getGestureSequence();
/*******************************************************************************
* 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
* ... | GestureSequence getGestureSequence();
/*******************************************************************************
* 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
* ... |
public void add(ColumbaHeader header) throws Exception {
ColumbaHeader strippedHeader = new ColumbaHeader();
for( int i=0; i < CachedHeaderfields.POP3_HEADERFIELDS.length; i++) {
strippedHeader.set(CachedHeaderfields.POP3_HEADERFIELDS[i], header.get(CachedHeaderfields.POP3_HEADERFIELDS[i]));
}
super.add(... | public void add(ColumbaHeader header) throws Exception {
ColumbaHeader strippedHeader = new ColumbaHeader();
for( int i=0; i < CachedHeaderfields.POP3_HEADERFIELDS.length; i++) {
strippedHeader.set(CachedHeaderfields.POP3_HEADERFIELDS[i], header.get(CachedHeaderfields.POP3_HEADERFIELDS[i]));
}
headerList... |
protected void updateProblemsFor(CompilationResult result) throws CoreException {
IProblem[] problems = result.getProblems();
if (problems == null || problems.length == 0) return;
notifier.updateProblemCounts(null, problems);
IPath filePath = new Path(new String(result.getFileName()));
IResource resource = javaB... | protected void updateProblemsFor(CompilationResult result) throws CoreException {
IProblem[] problems = result.getProblems();
if (problems == null || problems.length == 0) return;
notifier.updateProblemCounts(problems);
IPath filePath = new Path(new String(result.getFileName()));
IResource resource = javaBuilder... |
public void removeElement() {
//overrides removeElement in PropPanel
Object target = getTarget();
if(target instanceof MStateVertex) {
MStateVertex sv = (MStateVertex) target;
Object newTarget = sv.getContainer();
UmlFactory.getFactory().getStateMachines().re... | public void removeElement() {
//overrides removeElement in PropPanel
Object target = getTarget();
if(target instanceof MStateVertex) {
MStateVertex sv = (MStateVertex) target;
Object newTarget = sv.getContainer();
sv.remove();
if(newTarget != nul... |
public boolean needsRefresh() {
return changes.size() != 0;
}
| public boolean needsRefresh() {
return this.changes.size() != 0;
}
|
public static String getComments(Object o) {
StringBuffer result = new StringBuffer();
if(o instanceof MModelElement) {
Collection comments = ((MModelElement) o).getComments();
if (!comments.isEmpty()) {
for(Iterator iter = comments.iterator(); iter.hasNext(); ) {
MComment c = (MComment)it... | public static String getComments(Object o) {
StringBuffer result = new StringBuffer();
if(o instanceof MModelElement) {
Collection comments = ((MModelElement) o).getComments();
if (!comments.isEmpty()) {
for(Iterator iter = comments.iterator(); iter.hasNext(); ) {
MComment c = (MComment)it... |
protected void process(PossibleMatch possibleMatch, boolean bindingsWereCreated) throws CoreException {
this.currentPossibleMatch = possibleMatch;
CompilationUnitDeclaration unit = possibleMatch.parsedUnit;
try {
if (unit.isEmpty()) {
if (this.currentPossibleMatch.openable instanceof ClassFile) {
ClassFile ... | protected void process(PossibleMatch possibleMatch, boolean bindingsWereCreated) throws CoreException {
this.currentPossibleMatch = possibleMatch;
CompilationUnitDeclaration unit = possibleMatch.parsedUnit;
try {
if (unit.isEmpty()) {
if (this.currentPossibleMatch.openable instanceof ClassFile) {
ClassFile ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.