buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void setLeadingComment(String comment) {
if (comment != null) {
char[] source = comment.toCharArray();
Scanner scanner = new Scanner(true, true, false, false, false, null, null);
scanner.resetTo(0, source.length);
scanner.setSource(source);
try {
int token;
boolean onlyOneComment = fals... | public void setLeadingComment(String comment) {
if (comment != null) {
char[] source = comment.toCharArray();
Scanner scanner = this.getAST().scanner;
scanner.resetTo(0, source.length);
scanner.setSource(source);
try {
int token;
boolean onlyOneComment = false;
while ((token = scanner.getN... |
public int getNodeType() {
return INITIALIZER;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
Initializer result = new Initializer(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setModifiers(getModifiers());
result.s... | public int getNodeType() {
return INITIALIZER;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
Initializer result = new Initializer(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setModifiers(getModifiers());
result.s... |
public IToolBarManager getToolBarManager() {
// by pass the sub coolBar and use the real cool bar.
ICoolBarManager coolBarManager = getCastedParent().getCoolBarManager();
if (coolBarManager == null) { return null; }
if (toolBarContributionItem == null) {
IContributionIt... | public IToolBarManager getToolBarManager() {
// by pass the sub coolBar and use the real cool bar.
ICoolBarManager coolBarManager = getCastedParent().getCoolBarManager();
if (coolBarManager == null) { return null; }
if (toolBarContributionItem == null) {
IContributionIt... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
VariableDeclarationStatement(AST ast) {
super(ast);
if (ast.apiLevel >= AST.JLS3) {
this.modifiers = new ASTNode.NodeList(MODIFIERS2_PROPERTY);
}
}
/* (omit javadoc for this method)
* Method d... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
VariableDeclarationStatement(AST ast) {
super(ast);
if (ast.apiLevel >= AST.JLS3) {
this.modifiers = new ASTNode.NodeList(MODIFIERS2_PROPERTY);
}
}
/* (omit javadoc for this method)
* Method d... |
public void describeLayout(StringBuffer buf) {
IViewReference[] fastViews = getFastViews();
if (fastViews.length != 0) {
buf.append("fastviews ("); //$NON-NLS-1$
for (int idx = 0; idx < fastViews.length; idx++) {
IViewReference ref = fastViews[idx];
... | public void describeLayout(StringBuffer buf) {
IViewReference[] fastViews = getFastViews();
if (fastViews.length != 0) {
buf.append("fastviews ("); //$NON-NLS-1$
for (int idx = 0; idx < fastViews.length; idx++) {
IViewReference ref = fastViews[idx];
... |
public void actionPerformed(ActionEvent evt) {
ColumbaLogger.log.debug("start encryption...");
ComposerModel model = (ComposerModel) ((ComposerController) getFrameMediator()).getModel();
model.setEncryptMessage(getCheckBoxMenuItem().isSelected());
}
| public void actionPerformed(ActionEvent evt) {
ColumbaLogger.log.info("start encryption...");
ComposerModel model = (ComposerModel) ((ComposerController) getFrameMediator()).getModel();
model.setEncryptMessage(getCheckBoxMenuItem().isSelected());
}
|
public Any getClassifier(String name) {
Project p = ProjectBrowser.TheInstance.getProject();
if (target != null && target.getName() == name ) {
return new ArgoAny(target);
}
// else we have a problem: this is not clean!
else {
MClassifier classifier = p.findTypeInModel(name, p.ge... | public Any getClassifier(String name) {
Project p = ProjectBrowser.TheInstance.getProject();
if (target != null && target.getName().equals(name) ) {
return new ArgoAny(target);
}
// else we have a problem: this is not clean!
else {
MClassifier classifier = p.findTypeInModel(name,... |
public SendableMessage compose(WorkerStatusController workerStatusController)
throws IOException {
this.accountUid = model.getAccountItem().getUid();
workerStatusController.setDisplayText("Composing Message...");
MimeTreeRenderer renderer = MimeTreeRenderer.getInstance();
SendableMessage message = new Send... | public SendableMessage compose(WorkerStatusController workerStatusController)
throws Exception {
this.accountUid = model.getAccountItem().getUid();
workerStatusController.setDisplayText("Composing Message...");
MimeTreeRenderer renderer = MimeTreeRenderer.getInstance();
SendableMessage message = new Sendab... |
protected void buildSupertypes() {
IType focusType = this.getType();
if (focusType == null)
return;
// get generic type from focus type
IGenericType type;
try {
type = (IGenericType) ((JavaElement) focusType).getElementInfo();
} catch (JavaModelException e) {
// if the focus type is not present, o... | protected void buildSupertypes() {
IType focusType = getType();
if (focusType == null)
return;
// get generic type from focus type
IGenericType type;
try {
type = (IGenericType) ((JavaElement) focusType).getElementInfo();
} catch (JavaModelException e) {
// if the focus type is not present, or if ... |
public void finalizeProblems() {
if (this.suppressWarningsCount == 0) return;
int removed = 0;
CategorizedProblem[] problems = this.compilationResult.problems;
int problemCount = this.compilationResult.problemCount;
IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
CompilerOptions option... | public void finalizeProblems() {
if (this.suppressWarningsCount == 0) return;
int removed = 0;
CategorizedProblem[] problems = this.compilationResult.problems;
int problemCount = this.compilationResult.problemCount;
IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
CompilerOptions option... |
public static void main(String argv[]) {
if(argv.length != 2) {
Usage();
}
ProgramInit(argv);
double delta;
System.out.println();
for(int i = 0; i < CAT_ARRAY.length; i++) {
delta = SimpleMessage(CAT_ARRAY[i], SHORT_MSG, runLength);
System.out.println("Simple argum... | public static void main(String argv[]) {
if(argv.length != 2) {
Usage();
}
ProgramInit(argv);
double delta;
System.out.println();
for(int i = 0; i < CAT_ARRAY.length; i++) {
delta = SimpleMessage(CAT_ARRAY[i], SHORT_MSG, runLength);
System.out.println("Simple argum... |
protected boolean readElement(IConfigurationElement element) {
if (!element.getName().equals(IWorkbenchRegistryConstants.TAG_EDITOR)) {
return false;
}
String id = element.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
if (id == null) {
logMissingAttribute(element, IWork... | protected boolean readElement(IConfigurationElement element) {
if (!element.getName().equals(IWorkbenchRegistryConstants.TAG_EDITOR)) {
return false;
}
String id = element.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
if (id == null) {
logMissingAttribute(element, IWork... |
public UMLAction(String name, boolean global, boolean hasIcon) {
super(name);
if (hasIcon) {
Icon icon = Util.loadIconResource(name);
if (icon != null) putValue(Action.SMALL_ICON, icon);
else { System.out.println("icon not found: " + name); }
}
putValue(Action.SHORT_DESCRIPTION, name... | public UMLAction(String name, boolean global, boolean hasIcon) {
super(name);
if (hasIcon) {
Icon icon = Util.loadIconResource(name);
if (icon != null) putValue(Action.SMALL_ICON, icon);
else { System.out.println("icon not found: " + name); }
}
putValue(Action.SHORT_DESCRIPTION, name... |
public void execute(Worker worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
uids = r[0].getUids();
folder = (Folder) r[0].getFolder();
markVariant = r[0].getMarkVariant();
ColumbaLogger.log.debug("src=" + folder);
folder.markMessage(MessageNode.toUidArra... | public void execute(Worker worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
uids = r[0].getUids();
folder = (Folder) r[0].getFolder();
markVariant = r[0].getMarkVariant();
ColumbaLogger.log.debug("src=" + folder);
folder.markMessage(r[0].getUids(), markV... |
protected void executeOperation() throws JavaModelException {
if (this.progressMonitor != null) {
if (this.progressMonitor.isCanceled())
throw new OperationCanceledException();
this.progressMonitor.beginTask(Messages.element_reconciling, 2);
}
CompilationUnit workingCopy = getWorkingCopy();
IProb... | protected void executeOperation() throws JavaModelException {
if (this.progressMonitor != null) {
if (this.progressMonitor.isCanceled())
throw new OperationCanceledException();
this.progressMonitor.beginTask(Messages.element_reconciling, 2);
}
CompilationUnit workingCopy = getWorkingCopy();
IProb... |
public void traverse(IAbstractSyntaxTreeVisitor visitor, MethodScope scope) {
if (visitor.visit(this, scope)) {
block.traverse(visitor, scope);
}
visitor.visit(this, scope);
}
| public void traverse(IAbstractSyntaxTreeVisitor visitor, MethodScope scope) {
if (visitor.visit(this, scope)) {
block.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
|
protected static String
byteArrayToString(byte [] array, boolean quote) {
StringBuffer sb = new StringBuffer();
if (quote)
sb.append('"');
for (int i = 0; i < array.length; i++) {
int b = array[i] & 0xFF;
if (b < 0x20 || b >= 0x7f) {
sb.append('\\');
sb.append(byteFormat.format(b));
} else if (b == '"'... | protected static String
byteArrayToString(byte [] array, boolean quote) {
StringBuffer sb = new StringBuffer();
if (quote)
sb.append('"');
for (int i = 0; i < array.length; i++) {
int b = array[i] & 0xFF;
if (b < 0x20 || b >= 0x7f) {
sb.append('\\');
sb.append(byteFormat.format(b));
} else if (b == '"'... |
public MethodPattern(
boolean findDeclarations,
boolean findReferences,
char[] selector,
char[] declaringQualification,
char[] declaringSimpleName,
char[] returnQualification,
char[] returnSimpleName,
String returnSignature,
char[][] parameterQualifications,
char[][] parameterSimpleNames,
String[] parame... | public MethodPattern(
boolean findDeclarations,
boolean findReferences,
char[] selector,
char[] declaringQualification,
char[] declaringSimpleName,
char[] returnQualification,
char[] returnSimpleName,
String returnSignature,
char[][] parameterQualifications,
char[][] parameterSimpleNames,
String[] parame... |
protected void executeOperation() throws JavaModelException {
beginTask(getMainTaskName(), getMainAmountOfWork());
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
generateNewCompilationUnitDOM(unit);
if (fCreationOccurred) {
//a change has really occurred
Buffer bu... | protected void executeOperation() throws JavaModelException {
beginTask(getMainTaskName(), getMainAmountOfWork());
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
generateNewCompilationUnitDOM(unit);
if (fCreationOccurred) {
//a change has really occurred
Buffer bu... |
public IJavaElement findCorrespondingElement(IJavaElement element) {
ArrayList children = new ArrayList();
while (element != null && element.getElementType() != IJavaElement.COMPILATION_UNIT) {
children.add(element);
element = element.getParent();
}
if (element == null) return null;
IJavaElement currentElement... | public IJavaElement findCorrespondingElement(IJavaElement element) {
ArrayList children = new ArrayList();
while (element != null && element.getElementType() != IJavaElement.COMPILATION_UNIT) {
children.add(element);
element = element.getParent();
}
if (element == null) return null;
IJavaElement currentElement... |
public GlobalOptionsAction(AbstractFrameController controller) {
super(
controller,
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_edit_generaloptions"));
setLongDescription(
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_edit_generaloptions_tooltip"));
setS... | public GlobalOptionsAction(AbstractFrameController controller) {
super(
controller,
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_edit_generaloptions"));
setTooltipText(
MailResourceLoader.getString(
"menu",
"mainframe",
"menu_edit_generaloptions_tooltip"));
setSmall... |
public String getMessage() {
Throwable exception = getException();
if (exception == null) {
switch (getCode()) {
case CORE_EXCEPTION :
return Messages.status_coreException;
case BUILDER_INITIALIZATION_ERROR:
return Messages.build_initializationError;
case BUILDER_SERIALIZATION_ERROR:
... | public String getMessage() {
Throwable exception = getException();
if (exception == null) {
switch (getCode()) {
case CORE_EXCEPTION :
return Messages.status_coreException;
case BUILDER_INITIALIZATION_ERROR:
return Messages.build_initializationError;
case BUILDER_SERIALIZATION_ERROR:
... |
private String getPluginId(IConfigurationElement configurationElement) {
String pluginId = null;
if (configurationElement != null) {
IExtension extension = configurationElement.getDeclaringExtension();
if (extension != null)
pluginId = extension.getParentIdentifier();
}
return pluginId;
}
| private String getPluginId(IConfigurationElement configurationElement) {
String pluginId = null;
if (configurationElement != null) {
IExtension extension = configurationElement.getDeclaringExtension();
if (extension != null)
pluginId = extension.getNamespace();
}
return pluginId;
}
|
public MarkMessageAsSpamAction(FrameMediator frameController) {
super(frameController, "Mark Message as Spam");
// tooltip text
setTooltipText("Mark selected messages as Spam");
setEnabled(false);
(
(
AbstractMailFrameController) frameController)
.registerTableSelectionListener(
this);
}
| public MarkMessageAsSpamAction(FrameMediator frameController) {
super(frameController, "Mark Message as Spam");
// tooltip text
putValue(SHORT_DESCRIPTION, "Mark selected messages as Spam");
setEnabled(false);
(
(
AbstractMailFrameController) frameController)
.registerTableSelectionListener(
... |
public IPackageFragmentRoot getPackageFragmentRoot(IPath path) {
IResource resource = null;
if (!path.isAbsolute() || (resource = getProject().getWorkspace().getRoot().findMember(path)) != null) {
if (resource != null){
return getPackageFragmentRoot(resource);
}
if (path.segmentCount() > 0) {
... | public IPackageFragmentRoot getPackageFragmentRoot(IPath path) {
IResource resource = null;
if (!path.isAbsolute() || (resource = getProject().getWorkspace().getRoot().findMember(path)) != null) {
if (resource != null){
return getPackageFragmentRoot(resource);
}
if (path.segmentCount() > 0) {
... |
private String disassemble(IVerificationTypeInfo[] infos, int mode) {
StringBuffer buffer = new StringBuffer();
buffer.append('{');
for (int i = 0, max = infos.length; i < max; i++) {
if(i != 0) buffer.append(", "); //$NON-NLS-1$
switch(infos[i].getTag()) {
case IVerificationTypeInfo.ITEM_DOUBLE :
... | private String disassemble(IVerificationTypeInfo[] infos, int mode) {
StringBuffer buffer = new StringBuffer();
buffer.append('{');
for (int i = 0, max = infos.length; i < max; i++) {
if(i != 0) buffer.append(", "); //$NON-NLS-1$
switch(infos[i].getTag()) {
case IVerificationTypeInfo.ITEM_DOUBLE :
... |
public void save(DBConnection dbcon)
throws Exception
{
if ( isModified() && !getIssue().isTemplate() )
{
checkTransaction("Cannot save a value outside a Transaction");
// Save activity record
Activity activity = new Activity();
String des... | public void save(DBConnection dbcon)
throws Exception
{
if ( isModified())
{
checkTransaction("Cannot save a value outside a Transaction");
// Save activity record
Activity activity = new Activity();
String desc = getActivityDescription();
... |
public boolean select(Viewer viewer, Object parentElement, Object element) {
Object[] children = ((ITreeContentProvider) ((AbstractTreeViewer) viewer)
.getContentProvider()).getChildren(element);
if (children.length > 0)
return filter(viewer, element, children).length > 0... | public boolean select(Viewer viewer, Object parentElement, Object element) {
Object[] children = ((ITreeContentProvider) ((AbstractTreeViewer) viewer)
.getContentProvider()).getChildren(element);
if ((children != null) && (children.length > 0))
return filter(viewer, eleme... |
public void handle(final StatusAdapter statusAdapter, int style) {
if ((style & StatusManager.SHOW) == StatusManager.SHOW) {
StatusNotificationManager.getInstance().addError(
statusAdapter.getStatus(), null);
}
if ((style & StatusManager.LOG) == StatusManager.LOG) {
StatusManager.getManager().addLogg... | public void handle(final StatusAdapter statusAdapter, int style) {
if ((style & StatusManager.SHOW) == StatusManager.SHOW) {
StatusNotificationManager.getInstance().addError(
statusAdapter);
}
if ((style & StatusManager.LOG) == StatusManager.LOG) {
StatusManager.getManager().addLoggedStatus(
sta... |
public void rollover() {
// Note: synchronization not necessary since doAppend is already synched
// make sure to close the hereto active log file!!
this.closeFile();
activeFile = new File(fileName);
rollingPolicy.rollover(activeFile);
try {
// This will also close the file. This is OK... | public void rollover() {
// Note: synchronization not necessary since doAppend is already synched
// make sure to close the hereto active log file!!
this.closeFile();
activeFile = new File(fileName);
rollingPolicy.rollover();
try {
// This will also close the file. This is OK since mul... |
public String toStringExpression(int tab) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < tokens.length; i++) {
buffer.append(tokens[i]);
if (i < (tokens.length - 1)) {
buffer.append("."); //$NON-NLS-1$
}
}
return buffer.toString();
}
| public String toStringExpression(int tab) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < tokens.length; i++) {
buffer.append(tokens[i]);
if (i < (tokens.length - 1)) {
buffer.append("."/*nonNLS*/);
}
}
return buffer.toString();
}
|
public String toString() {
return "ProblemDetail("/*nonNLS*/ + getMessage() + ")"/*nonNLS*/;
}
| public String toString() {
return "ProblemDetail(" + getMessage() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
|
public void addInterceptor(ContextManager cm, Context ctx,
BaseInterceptor module)
throws TomcatException
{
// checkHooks(cm, ctx, module);
if( this != module ) return;
setupHookFinder();
XmlMapper xh=new XmlMapper();
xh.setDebug( debug );
xh.addRule( "ContextManager", xh.setProperties() );
se... | public void addInterceptor(ContextManager cm, Context ctx,
BaseInterceptor module)
throws TomcatException
{
// checkHooks(cm, ctx, module);
if( this != module ) return;
setupHookFinder();
XmlMapper xh=new XmlMapper();
xh.setDebug( debug );
xh.addRule( "ContextManager", xh.setProperties() );
se... |
private int decodeElementValue(int offset) {
int readOffset = offset;
int tag = u1At(readOffset);
readOffset++;
switch(tag) {
case 'B' :
case 'C' :
case 'D' :
case 'F' :
case 'I' :
case 'J' :
case 'S' :
case 'Z' :
case 's' :
readOffset += 2;
break;
case 'e' :
readOffset += 4;
break;
... | private int decodeElementValue(int offset) {
int readOffset = offset;
int tag = u1At(readOffset);
readOffset++;
switch(tag) {
case 'B' :
case 'C' :
case 'D' :
case 'F' :
case 'I' :
case 'J' :
case 'S' :
case 'Z' :
case 's' :
readOffset += 2;
break;
case 'e' :
readOffset += 4;
break;
... |
public
NXTRecord(Name name, int dclass, long ttl, Name next, BitSet bitmap) {
this(name, dclass, ttl);
if (!next.isAbsolute())
throw new RelativeNameException(next);
this.next = next;
this.bitmap = bitmap;
}
Record
rrFromWire(Name name, int type, int dclass, long ttl, int length,
DataByteInputStream in)
thro... | public
NXTRecord(Name name, int dclass, long ttl, Name next, BitSet bitmap) {
this(name, dclass, ttl);
if (!next.isAbsolute())
throw new RelativeNameException(next);
this.next = next;
this.bitmap = bitmap;
}
Record
rrFromWire(Name name, int type, int dclass, long ttl, int length,
DataByteInputStream in)
thro... |
public SourceJavadocParser(Parser sourceParser) {
super(sourceParser);
this.kind = SOURCE_PARSER;
}
| public SourceJavadocParser(Parser sourceParser) {
super(sourceParser);
this.kind = SOURCE_PARSER | TEXT_PARSE | TEXT_VERIF;
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// here requires to generate a sequence of finally blocks invocations depending corresponding
// to each of the traversed try statements, so that execution will terminate properly.
// lookup the label, thi... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// here requires to generate a sequence of finally blocks invocations depending corresponding
// to each of the traversed try statements, so that execution will terminate properly.
// lookup the label, thi... |
protected void findSourceFiles(IResourceDelta sourceDelta, int segmentCount) throws CoreException {
// When a package becomes a type or vice versa, expect 2 deltas,
// one on the folder & one on the source file
IResource resource = sourceDelta.getResource();
IPath location = resource.getLocation();
switch(resource... | protected void findSourceFiles(IResourceDelta sourceDelta, int segmentCount) throws CoreException {
// When a package becomes a type or vice versa, expect 2 deltas,
// one on the folder & one on the source file
IResource resource = sourceDelta.getResource();
IPath location = resource.getLocation();
switch(resource... |
public int computeTriggeringPeriod(String datePattern) {
RollingCalendar rollingCalendar =
new RollingCalendar(GMT_TIMEZONE, Locale.ENGLISH);
// set sate to 1970-01-01 00:00:00 GMT
Date epoch = new Date(0);
if (datePattern != null) {
for (int i = TOP_OF_SECOND; i <= TOP_OF_MONTH; i++) {
... | public int computeTriggeringPeriod(String datePattern) {
RollingCalendar rollingCalendar =
new RollingCalendar(GMT_TIMEZONE, Locale.getDefault());
// set sate to 1970-01-01 00:00:00 GMT
Date epoch = new Date(0);
if (datePattern != null) {
for (int i = TOP_OF_SECOND; i <= TOP_OF_MONTH; i+... |
public void testNamespace() {
Object o = getFactory().create(Uml.USE_CASE);
assertNotNull("Didn't create object", o);
assertTrue("Should be a base", ModelFacade.isABase(o));
assertTrue("Should be a use case", ModelFacade.isAUseCase(o));
runTruthTests(o);
}
| public void testNamespace() {
Object o = ModelFacade.getFacade().create(Uml.USE_CASE);
assertNotNull("Didn't create object", o);
assertTrue("Should be a base", ModelFacade.isABase(o));
assertTrue("Should be a use case", ModelFacade.isAUseCase(o));
runTruthTests(o);
}
|
public String toString() {
// don't use append(char[]) due to JDK1.2 problems
return new StringBuffer("CompilationUnit(").append(getFileName()).append(")").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
// don't use append(char[]) due to JDK1.2 problems
return new StringBuffer("CompilationUnit("/*nonNLS*/).append(getFileName()).append(")"/*nonNLS*/).toString();
}
|
public void updateComponents(boolean b) {
if (b) {
XmlElement options = MailConfig.getInstance().get("options").getElement("/options");
XmlElement gui = options.getElement("gui");
XmlElement messageviewer = gui.getElement("messageviewer");
if (messageviewer... | public void updateComponents(boolean b) {
if (b) {
XmlElement options = MailConfig.getInstance().get("options").getElement("/options");
XmlElement gui = options.getElement("gui");
XmlElement messageviewer = gui.getElement("messageviewer");
if (messageviewer... |
public IJavaElement[] getVisibleElements(String typeSignature) {
if (this.assistScope == null) return new IJavaElement[0];
if (!this.hasComputedVisibleElementBindings) {
computeVisibleElementBindings();
}
TypeBinding assignableTypeBinding = null;
if (typeSignature != null) {
assignableTypeBinding = g... | public IJavaElement[] getVisibleElements(String typeSignature) {
if (this.assistScope == null) return new IJavaElement[0];
if (!this.hasComputedVisibleElementBindings) {
computeVisibleElementBindings();
}
TypeBinding assignableTypeBinding = null;
if (typeSignature != null) {
assignableTypeBinding = g... |
public void openWithUserDefinedProgram() throws CoreException {
// We need to determine if the command refers to a program in the plugin
// install directory. Otherwise we assume the program is on the path.
String programFileName = null;
IConfigurationElement configurationElement = descriptor.getConfigurationEleme... | public void openWithUserDefinedProgram() throws CoreException {
// We need to determine if the command refers to a program in the plugin
// install directory. Otherwise we assume the program is on the path.
String programFileName = null;
IConfigurationElement configurationElement = descriptor.getConfigurationEleme... |
public void handleCommandLineParameters(CommandLine commandLine) {
if (commandLine.hasOption("addressbook")) {
try {
FrameManager.getInstance().openView("Addressbook");
Main.getInstance().setRestoreLastSession(false);
} catch (PluginLoadingFailedException e) {
LOG.severe(e.getLocalizedMessage());
... | public void handleCommandLineParameters(CommandLine commandLine) {
if (commandLine.hasOption("addressbook")) {
try {
FrameManager.getInstance().openView("Addressbook");
ColumbaCmdLineParser.getInstance().setRestoreLastSession(false);
} catch (PluginLoadingFailedException e) {
LOG.severe(e.getLocal... |
private OverlayCache overlayCache = new OverlayCache();
LightweightDecoratorManager(LightweightDecoratorDefinition[] definitions) {
super();
lightweightDefinitions = definitions;
}
/**
* Get the lightweight definitions for the receiver.
* @return LightweightDecoratorDefinition[]
*/
LightweightDecorator... | private OverlayCache overlayCache = new OverlayCache();
LightweightDecoratorManager(LightweightDecoratorDefinition[] definitions) {
super();
lightweightDefinitions = definitions;
}
/**
* Get the lightweight definitions for the receiver.
* @return LightweightDecoratorDefinition[]
*/
LightweightDecorator... |
public
dnsCNAMERecord(dnsName _name, short _dclass, int _ttl, StringTokenizer st)
throws IOException
| public
dnsCNAMERecord(dnsName _name, short _dclass, int _ttl, MyStringTokenizer st)
throws IOException
|
private int getInsertionIndex(ContributionManager mgr, String location) {
MenuLocationURI uri = new MenuLocationURI(location);
String query = uri.getQuery();
int additionsIndex = -1;
// No Query means 'after=additions' (if ther) or
// the end of the menu
if (query.length() == 0 || query.equals("after=add... | private int getInsertionIndex(ContributionManager mgr, String location) {
MenuLocationURI uri = new MenuLocationURI(location);
String query = uri.getQuery();
int additionsIndex = -1;
// No Query means 'after=additions' (if ther) or
// the end of the menu
if (query.length() == 0 || query.equals("after=add... |
public static Test suite() {
TestSuite suite =
new TestSuite("Test for org.columba.modules.mail.parser");
//$JUnit-BEGIN$
suite.addTest(new TestSuite(Imap4ParserTest.class));
//$JUnit-END$
return suite;
}
| public static Test suite() {
TestSuite suite =
new TestSuite("Test for org.columba.modules.mail.parser");
//$JUnit-BEGIN$
suite.addTest(new TestSuite(UIDParserTest.class));
//$JUnit-END$
return suite;
}
|
public Object getValueAt(int row, int col) {
if (row < 0 || row >= _rowObjects.size()) return "bad row!";
if (col < 0 || col >= 4) return "bad col!";
Object rowObj = _rowObjects.elementAt(row);
if (rowObj instanceof Diagram) {
Diagram d = (Diagram) rowObj;
switch (col) {
case 0:
if ... | public Object getValueAt(int row, int col) {
if (row < 0 || row >= _rowObjects.size()) return "bad row!";
if (col < 0 || col >= 4) return "bad col!";
Object rowObj = _rowObjects.elementAt(row);
if (rowObj instanceof Diagram) {
Diagram d = (Diagram) rowObj;
switch (col) {
case 0:
if ... |
public String toStringExpression() {
/* slow speed */
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < tokens.length; i++) {
buffer.append(tokens[i]);
if (i < (tokens.length - 1)) {
buffer.append("."); //$NON-NLS-1$
}
}
return buffer.toString();
}
| public String toStringExpression() {
/* slow speed */
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < tokens.length; i++) {
buffer.append(tokens[i]);
if (i < (tokens.length - 1)) {
buffer.append("."/*nonNLS*/);
}
}
return buffer.toString();
}
|
public String getKey(boolean forceOpen) throws JavaModelException {
return getKey(this, org.eclipse.jdt.internal.compiler.lookup.Binding.USE_ACCESS_FLAGS_IN_BINDING_KEY/*with access flags*/, forceOpen);
}
| public String getKey(boolean forceOpen) throws JavaModelException {
return getKey(this, true/*with access flags*/, forceOpen);
}
|
public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
} | public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
} |
public PrintMessageCommand(ICommandReference reference, Charset charset) {
super(reference);
this.charset = charset;
// Header
cParagraph columbaParagraph = new cParagraph();
columbaParagraph.setText("The Columba Project");
columbaParagraph.setColor(Color.lightGray);... | public PrintMessageCommand(ICommandReference reference, Charset charset) {
super(reference);
this.charset = charset;
// Header
cParagraph columbaParagraph = new cParagraph();
columbaParagraph.setText("The Columba Project");
columbaParagraph.setColor(Color.lightGray);... |
private void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
if ((this.binding.isPrivate()/* || (this.binding.tagBits & (TagBits.IsAnonymousType|TagBits.IsLocalType)) == TagBits.IsLocalType*/) && !this.binding.isUsed()) {
if (!this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) ... | private void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
if ((this.binding.isPrivate() || (this.binding.tagBits & (TagBits.IsAnonymousType|TagBits.IsLocalType)) == TagBits.IsLocalType) && !this.binding.isUsed()) {
if (!this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
if (!project.isOpen())
return COMPLETE; // nothing to do
IIndex index = manager.getIndex(project.getFullPath(), true /*reuse index file*/, true /*create if none*/);
i... | public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
if (!project.isOpen())
return COMPLETE; // nothing to do
IIndex index = manager.getIndex(project.getFullPath(), true /*reuse index file*/, true /*create if none*/);
i... |
public void createControl(Composite parent, Color color) {
IPreferenceNode node = (IPreferenceNode) getElement();
gradientColor = color;
control = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = 0;
con... | public void createControl(Composite parent, Color color) {
IPreferenceNode node = (IPreferenceNode) getElement();
gradientColor = color;
control = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = 0;
con... |
public String toString(){
return "FirstWordInBlock: "/*nonNLS*/ + new String(word) + ", blockNum: "/*nonNLS*/ + blockNum;
}
}
| public String toString(){
return "FirstWordInBlock: " + new String(word) + ", blockNum: " + blockNum; //$NON-NLS-1$ //$NON-NLS-2$
}
}
|
public String
toString() {
StringBuffer sb = toStringNoData();
if (host != null) {
sb.append(host);
sb.append(" ");
sb.append(admin);
sb.append(" (\n\t\t\t\t\t");
sb.append(serial);
sb.append("\t; serial\n\t\t\t\t\t");
sb.append(refresh);
sb.append("\t; refresh\n\t\t\t\t\t");
sb.append(retry);
sb.... | public String
toString() {
StringBuffer sb = toStringNoData();
if (host != null) {
sb.append(host);
sb.append(" ");
sb.append(admin);
sb.append(" (\n\t\t\t\t\t");
sb.append(serial);
sb.append("\t; serial\n\t\t\t\t\t");
sb.append(refresh);
sb.append("\t; refresh\n\t\t\t\t\t");
sb.append(retry);
sb.... |
private void setCoolItemSize(final CoolItem coolItem) {
// there is no coolItem when the bar is on the left
if (currentLocation == LEFT)
return;
ToolBar toolbar = perspectiveBar.getControl();
if (toolbar == null)
return;
int rowHeight = 0;
To... | private void setCoolItemSize(final CoolItem coolItem) {
// there is no coolItem when the bar is on the left
if (currentLocation == LEFT)
return;
ToolBar toolbar = perspectiveBar.getControl();
if (toolbar == null)
return;
int rowHeight = 0;
To... |
public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Project p = pb.getProject();
Object target = pb.getDetailsTarget();
if (!(target instanceof MClassifier)) return;
MClassifier cls = (MClassifier) target;
MAttribute attr = UmlFactory.getFactory().getCore().buildAttr... | public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Project p = pb.getProject();
Object target = pb.getDetailsTarget();
if (!(target instanceof MClassifier)) return;
MClassifier cls = (MClassifier) target;
MAttribute attr = UmlFactory.getFactory().getCore().buildAttr... |
int UnnecessaryNLSTag = Internal + 265;
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
... | int UnnecessaryNLSTag = Internal + 265;
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
... |
public void add(IExtensionDelta delta) {
IExtensionPoint extPt = delta.getExtensionPoint();
IExtension ext = delta.getExtension();
// Get the name of the plugin that is adding this extension. The
// name of the plugin that adds the extension point is us.
String pluginId = ext.getDeclaringPluginDescriptor().... | public void add(IExtensionDelta delta) {
IExtensionPoint extPt = delta.getExtensionPoint();
IExtension ext = delta.getExtension();
// Get the name of the plugin that is adding this extension. The
// name of the plugin that adds the extension point is us.
String pluginId = ext.getNamespace();
add(buildNewC... |
private int getTypeArguments(ParameterizedQualifiedTypeReference typeReference) {
TypeReference[][] typeArguments = typeReference.typeArguments;
int value = 0;
for (int i = 0, max = typeArguments.length; i < max; i++) {
if ((typeArguments[i] != null) || (value != 0)) {
value++;
}
}
return value;
}... | private int getTypeArguments(ParameterizedQualifiedTypeReference typeReference) {
TypeReference[][] typeArguments = typeReference.typeArguments;
int value = 0;
for (int i = 0, max = typeArguments.length; i < max; i++) {
if ((typeArguments[i] != null) || (value != 0)) {
value++;
}
}
return value;
}... |
public final int kind() {
return PACKAGE;
}
| public final int kind() {
return Binding.PACKAGE;
}
|
public interface ICategoryDefinition extends Comparable {
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Pub... | public interface ICategoryDefinition extends Comparable {
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Pub... |
public AboutAction(IWorkbenchWindow window) {
this.workbenchWindow = window;
AboutInfo aboutInfo = ((Workbench) PlatformUI.getWorkbench()).getAboutInfo();
String productName = aboutInfo.getProductName();
if (productName == null) {
productName = ""; //$NON-NLS$
}
setText(WorkbenchMessages.format("AboutAction.tex... | public AboutAction(IWorkbenchWindow window) {
this.workbenchWindow = window;
AboutInfo aboutInfo = ((Workbench) PlatformUI.getWorkbench()).getConfigurationInfo().getAboutInfo();
String productName = aboutInfo.getProductName();
if (productName == null) {
productName = ""; //$NON-NLS$
}
setText(WorkbenchMessages.... |
public RequestDispatcher getRequestDispatcher(String path) {
if (path == null)
return null;
if (! path.startsWith("/")) {
// The original implementation returned that RD relative
// to lookupPath, which is RequestPath + PathInfo
String pI= request.getPathInfo();
if( pI == null )
... | public RequestDispatcher getRequestDispatcher(String path) {
if (path == null)
return null;
if (! path.startsWith("/")) {
// The original implementation returned that RD relative
// to lookupPath, which is RequestPath + PathInfo
String pI= request.getPathInfo();
if( pI == null )
... |
protected ActionSaveGraphics() {
super( "Save Graphics...", NO_ICON);
}
| protected ActionSaveGraphics() {
super( "action.save-graphics", NO_ICON);
}
|
public HumanResourcesExample() {
try {
model = new Model("default");
personClass = new MMClass("Person");
companyClass = new MMClass("Company");
deptClass = new MMClass("Deptartment");
at1 = new Attribute("birthdate");
at2 = new Attribute("age");
at2.addStereotype(Stereo... | public HumanResourcesExample() {
try {
model = new Model("HumanResourcesExample");
personClass = new MMClass("Person");
companyClass = new MMClass("Company");
deptClass = new MMClass("Deptartment");
at1 = new Attribute("birthdate");
at2 = new Attribute("age");
at2.addSte... |
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... |
public IAdaptable createElement(IMemento memento) {
// Get the feature id.
String featureId = memento.getString(WelcomeEditorInput.FEATURE_ID);
if (featureId == null)
return null;
AboutInfo info = null;
AboutInfo [] infos =
((Workbench)(WorkbenchPlugin.getDefault().getWorkbench())).getFeaturesInfo();
for (... | public IAdaptable createElement(IMemento memento) {
// Get the feature id.
String featureId = memento.getString(WelcomeEditorInput.FEATURE_ID);
if (featureId == null)
return null;
AboutInfo info = null;
AboutInfo [] infos =
((Workbench)(WorkbenchPlugin.getDefault().getWorkbench())).getConfigurationInfo().ge... |
public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
/* do not consider a type starting passed the type end (if set)
it must be belonging to an enclosing type */
if (methodDeclaration.declarationSourceEnd != 0
&& typeDeclaration.declarationSourceStart > methodDeclaration.decla... | public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
/* do not consider a type starting passed the type end (if set)
it must be belonging to an enclosing type */
if (methodDeclaration.declarationSourceEnd != 0
&& typeDeclaration.declarationSourceStart > methodDeclaration.decla... |
public TypeBinding resolveType(BlockScope scope) {
// it can be a package, type, member type, local variable or field
binding = scope.getBinding(token, VARIABLE | TYPE | PACKAGE, this);
if (!binding.isValidBinding()) {
if (binding instanceof ProblemFieldBinding) {
// tolerate some error cases
if (binding.pro... | public TypeBinding resolveType(BlockScope scope) {
// it can be a package, type, member type, local variable or field
binding = scope.getBinding(token, VARIABLE | TYPE | PACKAGE, this, true /*resolve*/);
if (!binding.isValidBinding()) {
if (binding instanceof ProblemFieldBinding) {
// tolerate some error cases
... |
public SimpleName getName() {
if (this.methodName == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.methodName == null) {
preLazyInit();
this.methodName = new SimpleName(this.ast);
postLazyInit(this.methodName, NAME_PROPERTY);
}
}
}
return ... | public SimpleName getName() {
if (this.methodName == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.methodName == null) {
preLazyInit();
this.methodName = new SimpleName(this.ast);
postLazyInit(this.methodName, NAME_PROPERTY);
}
}
}
return this... |
public static void performPreBuildCheck(
IResourceDelta delta,
IJavaElement parent) {
IResource resource = delta.getResource();
IJavaElement element = JavaCore.create(resource);
boolean processChildren = false;
switch (resource.getType()) {
case IResource.ROOT :
processChildren = true;
break;... | public static void performPreBuildCheck(
IResourceDelta delta,
IJavaElement parent) {
IResource resource = delta.getResource();
IJavaElement element = JavaCore.create(resource);
boolean processChildren = false;
switch (resource.getType()) {
case IResource.ROOT :
processChildren = true;
break;... |
public
NSRecord(Name _name, short _dclass, int _ttl, int length,
CountedDataInputStream in, Compression c) throws IOException
{
super(_name, Type.NS, _dclass, _ttl, length, in, c);
}
| public
NSRecord(Name _name, short _dclass, int _ttl, int length,
DataByteInputStream in, Compression c) throws IOException
{
super(_name, Type.NS, _dclass, _ttl, length, in, c);
}
|
public void run() {
workbenchWindow.getWorkbench().showIntro(workbenchWindow, false);
}
| public void run() {
workbenchWindow.getWorkbench().getIntroManager().showIntro(workbenchWindow, false);
}
|
protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
super.toStringInfo(tab, buffer, info, showResolvedInfo);
if (showResolvedInfo) {
buffer.append(" {key="); //$NON-NLS-1$
buffer.append(this.uniqueKey);
buffer.append("}"); //$NON-NLS-1$
}
}
| protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
super.toStringInfo(tab, buffer, info, showResolvedInfo);
if (showResolvedInfo) {
buffer.append(" {key="); //$NON-NLS-1$
buffer.append(this.getKey());
buffer.append("}"); //$NON-NLS-1$
}
}
|
public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream) {
if (binding.isVarargs()) {
// 5 possibilities exist for a call to the vararg method foo(int i, int ... value) :
// foo(1), foo(1, null), foo(1, 2), foo(1, 2, 3, 4) & foo(1, ne... | public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream) {
if (binding.isVarargs()) {
// 5 possibilities exist for a call to the vararg method foo(int i, int ... value) :
// foo(1), foo(1, null), foo(1, 2), foo(1, 2, 3, 4) & foo(1, ne... |
public EncryptMessageAction(ComposerController composerController) {
super(composerController,
MailResourceLoader.getString("menu", "composer",
"menu_message_encrypt"));
// tooltip text
putValue(SHORT_DESCRIPTION,
MailResourceLoader.getString("menu", ... | public EncryptMessageAction(ComposerController composerController) {
super(composerController,
MailResourceLoader.getString("menu", "composer",
"menu_message_encrypt"));
// tooltip text
putValue(SHORT_DESCRIPTION,
MailResourceLoader.getString("menu", ... |
public TypeBinding resolveType(BlockScope scope) {
boolean argsContainCast = false;
if (left instanceof CastExpression) {
left.bits |= IgnoreNeedForCastCheckMASK; // will check later on
argsContainCast = true;
}
TypeBinding leftType = left.resolveType(scope);
if (right instanceof CastExpression) {
... | public TypeBinding resolveType(BlockScope scope) {
boolean argsContainCast = false;
if (left instanceof CastExpression) {
left.bits |= IgnoreNeedForCastCheckMASK; // will check later on
argsContainCast = true;
}
TypeBinding leftType = left.resolveType(scope);
if (right instanceof CastExpression) {
... |
protected IJavaElement createHandle(AbstractMethodDeclaration method, IJavaElement parent) {
if (!(parent instanceof IType)) return parent;
IType type = (IType) parent;
Argument[] arguments = method.arguments;
int argCount = arguments == null ? 0 : arguments.length;
if (type.isBinary()) {
// don't cache the met... | protected IJavaElement createHandle(AbstractMethodDeclaration method, IJavaElement parent) {
if (!(parent instanceof IType)) return parent;
IType type = (IType) parent;
Argument[] arguments = method.arguments;
int argCount = arguments == null ? 0 : arguments.length;
if (type.isBinary()) {
// don't cache the met... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = testExpression.analyseCode(currentScope, flowContext, flowInfo);
SwitchFlowContext switchContext =
new SwitchFlowContext(flowContext, this, (breakLabel = new Label()));
// analyse the b... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = testExpression.analyseCode(currentScope, flowContext, flowInfo);
SwitchFlowContext switchContext =
new SwitchFlowContext(flowContext, this, (breakLabel = new Label()));
// analyse the b... |
private void readContextBindingDefinition(IConfigurationElement configurationElement) {
IContextBindingDefinition contextBindingDefinition = Persistence.readContextBindingDefinition(new ConfigurationElementMemento(configurationElement), getPluginId(configurationElement));
if (contextBindingDefinition != null)
... | private void readContextBindingDefinition(IConfigurationElement configurationElement) {
IActivityBindingDefinition contextBindingDefinition = Persistence.readContextBindingDefinition(new ConfigurationElementMemento(configurationElement), getPluginId(configurationElement));
if (contextBindingDefinition != null)
... |
public void end( SaxContext ctx) throws Exception {
Stack st=ctx.getObjectStack();
String params[]=null;
if( paramC >0 ) params=(String []) st.pop();
Object parent=st.peek();
if( paramC == 0 ) {
params=new String[1];
params[0]= ctx.getBody().trim();
if( ctx.getDebug() > 0 ) ctx.log("" + parent.... | public void end( SaxContext ctx) throws Exception {
Stack st=ctx.getObjectStack();
String params[]=null;
if( paramC >0 ) params=(String []) st.pop();
Object parent=st.peek();
if( paramC == 0 ) {
params=new String[1];
params[0]= ctx.getBody().trim();
if( ctx.getDebug() > 0 ) ctx.log("" + parent.... |
protected void setUp() throws Exception {
// create config-folder
File file = new File("test_config");
file.mkdir();
new Config(file);
Logging.DEBUG = true;
Logging.createDefaultHandler();
new AddressbookMain();
// now load all available plugins
PluginManager.getInstance().initPlugins();
fo... | protected void setUp() throws Exception {
// create config-folder
File file = new File("test_config");
file.mkdir();
new Config(file);
Logging.DEBUG = true;
Logging.createDefaultHandler();
new AddressbookMain();
// now load all available plugins
PluginManager.getInstance().initCorePlugins();
... |
public void place() {
// register the handler inside the codeStream then normal place
codeStream.registerExceptionHandler(this);
if (CodeStream.DEBUG) System.out.println("\t\t\t\t<place at: "+codeStream.position+" - "+ this); //$NON-NLS-1$ //$NON-NLS-2$
this.position = codeStream.position;
}
| public void place() {
// register the handler inside the codeStream then normal place
codeStream.registerExceptionHandler(this);
if (CodeStream.DEBUG) System.out.println("\t\t\t\t<place at: "+codeStream.position+" - "+ this); //$NON-NLS-1$ //$NON-NLS-2$
this.position = codeStream.getPosition();
}
|
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], (... |
private final IHandlerActivation resolveConflicts(final String commandId,
final SortedSet activations) {
// If we don't have any, then there is no match.
if (activations.isEmpty()) {
return null;
}
// Cycle over the activations, remembered the current best.
final Iterator activationItr = activations... | private final IHandlerActivation resolveConflicts(final String commandId,
final SortedSet activations) {
// If we don't have any, then there is no match.
if (activations.isEmpty()) {
return null;
}
// Cycle over the activations, remembered the current best.
final Iterator activationItr = activations... |
public void findIndexMatches(IndexInput input, IIndexSearchRequestor requestor, int detailLevel, IProgressMonitor progressMonitor, IJavaSearchScope scope) throws IOException {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
/* narrow down a set of entries using ... | public void findIndexMatches(IndexInput input, IIndexSearchRequestor requestor, int detailLevel, IProgressMonitor progressMonitor, IJavaSearchScope scope) throws IOException {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
/* narrow down a set of entries using ... |
public
PTRRecord(Name _name, short _dclass, int _ttl, int length,
CountedDataInputStream in, Compression c) throws IOException
{
super(_name, Type.PTR, _dclass, _ttl, length, in, c);
}
| public
PTRRecord(Name _name, short _dclass, int _ttl, int length,
DataByteInputStream in, Compression c) throws IOException
{
super(_name, Type.PTR, _dclass, _ttl, length, in, c);
}
|
public void testRename() throws Exception {
RollingFileAppender rfa = new RollingFileAppender();
rfa.setLayout(layout);
// rollover by the second
String datePattern = "yyyy-MM-dd_HH_mm_ss";
SimpleDateFormat sdf = new SimpleDateFormat(datePattern);
String[] filenames = new String[2];
T... | public void testRename() throws Exception {
RollingFileAppender rfa = new RollingFileAppender();
rfa.setLayout(layout);
// rollover by the second
String datePattern = "yyyy-MM-dd_HH_mm_ss";
SimpleDateFormat sdf = new SimpleDateFormat(datePattern);
String[] filenames = new String[2];
T... |
extends org.tigris.scarab.om.BaseRModuleAttributePeer
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Village classes
import com.workingdogs.village.*;
// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache... | extends org.tigris.scarab.om.BaseRModuleAttributePeer
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Village classes
import com.workingdogs.village.*;
// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache... |
public SimpleLookupTable(int size) {
if (size < 7) size = 7;
this.elementSize = 0;
this.threshold = size + 1; // size is the expected number of elements
int tableLength = 2 * size + 1;
this.keyTable = new Object[tableLength];
this.valueTable = new Object[tableLength];
}
| public SimpleLookupTable(int size) {
if (size < 3) size = 3;
this.elementSize = 0;
this.threshold = size + 1; // size is the expected number of elements
int tableLength = 2 * size + 1;
this.keyTable = new Object[tableLength];
this.valueTable = new Object[tableLength];
}
|
public void test2() throws Exception {
common(2);
}
void common(int number) throws Exception {
JoranConfigurator jc = new JoranConfigurator();
jc.doConfigure("input/xml/customLogger" + number + ".xml", LogManager.getLoggerRepository());
int i = -1;
Logger root = Logger.getRootLogger();
... | public void test2() throws Exception {
common(2);
}
void common(int number) throws Exception {
JoranConfigurator jc = new JoranConfigurator();
jc.doConfigure("input/xml/customLogger" + number + ".xml", LogManager.getLoggerRepository());
int i = -1;
Logger root = Logger.getRootLogger();
... |
private TypeBinding internalResolveType(Scope scope) {
constant = NotAConstant;
if (this.receiver == null) {
SourceTypeBinding sourceTypeBinding = scope.enclosingSourceType();
this.receiverType = sourceTypeBinding;
this.receiver = new JavadocQualifiedTypeReference(sourceTypeBinding.compoundName, new lon... | private TypeBinding internalResolveType(Scope scope) {
constant = NotAConstant;
if (this.receiver == null) {
SourceTypeBinding sourceTypeBinding = scope.enclosingSourceType();
this.receiverType = sourceTypeBinding;
this.receiver = new JavadocQualifiedTypeReference(sourceTypeBinding.compoundName, new lon... |
public void searchAllTypeNames(
final char[] packageName,
final int packageMatchRule,
final char[] typeName,
final int typeMatchRule,
int searchFor,
IJavaSearchScope scope,
final TypeNameMatchRequestor nameMatchRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor) throws JavaModelExce... | public void searchAllTypeNames(
final char[] packageName,
final int packageMatchRule,
final char[] typeName,
final int typeMatchRule,
int searchFor,
IJavaSearchScope scope,
final TypeNameMatchRequestor nameMatchRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor) throws JavaModelExce... |
public boolean execute() {
try {
if (this.resource != null) {
if (!this.resource.isLocal(IResource.DEPTH_ZERO)) {
return FAILED;
}
}
IPath indexedPath = this.path;
// if index already cached, then do not perform any check
IIndex index = (IIndex) manager.getIndex(indexedPath, false);
if (index != ... | public boolean execute() {
try {
if (this.resource != null) {
if (!this.resource.isLocal(IResource.DEPTH_ZERO)) {
return FAILED;
}
}
IPath indexedPath = this.path;
// if index already cached, then do not perform any check
IIndex index = (IIndex) manager.getIndex(indexedPath, false);
if (index != ... |
public String getMainTaskName(){
return Util.bind("operation.createFieldProgress"); //$NON-NLS-1$
}
| public String getMainTaskName(){
return Util.bind("operation.createFieldProgress"/*nonNLS*/);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.