buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static String stripDuplicateBackslashes(final String src) {
int i = src.lastIndexOf('\\');
if (i > 0) {
StringBuffer buf = new StringBuffer(src);
for(; i > 0; i = src.lastIndexOf('\\', i - 1)) {
//
// if the preceding character is a slash then
// remove the prec... | public static String stripDuplicateBackslashes(final String src) {
int i = src.lastIndexOf('\\');
if (i > 0) {
StringBuffer buf = new StringBuffer(src);
for(; i > 0; i = src.lastIndexOf('\\', i - 1)) {
//
// if the preceding character is a slash then
// remove the prec... |
public String toStringExpression(int tab){
return "<CompleteOnType:" + new String(token) + ">" ; //$NON-NLS-2$ //$NON-NLS-1$
}
| public String toStringExpression(int tab){
return "<CompleteOnType:"/*nonNLS*/ + new String(token) + ">"/*nonNLS*/ ;
}
|
public PropPanelSimpleState() {
super("State",_stateIcon, ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"), nameField);
addField(Argo.localize("UMLMenu", "label.stereotype"), new UMLComboBoxNavigator(this, Argo.localize("UMLMenu", "tooltip.nav-stereo")... | public PropPanelSimpleState() {
super("Simple State",_stateIcon, ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"), nameField);
addField(Argo.localize("UMLMenu", "label.stereotype"), new UMLComboBoxNavigator(this, Argo.localize("UMLMenu", "tooltip.nav-s... |
public void contextInit( Context ctx)
throws TomcatException
{
setEngineHeader( ctx );
// XXX XXX this will go away - error handling needs to
// be re-writen !!!!!!
ServletWrapper errorWrapper=new ServletWrapper();
errorWrapper.setContext( ctx );
errorWrapper.setServletClass( "org.apache.tomcat.servle... | public void contextInit( Context ctx)
throws TomcatException
{
setEngineHeader( ctx );
// XXX XXX this will go away - error handling needs to
// be re-writen !!!!!!
ServletWrapper errorWrapper=new ServletWrapper();
errorWrapper.setContext( ctx );
errorWrapper.setServletClass( "org.apache.tomcat.servle... |
public void execute(Object parameter) throws ExecutionException {
Rectangle clientArea = tabFolder.getClientArea();
Point location = tabFolder.getDisplay().map(tabFolder, null,
clientArea.x, clientArea.y);
showList(shell, location.x, lo... | public void execute(Object parameter) throws ExecutionException {
Rectangle clientArea = tabFolder.getClientArea();
Point location = tabFolder.getDisplay().map(tabFolder, null,
clientArea.x, clientArea.y);
showList(shell, location.x, lo... |
public final boolean checkCastTypesCompatibility(Scope scope, TypeBinding castType, TypeBinding expressionType, Expression expression) {
// see specifications 5.5
// handle errors and process constant when needed
// if either one of the type is null ==>
// some error has been already reported some where ==>
// we... | public final boolean checkCastTypesCompatibility(Scope scope, TypeBinding castType, TypeBinding expressionType, Expression expression) {
// see specifications 5.5
// handle errors and process constant when needed
// if either one of the type is null ==>
// some error has been already reported some where ==>
// we... |
private static final String GREATER_THAN_EQUALS_RULE = ">=";
static {
rules.add(AND_RULE);
rules.add(OR_RULE);
rules.add(NOT_RULE);
rules.add(NOT_EQUALS_RULE);
rules.add(EQUALS_RULE);
rules.add(PARTIAL_TEXT_MATCH_RULE);
rules.add(LIKE_RULE);
rules.add(LESS_THAN_RULE);
rules.add(G... | private static final String GREATER_THAN_EQUALS_RULE = ">=";
static {
rules.add(AND_RULE);
rules.add(OR_RULE);
rules.add(NOT_RULE);
rules.add(NOT_EQUALS_RULE);
rules.add(EQUALS_RULE);
rules.add(PARTIAL_TEXT_MATCH_RULE);
rules.add(LIKE_RULE);
rules.add(LESS_THAN_RULE);
rules.add(G... |
public TypeBinding resolveType(BlockScope scope) {
constant = Constant.NotAConstant;
if ((targetType = type.resolveType(scope, true /* check bounds*/)) == null)
return null;
if (targetType.isArrayType()
&& ((ArrayBinding) targetType).leafComponentType == VoidBinding) {
scope.problemReporter().cannotAl... | public TypeBinding resolveType(BlockScope scope) {
constant = Constant.NotAConstant;
if ((targetType = type.resolveType(scope, true /* check bounds*/)) == null)
return null;
if (targetType.isArrayType()
&& ((ArrayBinding) targetType).leafComponentType == TypeBinding.VOID) {
scope.problemReporter().can... |
private static final void readState(
final IConfigurationElement configurationElement,
final List warningsToLog, final Command command) {
final IConfigurationElement[] stateElements = configurationElement
.getChildren(ELEMENT_STATE);
if ((stateElements == null) || (stateElements.length == 0)) {
return... | private static final void readState(
final IConfigurationElement configurationElement,
final List warningsToLog, final Command command) {
final IConfigurationElement[] stateElements = configurationElement
.getChildren(ELEMENT_STATE);
if ((stateElements == null) || (stateElements.length == 0)) {
return... |
public Object addMessage(InputStream in, Attributes attributes, Flags flags)
throws Exception {
Message message = MessageParser.parse(
TempSourceFactory.createTempSource(in, -1, null));
Object newUid = generateNextUid();
LOG.info("new UID=" + newUid);
Colu... | public Object addMessage(InputStream in, Attributes attributes, Flags flags)
throws Exception {
Message message = MessageParser.parse(
TempSourceFactory.createTempSource(in, -1));
Object newUid = generateNextUid();
LOG.info("new UID=" + newUid);
ColumbaHea... |
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... |
public void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0)) {
printUsage();
return;
}
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog = 8;
final int InsideRepetition = 16;
fin... | public void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0)) {
printUsage();
return;
}
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog = 8;
final int InsideRepetition = 16;
fin... |
public void propertyChanged(Object source, int propId) {
if (propId == WorkbenchPartReference.INTERNAL_PROPERTY_PINNED) {
WorkbenchPartReference ref = (WorkbenchPartReference)source;
setChecked(ref.isPinned());
} else if (propId == IWorkbenchPartConstants.... | public void propertyChanged(Object source, int propId) {
if (propId == WorkbenchPartReference.INTERNAL_PROPERTY_PINNED) {
WorkbenchPartReference ref = (WorkbenchPartReference)source;
setChecked(ref.isPinned());
} else if (propId == IWorkbenchPartConstants.... |
public String toString(int tab) {
/* slow code */
String s = tabString(tab);
s += new String(label) + ": " + statement.toString(0);
return s;
}
| public String toString(int tab) {
/* slow code */
String s = tabString(tab);
s += new String(label) + ": "/*nonNLS*/ + statement.toString(0);
return s;
}
|
protected void executeOperation() throws JavaModelException {
try {
beginTask(getMainTaskName(), getMainAmountOfWork());
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
generateNewCompilationUnitAST(unit);
if (this.creationOccurred) {
//a change has re... | protected void executeOperation() throws JavaModelException {
try {
beginTask(getMainTaskName(), getMainAmountOfWork());
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
generateNewCompilationUnitAST(unit);
if (this.creationOccurred) {
//a change has re... |
public PropPanelCompositeState() {
super("Composite State",_compositeStateIcon, ConfigLoader.getTabPropsOrientation());
initialize();
addField(Argo.localize("UMLMenu", "label.name"), nameField);
addField(Argo.localize("UMLMenu", "label.stereotype"), new UMLComboBoxNavigator(this, Ar... | public PropPanelCompositeState() {
super("Composite State",_compositeStateIcon, ConfigLoader.getTabPropsOrientation());
initialize();
addField(Argo.localize("UMLMenu", "label.name"), nameField);
addField(Argo.localize("UMLMenu", "label.stereotype"), new UMLComboBoxNavigator(this, Ar... |
public int getType() {
return EDITOR | VIEW;
}
| public int getType() {
return EDITOR;
}
|
public PreviousUnreadMessageAction(AbstractFrameController frameController) {
super(
frameController,
MailResourceLoader.getString(
"menu", "mainframe", "menu_view_prevunreadmessage"));
// tooltip text
setTooltipText(
MailResourceLoader.getString(
"menu", "mainframe","menu_view_prevunrea... | public PreviousUnreadMessageAction(AbstractFrameController frameController) {
super(
frameController,
MailResourceLoader.getString(
"menu", "mainframe", "menu_view_prevunreadmessage"));
// tooltip text
setTooltipText(
MailResourceLoader.getString(
"menu", "mainframe","menu_view_prevunrea... |
protected String moduleSet2[] = {
"org.apache.tomcat.modules.config.PathSetter",
"org.apache.tomcat.modules.config.ServerXmlInterceptor",
};
| protected String moduleSet2[] = {
"org.apache.tomcat.modules.config.PathSetter",
"org.apache.tomcat.modules.config.ServerXmlReader",
};
|
public PropPanelClass() {
super("Class",_classIcon, ConfigLoader.getTabPropsOrientation());
Class mclass = MClass.class;
//
// this will cause the components on this page to be notified
// anytime a stereotype, namespace, operation, etc
// has its name changed or is removed anywh... | public PropPanelClass() {
super("Class",_classIcon, ConfigLoader.getTabPropsOrientation());
Class mclass = MClass.class;
//
// this will cause the components on this page to be notified
// anytime a stereotype, namespace, operation, etc
// has its name changed or is removed anywh... |
public void setArrowHeads(MLink ml, Vector contents) {
if (ml != null ) {
Collection col = ml.getStimuli();
MStimulus stimulus = null;
MAction action = null;
Iterator it = col.iterator();
while (it.hasNext()) {
stimulus = (MStimulus) it.next();
action = (MAction) stimulus.getDispatc... | public void setArrowHeads(MLink ml, Vector contents) {
if (ml != null ) {
Collection col = ml.getStimuli();
MStimulus stimulus = null;
MAction action = null;
Iterator it = col.iterator();
while (it.hasNext()) {
stimulus = (MStimulus) it.next();
action = (MAction) stimulus.getDispatc... |
public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
// only at the -end- like new int [4][][]. The parser allows new int[][4][]
// so this must be checked here......(this comes fro... | public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
// only at the -end- like new int [4][][]. The parser allows new int[][4][]
// so this must be checked here......(this comes fro... |
protected void internalRefresh(Object element) {
boolean usingMotif = "motif".equals(SWT.getPlatform());
try {
// This avoids a "graphic is disposed" error on Motif by not letting
// it redraw while we remove entries. Some items in this table are
// being removed and may have icons which may ... | protected void internalRefresh(Object element) {
boolean usingMotif = "motif".equals(SWT.getPlatform()); //$NON-NLS-1$
try {
// This avoids a "graphic is disposed" error on Motif by not letting
// it redraw while we remove entries. Some items in this table are
// being removed and may have ic... |
public AbstractElement[] getElements() {
if (cachedElements == null) {
IWorkbenchPage activePage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
IEditorReference[] editors = activePage.getEditorReferences();
cachedElements = new AbstractElement[editors.length];
for (int i = ... | public AbstractElement[] getElements() {
if (cachedElements == null) {
IWorkbenchPage activePage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
IEditorReference[] editors = activePage.getEditorReferences();
cachedElements = new AbstractElement[editors.length];
for (int i = ... |
public ReferenceBinding findSuperTypeErasingTo(ReferenceBinding erasure) {
if (this == erasure) return this;
ReferenceBinding currentType = this;
if ((erasure.modifiers & AccInterface) == 0) {
while ((currentType = currentType.superclass()) != null) {
if (currentType == erasure || currentType.erasure(... | public ReferenceBinding findSuperTypeErasingTo(ReferenceBinding erasure) {
if (this == erasure) return this;
ReferenceBinding currentType = this;
if (!erasure.isInterface()) {
while ((currentType = currentType.superclass()) != null) {
if (currentType == erasure || currentType.erasure() == erasure) ret... |
public boolean visit(EnumConstantDeclaration node) {
if (!hasChildrenChanges(node)) {
return doVisitUnchangedChildren(node);
}
int pos= rewriteJavadoc(node, EnumConstantDeclaration.JAVADOC_PROPERTY);
rewriteModifiers2(node, EnumConstantDeclaration.MODIFIERS2_PROPERTY, pos);
pos= rewriteRequiredNode(node, ... | public boolean visit(EnumConstantDeclaration node) {
if (!hasChildrenChanges(node)) {
return doVisitUnchangedChildren(node);
}
int pos= rewriteJavadoc(node, EnumConstantDeclaration.JAVADOC_PROPERTY);
rewriteModifiers2(node, EnumConstantDeclaration.MODIFIERS2_PROPERTY, pos);
pos= rewriteRequiredNode(node, ... |
private void addDefaultAbstractMethods() {
if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return;
this.tagBits |= TagBits.KnowsDefaultAbstractMethods;
if (isClass() && isAbstract()) {
if (this.scope.compilerOptions().targetJDK >= ClassFileConstants.JDK1_2)
return; // no longer added for post 1.... | private void addDefaultAbstractMethods() {
if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return;
this.tagBits |= TagBits.KnowsDefaultAbstractMethods;
if (isClass() && isAbstract()) {
if (this.scope.compilerOptions().targetJDK >= ClassFileConstants.JDK1_2)
return; // no longer added for post 1.... |
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
boolean needRuntimeCheckcast = (this.bits & GenerateCheckcast) != 0;
if (constant != Constant.NotAConstant) {
if (valueRequired || needRuntimeCheckcast) { // Added for: 1F1W... | public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
boolean needRuntimeCheckcast = (this.bits & GenerateCheckcast) != 0;
if (constant != Constant.NotAConstant) {
if (valueRequired || needRuntimeCheckcast) { // Added for: 1F1W... |
public SearchPattern getBlankPattern() {
return null;
}
final int getMatchMode() {
return this.matchMode;
}
final boolean isCamelCase() {
return this.isCamelCase;
}
final boolean isCaseSensitive () {
return this.isCaseSensitive;
}
final boolean isErasureMatch() {
return (this.matchCompatibility &... | public SearchPattern getBlankPattern() {
return null;
}
final int getMatchMode() {
return this.matchMode;
}
final boolean isCamelCase() {
return this.isCamelCase;
}
final boolean isCaseSensitive () {
return this.isCaseSensitive;
}
final boolean isErasureMatch() {
return (this.matchCompatibility &... |
private void handleSliderValueChange() {
updateCurrentValueLabel();
//if (!source.getValueIsAdjusting()) {
double zoomPercentage = (double) _slider.getValue() / 100d;
Editor ed = Globals.curEditor();
if (ed == null || zoomPercentage <= 0.0) {... | private void handleSliderValueChange() {
updateCurrentValueLabel();
//if (!source.getValueIsAdjusting()) {
double zoomPercentage = _slider.getValue() / 100d;
Editor ed = Globals.curEditor();
if (ed == null || zoomPercentage <= 0.0) {
... |
public void handleException(Throwable e) {
// Log error.
Workbench wb = (Workbench)WorkbenchPlugin.getDefault().getWorkbench();
if (!wb.isStarting())
super.handleException(e);
// Dispose old part.
Control children[] = content.getChildren();
for (int i = 0; i < children.length; i++){
childre... | public void handleException(Throwable e) {
// Log error.
Workbench wb = (Workbench)PlatformUI.getWorkbench();
if (!wb.isStarting())
super.handleException(e);
// Dispose old part.
Control children[] = content.getChildren();
for (int i = 0; i < children.length; i++){
children[i].dispose();
... |
public FolderPluginHandler() {
super("org.columba.addressbook.folder", "org/columba/addressbook/folder/folder.xml");
parentNode = getConfig().getRoot().getElement("folderlist");
}
| public FolderPluginHandler() {
super("org.columba.addressbook.folder", "org/columba/addressbook/plugin/folder.xml");
parentNode = getConfig().getRoot().getElement("folderlist");
}
|
public void execute(Worker worker) throws Exception {
// get references
FolderCommandReference[] references = (FolderCommandReference[]) getReferences();
// use wrapper class to make handling references easier
adapter = new FolderCommandAdapter(references);
// get array of ... | public void execute(Worker worker) throws Exception {
// get references
FolderCommandReference[] references = (FolderCommandReference[]) getReferences();
// use wrapper class to make handling references easier
adapter = new FolderCommandAdapter(references);
// get array of ... |
public int getNodeType() {
return EXPRESSION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ExpressionStatement result = new ExpressionStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComm... | public int getNodeType() {
return EXPRESSION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
ExpressionStatement result = new ExpressionStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingCom... |
protected boolean computeChildren(OpenableElementInfo info, Map newElements) throws JavaModelException {
// Note the children are not opened (so not added to newElements) for a regular package fragment root
// Howver they are opened for a Jar package fragment root (see JarPackageFragmentRoot#computeChildren)
try {
... | protected boolean computeChildren(OpenableElementInfo info, Map newElements) throws JavaModelException {
// Note the children are not opened (so not added to newElements) for a regular package fragment root
// Howver they are opened for a Jar package fragment root (see JarPackageFragmentRoot#computeChildren)
try {
... |
public ShapesExample() {
try {
model = new Model("default");
shapeClass = new MMClass("Shape");
polygonClass = new MMClass("Polygon");
ellipseClass = new MMClass("Ellipse");
splineClass = new MMClass("Spline");
shapeClass.setIsAbstract(Boolean.TRUE);
splineClass.setIsAbst... | public ShapesExample() {
try {
model = new Model("ShapesExample");
shapeClass = new MMClass("Shape");
polygonClass = new MMClass("Polygon");
ellipseClass = new MMClass("Ellipse");
splineClass = new MMClass("Spline");
shapeClass.setIsAbstract(Boolean.TRUE);
splineClass.set... |
public RegionBasedTypeHierarchy(IRegion region, IJavaProject project, IType type, boolean computeSubtypes) throws JavaModelException {
super(type, (IJavaSearchScope)null, computeSubtypes, null/*no working copies*/);
fRegion = region;
fProject = project;
}
| public RegionBasedTypeHierarchy(IRegion region, IJavaProject project, IType type, boolean computeSubtypes) throws JavaModelException {
super(type, null/*no working copies*/, (IJavaSearchScope)null, computeSubtypes);
fRegion = region;
fProject = project;
}
|
public String toString(int tab) {
String s = tabString(tab);
s += "<CompleteOnLocalName:"; //$NON-NLS-1$
if (type != null) s += type.toString() + " "; //$NON-NLS-1$
s += new String(name);
if (initialization != null) s += " = " + initialization.toStringExpression();
s += ">"; //$NON-NLS-1$
return s;
}
| public String toString(int tab) {
String s = tabString(tab);
s += "<CompleteOnLocalName:"; //$NON-NLS-1$
if (type != null) s += type.toString() + " "; //$NON-NLS-1$
s += new String(name);
if (initialization != null) s += " = " + initialization.toStringExpression(); //$NON-NLS-1$
s += ">"; //$NON-NLS-1$
r... |
private void checkForInheritedMemberTypes(SourceTypeBinding sourceType) {
// search up the hierarchy of the sourceType to see if any superType defines a member type
// when no member types are defined, tag the sourceType & each superType with the HasNoMemberTypes bit
ReferenceBinding currentType = sourceType;
... | private void checkForInheritedMemberTypes(SourceTypeBinding sourceType) {
// search up the hierarchy of the sourceType to see if any superType defines a member type
// when no member types are defined, tag the sourceType & each superType with the HasNoMemberTypes bit
ReferenceBinding currentType = sourceType;
... |
private void computeClasspathLocations(
IWorkspaceRoot root,
JavaProject javaProject,
SimpleLookupTable binaryLocationsPerProject) throws CoreException {
/* Update incomplete classpath marker */
IClasspathEntry[] classpathEntries = javaProject.getExpandedClasspath(true, true);
/* Update cycle marker */
IMarker... | private void computeClasspathLocations(
IWorkspaceRoot root,
JavaProject javaProject,
SimpleLookupTable binaryLocationsPerProject) throws CoreException {
/* Update incomplete classpath marker */
IClasspathEntry[] classpathEntries = javaProject.getExpandedClasspath(true, true, JavaBuilder.preferredClasspaths, Java... |
IMutableCommandHandlerService getMutableCommandHandlerService();
package org.eclipse.ui.commands;
/**
* An instance of this interface provides support for managing commands at the
* <code>IWorkbenchPartSite</code> level.
* <p>
* This interface is not intended to be extended or implemented by clients.
* </p>
* <... | IMutableCommandHandlerService getMutableCommandHandlerService();
package org.eclipse.ui.commands;
/**
* An instance of this interface provides support for managing commands at the
* <code>IWorkbenchPartSite</code> level.
* <p>
* This interface is not intended to be extended or implemented by clients.
* </p>
* <... |
public Object[] getElements(Object inputElement) {
Object[] elements = super.getElements(inputElement);
if (!showFinished)
return elements;
Set kept = FinishedJobs.getInstance().getKeptAsSet();
if (kept.size() == 0)
return elements;
Set all = new HashSet();
for (int i = 0; i < elements.length; i... | public Object[] getElements(Object inputElement) {
Object[] elements = super.getElements(inputElement);
if (!showFinished)
return elements;
Set kept = FinishedJobs.getInstance().getKeptAsSet();
if (kept.size() == 0)
return elements;
Set all = new HashSet();
for (int i = 0; i < elements.length; i... |
public Message
send(Message query) {
byte [] out, in;
Message response;
DatagramSocket s;
DatagramPacket dp;
int udpLength = 512;
try {
try {
s = new DatagramSocket();
}
catch (SocketException e) {
System.out.println(e);
return null;
}
query = (Message) query.clone();
if (EDNSlevel >= 0) {
... | public Message
send(Message query) {
byte [] out, in;
Message response;
DatagramSocket s;
DatagramPacket dp;
int udpLength = 512;
try {
try {
s = new DatagramSocket();
}
catch (SocketException e) {
System.out.println(e);
return null;
}
query = (Message) query.clone();
if (EDNSlevel >= 0) {
... |
// constructor will not be dumped as private, no emulation required thus
} else {
syntheticAccessor =
((SourceTypeBinding) binding.declaringClass).addSyntheticMethod(this.codegenBinding, isSuperAccess());
currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this);
}
}
... | // constructor will not be dumped as private, no emulation required thus
} else {
syntheticAccessor =
((SourceTypeBinding) this.codegenBinding.declaringClass).addSyntheticMethod(this.codegenBinding, isSuperAccess());
currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this)... |
public RolloverButton()
{
if(OperatingSystem.isMacOS())
setBorder(new EtchedBorder());
setBorderPainted(false);
addMouseListener(new MouseOverHandler());
} //}}}
| public RolloverButton()
{
if(OperatingSystem.isMacOSLF())
setBorder(new EtchedBorder());
setBorderPainted(false);
addMouseListener(new MouseOverHandler());
} //}}}
|
public void actionPerformed(ActionEvent evt) {
FolderCommandReference r = ((MailFrameMediator) getFrameMediator()).getTableSelection();
r.setMarkVariant(MarkMessageCommand.MARK_AS_EXPUNGED);
MessageFolder folder = (MessageFolder) r.getFolder();
int uid = folder.getConfiguration().ge... | public void actionPerformed(ActionEvent evt) {
FolderCommandReference r = ((MailFrameMediator) getFrameMediator()).getTableSelection();
r.setMarkVariant(MarkMessageCommand.MARK_AS_EXPUNGED);
MessageFolder folder = (MessageFolder) r.getFolder();
int uid = folder.getConfiguration().ge... |
public void saveFolder(FolderTreeNode parentFolder) {
int count = parentFolder.getChildCount();
FolderTreeNode child;
FolderTreeNode folder;
for (Enumeration e = parentFolder.children(); e.hasMoreElements();) {
child = (FolderTreeNode) e.nextElement();
Folde... | public void saveFolder(FolderTreeNode parentFolder) {
int count = parentFolder.getChildCount();
FolderTreeNode child;
FolderTreeNode folder;
for (Enumeration e = parentFolder.children(); e.hasMoreElements();) {
child = (FolderTreeNode) e.nextElement();
Folde... |
public
SIGRecord(Name name, int dclass, long ttl, int covered, int alg, int origttl,
Date expire, Date timeSigned, int footprint, Name signer,
byte [] signature)
{
this(name, dclass, ttl);
Type.check(covered);
checkU8("alg", alg);
checkU8("labels", labels);
TTL.check(origttl);
checkU16("footprint", footprin... | public
SIGRecord(Name name, int dclass, long ttl, int covered, int alg, int origttl,
Date expire, Date timeSigned, int footprint, Name signer,
byte [] signature)
{
this(name, dclass, ttl);
Type.check(covered);
checkU8("alg", alg);
checkU8("labels", labels);
TTL.check(origttl);
checkU16("footprint", footprin... |
private TypeDeclaration convert(SourceTypeElementInfo sourceType, CompilationResult compilationResult) {
/* create type declaration - can be member type, local type or anonymous type */
TypeDeclaration type;
boolean isAnonymous = false;
if (sourceType.getEnclosingType() == null) {
IType typeHandle = ((So... | private TypeDeclaration convert(SourceTypeElementInfo sourceType, CompilationResult compilationResult) {
/* create type declaration - can be member type, local type or anonymous type */
TypeDeclaration type;
boolean isAnonymous = false;
if (sourceType.getEnclosingType() == null) {
IType typeHandle = sour... |
public
void doConfigure(InputStream input, Hierarchy hierarchy)
throws FactoryConfigurationError {
DocumentBuilderFactory dbf = null;
try {
LogLog.debug("System property is :"+System.getProperty(dbfKey));
dbf = DocumentBuilderFactory.newInstance(... | public
void doConfigure(InputStream input, Hierarchy hierarchy)
throws FactoryConfigurationError {
DocumentBuilderFactory dbf = null;
try {
LogLog.debug("System property is :"+System.getProperty(dbfKey));
dbf = DocumentBuilderFactory.newInstance(... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
breakLabel = new Label();
continueLabel = new Label();
Constant cst = this.condition.constant;
boolean isConditionTrue = cst != NotAConstant && cst.booleanValue() == true;
boolean isConditionFalse = c... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
breakLabel = new Label();
continueLabel = new Label();
Constant cst = this.condition.constant;
boolean isConditionTrue = cst != NotAConstant && cst.booleanValue() == true;
boolean isConditionFalse = c... |
public void acceptLocalMethod(MethodBinding methodBinding) {
IJavaElement res = findLocalElement(methodBinding.sourceStart());
if(res != null) {
if(res.getElementType() == IJavaElement.METHOD) {
IMethod method = (IMethod) res;
char[] uniqueKey = methodBinding.computeUniqueKey();
if(method.isBinary()) {
... | public void acceptLocalMethod(MethodBinding methodBinding) {
IJavaElement res = findLocalElement(methodBinding.original().sourceStart());
if(res != null) {
if(res.getElementType() == IJavaElement.METHOD) {
IMethod method = (IMethod) res;
char[] uniqueKey = methodBinding.computeUniqueKey();
if(method.isBin... |
protected void executeOperation() throws JavaModelException {
try {
this.runnable.run(progressMonitor);
} catch (CoreException ce) {
if (ce instanceof JavaModelException) {
throw (JavaModelException)ce;
} else {
if (ce.getStatus().getCode() == IResourceStatus.OPERATION_FAILED) {
Throwable e= ... | protected void executeOperation() throws JavaModelException {
try {
this.runnable.run(this.progressMonitor);
} catch (CoreException ce) {
if (ce instanceof JavaModelException) {
throw (JavaModelException)ce;
} else {
if (ce.getStatus().getCode() == IResourceStatus.OPERATION_FAILED) {
Throwabl... |
public TypeBinding resolveType(BlockScope scope) {
// specs p.368
constant = NotAConstant;
LookupEnvironment env = scope.environment();
boolean use15specifics = env.options.sourceLevel >= ClassFileConstants.JDK1_5;
TypeBinding conditionType = condition.resolveTypeExpecting(scope, BooleanBinding);
if (va... | public TypeBinding resolveType(BlockScope scope) {
// specs p.368
constant = NotAConstant;
LookupEnvironment env = scope.environment();
boolean use15specifics = env.options.sourceLevel >= ClassFileConstants.JDK1_5;
TypeBinding conditionType = condition.resolveTypeExpecting(scope, BooleanBinding);
if (va... |
public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
if (isPublic()) return true;
SourceTypeBinding invocationType = scope.enclosingSourceType();
if (invocationType == this.declaringClass && invocationType == receiverType) return true;
if (invocationType == null... | public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
if (isPublic()) return true;
SourceTypeBinding invocationType = scope.enclosingSourceType();
if (invocationType == this.declaringClass && invocationType == receiverType) return true;
if (invocationType == null... |
public String toDebugString() {
String s = "#[\n"; //$NON-NLS-1$
Object object;
int count = 0;
for (int i = 0, length = elementTable.length; i < length; i++){
s += "\t"+i+"\t";//$NON-NLS-1$//$NON-NLS-2$
object = elementTable[i];
if (object == null){
s+= "-\n";//$NON-NLS-1$
} else {
s+= obje... | public String toDebugString() {
String s = "#[\n"; //$NON-NLS-1$
Object object;
int count = 0;
for (int i = 0, length = elementTable.length; i < length; i++){
s += "\t"+i+"\t";//$NON-NLS-1$//$NON-NLS-2$
object = elementTable[i];
if (object == null){
s+= "-\n";//$NON-NLS-1$
} else {
s+= obje... |
public void load() {
WorkingSetRegistryReader reader = new WorkingSetRegistryReader();
reader.readWorkingSets(Platform.getPluginRegistry(), this);
}
| public void load() {
WorkingSetRegistryReader reader = new WorkingSetRegistryReader();
reader.readWorkingSets(Platform.getExtensionRegistry(), this);
}
|
public boolean keepChecking()
{
return true;
}
}
} | public boolean keepChecking()
{
return false;
}
}
} |
public static CompilationUnitDeclaration parse(char[] source) {
if (source == null) {
throw new IllegalArgumentException();
}
CompilerOptions compilerOptions = new CompilerOptions(JavaCore.getOptions());
Parser parser =
new Parser(
new ProblemReporter(
DefaultErrorHandlingPolicies.proceedWithAll... | public static CompilationUnitDeclaration parse(char[] source) {
if (source == null) {
throw new IllegalArgumentException();
}
CompilerOptions compilerOptions = new CompilerOptions(JavaCore.getOptions());
Parser parser =
new Parser(
new ProblemReporter(
DefaultErrorHandlingPolicies.proceedWithAll... |
public FolderOptionsController(MailFrameMediator mediator) {
this.mediator = mediator;
// init plugin handler
try {
handler = PluginManager.getInstance().getHandler(
IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDEROPTIONS);
} catch (PluginHandlerNotFoundException e) {
// TODO (@author fdietz): show er... | public FolderOptionsController(MailFrameMediator mediator) {
this.mediator = mediator;
// init plugin handler
try {
handler = PluginManager.getInstance().getExtensionHandler(
IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDEROPTIONS);
} catch (PluginHandlerNotFoundException e) {
// TODO (@author fdietz)... |
protected boolean generateInfos(
OpenableElementInfo info,
IProgressMonitor pm,
Map newElements,
IResource underlyingResource) throws JavaModelException {
fgJavaModelManager.putInfo(fgJavaModelManager.getJavaModel(), info);
// determine my children
try {
IProject[] projects = this.getWorkspace().getRoot().get... | protected boolean generateInfos(
OpenableElementInfo info,
IProgressMonitor pm,
Map newElements,
IResource underlyingResource) throws JavaModelException {
JavaModelManager.getJavaModelManager().putInfo(this, info);
// determine my children
try {
IProject[] projects = this.getWorkspace().getRoot().getProjects(... |
public LoggerRepository getLoggerRepository(String name) {
if( Constants.JNDI_CONTEXT_NAME.equals(name)) {
return LogManager.defaultLoggerRepository;
} else {
return (LoggerRepository) hierMap.get(name);
}
}
| public LoggerRepository getLoggerRepository(String name) {
if(Constants.DEFAULT_REPOSITORY_NAME.equals(name)) {
return LogManager.defaultLoggerRepository;
} else {
return (LoggerRepository) hierMap.get(name);
}
}
|
public JavadocAllocationExpression(long pos) {
this((int) (pos >>> 32), (int) pos);
}
TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = Constant.NotAConstant;
if (this.type == null) {
this.resolvedTyp... | public JavadocAllocationExpression(long pos) {
this((int) (pos >>> 32), (int) pos);
}
TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = Constant.NotAConstant;
if (this.type == null) {
this.resolvedTyp... |
public SystemMenuMovePane(IStackPresentationSite site) {
this.site = site;
setText(WorkbenchMessages.getString("SystemMenuMovePane.PaneName")); //$NON-NLS-1$
}
| public SystemMenuMovePane(IStackPresentationSite site) {
this.site = site;
setText(WorkbenchMessages.SystemMenuMovePane_PaneName);
}
|
public void initialize(JavaProject project, PotentialMatch[] potentialMatches) throws JavaModelException {
// create name environment
if (this.nameEnvironment != null) { // cleanup
this.nameEnvironment.cleanup();
}
if (potentialMatches.length == 1) {
// if only one potential match, a file name environmen... | public void initialize(JavaProject project, PotentialMatch[] potentialMatches) throws JavaModelException {
// create name environment
if (this.nameEnvironment != null) { // cleanup
this.nameEnvironment.cleanup();
}
if (potentialMatches.length == 1) {
// if only one potential match, a file name environmen... |
public static Rule getRule(Stack stack) {
if (stack.size() < 2) {
throw new IllegalArgumentException("Invalid OR rule - expected two rules but provided " + stack.size());
}
Object o2 = stack.pop();
Object o1 = stack.pop();
if ((o2 instanceof Rule) && (o1 instanceof Rule)) {
... | public static Rule getRule(Stack stack) {
if (stack.size() < 2) {
throw new IllegalArgumentException("Invalid OR rule - expected two rules but received " + stack.size());
}
Object o2 = stack.pop();
Object o1 = stack.pop();
if ((o2 instanceof Rule) && (o1 instanceof Rule)) {
... |
public int discardPerWorkingCopyInfo(CompilationUnit workingCopy) throws JavaModelException {
// create the delta builder (this remembers the current content of the working copy)
// outside the perWorkingCopyInfos lock (see bug 50667)
JavaElementDeltaBuilder deltaBuilder = null;
if (workingCopy.isPrimary() ... | public int discardPerWorkingCopyInfo(CompilationUnit workingCopy) throws JavaModelException {
// create the delta builder (this remembers the current content of the working copy)
// outside the perWorkingCopyInfos lock (see bug 50667)
JavaElementDeltaBuilder deltaBuilder = null;
if (workingCopy.isPrimary() ... |
public void setSelection(DefaultCommandReference[] selection) {
ColumbaLogger.log.error("Not yet implemented!");
}
| public void setSelection(DefaultCommandReference[] selection) {
ColumbaLogger.log.severe("Not yet implemented!");
}
|
public void showFailedAssumptionsWhenNoParametersFound(int data,
Matcher<Integer> matcher) throws Exception {
assumeThat(data, not(matcher));
AssumptionsFail.DATA= data;
AssumptionsFail.MATCHER= matcher;
String result= testResult(AssumptionsFail.class).toString();
assertThat(result, containsString(match... | public void showFailedAssumptionsWhenNoParametersFound(int data,
Matcher<Integer> matcher) throws Exception {
assumeThat(data, not(matcher));
AssumptionsFail.DATA= data;
AssumptionsFail.MATCHER= matcher;
String result= testResult(AssumptionsFail.class).toString();
assertThat(result, containsString(match... |
private static int combinedMatchRule(int matchRule, int matchRule2) {
int combined = matchRule & matchRule2;
int compatibility = combined & MATCH_COMPATIBILITY_MASK;
if (compatibility == 0) {
if ((matchRule & MATCH_COMPATIBILITY_MASK) == R_FULL_MATCH) {
compatibility = matchRule2;
} else if ((matchRule2 & MAT... | private static int combinedMatchRule(int matchRule, int matchRule2) {
int combined = matchRule & matchRule2;
int compatibility = combined & MATCH_COMPATIBILITY_MASK;
if (compatibility == 0) {
if ((matchRule & MATCH_COMPATIBILITY_MASK) == R_FULL_MATCH) {
compatibility = matchRule2;
} else if ((matchRule2 & MAT... |
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
// Array initializers can only occur on the right hand side of an assignment
// expression, therefore the expected type contains the valid information
// concerning the type that must be enforced by the elements of the array in... | public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
// Array initializers can only occur on the right hand side of an assignment
// expression, therefore the expected type contains the valid information
// concerning the type that must be enforced by the elements of the array in... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// process the condition
flowInfo = condition.analyseCode(currentScope, flowContext, flowInfo);
Constant cst = this.condition.optimizedBooleanConstant();
boolean isConditionOptimizedTrue = cst != NotACon... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// process the condition
flowInfo = condition.analyseCode(currentScope, flowContext, flowInfo);
Constant cst = this.condition.optimizedBooleanConstant();
boolean isConditionOptimizedTrue = cst != NotACon... |
public void run(IProgressMonitor progressMonitor) throws CoreException {
for(int i = 0; i < projectLength; i++){
if (progressMonitor != null && progressMonitor.isCanceled()) return;
JavaProject affectedProject = (JavaProject)modifiedProjects[i];
if (affectedProject == null) continue; //... | public void run(IProgressMonitor progressMonitor) throws CoreException {
for(int i = 0; i < projectLength; i++){
if (progressMonitor != null && progressMonitor.isCanceled()) return;
JavaProject affectedProject = (JavaProject)modifiedProjects[i];
if (affectedProject == null) continue; //... |
public boolean visit(IResourceProxy proxy) throws CoreException {
IResource resource = null;
switch(proxy.getType()) {
case IResource.FILE :
if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName()) ||
org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.g... | public boolean visit(IResourceProxy proxy) throws CoreException {
IResource resource = null;
switch(proxy.getType()) {
case IResource.FILE :
if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName()) ||
org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.g... |
public int doEndTag() throws JspException {
// Acquire the select tag we are associated with
SelectTag selectTag =
(SelectTag) pageContext.getAttribute(Constants.SELECT_KEY);
if (selectTag == null)
throw new JspException
(messages.getMessage("optionsTag.select"));
StringBuffer sb = new StringB... | public int doEndTag() throws JspException {
// Acquire the select tag we are associated with
SelectTag selectTag =
(SelectTag) pageContext.getAttribute(Constants.SELECT_KEY);
if (selectTag == null)
throw new JspException
(messages.getMessage("optionsTag.select"));
StringBuffer sb = new StringB... |
public void execute(ContextManager cm)
throws TomcatException
{
// Find Ajp12 connector
int portInt=8007;
InetAddress address=null;
BaseInterceptor ci[]=cm.getInterceptors();
for( int i=0; i<ci.length; i++ ) {
Object con=ci[i];
if( con instanceof Ajp12ConnectionHandler ) {
PoolTcpConnector t... | public void execute(ContextManager cm)
throws TomcatException
{
// Find Ajp12 connector
int portInt=8007;
InetAddress address=null;
BaseInterceptor ci[]=cm.getContainer().getInterceptors();
for( int i=0; i<ci.length; i++ ) {
Object con=ci[i];
if( con instanceof Ajp12ConnectionHandler ) {
Poo... |
abstract IPath getProjectRelativePath();
/*******************************************************************************
* Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the... | abstract IPath getProjectRelativePath();
/*******************************************************************************
* Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the... |
public String
sectionToString(int i) {
if (i > 3)
return null;
StringBuffer sb = new StringBuffer();
Record [] records = getSectionArray(i);
for (int j = 0; i < records.length; j++) {
Record rec = records[j];
if (i == Section.QUESTION) {
sb.append(";;\t" + rec.name);
sb.append(", type = " + Type.strin... | public String
sectionToString(int i) {
if (i > 3)
return null;
StringBuffer sb = new StringBuffer();
Record [] records = getSectionArray(i);
for (int j = 0; j < records.length; j++) {
Record rec = records[j];
if (i == Section.QUESTION) {
sb.append(";;\t" + rec.name);
sb.append(", type = " + Type.strin... |
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... |
public void generatePostIncrement(
BlockScope currentScope,
CodeStream codeStream,
CompoundAssignment postIncrement,
boolean valueRequired) {
boolean isStatic;
receiver.generateCode(
currentScope,
codeStream,
!(isStatic = this.codegenBinding.isStatic()));
if (isStatic) {
if (syntheticAccesso... | public void generatePostIncrement(
BlockScope currentScope,
CodeStream codeStream,
CompoundAssignment postIncrement,
boolean valueRequired) {
boolean isStatic;
receiver.generateCode(
currentScope,
codeStream,
!(isStatic = this.codegenBinding.isStatic()));
if (isStatic) {
if (syntheticAccesso... |
// public int requestMap(Request req) {
// No op. All mapping is done in the first step - it's better because
// the alghoritm is more efficient. The only case where those 2 are
// not called togheter is in getContext( "path" ).
//
// We can split it again later if that creates problems - but right
// no... | // public int requestMap(Request req) {
// No op. All mapping is done in the first step - it's better because
// the alghoritm is more efficient. The only case where those 2 are
// not called togheter is in getContext( "path" ).
//
// We can split it again later if that creates problems - but right
// no... |
private static int combinedMatchRule(int matchRule, int matchRule2) {
int combined = matchRule & matchRule2;
int compatibility = combined & MATCH_COMPATIBILITY_MASK;
if (compatibility == 0) {
if ((matchRule & MATCH_COMPATIBILITY_MASK) == R_FULL_MATCH) {
compatibility = matchRule2;
} else if ((matchRule2 & MAT... | private static int combinedMatchRule(int matchRule, int matchRule2) {
int combined = matchRule & matchRule2;
int compatibility = combined & MATCH_COMPATIBILITY_MASK;
if (compatibility == 0) {
if ((matchRule & MATCH_COMPATIBILITY_MASK) == R_FULL_MATCH) {
compatibility = matchRule2;
} else if ((matchRule2 & MAT... |
public ChClass() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the class?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Should {name} be its own class o... | public ChClass() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the class?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Should {name} be its own class o... |
public String
toString() {
StringBuffer sb = new StringBuffer();
OPTRecord opt = getOPT();
if (opt != null)
sb.append(header.toStringWithRcode(getRcode()) + "\n");
else
sb.append(header + "\n");
if (isSigned()) {
sb.append(";; TSIG ");
if (isVerified())
sb.append("ok");
else
sb.append("invalid");
... | public String
toString() {
StringBuffer sb = new StringBuffer();
OPTRecord opt = getOPT();
if (opt != null)
sb.append(header.toStringWithRcode(getRcode()) + "\n");
else
sb.append(header + "\n");
if (isSigned()) {
sb.append(";; TSIG ");
if (isVerified())
sb.append("ok");
else
sb.append("invalid");
... |
public static IJavaModelStatus validateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation) {
IProject project = javaProject.getProject();
IPath projectPath= project.getFullPath();
String projectName = javaProject.getElementName();
/* validate output location */
... | public static IJavaModelStatus validateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation) {
IProject project = javaProject.getProject();
IPath projectPath= project.getFullPath();
String projectName = javaProject.getElementName();
/* validate output location */
... |
public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
return new ParameterizedMethodBinding(this, originalMethod);
}
| public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
return new ParameterizedMethodBinding(this, originalMethod, originalMethod.isStatic());
}
|
public ParameterAnnotation(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int length = u2At(classFileBytes, 0, offset);
this.readOffset = 2;
this.annotationsNumber = length;
if (length != 0) {
this.annotations = new IAnnotation[length];
for... | public ParameterAnnotation(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int length = u2At(classFileBytes, 0, offset);
this.readOffset = 2;
this.annotationsNumber = length;
if (length != 0) {
this.annotations = new IAnnotation[length];
for... |
protected void createContents(Composite parent,String resourceLabelString,int heightHint) {
Font font = parent.getFont();
// server name group
Composite composite = new Composite(parent,SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
composite.setLayout(layout... | protected void createContents(Composite parent,String resourceLabelString,int heightHint) {
Font font = parent.getFont();
// server name group
Composite composite = new Composite(parent,SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
composite.setLayout(layout... |
public Name
getTarget() {
return target;
}
void
rrToWire(DataByteOutputStream out, Compression c) throws IOException {
if (target == null)
return;
out.writeShort(priority);
out.writeShort(weight);
out.writeShort(port);
target.toWire(out, null);
}
void
rrToWireCanonical(DataByteOutputStream out) throws IOExce... | public Name
getTarget() {
return target;
}
void
rrToWire(DataByteOutputStream out, Compression c) throws IOException {
if (target == null)
return;
out.writeShort(priority);
out.writeShort(weight);
out.writeShort(port);
target.toWire(out, null);
}
void
rrToWireCanonical(DataByteOutputStream out) throws IOExce... |
public void open() {
if (path == null)
return;
// use default sink == System.err
long date=System.currentTimeMillis();
day=getDay(date);
try {
File file = new File(path);
String logName=file.getParent()+File.separator+
getDatePrefix(date,file.getName());
... | public void open() {
if (path == null)
return;
// use default sink == System.err
long date=System.currentTimeMillis();
day=getDay(date);
try {
File file = new File(path);
String logName=file.getParent()+File.separator+
getDatePrefix(date,file.getName());
... |
public IMAPFlags[] fetchFlagsListStartFrom(int startIdx, IMAPFolder folder)
throws IOException, IMAPException, CommandCancelledException {
try {
StatusObservable observable = getObservable();
ensureSelectedState(folder);
if (messageFolderInfo.getExists() - startIdx > 0) {
SequenceSet set = new Se... | public IMAPFlags[] fetchFlagsListStartFrom(int startIdx, IMAPFolder folder)
throws IOException, IMAPException, CommandCancelledException {
try {
StatusObservable observable = getObservable();
ensureSelectedState(folder);
if (messageFolderInfo.getExists() - startIdx > 0) {
SequenceSet set = new Se... |
public void resolve(MethodScope initializationScope) {
// the two <constant = Constant.NotAConstant> could be regrouped into
// a single line but it is clearer to have two lines while the reason of their
// existence is not at all the same. See comment for the second one.
//----------------------------------... | public void resolve(MethodScope initializationScope) {
// the two <constant = Constant.NotAConstant> could be regrouped into
// a single line but it is clearer to have two lines while the reason of their
// existence is not at all the same. See comment for the second one.
//----------------------------------... |
private Object[] computeNonJavaResources(IJavaProject project, IResource underlyingResource, PackageFragmentRoot handle) {
Object[] nonJavaResources = NO_NON_JAVA_RESOURCES;
try {
// the underlying resource may be a folder or a project (in the case that the project folder
// is actually the package fragment root)... | private Object[] computeNonJavaResources(IJavaProject project, IResource underlyingResource, PackageFragmentRoot handle) {
Object[] nonJavaResources = NO_NON_JAVA_RESOURCES;
try {
// the underlying resource may be a folder or a project (in the case that the project folder
// is actually the package fragment root)... |
public boolean isAnonymousLoginAllowed()
{
return Turbine.getConfiguration().getProperty("scarab.anonymous.username")!=null;
}
| public boolean isAnonymousLoginAllowed()
{
return Turbine.getConfiguration().getBoolean("scarab.anonymous.enable");
}
|
public void initializeScanner(char[] compilationUnitSource) {
this.scanner.setSource(compilationUnitSource);
this.scannerEndPosition = compilationUnitSource.length;
this.scanner.resetTo(0, this.scannerEndPosition);
this.edits = new OptimizedReplaceEdit[INITIAL_SIZE];
}
| public void initializeScanner(char[] compilationUnitSource) {
this.scanner.setSource(compilationUnitSource);
this.scannerEndPosition = compilationUnitSource.length;
this.scanner.resetTo(0, this.scannerEndPosition - 1);
this.edits = new OptimizedReplaceEdit[INITIAL_SIZE];
}
|
public void actionPerformed(ActionEvent evt) {
AddressbookFrameController addressbookFrameController =
(AddressbookFrameController) frameController;
Folder folder =
(Folder) addressbookFrameController.getTree().
getView().getSelectedFolder();
if (folder == null) return;
EditGroupDialog dial... | public void actionPerformed(ActionEvent evt) {
AddressbookFrameController addressbookFrameController =
(AddressbookFrameController) frameMediator;
Folder folder =
(Folder) addressbookFrameController.getTree().
getView().getSelectedFolder();
if (folder == null) return;
EditGroupDialog dialog... |
public void actionPerformed(ActionEvent evt) {
MainInterface.processor.addOp(
new OpenAttachmentCommand(
getFrameController()
.getSelectionManager()
.getHandler("mail.attachment")
.getSelection()));
}
| public void actionPerformed(ActionEvent evt) {
MainInterface.processor.addOp(
new OpenAttachmentCommand(
getFrameMediator()
.getSelectionManager()
.getHandler("mail.attachment")
.getSelection()));
}
|
private void computeIndexes() {
ArrayList indexesInScope = new ArrayList();
IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars();
IWorkspaceRoot root = this.indexManager.workspace.getRoot();
for (int i = 0; i < projectsAndJars.length; i++) {
IPath location;
IPath path = projectsAndJars[i];
if... | private void computeIndexes() {
ArrayList indexesInScope = new ArrayList();
IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace() .getRoot();
for (int i = 0; i < projectsAndJars.length; i++) {
IPath location;
IPath path = projectsAndJars[i];
... |
public void reportBadParams() throws Exception {
assertThat(testResult(DoesntUseParams.class),
hasSingleFailureContaining("everythingIsZero(1, 1)"));
}
@RunWith(Theories.class)
public static class NullsOK {
| public void reportBadParams() throws Exception {
assertThat(testResult(DoesntUseParams.class),
hasSingleFailureContaining("everythingIsZero(ONE, ONE)"));
}
@RunWith(Theories.class)
public static class NullsOK {
|
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
CatchClause(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
CatchClause(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.