buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.type != null) { // type null for enum constant initializations
output.append("new "); //$NON-NLS-1$
}
if (typeArguments != null) {
output.append('<');//$NON-NLS-1$
int max = typeArguments.length - 1;
for (int j = 0; j < ... | public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.type != null) { // type null for enum constant initializations
output.append("new "); //$NON-NLS-1$
}
if (typeArguments != null) {
output.append('<');
int max = typeArguments.length - 1;
for (int j = 0; j < max; j++) {
... |
private MethodBinding resolveTypesFor(MethodBinding method) {
if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
return method;
if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
if ((method.getAnnotationTagBits() & TagBits.AnnotationDeprecated) != 0)
method.modifier... | private MethodBinding resolveTypesFor(MethodBinding method) {
if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
return method;
if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
if ((method.getAnnotationTagBits() & TagBits.AnnotationDeprecated) != 0)
method.modifier... |
protected void matchReportReference(AstNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
locator.reportQualifiedReference(reference.sourceStart, reference.sourceEnd, new char[][] {this.name}, element, accuracy);
}
| protected void matchReportReference(AstNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
locator.reportAccurateReference(reference.sourceStart, reference.sourceEnd, new char[][] {this.name}, element, accuracy);
}
|
private static Hashtable getOptions(){
if(JavaModelManager.fOptions == null)
setOptionsToDefault();
return JavaModelManager.fOptions;
}
| private static Hashtable getOptions(){
if(JavaModelManager.fOptions == null)
resetOptions();
return JavaModelManager.fOptions;
}
|
public Object getRoot() {
throw new Error("getRoot should never be called");
}
| public Object getRoot() {
throw new UnsupportedOperationException("getRoot should never be called");
}
|
private Object findElement(TreeItem[] items) {
for (int i= 0; i < items.length; i++) {
Object element= items[i].getData();
if (matcher == null)
return element;
TreeItem parentItem = items[i].getParentItem();
Object parentElement = null;
if (parentItem != null) {
parentElement = parentItem.getD... | private Object findElement(TreeItem[] items) {
for (int i= 0; i < items.length; i++) {
Object element= items[i].getData();
if (matcher == null)
return element;
TreeItem parentItem = items[i].getParentItem();
Object parentElement = null;
if (parentItem != null) {
parentElement = parentItem.getD... |
public static void
main(String argv[]) throws IOException {
String server;
int arg;
Message query;
Record rec;
Resolver res = null;
if (argv.length < 1) {
usage();
}
try {
arg = 0;
if (argv[arg].startsWith("@")) {
server = argv[arg++].substring(1);
res = new SimpleResolver(server);
}
else
r... | public static void
main(String argv[]) throws IOException {
String server;
int arg;
Message query;
Record rec;
Resolver res = null;
if (argv.length < 1) {
usage();
}
try {
arg = 0;
if (argv[arg].startsWith("@")) {
server = argv[arg++].substring(1);
res = new SimpleResolver(server);
}
else
r... |
public void setTicks(int ticks) {
this.ticks = ticks;
}
/* (non-Javadoc)
* @see org.eclipse.ui.internal.progress.JobTreeElement#isActive()
*/
boolean isActive() {
return getJob().getState() == Job.NONE;
}
| public void setTicks(int ticks) {
this.ticks = ticks;
}
/* (non-Javadoc)
* @see org.eclipse.ui.internal.progress.JobTreeElement#isActive()
*/
boolean isActive() {
return getJob().getState() != Job.NONE;
}
|
public int discardPerWorkingCopyInfo(CompilationUnit workingCopy) throws JavaModelException {
synchronized(perWorkingCopyInfos) {
WorkingCopyOwner owner = workingCopy.owner;
Map pathToPerWorkingCopyInfos = (Map)this.perWorkingCopyInfos.get(owner);
if (pathToPerWorkingCopyInfos == null) return -1;
IPa... | public int discardPerWorkingCopyInfo(CompilationUnit workingCopy) throws JavaModelException {
synchronized(perWorkingCopyInfos) {
WorkingCopyOwner owner = workingCopy.owner;
Map pathToPerWorkingCopyInfos = (Map)this.perWorkingCopyInfos.get(owner);
if (pathToPerWorkingCopyInfos == null) return -1;
IPa... |
public void cleanup() {
this.directoryCache = null;
}
String[] directoryList(String qualifiedPackageName) {
String[] dirList = (String[]) directoryCache.get(qualifiedPackageName);
if (dirList == missingPackageHolder) return null; // package exists in another classpath directory or jar
if (dirList != null) return d... | public void cleanup() {
this.directoryCache = null;
}
String[] directoryList(String qualifiedPackageName) {
String[] dirList = (String[]) directoryCache.get(qualifiedPackageName);
if (dirList == missingPackageHolder) return null; // package exists in another classpath directory or jar
if (dirList != null) return d... |
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 void removeElement() {
//overrides removeElement in PropPanel
Object target = getTarget();
if(target instanceof MStateVertex) {
MStateVertex sv = (MStateVertex) target;
Object newTarget = sv.getContainer();
UmlFactory.getFactory().delete(sv);
... |
private TypeBinding internalResolveType(Scope scope) {
this.constant = Constant.NotAConstant;
if (this.resolvedType != null) // is a shared type reference which was already resolved
return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
if (this.argument != null) {
... | private TypeBinding internalResolveType(Scope scope) {
this.constant = Constant.NotAConstant;
if (this.resolvedType != null) // is a shared type reference which was already resolved
return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
if (this.argument != null) {
... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameController())
.getTableSelection();
MainInterface.processor.addOp(new ReplyCommand(r));
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameMediator())
.getTableSelection();
MainInterface.processor.addOp(new ReplyCommand(r));
}
|
protected IClasspathEntry copy(IClasspathEntry entry) throws JavaModelException {
switch (entry.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
return JavaCore.newContainerEntry(entry.getPath(), entry.isExported());
case IClasspathEntry.CPE_LIBRARY:
return JavaCore.newLibraryEntry(this.destinatio... | protected IClasspathEntry copy(IClasspathEntry entry) throws JavaModelException {
switch (entry.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
return JavaCore.newContainerEntry(entry.getPath(), entry.isExported());
case IClasspathEntry.CPE_LIBRARY:
return JavaCore.newLibraryEntry(this.destinatio... |
private void addFields(ParameterSignature sig,
List<PotentialAssignment> list) {
for (final Field field : fClass.getFields()) {
if (Modifier.isStatic(field.getModifiers())) {
Class<?> type= field.getType();
if (sig.canAcceptArrayType(type)
&& field.getAnnotation(DataPoints.class) != null) {
... | private void addFields(ParameterSignature sig,
List<PotentialAssignment> list) {
for (final Field field : fClass.getJavaClass().getFields()) {
if (Modifier.isStatic(field.getModifiers())) {
Class<?> type= field.getType();
if (sig.canAcceptArrayType(type)
&& field.getAnnotation(DataPoints.class) !... |
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
// in interface case, no caching occurs, since cannot make a cache field for interface
if (valueRequired)
codeStream.generateClassLiteralAccessForType(type.binding, syntheticField);
cod... | public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
// in interface case, no caching occurs, since cannot make a cache field for interface
if (valueRequired)
codeStream.generateClassLiteralAccessForType(type.binding, syntheticField);
cod... |
protected void executeOperation() throws JavaModelException {
try {
beginTask(Messages.operation_createUnitProgress, 2);
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
IPackageFragment pkg = (IPackageFragment) getParentElement();
IContainer folder = (IContainer... | protected void executeOperation() throws JavaModelException {
try {
beginTask(Messages.operation_createUnitProgress, 2);
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
IPackageFragment pkg = (IPackageFragment) getParentElement();
IContainer folder = (IContainer... |
public
NXTRecord(Name _name, short _dclass, int _ttl,
int length, CountedDataInputStream in, Compression c)
throws IOException
| public
NXTRecord(Name _name, short _dclass, int _ttl,
int length, DataByteInputStream in, Compression c)
throws IOException
|
public int typeID() {
return T_String;
}
| public int typeID() {
return T_JavaLangString;
}
|
public Constant resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
// switchExpressionType maybe null in error case
scope.enclosingCase = this; // record entering in a switch case block
if (this.constantExpression == null) {
// remember the default case into ... | public Constant resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
// switchExpressionType maybe null in error case
scope.enclosingCase = this; // record entering in a switch case block
if (this.constantExpression == null) {
// remember the default case into ... |
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (constant != NotAConstant) {
if (valueRequired) {
codeStream.generateConstant(constant, implicitConversion);
}
} else {
boolean isStatic = binding.isStatic();
receiver.generat... | public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (constant != NotAConstant) {
if (valueRequired) {
codeStream.generateConstant(constant, implicitConversion);
}
} else {
boolean isStatic = binding.isStatic();
receiver.generat... |
public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
if (enclosingInstances == null) return null; // is null if no enclosing instances are known
// exact match
for (int i = enclosingInstances.length; --i >= 0;)
if (enclosingInstances[i].type ... | public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
if (enclosingInstances == null) return null; // is null if no enclosing instances are known
// exact match
for (int i = enclosingInstances.length; --i >= 0;)
if (enclosingInstances[i].type ... |
public void testSingleton() {
Object o1 = DataTypesFactory.getFactory();
Object o2 = DataTypesFactory.getFactory();
assert("Different singletons", o1 == o2);
}
| public void testSingleton() {
Object o1 = DataTypesFactory.getFactory();
Object o2 = DataTypesFactory.getFactory();
assertTrue("Different singletons", o1 == o2);
}
|
public void actionPerformed(ActionEvent evt) {
URLController c = new URLController();
try {
c.open(new URL("http://columba.sourceforge.net/faq_user.php"));
} catch (MalformedURLException mue) {
}
}
| public void actionPerformed(ActionEvent evt) {
URLController c = new URLController();
try {
c.open(new URL("http://columba.sourceforge.net/index.php?option=com_content&task=section&id=3&Itemid=40"));
} catch (MalformedURLException mue) {
}
}
|
public void actionPerformed(ActionEvent e) {
CalendarFrameMediator calendarFrame = (CalendarFrameMediator) frameMediator;
calendarFrame.goNext();
}
| public void actionPerformed(ActionEvent e) {
CalendarFrameMediator calendarFrame = (CalendarFrameMediator) frameMediator;
calendarFrame.getCalendarView().viewNext();
}
|
public
UNKRecord(Name _name, short _type, short _dclass, int _ttl, int length,
CountedDataInputStream in, Compression c) throws IOException
{
super(_name, _type, _dclass, _ttl);
if (in == null)
return;
data = new byte[length];
in.read(data);
}
| public
UNKRecord(Name _name, short _type, short _dclass, int _ttl, int length,
DataByteInputStream in, Compression c) throws IOException
{
super(_name, _type, _dclass, _ttl);
if (in == null)
return;
data = new byte[length];
in.read(data);
}
|
public void appendForwardReferencesFrom(BranchLabel otherLabel) {
final int otherCount = otherLabel.forwardReferenceCount;
if (otherCount == 0) return;
// need to merge the two sorted arrays of forward references
int[] mergedForwardReferences = new int[this.forwardReferenceCount + otherCount];
int indexInMerge = 0... | public void appendForwardReferencesFrom(BranchLabel otherLabel) {
final int otherCount = otherLabel.forwardReferenceCount;
if (otherCount == 0) return;
// need to merge the two sorted arrays of forward references
int[] mergedForwardReferences = new int[this.forwardReferenceCount + otherCount];
int indexInMerge = 0... |
public ActionAddTopLevelPackage() {
super("Add Top-Level Package", NO_ICON);
}
| public ActionAddTopLevelPackage() {
super("action.add-top-level-package", NO_ICON);
}
|
public CompilationUnit convert(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit, char[] source) {
try {
if(unit.compilationResult.recoveryScannerData != null) {
RecoveryScanner recoveryScanner = new RecoveryScanner(this.scanner, unit.compilationResult.recoveryScannerData.removeUnused());
... | public CompilationUnit convert(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit, char[] source) {
try {
if(unit.compilationResult.recoveryScannerData != null) {
RecoveryScanner recoveryScanner = new RecoveryScanner(this.scanner, unit.compilationResult.recoveryScannerData.removeUnused());
... |
protected void createTreeItemFor(Widget parent, IPreferenceNode node) {
IObjectActivityManager prefManager =
WorkbenchPlugin.getDefault().getWorkbench()
.getActivityManager(
IWorkbenchConstants.PL_PREFERENCES, false);
if (prefManager != null) {
Collection activePages... | protected void createTreeItemFor(Widget parent, IPreferenceNode node) {
IObjectActivityManager prefManager =
WorkbenchPlugin.getDefault().getWorkbench()
.getObjectActivityManager(
IWorkbenchConstants.PL_PREFERENCES, false);
if (prefManager != null) {
Collection activ... |
public final ImageDescriptor getImageDescriptor(final String commandId,
final int type, final String style) {
if (commandId == null) {
throw new NullPointerException();
}
final Object[] images = (Object[]) imagesById.get(commandId);
if (images == null) {
return null;
}
if ((type < 0) || (type >=... | public final ImageDescriptor getImageDescriptor(final String commandId,
final int type, final String style) {
if (commandId == null) {
throw new NullPointerException();
}
final Object[] images = (Object[]) imagesById.get(commandId);
if (images == null) {
return null;
}
if ((type < 0) || (type >=... |
public int getNodeType() {
return IMPORT_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ImportDeclaration result = new ImportDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setOnDemand(isOnDeman... | public int getNodeType() {
return IMPORT_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ImportDeclaration result = new ImportDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setOnDemand(isOnDeman... |
public int doStartTag() throws JspException {
try {
args.clear();
targets.clear();
pageContext.setAttribute("antProperties",
args);
} catch (Exception ex ) {
ex.printStackTrace();
}
return EVAL_BODY_INCLUDE;
}
| public int doStartTag() throws JspException {
try {
args.clear();
targets.removeAllElements();
pageContext.setAttribute("antProperties",
args);
} catch (Exception ex ) {
ex.printStackTrace();
}
return EVAL_BODY_INCLUDE;
}
|
private String getCurrentPresentationClassName() {
// update the current selection (used to look for changes on apply)
String currentPresentationFactoryId = PrefUtil.getAPIPreferenceStore()
.getString(
IWorkbenchPreferenceConstants.PRESENTATION_FACTORY_ID);
// Workbench.getInstance().getPresentationId... | private String getCurrentPresentationClassName() {
// update the current selection (used to look for changes on apply)
String currentPresentationFactoryId = PrefUtil.getAPIPreferenceStore()
.getString(
IWorkbenchPreferenceConstants.PRESENTATION_FACTORY_ID);
// Workbench.getInstance().getPresentationId... |
public void service(HttpServletRequest requestH,
HttpServletResponse responseH)
throws ServletException, IOException
{
Request request=((HttpServletRequestFacade)requestH).getRealRequest();
Response response=request.getResponse();
// use internal APIs - we can avoid them,but it's easier and faster
int ... | public void service(HttpServletRequest requestH,
HttpServletResponse responseH)
throws ServletException, IOException
{
Request request=((HttpServletRequestFacade)requestH).getRealRequest();
Response response=request.getResponse();
// use internal APIs - we can avoid them,but it's easier and faster
int ... |
private IStatus openErrorDialog(String title, String msg, final ErrorInfo errorInfo) {
IWorkbench workbench = PlatformUI.getWorkbench();
//Abort on shutdown
if (workbench instanceof Workbench
&& ((Workbench) workbench).isClosing()) {
return Status.CANCEL_STATUS;
}
... | private IStatus openErrorDialog(String title, String msg, final ErrorInfo errorInfo) {
IWorkbench workbench = PlatformUI.getWorkbench();
//Abort on shutdown
if (workbench instanceof Workbench
&& ((Workbench) workbench).isClosing()) {
return Status.CANCEL_STATUS;
}
... |
private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
// need a minimum 1 char
if (start >= string.length) {
throw new IllegalArgumentException();
}
char c = string[start];
if (isVarArgs) {
switch (c) {
case C_ARRAY :
re... | private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
// need a minimum 1 char
if (start >= string.length) {
throw new IllegalArgumentException();
}
char c = string[start];
if (isVarArgs) {
switch (c) {
case C_ARRAY :
re... |
private static synchronized char[] scannedIdentifier(String id) {
if (id == null) {
return null;
}
String trimmed = id.trim();
if (!trimmed.equals(id)) {
return null;
}
try {
SCANNER.setSourceBuffer(id.toCharArray());
int token = SCANNER.getNextToken();
char[] currentIdentifier;
try {
currentIdenti... | private static synchronized char[] scannedIdentifier(String id) {
if (id == null) {
return null;
}
String trimmed = id.trim();
if (!trimmed.equals(id)) {
return null;
}
try {
SCANNER.setSource(id.toCharArray());
int token = SCANNER.getNextToken();
char[] currentIdentifier;
try {
currentIdentifier =... |
public void initGui() {
MainInterface.addressbookTreeModel = new AddressbookTreeModel(AddressbookConfig.get(
"tree").getElement("/tree"));
/*
MainInterface.addressbookModel =
new AddressbookFrameModel(
AddressbookConfig.get("option... | public void initGui() {
AddressbookInterface.addressbookTreeModel = new AddressbookTreeModel(AddressbookConfig.get(
"tree").getElement("/tree"));
/*
MainInterface.addressbookModel =
new AddressbookFrameModel(
AddressbookConfig.get(... |
public AST(Map options) {
Object value = options.get("org.eclipse.jdt.core.compiler.source"); //$NON-NLS-1$
if ("1.3".equals(value)) { //$NON-NLS-1$
// use a 1.3 scanner - treats assert as an identifier
this.scanner = new Scanner();
} else {
// use a 1.4 scanner - treats assert as an keyword
this.sca... | public AST(Map options) {
Object value = options.get("org.eclipse.jdt.core.compiler.source"); //$NON-NLS-1$
if ("1.3".equals(value)) { //$NON-NLS-1$
// use a 1.3 scanner - treats assert as an identifier
this.scanner = new Scanner();
} else {
// use a 1.4 scanner - treats assert as an keyword
this.sca... |
public SelectionScanner(long sourceLevel) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, sourceLevel, null /*taskTags*/, null/*taskPriorities*/);
}
| public SelectionScanner(long sourceLevel) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, sourceLevel, null /*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/);
}
|
private String encoding; // only useful if referenced in the source path
ClasspathDirectory(File directory, String encoding, int mode,
AccessRuleSet accessRuleSet, String destinationPath) {
super(accessRuleSet, destinationPath);
this.mode = mode;
this.path = directory.getAbsolutePath();
if (!this.path.endsWith(... | private String encoding; // only useful if referenced in the source path
ClasspathDirectory(File directory, String encoding, int mode,
AccessRuleSet accessRuleSet, String destinationPath) {
super(accessRuleSet, destinationPath);
this.mode = mode;
this.path = directory.getAbsolutePath();
if (!this.path.endsWith(... |
public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
scope.problemReporter().expressionShouldBeAVariable(this.lhs);
return null;
}
TypeBinding originalLhsType = lhs.resolveType(scope);
TypeBinding originalExpressionType... | public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
scope.problemReporter().expressionShouldBeAVariable(this.lhs);
return null;
}
TypeBinding originalLhsType = lhs.resolveType(scope);
TypeBinding originalExpressionType... |
private FieldDeclaration convert(SourceField fieldHandle, TypeDeclaration type, CompilationResult compilationResult) throws JavaModelException {
SourceFieldElementInfo fieldInfo = (SourceFieldElementInfo) fieldHandle.getElementInfo();
FieldDeclaration field = new FieldDeclaration();
int start = fieldInfo.getNa... | private FieldDeclaration convert(SourceField fieldHandle, TypeDeclaration type, CompilationResult compilationResult) throws JavaModelException {
SourceFieldElementInfo fieldInfo = (SourceFieldElementInfo) fieldHandle.getElementInfo();
FieldDeclaration field = new FieldDeclaration();
int start = fieldInfo.getNa... |
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 String getName() {
IDOMType topLevelType= null;
IDOMType firstType= null;
IDOMNode child= fFirstChild;
while (child != null) {
if (child.getNodeType() == IDOMNode.TYPE) {
IDOMType type= (IDOMType)child;
if (firstType == null) {
firstType= type;
}
if (Flags.isPublic(type.getFlags())) {
... | public String getName() {
IDOMType topLevelType= null;
IDOMType firstType= null;
IDOMNode child= fFirstChild;
while (child != null) {
if (child.getNodeType() == IDOMNode.TYPE) {
IDOMType type= (IDOMType)child;
if (firstType == null) {
firstType= type;
}
if (Flags.isPublic(type.getFlags())) {
... |
public ExternalJavaProject(IClasspathEntry[] rawClasspath) {
super(ResourcesPlugin.getWorkspace().getRoot().getProject(EXTERNAL_PROJECT_NAME), JavaModelManager.getJavaModelManager().getJavaModel());
try {
getPerProjectInfo().setClasspath(rawClasspath, defaultOutputLocation(), JavaModelStatus.VERIFIED_OK/*no .cl... | public ExternalJavaProject(IClasspathEntry[] rawClasspath) {
super(ResourcesPlugin.getWorkspace().getRoot().getProject(EXTERNAL_PROJECT_NAME), JavaModelManager.getJavaModelManager().getJavaModel());
try {
getPerProjectInfo().setClasspath(rawClasspath, defaultOutputLocation(), JavaModelStatus.VERIFIED_OK/*no .cl... |
public Object lookupData() {
return pluginHandler;
}
});
WizardModel model =
new DefaultWizardModel(
new Step[] { new PluginStep(data), new LocationStep(data)});
model.addWizardModelListener(new AddressbookImporter(data));
Wizard wizard =
new Wizard(
model,
AddressbookResourceLoader.... | public Object lookupData() {
return pluginHandler;
}
});
WizardModel model =
new DefaultWizardModel(
new Step[] { new PluginStep(data), new LocationStep(data)});
model.addWizardModelListener(new AddressbookImporter(data));
Wizard wizard =
new Wizard(
model,
AddressbookResourceLoader.... |
public Block getBody() {
if (this.body == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.body == null) {
preLazyInit();
this.body = new Block(this.ast);
postLazyInit(this.body, BODY_PROPERTY);
}
}
}
return this.body;
}
| public Block getBody() {
if (this.body == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.body == null) {
preLazyInit();
this.body = new Block(this.ast);
postLazyInit(this.body, BODY_PROPERTY);
}
}
}
return this.body;
}
|
public
void emitNoAppenderWarning(Category cat) {
// No appenders in hierarchy, warn user only once.
if(this.emittedNoAppenderWarning) {
LogLog.error("No appenders could be found for logger (" +
cat.getName() + ").");
LogLog.error("Please initialize the log4j system properly.");
this... | public
void emitNoAppenderWarning(Category cat) {
// No appenders in hierarchy, warn user only once.
if(!this.emittedNoAppenderWarning) {
LogLog.error("No appenders could be found for logger (" +
cat.getName() + ").");
LogLog.error("Please initialize the log4j system properly.");
thi... |
public ErrorNotificationDialog(Shell parentShell) {
super(parentShell);
setBlockOnOpen(false);
setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE | SWT.RESIZE);
}
| public ErrorNotificationDialog(Shell parentShell) {
super(parentShell == null ? ProgressManagerUtil.getDefaultParent() : parentShell);
setBlockOnOpen(false);
setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE | SWT.RESIZE);
}
|
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
return true;
}
if (match != null && (castType.isEnclosingTypeBoundParameterizedType() || expres... | public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
return true;
}
if (match != null && (!castType.isReifiable() || !expressionType.isReifiable()))... |
public void markNeedsSave() {
if (ProjectBrowser.TheInstance != null) {
Project p = ProjectBrowser.TheInstance.getProject();
if (p != null) {
p.setNeedsSave(true);
}
}
}
| public void markNeedsSave() {
if (ProjectBrowser.TheInstance != null) {
Project p = ProjectManager.getManager().getCurrentProject();
if (p != null) {
p.setNeedsSave(true);
}
}
}
|
protected boolean generateInfos(
OpenableElementInfo info,
IProgressMonitor pm,
Map newElements,
IResource underlyingResource) throws JavaModelException {
JavaModelManager.getJavaModelManager().putInfo(this, info);
// determine my children
IProject[] projects = this.getWorkspace().getRoot().getProjects();
for ... | protected boolean generateInfos(
OpenableElementInfo info,
IProgressMonitor pm,
Map newElements,
IResource underlyingResource) throws JavaModelException {
JavaModelManager.getJavaModelManager().putInfo(this, info);
// determine my children
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjec... |
public void recordReturnFrom(UnconditionalFlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
if (initsOnReturn == FlowInfo.DEAD_END) {
initsOnReturn = flowInfo.copy().unconditionalInits();
} else {
initsOnReturn.mergedWith(flowInfo.unconditionalInits());
}
}
}
| public void recordReturnFrom(FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
if (initsOnReturn == FlowInfo.DEAD_END) {
initsOnReturn = flowInfo.copy().unconditionalInits();
} else {
initsOnReturn.mergedWith(flowInfo.unconditionalInits());
}
}
}
|
public void doChangepassword(RunData data, TemplateContext context)
throws Exception
{
String template = getCurrentTemplate(data, null);
String nextTemplate = getNextTemplate(data, template);
IntakeTool intake = getIntakeTool(context);
if (intake.isAllValid())
... | public void doChangepassword(RunData data, TemplateContext context)
throws Exception
{
String template = getCurrentTemplate(data, null);
String nextTemplate = getNextTemplate(data, template);
IntakeTool intake = getIntakeTool(context);
if (intake.isAllValid())
... |
public void setVisible(boolean visible) {
throw new UnsupportedOperationException();
}
| public void setVisible(boolean visible) {
// Do nothing.
}
|
public String toString(int tab){
return tabString(tab) + "Recovered statement:\n" + statement.toString(tab + 1);
}
| public String toString(int tab){
return tabString(tab) + "Recovered statement:\n"/*nonNLS*/ + statement.toString(tab + 1);
}
|
public void locateMatches(String[] filePaths, IWorkspace workspace, org.eclipse.jdt.core.ICompilationUnit[] copies) throws JavaModelException {
if (SearchEngine.VERBOSE) {
System.out.println("Locating matches in files ["); //$NON-NLS-1$
for (int i = 0, length = filePaths.length; i < length; i++)
System.out.prin... | public void locateMatches(String[] filePaths, IWorkspace workspace, org.eclipse.jdt.core.ICompilationUnit[] copies) throws JavaModelException {
if (SearchEngine.VERBOSE) {
System.out.println("Locating matches in files ["); //$NON-NLS-1$
for (int i = 0, length = filePaths.length; i < length; i++)
System.out.prin... |
private void buildMoreCompletionContext(Expression expression) {
ASTNode parentNode = null;
int kind = topKnownElementKind(SELECTION_OR_ASSIST_PARSER);
if(kind != 0) {
// int info = topKnownElementInfo(SELECTION_OR_ASSIST_PARSER);
nextElement : switch (kind) {
case K_BETWEEN_CASE_AND_COLON :
if(this.expr... | private void buildMoreCompletionContext(Expression expression) {
ASTNode parentNode = null;
int kind = topKnownElementKind(SELECTION_OR_ASSIST_PARSER);
if(kind != 0) {
// int info = topKnownElementInfo(SELECTION_OR_ASSIST_PARSER);
switch (kind) {
case K_BETWEEN_CASE_AND_COLON :
if(this.expressionPtr > 0)... |
protected void closing(Object info) throws JavaModelException {
if (JavaModelManager.VERBOSE){
System.out.println("CLOSING Element ("+ Thread.currentThread()+"): " + this.getHandleIdentifier());
}
ClassFileInfo cfi = getClassFileInfo();
cfi.removeBinaryChildren();
}
| protected void closing(Object info) throws JavaModelException {
if (JavaModelManager.VERBOSE){
System.out.println("CLOSING Element ("+ Thread.currentThread()+"): " + this.getHandleIdentifier()); //$NON-NLS-1$//$NON-NLS-2$
}
ClassFileInfo cfi = getClassFileInfo();
cfi.removeBinaryChildren();
}
|
public UMLDiagram createDiagram(Object handle) {
if (!ModelFacade.isANamespace(handle)) {
cat.error("No namespace as argument");
cat.error(handle);
throw new IllegalArgumentException(
"The argument " + handle + "is not a namespace.");
}
MNa... | public UMLDiagram createDiagram(Object handle) {
if (!ModelFacade.isANamespace(handle)) {
cat.error("No namespace as argument");
cat.error(handle);
throw new IllegalArgumentException(
"The argument " + handle + "is not a namespace.");
}
MNa... |
public void append(LoggingEvent event) {
// Set the NDC and thread name for the calling thread as these
// LoggingEvent fields were not set at event creation time.
event.getNDC();
event.getThreadName();
// Get a copy of this thread's MDC.
event.getMDCCopy();
if (locationInfo) {
eve... | public void append(LoggingEvent event) {
// Set the NDC and thread name for the calling thread as these
// LoggingEvent fields were not set at event creation time.
event.getNDC();
event.getThreadName();
// Get a copy of this thread's MDC.
event.createProperties();
if (locationInfo) {
... |
protected TypeBinding findNextTypeBinding(int tokenIndex, Scope scope, PackageBinding packageBinding) {
try {
if (this.resolvedType == null) {
this.resolvedType = scope.getType(this.tokens[tokenIndex], packageBinding);
} else {
this.resolvedType = scope.getMemberType(this.tokens[tokenIndex], (... | protected TypeBinding findNextTypeBinding(int tokenIndex, Scope scope, PackageBinding packageBinding) {
try {
if (this.resolvedType == null) {
this.resolvedType = scope.getType(this.tokens[tokenIndex], packageBinding);
} else {
this.resolvedType = scope.getMemberType(this.tokens[tokenIndex], (... |
@Override public List<PotentialAssignment> getValueSources(Object test, ParameterSignature sig) {
List<PotentialAssignment> list = new ArrayList<PotentialAssignment>();
TestedOn testedOn = sig.getAnnotation(TestedOn.class);
int[] ints = testedOn.ints();
for (final int i : ints) {
list.add(PotentialAssignmen... | @Override public List<PotentialAssignment> getValueSources(ParameterSignature sig) {
List<PotentialAssignment> list = new ArrayList<PotentialAssignment>();
TestedOn testedOn = sig.getAnnotation(TestedOn.class);
int[] ints = testedOn.ints();
for (final int i : ints) {
list.add(PotentialAssignment.forValue(i)... |
public CreateVirtualFolderAction(FrameMediator frameMediator) {
super(frameMediator, MailResourceLoader.getString("menu", "mainframe",
"menu_folder_newvirtualfolder"));
// tooltip text
putValue(SHORT_DESCRIPTION, MailResourceLoader.getString("menu",
"mainframe", "menu_folder_newvirtualfolder")
.repl... | public CreateVirtualFolderAction(FrameMediator frameMediator) {
super(frameMediator, MailResourceLoader.getString("menu", "mainframe",
"menu_folder_newvirtualfolder"));
// tooltip text
putValue(SHORT_DESCRIPTION, MailResourceLoader.getString("menu",
"mainframe", "menu_folder_newvirtualfolder")
.repl... |
protected void verify(IJavaElement element) throws JavaModelException {
IJavaElement[] children = ((IRegion) fChildrenToRemove.get(element)).getElements();
for (int i = 0; i < children.length; i++) {
IJavaElement child = children[i];
if (child.getResource() != null)
error(IJavaModelStatusConstants.INVALI... | protected void verify(IJavaElement element) throws JavaModelException {
IJavaElement[] children = ((IRegion) fChildrenToRemove.get(element)).getElements();
for (int i = 0; i < children.length; i++) {
IJavaElement child = children[i];
if (child.getCorrespondingResource() != null)
error(IJavaModelStatusCon... |
public
void testHierarchy1() {
Hierarchy h = new Hierarchy(new RootCategory((Level) Level.ERROR));
Logger a0 = h.getLogger("a");
assertEquals("a", a0.getName());
assertNull(a0.getLevel());
assertSame(Level.ERROR, a0.getChainedLevel());
Logger a1 = h.getLogger("a");
assertSame(a0, a1);
... | public
void testHierarchy1() {
Hierarchy h = new Hierarchy(new RootCategory((Level) Level.ERROR));
Logger a0 = h.getLogger("a");
assertEquals("a", a0.getName());
assertNull(a0.getLevel());
assertSame(Level.ERROR, a0.getEffectiveLevel());
Logger a1 = h.getLogger("a");
assertSame(a0, a1);... |
private static int readDeprecatedStroke(IMemento memento) {
if (memento == null)
throw new NullPointerException();
Integer value = memento.getInteger("value"); //$NON-NLS-1$
return value != null ? value.intValue() : 0;
}
/**
* Reads the handler from XML, and creates a proxy to contain it. The prox... | private static int readDeprecatedStroke(IMemento memento) {
if (memento == null)
throw new NullPointerException();
Integer value = memento.getInteger("value"); //$NON-NLS-1$
return value != null ? value.intValue() : 0;
}
/**
* Reads the handler from XML, and creates a proxy to contain it. The prox... |
public void testSerializationWithException() throws Exception {
Logger root = Logger.getRootLogger();
Exception ex = new Exception("Don't panic");
LoggingEvent event = new LoggingEvent(root.getClass().getName(),
root, Level.INFO, "Hello, world.", ex);
event.prepareForDeferredPro... | public void testSerializationWithException() throws Exception {
Logger root = Logger.getRootLogger();
Exception ex = new Exception("Don't panic");
LoggingEvent event = new LoggingEvent(root.getClass().getName(),
root, Level.INFO, "Hello, world.", ex);
event.prepareForDeferredPro... |
public String toString() {
return Localizer.localize ("Tree", "Class->State Machine");
}
| public String toString() {
return Localizer.localize ("Tree", "misc.class.state-machine");
}
|
public static ClasspathLocation forBinaryFolder(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
return new ClasspathDirectory(binaryFolder, isOutputFolder, accessRuleSet);
}
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet) {
r... | public static ClasspathLocation forBinaryFolder(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
return new ClasspathDirectory(binaryFolder, isOutputFolder, accessRuleSet);
}
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet) {
r... |
public void setOutputType(String t ) {
GTest.setDefaultOutput(t);
}
| public void setOutputType(String t ) {
Report.setDefaultOutput(t);
}
|
protected void closing(Object info) throws JavaModelException {
// forget source attachment recommendations
Object[] children = ((JavaElementInfo)info).fChildren;
for (int i = 0, length = children.length; i < length; i++) {
Object child = children[i];
if (child instanceof JarPackageFragmentRoot){
((... | protected void closing(Object info) throws JavaModelException {
// forget source attachment recommendations
Object[] children = ((JavaElementInfo)info).children;
for (int i = 0, length = children.length; i < length; i++) {
Object child = children[i];
if (child instanceof JarPackageFragmentRoot){
((J... |
protected boolean commentParse() {
boolean validComment = true;
try {
// Init local variables
this.astLengthPtr = -1;
this.astPtr = -1;
this.identifierPtr = -1;
this.currentTokenType = -1;
this.inlineTagStarted = false;
this.inlineTagStart = -1;
this.lineStarted = false;
this.returnSt... | protected boolean commentParse() {
boolean validComment = true;
try {
// Init local variables
this.astLengthPtr = -1;
this.astPtr = -1;
this.identifierPtr = -1;
this.currentTokenType = -1;
this.inlineTagStarted = false;
this.inlineTagStart = -1;
this.lineStarted = false;
this.returnSt... |
protected void createPageControl(IPreferencePage page, Composite parent) {
if (page instanceof PreferencePage)
((PreferencePage) page).createControl(parent, true);
else
super.createPageControl(page, parent);
}
| protected void createPageControl(IPreferencePage page, Composite parent) {
if (page instanceof PreferencePage)
((PreferencePage) page).createControl(parent);
else
super.createPageControl(page, parent);
}
|
protected Control createDialogArea(Composite parent) {
Font font = parent.getFont();
// Run super.
Composite composite = (Composite)super.createDialogArea(parent);
// description
Label descLabel = new Label(composite, SWT.WRAP);
descLabel.setText(WorkbenchMessages.getString("SavePerspectiveDialog.description"));... | protected Control createDialogArea(Composite parent) {
Font font = parent.getFont();
// Run super.
Composite composite = (Composite)super.createDialogArea(parent);
// description
Label descLabel = new Label(composite, SWT.WRAP);
descLabel.setText(WorkbenchMessages.getString("SavePerspectiveDialog.description"));... |
private void makeActions() {
// The actions in jface do not have menu vs. enable, vs. disable vs. color
// There are actions in here being passed the workbench - problem
// Get services for notification.
IPartService partService = getWindow().getPartService();
WWinKeyBindingService keyBindingService =
... | private void makeActions() {
// The actions in jface do not have menu vs. enable, vs. disable vs. color
// There are actions in here being passed the workbench - problem
// Get services for notification.
IPartService partService = getWindow().getPartService();
WWinKeyBindingService keyBindingService =
... |
public void triggerLinkAt(int offset) {
// Check if there is a help link at the offset
for (int i = 0; i < helpRanges.length; i++){
if (offset >= helpRanges[i][0] && offset < helpRanges[i][0] + helpRanges[i][1]) {
// trigger the link
openHelpTopic(helpIds[i], helpHrefs[i]);
return;
}
}
// Check if the... | public void triggerLinkAt(int offset) {
// Check if there is a help link at the offset
for (int i = 0; i < helpRanges.length; i++){
if (offset >= helpRanges[i][0] && offset < helpRanges[i][0] + helpRanges[i][1]) {
// trigger the link
openHelpTopic(helpIds[i], helpHrefs[i]);
return;
}
}
// Check if the... |
//void clear();
/**********************************************************************
Copyright (c) 2002 IBM Corp. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Common Public License v0.5
which accompanies this distribution, and is available ... | //void clear();
/**********************************************************************
Copyright (c) 2002 IBM Corp. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Common Public License v0.5
which accompanies this distribution, and is available ... |
public SwitchPerspectiveSubmenu(IFrameMediator controller) {
super(controller, "Show View", ((DefaultFrameController) controller)
.getViewItem().get("id"));
String id = ((DefaultFrameController) getFrameMediator()).getViewItem()
.get("id");
// check if this is a management frame instance
// -> if so ... | public SwitchPerspectiveSubmenu(IFrameMediator controller) {
super(controller, "Window", ((DefaultFrameController) controller)
.getViewItem().get("id"));
String id = ((DefaultFrameController) getFrameMediator()).getViewItem()
.get("id");
// check if this is a management frame instance
// -> if so cre... |
public CompilationUnitVisitor(
INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory) {
super(environment, policy, settings, requestor, problemFactory);
}
| public CompilationUnitVisitor(
INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory) {
super(environment, policy, settings, requestor, problemFactory, true);
}
|
public void reportAccurateReference(
int sourceStart,
int sourceEnd,
char[][] qualifiedName,
IJavaElement element,
int[] accuracies,
boolean accuracyStartsOnFirstToken)
throws CoreException {
// compute source positions of the qualified reference
Scanner scanner = parser.scanner;
scanner.setSourc... | public void reportAccurateReference(
int sourceStart,
int sourceEnd,
char[][] qualifiedName,
IJavaElement element,
int[] accuracies,
boolean accuracyStartsOnFirstToken)
throws CoreException {
// compute source positions of the qualified reference
Scanner scanner = parser.scanner;
scanner.setSourc... |
public Profile getProfile() {
if(_profile == null) {
_profile = new ProfileJava();
}
return _profile;
}
| public Profile getProfile() {
if(_profile == null) {
_profile = ProfileJava.getInstance();
}
return _profile;
}
|
public void propertyChange(
PropertyChangeEvent propertyChangeEvent) {
String property = propertyChangeEvent.getProperty();
if (IAction.ENABLED.equals(property)
|| IAction.CHECKED.equals(property)
... | public void propertyChange(
PropertyChangeEvent propertyChangeEvent) {
String property = propertyChangeEvent.getProperty();
if (IAction.ENABLED.equals(property)
|| IAction.CHECKED.equals(property)
... |
public void test() {
PluginManager manager = new PluginManager();
manager.initPlugins();
}
| public void test() {
PluginManager manager = PluginManager.getInstance();
manager.initPlugins();
}
|
public PropPanelDependency() {
super("Dependency",_dependencyIcon, 2);
Class[] namesToWatch = { MStereotype.class,MNamespace.class,MDependency.class};
setNameEventListening(namesToWatch);
Class mclass = MDependency.class;
addCaption(Argo.localize("UMLMenu", "label.nam... | public PropPanelDependency() {
super("Dependency",_dependencyIcon, 2);
Class[] namesToWatch = { MStereotype.class,MNamespace.class,MDependency.class};
setNameEventListening(namesToWatch);
Class mclass = MDependency.class;
addCaption(Argo.localize("UMLMenu", "label.nam... |
public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
if (visitor.visit(this, scope)) {
if (this.memberValue != null) {
this.memberValue.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
} | public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.memberValue != null) {
this.memberValue.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
} |
public
String format(LoggingEvent event) {
sbuf.setLength(0);
sbuf.append(event.priority.toString());
sbuf.append(" - ");
sbuf.append(event.message);
sbuf.append(LINE_SEP);
return sbuf.toString();
}
| public
String format(LoggingEvent event) {
sbuf.setLength(0);
sbuf.append(event.priority.toString());
sbuf.append(" - ");
sbuf.append(event.getRenderedMessage());
sbuf.append(LINE_SEP);
return sbuf.toString();
}
|
public void putBoolean(String key, boolean value) {
checkRemoved();
if (key == null)
throw new NullPointerException();
String oldValue = null;
if (temporarySettings.containsKey(key))
oldValue = (String) temporarySettings.get(key);
else
oldValue = getOriginal().get(key, null);
String newValue = Boo... | public void putBoolean(String key, boolean value) {
checkRemoved();
if (key == null)
throw new NullPointerException();
String oldValue = null;
if (temporarySettings.containsKey(key))
oldValue = (String) temporarySettings.get(key);
else
oldValue = getOriginal().get(key, null);
String newValue = Str... |
private boolean checkAndTagAsMalformed(ASTNode node) {
boolean tagWithErrors = false;
search: for (int i = 0, max = this.problems.length; i < max; i++) {
IProblem problem = this.problems[i];
switch(problem.getID()) {
case IProblem.ParsingErrorOnKeywordNoSuggestion :
case IProblem.ParsingErrorOnKeywor... | private boolean checkAndTagAsMalformed(ASTNode node) {
boolean tagWithErrors = false;
search: for (int i = 0, max = this.problems.length; i < max; i++) {
IProblem problem = this.problems[i];
switch(problem.getID()) {
case IProblem.ParsingErrorOnKeywordNoSuggestion :
case IProblem.ParsingErrorOnKeywor... |
protected void readRegistry(IPluginRegistry registry, String pluginId, String extensionPoint) {
String pointId = pluginId + "-" + extensionPoint; //$NON-NLS-1$
IExtension[] extensions = (IExtension[])extensionPoints.get(pointId);
if (extensions == null) {
IExtensionPoint point = registry.getExtensionPoint(pluginI... | public void readRegistry(IPluginRegistry registry, String pluginId, String extensionPoint) {
String pointId = pluginId + "-" + extensionPoint; //$NON-NLS-1$
IExtension[] extensions = (IExtension[])extensionPoints.get(pointId);
if (extensions == null) {
IExtensionPoint point = registry.getExtensionPoint(pluginId, ... |
private void anonymousLogin(RunData data, ValveContext context)
{
try
{
ScarabUser user = (ScarabUser)TurbineSecurity.getAuthenticatedUser(username, password);
data.setUser(user);
user.setHasLoggedIn(Boolean.TRUE);
user.updateLastLogin();
... | private void anonymousLogin(RunData data, ValveContext context)
{
try
{
ScarabUser user = (ScarabUser)TurbineSecurity.getUser(username);
data.setUser(user);
user.setHasLoggedIn(Boolean.TRUE);
user.updateLastLogin();
data.save(); ... |
protected void indexFile(IDocument document) throws IOException {
// Add the name of the file to the index
output.addDocument(document);
// Create a new Parser
SourceIndexerRequestor requestor = new SourceIndexerRequestor(this, document);
SourceElementParser parser = new SourceElementParser(
requestor,
prob... | protected void indexFile(IDocument document) throws IOException {
// Add the name of the file to the index
output.addDocument(document);
// Create a new Parser
SourceIndexerRequestor requestor = new SourceIndexerRequestor(this, document);
SourceElementParser parser = new SourceElementParser(
requestor,
prob... |
protected StringBuffer print(StringBuffer output) {
output.append(", "); //$NON-NLS-1$
if (hasTypeArguments() && hasSignatures()) {
output.append("signature:\""); //$NON-NLS-1$
output.append(this.typeSignatures[0]);
output.append("\", "); //$NON-NLS-1$
}
switch(getMatchMode()) {
case R_EXACT_MATCH ... | protected StringBuffer print(StringBuffer output) {
output.append(", "); //$NON-NLS-1$
if (hasTypeArguments() && hasSignatures()) {
output.append("signature:\""); //$NON-NLS-1$
output.append(this.typeSignatures[0]);
output.append("\", "); //$NON-NLS-1$
}
switch(getMatchMode()) {
case R_EXACT_MATCH ... |
public void popTypeName(){
try {
enclosingTypeNames[depth--] = null;
} catch (ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
}
}
| public void popTypeName(){
try {
enclosingTypeNames[--depth] = null;
} catch (ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
}
}
|
public void testRemoveObject() throws Exception {
ContactModel c = new ContactModel();
c.setNickName("nickname");
Object uid = getSourceFolder().add(c);
getSourceFolder().remove(uid);
assertEquals("folder contact count == 0", 0, getSourceFolder().count());
}
| public void testRemoveObject() throws Exception {
ContactModel c = new ContactModel();
c.setNickName("nickname");
String uid = getSourceFolder().add(c);
getSourceFolder().remove(uid);
assertEquals("folder contact count == 0", 0, getSourceFolder().count());
}
|
public int getNodeType() {
return IF_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
IfStatement result = new IfStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.setE... | public int getNodeType() {
return IF_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
IfStatement result = new IfStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.set... |
public void restartTimer() {
// recreate name of menuitem
createName();
IDefaultItem item = null;
if (accountItem.isPopAccount()) {
XmlElement e = accountItem.getRoot().getElement("popserver");
item = new DefaultItem(e);
} else {
XmlElement e = accountItem.getRoot().getElement("imapserver");
it... | public void restartTimer() {
// recreate name of menuitem
createName();
IDefaultItem item = null;
if (accountItem.isPopAccount()) {
XmlElement e = accountItem.getRoot().getElement("popserver");
item = new DefaultItem(e);
} else {
XmlElement e = accountItem.getRoot().getElement("imapserver");
it... |
public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
ConfigurableOption[] settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, r... | public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
ConfigurableOption[] settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.