buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private BlockedJobsDialog(Shell parentShell, IProgressMonitor blocking,
IStatus blockingStatus) {
super(parentShell == null ? ProgressManagerUtil.getDefaultParent()
: parentShell);
blockingMonitor = blocking;
setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL
| SWT.RESIZE | SWT.MAX | getDefa... | private BlockedJobsDialog(Shell parentShell, IProgressMonitor blocking,
IStatus blockingStatus) {
super(parentShell == null ? ProgressManagerUtil.getDefaultParent()
: parentShell);
blockingMonitor = blocking;
setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL
| SWT.RESIZE | SWT.MAX | getDefa... |
public void initializeDefaultPreferences() {
// Get options names set
HashSet optionNames = JavaModelManager.getJavaModelManager().optionNames;
// Compiler settings
Map defaultOptionsMap = new CompilerOptions().getMap(); // compiler defaults
// Override some compiler defaults
defaultOptionsMap.put(J... | public void initializeDefaultPreferences() {
// Get options names set
HashSet optionNames = JavaModelManager.getJavaModelManager().optionNames;
// Compiler settings
Map defaultOptionsMap = new CompilerOptions().getMap(); // compiler defaults
// Override some compiler defaults
defaultOptionsMap.put(J... |
protected double getMemoryRatio() {
if (this.memoryRatio == -1) {
long maxMemory = Runtime.getRuntime().maxMemory();
// if max memory is infinite, set the ratio to 4d which corresponds to the 256MB that Eclipse defaults to
// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=111299)
this.memoryRatio = maxMe... | protected double getMemoryRatio() {
if (this.memoryRatio == -1) {
long maxMemory = Runtime.getRuntime().maxMemory();
// if max memory is infinite, set the ratio to 4d which corresponds to the 256MB that Eclipse defaults to
// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=111299)
this.memoryRatio = maxMe... |
public String toStringExpression(){
char[] declaringType = this.evaluationContext.declaringTypeName;
return "("+ (declaringType == null ? "<NO DECLARING TYPE>" : new String(declaringType)) + ")this";
}
| public String toStringExpression(){
char[] declaringType = this.evaluationContext.declaringTypeName;
return "("/*nonNLS*/ + (declaringType == null ? "<NO DECLARING TYPE>"/*nonNLS*/ : new String(declaringType)) + ")this"/*nonNLS*/;
}
|
void contextServiceChanged(IContextServiceEvent contextServiceEvent);
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of th... | void contextServiceChanged(IContextServiceEvent contextServiceEvent);
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of th... |
public static void main(String args[]) {
//defineMockHistory();
Vector argv = new Vector();
for (int i = 0; i < args.length; ++i) argv.addElement(args[i]);
// try {
// UIManager.setLookAndFeel(new JasonsLookAndFeel());
// }
// catch (Exception ex) {
// System.out.println("could no... | public static void main(String args[]) {
//defineMockHistory();
Vector argv = new Vector();
for (int i = 0; i < args.length; ++i) argv.addElement(args[i]);
// try {
// UIManager.setLookAndFeel(new JasonsLookAndFeel());
// }
// catch (Exception ex) {
// System.out.println("could no... |
public FieldPattern(
boolean findDeclarations,
boolean readAccess,
boolean writeAccess,
char[] name,
char[] declaringQualification,
char[] declaringSimpleName,
char[] typeQualification,
char[] typeSimpleName,
int matchRule) {
super(FIELD_PATTERN, findDeclarations, readAccess, writeAccess, name, matchRule)... | public FieldPattern(
boolean findDeclarations,
boolean readAccess,
boolean writeAccess,
char[] name,
char[] declaringQualification,
char[] declaringSimpleName,
char[] typeQualification,
char[] typeSimpleName,
int matchRule) {
super(FIELD_PATTERN, findDeclarations, readAccess, writeAccess, name, matchRule)... |
public void checkComment() {
// discard obsolete comments while inside methods or fields initializer (see bug 74369)
if (!(this.diet && this.dietInt==0) && this.scanner.commentPtr >= 0) {
flushCommentsDefinedPriorTo(this.endStatementPosition);
}
int lastComment = this.scanner.commentPtr;
if (this.modifiersSo... | public void checkComment() {
// discard obsolete comments while inside methods or fields initializer (see bug 74369)
if (!(this.diet && this.dietInt==0) && this.scanner.commentPtr >= 0) {
flushCommentsDefinedPriorTo(this.endStatementPosition);
}
int lastComment = this.scanner.commentPtr;
if (this.modifiersSo... |
public int numberOfDifferentLocals(StackMapFrame prevFrame) {
if (this.numberOfDifferentLocals != -1) return this.numberOfDifferentLocals;
if (prevFrame == null) {
this.numberOfDifferentLocals = 0;
return 0;
}
VerificationTypeInfo[] prevLocals = prevFrame.locals;
VerificationTypeInfo[] currentLocals = this.loc... | public int numberOfDifferentLocals(StackMapFrame prevFrame) {
if (this.numberOfDifferentLocals != -1) return this.numberOfDifferentLocals;
if (prevFrame == null) {
this.numberOfDifferentLocals = 0;
return 0;
}
VerificationTypeInfo[] prevLocals = prevFrame.locals;
VerificationTypeInfo[] currentLocals = this.loc... |
public void componentAdded(ContainerEvent e) {
ColumbaLogger.log.debug(
"Re-registering as observer on editor controller");
((ComposerController) getFrameMediator()).getEditorController()
.addObserver(this);
}
| public void componentAdded(ContainerEvent e) {
ColumbaLogger.log.info(
"Re-registering as observer on editor controller");
((ComposerController) getFrameMediator()).getEditorController()
.addObserver(this);
}
|
public int compare(Viewer testViewer, Object e1, Object e2) {
return ((Comparable) e1).compareTo(e2);
}
});
IContentProvider provider = new ProgressTreeContentProvider(viewer);
viewer.setContentProvider(provider);
viewer.setInput(provider);
viewer.setLabelProvider(new ProgressLabelProvider()... | public int compare(Viewer testViewer, Object e1, Object e2) {
return ((Comparable) e1).compareTo(e2);
}
});
IContentProvider provider = new ProgressTreeContentProvider(viewer,true);
viewer.setContentProvider(provider);
viewer.setInput(provider);
viewer.setLabelProvider(new ProgressLabelProvi... |
public synchronized void setFile(
String filename, boolean append, boolean bufferedIO, int bufferSize)
throws IOException {
getLogger().debug("setFile called: {}, {}", fileName, Boolean.toString(append));
// It does not make sense to have immediate flush and bufferedIO.
if (bufferedIO) {
se... | public synchronized void setFile(
String filename, boolean append, boolean bufferedIO, int bufferSize)
throws IOException {
getLogger().debug("setFile called: {}, {}", fileName, append?"true":"false");
// It does not make sense to have immediate flush and bufferedIO.
if (bufferedIO) {
setIm... |
public PropPanelAssociation() {
super("Association",_associationIcon,2);
Class mclass = MAssociation.class;
//
// this will cause the components on this page to be notified
// anytime a stereotype, namespace, operation, etc
// has its name changed or is removed anywhere in the mo... | public PropPanelAssociation() {
super("Association",_associationIcon,2);
Class mclass = MAssociation.class;
//
// this will cause the components on this page to be notified
// anytime a stereotype, namespace, operation, etc
// has its name changed or is removed anywhere in the mo... |
protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("operation.createUnitProgress"), 2); //$NON-NLS-1$
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
IPackageFragment pkg = (IPackageFragment) getParentElement();
IContainer fol... | protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("operation.createUnitProgress"), 2); //$NON-NLS-1$
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
IPackageFragment pkg = (IPackageFragment) getParentElement();
IContainer fol... |
private static int appendClassTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
// need a minimum 3 chars "Lx;"
if (start >= string.length - 2) {
throw new IllegalArgumentException();
}
// must start in "L" or "Q"
char c = string[start];
if (c != C_RESOLVED && c != C... | private static int appendClassTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
// need a minimum 3 chars "Lx;"
if (start >= string.length - 2) {
throw new IllegalArgumentException();
}
// must start in "L" or "Q"
char c = string[start];
if (c != C_RESOLVED && c != C... |
private Map getDefaultCompilerOptions() {
if (this.defaultCompilerOptions == null) {
Map optionsMap = new HashMap(30);
optionsMap.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE);
optionsMap.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.DO_NOT_GENERATE)... | private Map getDefaultCompilerOptions() {
if (this.defaultCompilerOptions == null) {
Map optionsMap = new HashMap(30);
optionsMap.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE);
optionsMap.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.DO_NOT_GENERATE)... |
protected void executeOperation() throws JavaModelException {
beginTask(Util.bind("classpath.settingOutputLocationProgress"), 2); //$NON-NLS-1$
JavaProject project= ((JavaProject) getElementsToProcess()[0]);
IPath oldLocation= project.getOutputLocation();
IPath newLocation= fOutputLocation;
// see if this will ... | protected void executeOperation() throws JavaModelException {
beginTask(Util.bind("classpath.settingOutputLocationProgress"), 2); //$NON-NLS-1$
JavaProject project= ((JavaProject) getElementsToProcess()[0]);
IPath oldLocation= project.getOutputLocation();
IPath newLocation= fOutputLocation;
// see if this will ... |
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(new UMLTextField(this,new UMLTextProperty(mclass,"name","getName","setName")),1,0,0);
addCaption(Argo.localize("UMLMenu", "label.s... |
public TypeBinding checkFieldAccess(BlockScope scope) {
FieldBinding fieldBinding = (FieldBinding) binding;
bits &= ~RestrictiveFlagMASK; // clear bits
bits |= FIELD;
if (!((FieldBinding) binding).isStatic()) {
// must check for the static status....
if (scope.methodScope().isStatic) {
scope.problemReport... | public TypeBinding checkFieldAccess(BlockScope scope) {
FieldBinding fieldBinding = (FieldBinding) binding;
bits &= ~RestrictiveFlagMASK; // clear bits
bits |= FIELD;
if (!((FieldBinding) binding).isStatic()) {
// must check for the static status....
if (scope.methodScope().isStatic) {
scope.problemReport... |
public void init() {
try {
PluginMetadata metadata = PluginManager.getInstance().getPluginMetadata(PLUGIN_ID);
InputStream is = this.getClass().getResourceAsStream(
"/org/columba/chat/action/action.xml");
PluginManager.getInstance().getHandler(
IExtensionHandlerKeys.ORG_COLUMBA_CORE_ACTION).l... | public void init() {
try {
PluginMetadata metadata = PluginManager.getInstance().getPluginMetadata(PLUGIN_ID);
InputStream is = this.getClass().getResourceAsStream(
"/org/columba/chat/action/action.xml");
PluginManager.getInstance().getExtensionHandler(
IExtensionHandlerKeys.ORG_COLUMBA_CORE_... |
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding tb = type.resolveTypeExpecting(scope, scope.getJavaLangThrowabl... | public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding tb = type.resolveTypeExpecting(scope, scope.getJavaLangThrowabl... |
public String toString() {
return "ZipNode(" + fZipFile + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
return "ZipNode("/*nonNLS*/ + fZipFile + ")"/*nonNLS*/;
}
|
public DeclarationOfReferencedTypesPattern(IJavaElement enclosingElement) {
super(null, null, PATTERN_MATCH, false);
this.enclosingElement = enclosingElement;
this.knownTypes = new SimpleSet();
this.mustResolve = true;
}
| public DeclarationOfReferencedTypesPattern(IJavaElement enclosingElement) {
super(null, null, R_PATTERN_MATCH);
this.enclosingElement = enclosingElement;
this.knownTypes = new SimpleSet();
this.mustResolve = true;
}
|
public
NS_CNAME_PTRRecord(Name name, short type, short dclass, int ttl, Name target) {
super(_name, type, dclass, ttl);
this.target = target;
}
| public
NS_CNAME_PTRRecord(Name name, short type, short dclass, int ttl, Name target) {
super(name, type, dclass, ttl);
this.target = target;
}
|
public void addDefaultAbstractMethods() {
if ((tagBits & KnowsDefaultAbstractMethods) != 0) return;
tagBits |= KnowsDefaultAbstractMethods;
if (isClass() && isAbstract()) {
if (fPackage.environment.options.complianceLevel >= CompilerOptions.JDK1_4) return; // no longer added in 1.4
ReferenceBinding[][] interf... | public void addDefaultAbstractMethods() {
if ((tagBits & KnowsDefaultAbstractMethods) != 0) return;
tagBits |= KnowsDefaultAbstractMethods;
if (isClass() && isAbstract()) {
if (fPackage.environment.options.targetJDK >= CompilerOptions.JDK1_2) return; // no longer added for post 1.2 targets
ReferenceBinding[][... |
public String getMainTaskName(){
return Util.bind("operation.createImportsProgress"/*nonNLS*/);
}
| public String getMainTaskName(){
return Util.bind("operation.createImportsProgress"); //$NON-NLS-1$
}
|
public TypeBinding resolveType(BlockScope scope) {
boolean expressionIsCast;
if ((expressionIsCast = this.expression instanceof CastExpression) == true) this.expression.bits |= DisableUnnecessaryCastCheck; // will check later on
TypeBinding expressionType = this.expression.resolveType(scope);
if (expression... | public TypeBinding resolveType(BlockScope scope) {
boolean expressionIsCast;
if ((expressionIsCast = this.expression instanceof CastExpression) == true) this.expression.bits |= DisableUnnecessaryCastCheck; // will check later on
TypeBinding expressionType = this.expression.resolveType(scope);
if (expression... |
public void actionPerformed(ActionEvent arg0) {
if (arg0.equals("CANCEL")) {
// send cancel event to worker
worker.cancel();
setVisible(false);
}
}
| public void actionPerformed(ActionEvent arg0) {
if (arg0.getActionCommand().equals("CANCEL")) {
// send cancel event to worker
worker.cancel();
setVisible(false);
}
}
|
public String toString() {
return "FlowInfo<true: "/*nonNLS*/ + initsWhenTrue.toString() + ", false: "/*nonNLS*/ + initsWhenFalse.toString() + ">"/*nonNLS*/;
}
| public String toString() {
return "FlowInfo<true: " + initsWhenTrue.toString() + ", false: " + initsWhenFalse.toString() + ">"; //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
}
|
protected void initializeDefaultPreferences(IPreferenceStore store) {
JFacePreferences.setPreferenceStore(store);
// new generic workbench preferences
store.setDefault(IWorkbenchPreferences.SHOULD_SAVE_WORKBENCH_STATE, false);
store.setDefault(IWorkbenchPreferences.SHOULD_CLOSE_EDITORS_ON_EXIT, false);
s... | protected void initializeDefaultPreferences(IPreferenceStore store) {
JFacePreferences.setPreferenceStore(store);
// new generic workbench preferences
store.setDefault(IWorkbenchPreferences.SHOULD_SAVE_WORKBENCH_STATE, false);
store.setDefault(IWorkbenchPreferences.SHOULD_CLOSE_EDITORS_ON_EXIT, false);
s... |
public
void print(String msg) {
// You have to supply the fully qualified named of the wrapper
// class to the specially tailored category.log method for
// PatternLayout's %C conversion pattern to work.
// We have to add the ".print" string because the invocation of
// wrapper.print method i... | public
void print(String msg) {
// You have to supply the fully qualified named of the wrapper
// class to the specially tailored category.log method for
// PatternLayout's %C conversion pattern to work.
// We have to add the ".print" string because the invocation of
// wrapper.print method i... |
public boolean isTypeAccess() {
return true;
}
/* Inner emulation consists in either recording a dependency
* link only, or performing one level of propagation.
*
* Dependency mechanism is used whenever dealing with source target
* types, since by the time we reach them, we might not yet know their
* ... | public boolean isTypeAccess() {
return true;
}
/* Inner emulation consists in either recording a dependency
* link only, or performing one level of propagation.
*
* Dependency mechanism is used whenever dealing with source target
* types, since by the time we reach them, we might not yet know their
* ... |
private TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = NotAConstant;
if (this.type == null) {
this.resolvedType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.reso... | private TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = NotAConstant;
if (this.type == null) {
this.resolvedType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.reso... |
public String individualToString(){
return "Label flow context [label:"/*nonNLS*/+String.valueOf(labelName)+"]"/*nonNLS*/;
}
| public String individualToString(){
return "Label flow context [label:"+String.valueOf(labelName)+"]"; //$NON-NLS-2$ //$NON-NLS-1$
}
|
public void loadPreferences() {
preferenceConfigurationMap = Collections.unmodifiableSortedMap(new TreeMap());
preferenceScopeMap = Collections.unmodifiableSortedMap(new TreeMap());
preferenceDefinitions = Collections.EMPTY_LIST;
IPreferenceStore preferenceStore = WorkbenchPlugin.getDefault().getPrefere... | public void loadPreferences() {
preferenceConfigurationMap = Collections.unmodifiableSortedMap(new TreeMap());
preferenceScopeMap = Collections.unmodifiableSortedMap(new TreeMap());
preferenceDefinitions = Collections.EMPTY_LIST;
IPreferenceStore preferenceStore = WorkbenchPlugin.getDefault().getPrefere... |
public static
String substVars(String val, Properties props) throws
IllegalArgumentException {
sbuf.setLength(0);
int i = 0;
int j, k;
while(true) {
j=val.indexOf(DELIM_START, i);
if(j == -1) {
if(i==0)
return val;
else {
sbuf.append(val.substring(i, val... | public static
String substVars(String val, Properties props) throws
IllegalArgumentException {
sbuf.setLength(0);
int i = 0;
int j, k;
while(true) {
j=val.indexOf(DELIM_START, i);
if(j == -1) {
if(i==0)
return val;
else {
sbuf.append(val.substring(i, val... |
protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(this.tabString(tab));
if (info == null) {
toStringName(buffer);
buffer.append(" (not open)"); //$NON-NLS-1$
} else if (info == NO_INFO) {
toStringName(buffer);
} else {
try {
buffer.append(Signature.toString(this.getTy... | protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
buffer.append(this.tabString(tab));
if (info == null) {
toStringName(buffer);
buffer.append(" (not open)"); //$NON-NLS-1$
} else if (info == NO_INFO) {
toStringName(buffer);
} else {
try {
buffer.append(Sig... |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(getPath().toString());
buffer.append('[');
switch (getEntryKind()) {
case IClasspathEntry.CPE_LIBRARY :
buffer.append("CPE_LIBRARY"); //$NON-NLS-1$
break;
case IClasspathEntry.CPE_PROJECT :
buffer.append("CPE_P... | public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(getPath().toString());
buffer.append('[');
switch (getEntryKind()) {
case IClasspathEntry.CPE_LIBRARY :
buffer.append("CPE_LIBRARY"); //$NON-NLS-1$
break;
case IClasspathEntry.CPE_PROJECT :
buffer.append("CPE_P... |
public Object getAttribute(String name) {
if (name.startsWith("org.apache.tomcat")) {
// XXX XXX XXX XXX Security - servlets may get too much access !!!
// right now we don't check because we need JspServlet to
// be able to access classloader and classpath
if (name.equals("org.apa... | public Object getAttribute(String name) {
if (name.startsWith("org.apache.tomcat")) {
// XXX XXX XXX XXX Security - servlets may get too much access !!!
// right now we don't check because we need JspServlet to
// be able to access classloader and classpath
if (name.equals("org.apa... |
public String toString() {
if (string == null) {
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append('[');
stringBuffer.append(active);
stringBuffer.append(',');
stringBuffer.append(defined);
stringBuffer.append(',');
stringBuffer.append(description);
stringBuffer.append... | public String toString() {
if (string == null) {
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append('[');
stringBuffer.append(active);
stringBuffer.append(',');
stringBuffer.append(defined);
stringBuffer.append(',');
stringBuffer.append(description);
stringBuffer.append... |
public
KEYRecord(Name _name, short _dclass, int _ttl,
int length, CountedDataInputStream in, Compression c)
throws IOException
| public
KEYRecord(Name _name, short _dclass, int _ttl,
int length, DataByteInputStream in, Compression c)
throws IOException
|
private PreferenceRegistry(IPreferenceStore preferenceStore) {
super();
if (preferenceStore == null)
throw new NullPointerException();
this.preferenceStore = preferenceStore;
}
| private IPreferenceStore preferenceStore;
PreferenceRegistry(IPreferenceStore preferenceStore) {
super();
if (preferenceStore == null)
throw new NullPointerException();
this.preferenceStore = preferenceStore;
}
|
public void addAttribute( Attribute attribute )
throws Exception
{
IssueType issueType = getIssueType();
Module module = getModule();
// add attribute group-attribute mapping
RAttributeAttributeGroup raag =
addRAttributeAttributeGroup(attribu... | public void addAttribute( Attribute attribute )
throws Exception
{
IssueType issueType = getIssueType();
Module module = getModule();
// add attribute group-attribute mapping
RAttributeAttributeGroup raag =
addRAttributeAttributeGroup(attribu... |
public IPackage[] getReferencingPackages(IImageContext context)
throws NotPresentException {
if (!isPresent())
throw new NotPresentException(Util.bind("element.notPresent"/*nonNLS*/));
IPackage[] pkgs = fState.getReferencingPackages(fHandle, context);
/* wrap packages in state */
for (int i = 0; i < p... | public IPackage[] getReferencingPackages(IImageContext context)
throws NotPresentException {
if (!isPresent())
throw new NotPresentException(Util.bind("element.notPresent")); //$NON-NLS-1$
IPackage[] pkgs = fState.getReferencingPackages(fHandle, context);
/* wrap packages in state */
for (int i = 0; i... |
private void saveApplicationContext() {
realHandlerService = (HandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
contextSnapshot = realHandlerService.getContextSnapshot();
}
| private void saveApplicationContext() {
realHandlerService = (HandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
contextSnapshot = realHandlerService.getFullContextSnapshot();
}
|
public void testSingleton() {
Object o1 = ExtensionMechanismsFactory.getFactory();
Object o2 = ExtensionMechanismsFactory.getFactory();
assert("Different singletons", o1 == o2);
}
| public void testSingleton() {
Object o1 = ExtensionMechanismsFactory.getFactory();
Object o2 = ExtensionMechanismsFactory.getFactory();
assertTrue("Different singletons", o1 == o2);
}
|
private String getDisplayStringWithStatus(boolean showProgress) {
if (isCanceled()) {
return NLS.bind(ProgressMessages.JobInfo_Cancelled, (new Object[] { getJob().getName() }));
}
if (isBlocked()) {
return NLS.bind(ProgressMessages.JobInfo_Blocked, (new Object[] { getJob().getName(),
bloc... | private String getDisplayStringWithStatus(boolean showProgress) {
if (isCanceled()) {
return NLS.bind(ProgressMessages.JobInfo_Cancelled, (new Object[] { getJob().getName() }));
}
if (isBlocked()) {
return NLS.bind(ProgressMessages.JobInfo_Blocked, (new Object[] { getJob().getName(),
bloc... |
static public void attachTemporaryConsoleAppender(LoggerRepository repository) {
Logger ll = repository.getLogger(Constants.LOG4J_PACKAGE_NAME);
ConsoleAppender appender = new ConsoleAppender();
appender.setLayout(
new PatternLayout("LOG4J-INTERNAL: %d %level [%t] %c - %m%n"));
appender.set... | static public void attachTemporaryConsoleAppender(LoggerRepository repository) {
Logger ll = repository.getLogger(Constants.LOG4J_PACKAGE_NAME);
ConsoleAppender appender = new ConsoleAppender();
appender.setLayout(
new PatternLayout("LOG4J-INTERNAL: %d %level [%t] %c#%M:%L)- %m%n"));
append... |
public InetAddress
getAddress() {
String s = toDottedQuad(addr);
try {
return InetAddress.getByName(s);
}
catch (UnknownHostException e) {
return null;
}
}
void
rrToWire(DataByteOutputStream out, Compression c) {
out.writeByte(((addr >>> 24) & 0xFF));
out.writeByte(((addr >>> 16) & 0xFF));
out.writeByte(((... | public InetAddress
getAddress() {
String s = toDottedQuad(addr);
try {
return InetAddress.getByName(s);
}
catch (UnknownHostException e) {
return null;
}
}
void
rrToWire(DataByteOutputStream out, Compression c, boolean canonical) {
out.writeByte(((addr >>> 24) & 0xFF));
out.writeByte(((addr >>> 16) & 0xFF))... |
private String getTemplateBody() throws Exception,
CommandCancelledException, IOException {
// template folder has uid=107
MessageFolder templateFolder = (MessageFolder) MailInterface.treeModel
.getFolder(107);
// retrieve headerlist of tempate folder
Hea... | private String getTemplateBody() throws Exception,
CommandCancelledException, IOException {
// template folder has uid=107
MessageFolder templateFolder = (MessageFolder) MailInterface.treeModel
.getFolder(107);
// retrieve headerlist of tempate folder
Hea... |
public String format() {
return format(FormatManager.XEMACS);
}
| public String format() {
return format(FormatManager.NATIVE);
}
|
protected char[] getTagName(int previousPosition, int currentPosition) {
this.invalidTagName = false;
if (currentPosition != this.scanner.startPosition) {
this.invalidTagName = true;
return null;
}
if (this.index >= this.scanner.eofPosition) {
this.invalidTagName = true;
return null;
}
this.tagSourceSt... | protected char[] getTagName(int previousPosition, int currentPosition) {
this.invalidTagName = false;
if (currentPosition != this.scanner.startPosition) {
this.invalidTagName = true;
return null;
}
if (this.index >= this.scanner.eofPosition) {
this.invalidTagName = true;
return null;
}
this.tagSourceSt... |
public static Map getJavaConventionsSetttings() {
return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap();
}
} | public static Map getJavaConventionsSettings() {
return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap();
}
} |
public void reset() {
}
} | public void cleanup() {
}
} |
public static TypeBinding substitute(Substitution substitution, TypeBinding originalType) {
switch (originalType.kind()) {
case Binding.TYPE_PARAMETER:
return substitution.substitute( (TypeVariableBinding) originalType);
case Binding.PARAMETERIZED_TYPE:
ParameterizedTypeBinding originalPara... | public static TypeBinding substitute(Substitution substitution, TypeBinding originalType) {
switch (originalType.kind()) {
case Binding.TYPE_PARAMETER:
return substitution.substitute( (TypeVariableBinding) originalType);
case Binding.PARAMETERIZED_TYPE:
ParameterizedTypeBinding originalPara... |
protected void matchCheck(AstNode node, MatchSet set) {
if (this.readAccess) {
super.matchCheck(node, set);
}
if (node instanceof Assignment) {
AstNode lhs = ((Assignment)node).lhs;
if (this.writeAccess) {
super.matchCheck(lhs, set);
} else {
// the lhs may have been added when checking if it was a rea... | protected void matchCheck(AstNode node, MatchSet set) {
if (this.readAccess) {
super.matchCheck(node, set);
}
if (node instanceof Assignment) {
AstNode lhs = ((Assignment)node).lhs;
if (this.writeAccess) {
super.matchCheck(lhs, set);
} else if (!(node instanceof CompoundAssignment)){
// the lhs may hav... |
public int getModifiers() {
return 0;
}
| public int getModifiers() {
return Modifier.NONE;
}
|
protected void readNextRequest() throws IOException {
String dummy,token1,token2;
int marker;
int signal;
// Hashtable env_vars=new Hashtable();
try {
boolean more=true;
while (more) {
marker = ajpin.read();
switch (marker) {
case 0: //NOP marker useful for testing if stream i... | protected void readNextRequest() throws IOException {
String dummy,token1,token2;
int marker;
int signal;
// Hashtable env_vars=new Hashtable();
try {
boolean more=true;
while (more) {
marker = ajpin.read();
switch (marker) {
case 0: //NOP marker useful for testing if stream i... |
protected IncrementalImageBuilder(JavaBuilder javaBuilder, State buildState) {
super(javaBuilder, true, buildState);
this.nameEnvironment.isIncrementalBuild = true;
this.makeOutputFolderConsistent = JavaCore.ENABLED.equals(
javaBuilder.javaProject.getOption(JavaCore.CORE_JAVA_BUILD_MAKE_OUTPUT_FOLDER_CONSISTENT, t... | protected IncrementalImageBuilder(JavaBuilder javaBuilder, State buildState) {
super(javaBuilder, true, buildState);
this.nameEnvironment.isIncrementalBuild = true;
this.makeOutputFolderConsistent = JavaCore.ENABLED.equals(
javaBuilder.javaProject.getOption(JavaCore.CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN... |
public void testForewardWithAttachement() throws Exception {
String input = FolderTstHelper.getString("0_attachment.eml");
System.out.println("input=" + input);
// create stream from string
InputStream inputStream = FolderTstHelper
.getByteArrayInputStream(input);
// add stream to folder
Object uid = g... | public void testForewardWithAttachment() throws Exception {
String input = FolderTstHelper.getString("0_attachment.eml");
System.out.println("input=" + input);
// create stream from string
InputStream inputStream = FolderTstHelper
.getByteArrayInputStream(input);
// add stream to folder
Object uid = ge... |
public IBuffer createBuffer(ICompilationUnit workingCopy) {
return BufferManager.getDefaultBufferManager().createBuffer(workingCopy);
}
| public IBuffer createBuffer(ICompilationUnit workingCopy) {
return BufferManager.createBuffer(workingCopy);
}
|
// abstract private methods cannot occur nor abstract static............
}
if (isMethodUseDeprecated(binding, scope))
scope.problemReporter().deprecatedMethod(binding, this);
// from 1.5 compliance on, array#clone() returns the array type (but binding still shows Object)
if (actualReceiverType.isArrayType()
... | // abstract private methods cannot occur nor abstract static............
}
if (isMethodUseDeprecated(binding, scope))
scope.problemReporter().deprecatedMethod(binding, this);
// from 1.5 compliance on, array#clone() returns the array type (but binding still shows Object)
if (actualReceiverType.isArrayType()
... |
public boolean isUserInRole(String role) {
checkRoles[0]=role;
int status=0;
BaseInterceptor reqI[]= getContainer().
getInterceptors(Container.H_authorize);
// Call all authorization callbacks.
for( int i=0; i< reqI.length; i++ ) {
status = reqI[i].authorize( this, response, checkRoles );
if ... | public boolean isUserInRole(String role) {
checkRoles[0]=role;
int status=0;
BaseInterceptor reqI[]= getContainer().
getInterceptors(Container.H_authorize);
// Call all authorization callbacks.
for( int i=0; i< reqI.length; i++ ) {
status = reqI[i].authorize( this, response, checkRoles );
if ... |
public void match(TypeDeclaration node, MatchingNodeSet nodeSet) {
if (this.pattern.simpleName == null || matchesName(this.pattern.simpleName, node.name))
nodeSet.addMatch(node, this.pattern.mustResolve ? POTENTIAL_MATCH : ACCURATE_MATCH);
}
| public void match(TypeDeclaration node, MatchingNodeSet nodeSet) {
if (this.pattern.simpleName == null || matchesName(this.pattern.simpleName, node.name))
nodeSet.addMatch(node, this.pattern.mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH);
}
|
public char[] getMainTypeName() {
if (this.mainTypeName == null) {
int start = CharOperation.lastIndexOf('/', this.fileName) + 1;
if (start == 0 || start < CharOperation.lastIndexOf('\\', this.fileName))
start = CharOperation.lastIndexOf('\\', this.fileName) + 1;
int separator = CharOperation.indexOf('|', thi... | public char[] getMainTypeName() {
if (this.mainTypeName == null) {
int start = CharOperation.lastIndexOf('/', this.fileName) + 1;
if (start == 0 || start < CharOperation.lastIndexOf('\\', this.fileName))
start = CharOperation.lastIndexOf('\\', this.fileName) + 1;
int separator = CharOperation.indexOf('|', thi... |
protected void consumeMethodDeclaration(boolean isNotAbstract) {
// MethodDeclaration ::= MethodHeader MethodBody
// AbstractMethodDeclaration ::= MethodHeader ';'
super.consumeMethodDeclaration(isNotAbstract);
// now we know that we have a method declaration at the top of the ast stack
MethodDeclaration method... | protected void consumeMethodDeclaration(boolean isNotAbstract) {
// MethodDeclaration ::= MethodHeader MethodBody
// AbstractMethodDeclaration ::= MethodHeader ';'
super.consumeMethodDeclaration(isNotAbstract);
// now we know that we have a method declaration at the top of the ast stack
MethodDeclaration method... |
public TypeBinding resolveType(BlockScope scope) {
// handle the error here
constant = NotAConstant;
if (binding != null) { // is a shared type reference which was already resolved
if (!binding.isValidBinding())
return null; // already reported error
} else {
binding = getTypeBinding(scope);
if (!binding.i... | public TypeBinding resolveType(BlockScope scope) {
// handle the error here
constant = NotAConstant;
if (binding != null) { // is a shared type reference which was already resolved
if (!binding.isValidBinding())
return null; // already reported error
} else {
binding = getTypeBinding(scope);
if (!binding.i... |
public String toString() {
String basic = getClass().getName();
basic = basic.substring(basic.lastIndexOf('.')+1);
StringBuffer buffer = new StringBuffer(basic);
buffer.append('@').append(Integer.toHexString(hashCode()));
buffer.append("(type=").append(this.exceptionType == null ? null : this.exceptionType.readab... | public String toString() {
String basic = getClass().getName();
basic = basic.substring(basic.lastIndexOf('.')+1);
StringBuffer buffer = new StringBuffer(basic);
buffer.append('@').append(Integer.toHexString(hashCode()));
buffer.append("(type=").append(this.exceptionType == null ? null : this.exceptionType.readab... |
private void addSelectedAttributes(Criteria crit, List attValues)
throws Exception
{
Criteria.Criterion c = null;
boolean atLeastOne = false;
HashMap aliasIndices = new HashMap((int)(attValues.size()*1.25));
for ( int j=0; j<attValues.size(); j++ )
{
... | private void addSelectedAttributes(Criteria crit, List attValues)
throws Exception
{
Criteria.Criterion c = null;
boolean atLeastOne = false;
HashMap aliasIndices = new HashMap((int)(attValues.size()*1.25));
for ( int j=0; j<attValues.size(); j++ )
{
... |
protected void resolveDuplicates(IJavaElement handle) {
while (newElements.containsKey(handle)) {
JavaElement h = (JavaElement) handle;
h.setOccurrenceCount(h.getOccurrenceCount() + 1);
}
}
| protected void resolveDuplicates(IJavaElement handle) {
while (newElements.containsKey(handle)) {
JavaElement h = (JavaElement) handle;
h.occurrenceCount++;
}
}
|
public void init(TreeView tree, TableView table) {
Container c = getContentPane();
table.setupRenderer();
JScrollPane treeScrollPane = new JScrollPane(tree);
treeScrollPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
JScrollPane tableScrollPane = new JScrollPane(table);
JSplitPane split... | public void init(TreeView tree, TableView table) {
Container c = getContentPane();
//table.setupRenderer();
JScrollPane treeScrollPane = new JScrollPane(tree);
treeScrollPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
JScrollPane tableScrollPane = new JScrollPane(table);
JSplitPane spl... |
public void setPart(IWorkbenchPart part) {
this.part = part;
if(part == null)
return;
Object listeners[] = propChangeListeners.getListeners();
for (int i = 0; i < listeners.length; i++) {
part.addPropertyListener((IPropertyListener)listeners[i]);
}
PartSite site = (PartSite)part.getSite();
if(site ... | public void setPart(IWorkbenchPart part) {
this.part = part;
if(part == null)
return;
Object listeners[] = propChangeListeners.getListeners();
for (int i = 0; i < listeners.length; i++) {
part.addPropertyListener((IPropertyListener)listeners[i]);
}
PartSite site = (PartSite)part.getSite();
if(site ... |
public int getByteOff() {
return bb.getOffset();
}
| public int getByteOff() {
return bb.getEnd();
}
|
public void engineState(ContextManager cm, int state )
throws TomcatException
{
if( state!=ContextManager.STATE_START )
return;
// the engine is now started, create the ajp12.id
// file that will allow us to stop the server and
// know that the server is started ok.
Ajp12Interceptor tcpCon=this;
int... | public void engineState(ContextManager cm, int state )
throws TomcatException
{
if( state!=ContextManager.STATE_START )
return;
// the engine is now started, create the ajp12.id
// file that will allow us to stop the server and
// know that the server is started ok.
Ajp12Interceptor tcpCon=this;
int... |
public String toString() {
return "OldBuilderType(" + fOldTSEntry.getType().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
return "OldBuilderType("/*nonNLS*/ + fOldTSEntry.getType().getName() + ")"/*nonNLS*/;
}
|
public CloseAllSavedAction(IWorkbenchWindow aWorkbench) {
super(WorkbenchMessages.getString("CloseAllSavedAction.text")); //$NON-NLS-1$
this.workbench = aWorkbench;
setToolTipText(WorkbenchMessages.getString("CloseAllSavedAction.toolTip")); //$NON-NLS-1$
//Should create a ID in IWorkbenchActionConstants when it bec... | public CloseAllSavedAction(IWorkbenchWindow aWorkbench) {
super(WorkbenchMessages.getString("CloseAllSavedAction.text")); //$NON-NLS-1$
this.workbench = aWorkbench;
setToolTipText(WorkbenchMessages.getString("CloseAllSavedAction.toolTip")); //$NON-NLS-1$
//Should create a ID in IWorkbenchActionConstants when it bec... |
protected void initializeAnnotationProcessorManager() {
try {
Class c = Class.forName("org.eclipse.jdt.internal.compiler.apt.dispatch.AnnotationProcessorManager"); //$NON-NLS-1$
AbstractAnnotationProcessorManager annotationManager = (AbstractAnnotationProcessorManager) c.newInstance();
annotationManager.configur... | protected void initializeAnnotationProcessorManager() {
try {
Class c = Class.forName("org.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager"); //$NON-NLS-1$
AbstractAnnotationProcessorManager annotationManager = (AbstractAnnotationProcessorManager) c.newInstance();
annotationManager.con... |
public void removeElement() {
Object target = getTarget();
if(target instanceof ArgoDiagram) {
try {
ArgoDiagram diagram = (ArgoDiagram) target;
Project project = ProjectBrowser.TheInstance.getProject();
//
// can't easily find owner of diag... | public void removeElement() {
Object target = getTarget();
if(target instanceof ArgoDiagram) {
try {
ArgoDiagram diagram = (ArgoDiagram) target;
Project project = ProjectBrowser.TheInstance.getProject();
//
// can't easily find owner of diag... |
public
dnsNSRecord(dnsName _name, short _dclass, int _ttl, StringTokenizer st)
throws IOException
| public
dnsNSRecord(dnsName _name, short _dclass, int _ttl, MyStringTokenizer st)
throws IOException
|
public int getNodeType() {
return ANNOTATION_TYPE_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
AnnotationTypeDeclaration result = new AnnotationTypeDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
res... | public int getNodeType() {
return ANNOTATION_TYPE_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
AnnotationTypeDeclaration result = new AnnotationTypeDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
re... |
public JavaWorkspaceScope() {
JavaCore javaCore = JavaCore.getJavaCore();
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0, length = projects.length; i < length; i++) {
IProject project = projects[i];
if (project.isAccessible()) {
try {
this.add(javaCore.create(... | public JavaWorkspaceScope() {
JavaCore javaCore = JavaCore.getJavaCore();
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0, length = projects.length; i < length; i++) {
IProject project = projects[i];
if (project.isAccessible()) {
try {
this.add(javaCore.create(... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return true;
try {
/* ensure no concurrent write access to index */
IIndex index = manager.getIndex(this.indexPath, true, /*reuse index file*/ true /*create if none*/);
if (index == nu... | public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return true;
try {
/* ensure no concurrent write access to index */
IIndex index = manager.getIndex(this.indexPath, true, /*reuse index file*/ false /*create if none*/);
if (index == n... |
public int getNodeType() {
return SUPER_CONSTRUCTOR_INVOCATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
SuperConstructorInvocation result = new SuperConstructorInvocation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
... | public int getNodeType() {
return SUPER_CONSTRUCTOR_INVOCATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
SuperConstructorInvocation result = new SuperConstructorInvocation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
... |
private boolean usingWriter = false;
ServletOutputStreamFacade osFacade=null;
PrintWriter writer = null; // XXX will go away when we add the convertor
// Logger.Helper loghelper = new Logger.Helper("tc_log", "HttpServletResponseFacade");
/** Package
*/
HttpServletResponseFacade(Re... | private boolean usingWriter = false;
ServletOutputStreamFacade osFacade=null;
PrintWriter writer = null; // XXX will go away when we add the convertor
// Logger.Helper loghelper = new Logger.Helper("tc_log", "HttpServletResponseFacade");
/** Package
*/
HttpServletResponseFacade(Re... |
private AstNode[] computeMergedMemberDeclarations(TypeDeclaration typeDeclaration){
int fieldIndex = 0, fieldCount = (typeDeclaration.fields == null) ? 0 : typeDeclaration.fields.length;
FieldDeclaration field = fieldCount == 0 ? null : typeDeclaration.fields[fieldIndex];
int fieldStart = field == null ? Inte... | private AstNode[] computeMergedMemberDeclarations(TypeDeclaration typeDeclaration){
int fieldIndex = 0, fieldCount = (typeDeclaration.fields == null) ? 0 : typeDeclaration.fields.length;
FieldDeclaration field = fieldCount == 0 ? null : typeDeclaration.fields[fieldIndex];
int fieldStart = field == null ? Inte... |
protected void computeFolderChildren(IContainer folder, boolean isIncluded, String[] pkgName, ArrayList vChildren, char[][] inclusionPatterns, char[][] exclusionPatterns) throws JavaModelException {
if (isIncluded) {
IPackageFragment pkg = getPackageFragment(pkgName);
vChildren.add(pkg);
}
try {
JavaProjec... | protected void computeFolderChildren(IContainer folder, boolean isIncluded, String[] pkgName, ArrayList vChildren, char[][] inclusionPatterns, char[][] exclusionPatterns) throws JavaModelException {
if (isIncluded) {
IPackageFragment pkg = getPackageFragment(pkgName);
vChildren.add(pkg);
}
try {
JavaProjec... |
public static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory){
// if factory is null, default factory must be used
if (factory == null) factory = BufferManager.getDefaultBufferManager().getDefaultBufferFactory();
Map sharedWorkingCopies = JavaModelManager.getJavaModelManager().sharedWorkingCopi... | public static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory){
// if factory is null, default factory must be used
if (factory == null) factory = BufferManager.getDefaultBufferManager().getDefaultBufferFactory();
Map sharedWorkingCopies = JavaModelManager.getJavaModelManager().sharedWorkingCopi... |
public StringBuffer print(int indent, StringBuffer output) {
output
.append(name)
.append(" = "); //$NON-NLS-1$
value.print(indent, output);
return output;
}
| public StringBuffer print(int indent, StringBuffer output) {
output
.append(name)
.append(" = "); //$NON-NLS-1$
value.print(0, output);
return output;
}
|
protected String getMainTaskName() {
return Util.bind("operation.moveElementProgress"); //$NON-NLS-1$
}
| protected String getMainTaskName() {
return Util.bind("operation.moveElementProgress"/*nonNLS*/);
}
|
protected void consumeFormalParameter(boolean isVarArgs) {
if (this.indexOfAssistIdentifier() < 0) {
super.consumeFormalParameter(isVarArgs);
if((!diet || dietInt != 0) && astPtr > -1) {
Argument argument = (Argument) astStack[astPtr];
if(argument.type == assistNode) {
isOrphanCompletionNode = true;
... | protected void consumeFormalParameter(boolean isVarArgs) {
if (this.indexOfAssistIdentifier() < 0) {
super.consumeFormalParameter(isVarArgs);
if((!diet || dietInt != 0) && astPtr > -1) {
Argument argument = (Argument) astStack[astPtr];
if(argument.type == assistNode) {
isOrphanCompletionNode = true;
... |
public static List createFlatList(List list) {
IFolderFacade folderFacade;
try {
folderFacade = ServiceConnector.getFolderFacade();
} catch (ServiceNotFoundException e1) {
e1.printStackTrace();
return new ArrayList();
}
if (list == null)
return null;
List result = new Vector();
for (Itera... | public static List createFlatList(List list) {
IFolderFacade folderFacade;
try {
folderFacade = ServiceConnector.getFolderFacade();
} catch (ServiceNotFoundException e1) {
e1.printStackTrace();
return new ArrayList();
}
if (list == null)
return null;
List result = new Vector();
for (Itera... |
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... | 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... |
public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
ReferenceBinding memberType = scope.getMemberType(token, enclosingType);
if (!memberType.isValidBinding()) {
scope.problemReporter().invalidEnclosingType(this, memberType, enclosingType);
return null;
}
if (isTyp... | public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
ReferenceBinding memberType = scope.getMemberType(token, enclosingType);
if (!memberType.isValidBinding()) {
scope.problemReporter().invalidEnclosingType(this, memberType, enclosingType);
return null;
}
if (isTyp... |
public void loadWindowPosition(ViewItem viewItem) {
int x = viewItem.getInteger("window", "width");
int y = viewItem.getInteger("window", "height");
boolean maximized = viewItem.getBoolean("window", "maximized");
if (maximized)
maximize();
else {
Dimension dim = new Dimension(x, y);
setSize(dim)... | public void loadWindowPosition(ViewItem viewItem) {
int x = viewItem.getInteger("window", "width");
int y = viewItem.getInteger("window", "height");
boolean maximized = viewItem.getBoolean("window", "maximized", true);
if (maximized)
maximize();
else {
Dimension dim = new Dimension(x, y);
setSiz... |
private ISourceElementRequestor.TypeParameterInfo[] getTypeParameterInfos(TypeParameter[] typeParameters) {
if (typeParameters == null) return null;
int typeParametersLength = typeParameters.length;
ISourceElementRequestor.TypeParameterInfo[] result = new ISourceElementRequestor.TypeParameterInfo[typeParametersLengt... | private ISourceElementRequestor.TypeParameterInfo[] getTypeParameterInfos(TypeParameter[] typeParameters) {
if (typeParameters == null) return null;
int typeParametersLength = typeParameters.length;
ISourceElementRequestor.TypeParameterInfo[] result = new ISourceElementRequestor.TypeParameterInfo[typeParametersLengt... |
public boolean checkDeprecation(int annotationStart, int annotationEnd) {
char[] source = this.scanner.source;
boolean foundDeprecated = false;
if (this.sourceParser.checkAnnotation) {
this.annotation = new Annotation(annotationStart, annotationEnd);
} else {
this.annotation = null;
}
int firstL... | public boolean checkDeprecation(int annotationStart, int annotationEnd) {
char[] source = this.scanner.source;
boolean foundDeprecated = false;
if (false/*this.sourceParser.checkAnnotation*/) {
this.annotation = new Annotation(annotationStart, annotationEnd);
} else {
this.annotation = null;
}
i... |
public void insertUpdate(DocumentEvent e) {
System.out.println(getClass().getName() + " insert");
if (e.getDocument() == _expr.getDocument()) {
//setTargetName();
System.out.println("changed constraint expression text");
}
}
| public void insertUpdate(DocumentEvent e) {
//System.out.println(getClass().getName() + " insert");
if (e.getDocument() == _expr.getDocument()) {
//setTargetName();
System.out.println("changed constraint expression text");
}
}
|
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... | public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... |
public String toStringExpression(){
/* slow code */
return receiver.toString()
+ "." //$NON-NLS-1$
+ new String(token);}
| public String toStringExpression(){
/* slow code */
return receiver.toString()
+ "."/*nonNLS*/
+ new String(token);}
|
protected void matchReportReference(ASTNode reference, IJavaElement element, IJavaElement localElement, IJavaElement[] otherElements, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {
MethodBinding methodBinding = (reference instanceof MessageSend) ? ((MessageSend)reference).binding: (... | protected void matchReportReference(ASTNode reference, IJavaElement element, IJavaElement localElement, IJavaElement[] otherElements, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {
MethodBinding methodBinding = (reference instanceof MessageSend) ? ((MessageSend)reference).binding: (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.