buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private Properties loadCurrentUserProperties() {
Properties properties = new Properties(defaultProperties);
InputStream is = null;
File f = new File(getSettingsDirectory(), SETTINGS_FILE_NAME);
if (f.exists()) {
try {
is =
new BufferedInputStream(
new FileInputStre... | public Properties getDefaultSettings() {
return defaultProperties;
}
} |
private void setDefaultContentDescription() {
if (compatibilityTitleListener == null) {
return;
}
String partName = getPartName();
String title = getTitle();
if (Util.equals(partName, title)) {
internalSetContentDescription("");
} else {
internalSetContentDescription(title);
}
}
| private void setDefaultContentDescription() {
if (compatibilityTitleListener == null) {
return;
}
String partName = getPartName();
String title = getTitle();
if (Util.equals(partName, title)) {
internalSetContentDescription(""); //$NON-NLS-1$
} else {
internalSetContentDescription(title);
}
}
|
static private void failNotEquals(String message, Object expected, Object actual) {
throw new ComparisonFailure(message, expected == null ? "null" : expected.toString(), actual == null ? "null" : actual.toString());
}
| static private void failNotEquals(String message, Object expected, Object actual) {
throw new ComparisonFailure(message, expected.toString(), actual.toString());
}
|
public
dnsKEYRecord(dnsName _name, short _dclass, int _ttl, StringTokenizer st)
throws IOException
| public
dnsKEYRecord(dnsName _name, short _dclass, int _ttl, MyStringTokenizer st)
throws IOException
|
public EditorStack(EditorSashContainer editorArea, WorkbenchPage page) {
super(PresentationFactoryUtil.ROLE_EDITOR); //$NON-NLS-1$
this.editorArea = editorArea;
setID(this.toString());
// Each folder has a unique ID so relative positioning is unambiguous.
// save off a ref to... | public EditorStack(EditorSashContainer editorArea, WorkbenchPage page) {
super(PresentationFactoryUtil.ROLE_EDITOR);
this.editorArea = editorArea;
setID(this.toString());
// Each folder has a unique ID so relative positioning is unambiguous.
// save off a ref to the page
... |
private String getDecodedMessageBody()
throws IOException {
int encoding = bodyHeader.getContentTransferEncoding();
switch (encoding) {
case MimeHeader.QUOTED_PRINTABLE: {
bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);
break;
}
... | private String getDecodedMessageBody()
throws IOException {
int encoding = bodyHeader.getContentTransferEncoding();
switch (encoding) {
case MimeHeader.QUOTED_PRINTABLE: {
bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);
break;
}
... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
ConditionalExpression(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDe... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
ConditionalExpression(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDe... |
private boolean getPassphrase(PGPItem item) {
String passphrase = item.getPassphrase();
boolean save = false;
boolean ret = false;
PasswordDialog dialog = new PasswordDialog();
if (passphrase.length() == 0) {
//PGPPassphraseDialog dialog = new PGPPassphraseDialog(id, false);
dialog.showDialog(item... | private boolean getPassphrase(PGPItem item) {
String passphrase = item.getPassphrase();
boolean save = false;
boolean ret = false;
PasswordDialog dialog = new PasswordDialog();
if (passphrase.length() == 0) {
//PGPPassphraseDialog dialog = new PGPPassphraseDialog(id, false);
dialog.showDialog( "PG... |
public static final String
WEBAPP_DTD_RESOURCE = "/org/apache/tomcat/deployment/web.dtd";
| public static final String
WEBAPP_DTD_RESOURCE = "/org/apache/jasper/resources/web.dtd";
|
public CompilationResult compilationResult(){
return scope.referenceCompilationUnit().compilationResult;
}
/**
* Bytecode generation for a method
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false; // reset wideMode to false
if (... | public CompilationResult compilationResult(){
return scope.referenceCompilationUnit().compilationResult;
}
/**
* Bytecode generation for a method
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false; // reset wideMode to false
if (... |
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
int pc = codeStream.position;
if (targetLabel != null) {
targetLabel.codeStream = codeStream;
if (statement != null) {
statement.generateCode(currentScope, codeStream);
}
targetLabel.place();
}
// May loose some local variable ini... | public void generateCode(BlockScope currentScope, CodeStream codeStream) {
int pc = codeStream.position;
if (targetLabel != null) {
targetLabel.codeStream = codeStream;
if (statement != null) {
statement.generateCode(currentScope, codeStream);
}
targetLabel.place();
}
// May loose some local variable ini... |
public Inet6Address
getAddress() {
return address;
}
void
rrToWire(DataByteOutputStream out, Compression c) {
if (address == null)
return;
byte [] b = address.toBytes();
out.writeArray(b);
}
| public Inet6Address
getAddress() {
return address;
}
void
rrToWire(DataByteOutputStream out, Compression c, boolean canonical) {
if (address == null)
return;
byte [] b = address.toBytes();
out.writeArray(b);
}
|
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
tagAsUnnecess... | public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
tagAsUnnecess... |
protected void matchReportReference(AstNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
// need accurate match to be able to open on type ref
if (accuracy == IJavaSearchResultCollector.POTENTIAL_MATCH) return;
// element that references the type must be included in t... | protected void matchReportReference(AstNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
// need accurate match to be able to open on type ref
if (accuracy == IJavaSearchResultCollector.POTENTIAL_MATCH) return;
// element that references the type must be included in t... |
public void execute(WorkerStatusController worker) throws Exception {
root = (IMAPRootFolder) ((SubscribeCommandReference) getReference())
.getFolder();
store = root.getServer();
node = createTreeStructure();
}
| public void execute(WorkerStatusController worker) throws Exception {
root = (IMAPRootFolder) ((SubscribeCommandReference) getReference())
.getSourceFolder();
store = root.getServer();
node = createTreeStructure();
}
|
public String toString() {
return "ProblemDetail(" + getMessage() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
return "ProblemDetail("/*nonNLS*/ + getMessage() + ")"/*nonNLS*/;
}
|
public IJavaElement getSharedWorkingCopy(IProgressMonitor pm, IBufferFactory factory, IProblemRequestor problemRequestor) throws JavaModelException {
JavaModelManager manager = JavaModelManager.getJavaModelManager();
// In order to be shared, working copies have to denote the same compilation unit
// AND use the... | public IJavaElement getSharedWorkingCopy(IProgressMonitor pm, IBufferFactory factory, IProblemRequestor problemRequestor) throws JavaModelException {
JavaModelManager manager = JavaModelManager.getJavaModelManager();
// In order to be shared, working copies have to denote the same compilation unit
// AND use the... |
public void saveAndSendEmail( ScarabUser user, Module module,
TemplateContext context )
throws Exception
{
Issue issue = (Issue) IssuePeer.retrieveByPK(getIssueId());
// If it's a module template, user must have Item | Approve
// permission,... | public void saveAndSendEmail( ScarabUser user, Module module,
TemplateContext context )
throws Exception
{
Issue issue = (Issue) IssuePeer.retrieveByPK(getIssueId());
// If it's a module template, user must have Item | Approve
// permission,... |
private TypeBinding internalResolveType(Scope scope, boolean checkBounds) {
// handle the error here
this.constant = Constant.NotAConstant;
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !this.resolvedType.isValidBinding(... | private TypeBinding internalResolveType(Scope scope, boolean checkBounds) {
// handle the error here
this.constant = Constant.NotAConstant;
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !this.resolvedType.isValidBinding(... |
public ICompilationUnit createCompilationUnit(String cuName, String contents, boolean force, IProgressMonitor monitor) throws JavaModelException {
CreateCompilationUnitOperation op= new CreateCompilationUnitOperation(this, cuName, contents, force);
runOperation(op, monitor);
return new CompilationUnit(this, cuName, ... | public ICompilationUnit createCompilationUnit(String cuName, String contents, boolean force, IProgressMonitor monitor) throws JavaModelException {
CreateCompilationUnitOperation op= new CreateCompilationUnitOperation(this, cuName, contents, force);
op.runOperation(monitor);
return new CompilationUnit(this, cuName, D... |
private LoggerRepository hierarchy;
private static Logger log = Logger.getInstance(HierarchyDynamicMBean.class);
| private LoggerRepository hierarchy;
private static Logger log = Logger.getLogger(HierarchyDynamicMBean.class);
|
public void resolve(BlockScope scope) {
if ((bits & IsUsefulEmptyStatementMASK) == 0) {
scope.problemReporter().superfluousSemicolon(this.sourceStart, this.sourceEnd);
} else {
scope.problemReporter().emptyControlFlowStatement(this.sourceStart, this.sourceEnd);
}
}
| public void resolve(BlockScope scope) {
if ((bits & IsUsefulEmptyStatement) == 0) {
scope.problemReporter().superfluousSemicolon(this.sourceStart, this.sourceEnd);
} else {
scope.problemReporter().emptyControlFlowStatement(this.sourceStart, this.sourceEnd);
}
}
|
public SelectionScanner(boolean assertMode) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, assertMode /*assert*/, null /*todo*/);
}
| public SelectionScanner(boolean assertMode) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, assertMode /*assert*/, null /*task*/);
}
|
public void actionPerformed(ActionEvent e) {
CalendarFrameMediator calendarFrame = (CalendarFrameMediator) frameMediator;
calendarFrame.goBack();
}
| public void actionPerformed(ActionEvent e) {
CalendarFrameMediator calendarFrame = (CalendarFrameMediator) frameMediator;
calendarFrame.getCalendarView().viewPrevious();
}
|
public ArrayBinding createArrayType(TypeBinding leafComponentType, int dimensionCount) {
if (leafComponentType instanceof LocalTypeBinding) // cache local type arrays with the local type itself
return ((LocalTypeBinding) leafComponentType).createArrayType(dimensionCount);
// find the array binding cache for this d... | public ArrayBinding createArrayType(TypeBinding leafComponentType, int dimensionCount) {
if (leafComponentType instanceof LocalTypeBinding) // cache local type arrays with the local type itself
return ((LocalTypeBinding) leafComponentType).createArrayType(dimensionCount, this);
// find the array binding cache for ... |
public int getNodeType() {
return DO_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
DoStatement result = new DoStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setLeadingComment(getLeadingComment());... | public int getNodeType() {
return DO_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
DoStatement result = new DoStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.setE... |
public DetailsPane() {
System.out.println("making DetailsPane");
_tabPanels.addElement(new TabToDo());
_tabPanels.addElement(new TabProps());
_tabPanels.addElement(new TabDocs());
_tabPanels.addElement(new TabSrc());
_tabPanels.addElement(new TabConstraints());
_tabPanels.addElement(ne... | public DetailsPane() {
System.out.println("making DetailsPane");
_tabPanels.addElement(new TabToDo());
_tabPanels.addElement(new TabProps());
_tabPanels.addElement(new TabDocs());
_tabPanels.addElement(new TabJavaSrc());
_tabPanels.addElement(new TabConstraints());
_tabPanels.addElemen... |
public File getLocationOfExternalTool(String toolID) {
AbstractExternalToolsPlugin plugin = null;
try {
IExtension extension = getHandler().getExtension(toolID);
plugin = (AbstractExternalToolsPlugin) extension
.instanciateExtension(new Object[] { null });
} catch (Exception e1) {
e1.printStackTr... | public File getLocationOfExternalTool(String toolID) {
AbstractExternalToolsPlugin plugin = null;
try {
IExtension extension = getHandler().getExtension(toolID);
plugin = (AbstractExternalToolsPlugin) extension
.instanciateExtension(null);
} catch (Exception e1) {
e1.printStackTrace();
return... |
public void mouseDoubleClick(MouseEvent e) {
processDoubleClick();
}
});
//Never show debug info
IContentProvider provider = new ProgressViewerContentProvider(viewer,
false,false);
viewer.setContentProvider(provider);
viewe... | public void mouseDoubleClick(MouseEvent e) {
processDoubleClick();
}
});
//Never show debug info
IContentProvider provider = new ProgressViewerContentProvider(viewer,
false,false);
viewer.setContentProvider(provider);
viewe... |
protected Commandline setupJavacCommand() throws BuildException {
Commandline cmd = new Commandline();
/*
* This option is used to never exit at the end of the ant task.
*/
cmd.createArgument().setValue("-noExit"); //$NON-NLS-1$
cmd.createArgument().setValue("-bootclasspath"); //$NON-NLS-1$
final Ja... | protected Commandline setupJavacCommand() throws BuildException {
Commandline cmd = new Commandline();
/*
* This option is used to never exit at the end of the ant task.
*/
cmd.createArgument().setValue("-noExit"); //$NON-NLS-1$
cmd.createArgument().setValue("-bootclasspath"); //$NON-NLS-1$
final Ja... |
public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() == IResource.FOLDER) {
IPath path = proxy.requestFullPath();
if (prefixesOneOf(path, nestedFolders)) {
if (equalsOneOf(path, nestedFolders)) {
// nested source folder
return false;
} ... | public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() == IResource.FOLDER) {
IPath path = proxy.requestFullPath();
if (prefixesOneOf(path, nestedFolders)) {
if (equalsOneOf(path, nestedFolders)) {
// nested source folder
return false;
} ... |
public String toString() {
return "TypeNode(" + fType.getFileName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
return "TypeNode("/*nonNLS*/ + fType.getFileName() + ")"/*nonNLS*/;
}
|
private void setTextScopeToAll()
throws Exception
{
List textAttributes = getQuickSearchTextAttributeValues();
if ( textAttributes != null )
{
textScope = new NumberKey[textAttributes.size()];
for ( int j=textAttributes.size()-1; j>=0; j-- )
... | private void setTextScopeToAll()
throws Exception
{
List textAttributes = getQuickSearchTextAttributeValues();
if ( textAttributes != null )
{
textScope = new NumberKey[textAttributes.size()];
for ( int j=textAttributes.size()-1; j>=0; j-- )
... |
public void setTarget(Object t) {
if(!t.equals(_target)) {
boolean removeOldPromiscuousListener = (_nameListener != null);
if(t instanceof MBase && _nameListener != null) {
//XXX removeOldPromiscuousListener =
//XXX ((MBase) t).addPromis... | public void setTarget(Object t) {
if(!t.equals(_target)) {
boolean removeOldPromiscuousListener = (_nameListener != null);
if(t instanceof MBase && _nameListener != null) {
//XXX removeOldPromiscuousListener =
//XXX ((MBase) t).addPromis... |
public static final int GZIP_MAGIC_2 = 0x8b;
Vector plugins;
Hashtable pluginHash;
Vector pluginSets;
PluginList() throws Exception
{
plugins = new Vector();
pluginHash = new Hashtable();
pluginSets = new Vector();
String path = jEdit.getProperty("plugin-manager.export-url");
String id = jEdit.getPro... | public static final int GZIP_MAGIC_2 = 0x8b;
Vector plugins;
Hashtable pluginHash;
Vector pluginSets;
PluginList() throws Exception
{
plugins = new Vector();
pluginHash = new Hashtable();
pluginSets = new Vector();
String path = jEdit.getProperty("plugin-manager.export-url");
String id = jEdit.getPro... |
public static IClassFileReader createDefaultClassFileReader(String fileName, int decodingFlag){
try {
return new ClassFileReader(Util.getFileByteContent(new File(fileName)), decodingFlag);
} catch(ClassFormatException e) {
return null;
} catch(IOException e) {
return null;
}
}
/**
* Create a cl... | public static IClassFileReader createDefaultClassFileReader(String fileName, int decodingFlag){
try {
return new ClassFileReader(Util.getFileByteContent(new File(fileName)), decodingFlag);
} catch(ClassFormatException e) {
return null;
} catch(IOException e) {
return null;
}
}
/**
* Create a cl... |
public String toString() {
return "ClasspathDirectory " + path; //$NON-NLS-1$
}
| public String toString() {
return "ClasspathDirectory "/*nonNLS*/ + path;
}
|
public void record(IProblem problem, CompilationResult unitResult) {
unitResult.record(problem);
SelectionEngine.this.requestor.acceptError(problem);
}
};
this.parser = new SelectionParser(problemReporter);
this.lookupEnvironment = new LookupEnvironment(this, options, problemReporter, nameEnviro... | public void record(IProblem problem, CompilationResult unitResult) {
unitResult.record(problem);
SelectionEngine.this.requestor.acceptError(problem);
}
};
this.parser = new SelectionParser(problemReporter, options.getAssertMode());
this.lookupEnvironment = new LookupEnvironment(this, options, pr... |
private static void computeDietRange0(TypeDeclaration[] types, RangeResult result) {
for (int j = 0; j < types.length; j++) {
//members
TypeDeclaration[] memberTypeDeclarations = types[j].memberTypes;
if(memberTypeDeclarations != null && memberTypeDeclarations.length > 0) {
computeDietRange0(types[j].me... | private static void computeDietRange0(TypeDeclaration[] types, RangeResult result) {
for (int j = 0; j < types.length; j++) {
//members
TypeDeclaration[] memberTypeDeclarations = types[j].memberTypes;
if(memberTypeDeclarations != null && memberTypeDeclarations.length > 0) {
computeDietRange0(types[j].me... |
protected void executeOperation() throws JavaModelException {
try {
beginTask(getMainTaskName(), getMainAmountOfWork());
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
generateNewCompilationUnitDOM(unit);
if (fCreationOccurred) {
//a change has really... | protected void executeOperation() throws JavaModelException {
try {
beginTask(getMainTaskName(), getMainAmountOfWork());
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
generateNewCompilationUnitDOM(unit);
if (fCreationOccurred) {
//a change has really... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new AddAddressToBlackListCommand(r));
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new AddAddressToBlackListCommand(r));
}
|
public void
setTSIGKey(String key) {
String name;
try {
name = InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException e) {
System.out.println("getLocalHost failed");
return;
}
setTSIGKey(name, key);
}
Message
sendTCP(Message query, byte [] out) throws IOException {
byte [] in;
Socket s;
... | public void
setTSIGKey(String key) {
String name;
try {
name = InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException e) {
System.out.println("getLocalHost failed");
return;
}
setTSIGKey(name, key);
}
Message
sendTCP(Message query, byte [] out) throws IOException {
byte [] in;
Socket s;
... |
public String toString() {
return "--- CompilationUnit Scope : "/*nonNLS*/ + new String(referenceContext.getFileName());
}
| public String toString() {
return "--- CompilationUnit Scope : " + new String(referenceContext.getFileName()); //$NON-NLS-1$
}
|
public void activateProcessing() {
try {
Thread.currentThread().sleep(10000); // wait 10 seconds so as not to interfere with plugin startup
} catch (InterruptedException ie) {
}
checkIndexConsistency();
super.activateProcessing();
}
| public void activateProcessing() {
try {
Thread.sleep(10000); // wait 10 seconds so as not to interfere with plugin startup
} catch (InterruptedException ie) {
}
checkIndexConsistency();
super.activateProcessing();
}
|
private FieldDecoration getFieldDecoration() {
FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
// Look for a decoration installed for this particular command id.
String decId = CONTENT_ASSIST_DECORATION_ID + adapter.getCommandId();
FieldDecoration dec = registry.getFieldDecoration(decI... | private FieldDecoration getFieldDecoration() {
FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
// Look for a decoration installed for this particular command id.
String decId = CONTENT_ASSIST_DECORATION_ID + adapter.getCommandId();
FieldDecoration dec = registry.getFieldDecoration(decI... |
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) {
ISourceType sourceType = sourceTypes[0];
while (sourceType.getEnclosingType() != null)
sourceType = sourceType.getEnclosingType();
if (sourceType instanceof SourceTypeElementInfo) {
// get source
SourceTypeElementInfo element... | public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) {
ISourceType sourceType = sourceTypes[0];
while (sourceType.getEnclosingType() != null)
sourceType = sourceType.getEnclosingType();
if (sourceType instanceof SourceTypeElementInfo) {
// get source
SourceTypeElementInfo element... |
protected TypeBinding getTypeBinding(Scope scope) {
if (this.resolvedType != null)
return this.resolvedType;
Binding binding = scope.getPackage(this.tokens);
if (binding != null && !binding.isValidBinding())
return (ReferenceBinding) binding; // not found
PackageBinding packageBinding = binding =... | protected TypeBinding getTypeBinding(Scope scope) {
if (this.resolvedType != null)
return this.resolvedType;
Binding binding = scope.getPackage(this.tokens);
if (binding != null && !binding.isValidBinding())
return (ReferenceBinding) binding; // not found
PackageBinding packageBinding = binding =... |
public PerspectiveBarContributionItem(IPerspectiveDescriptor perspective,
WorkbenchPage workbenchPage) {
super(PerspectiveBarContributionItem.class.getName());
this.perspective = perspective;
this.workbenchPage = workbenchPage;
preferenceStore.addPropertyChangeListener(pr... | public PerspectiveBarContributionItem(IPerspectiveDescriptor perspective,
WorkbenchPage workbenchPage) {
super(perspective.getId());
this.perspective = perspective;
this.workbenchPage = workbenchPage;
preferenceStore.addPropertyChangeListener(propertyChangeListener);
... |
public void updateGUI() throws Exception {
MimeTypeViewer viewer = new MimeTypeViewer();
MimeHeader header = new MimeHeader();
viewer.open(header, tempFile);
}
| public void updateGUI() throws Exception {
MimeTypeViewer viewer = new MimeTypeViewer();
MimeHeader header = new MimeHeader();
viewer.open(header, tempFile, false);
}
|
public final Map getCurrentState() {
final Map currentState = new HashMap(4);
currentState.put(ISources.ACTIVE_SITE_NAME, null);
currentState.put(ISources.ACTIVE_PART_NAME, null);
currentState.put(ISources.ACTIVE_PART_ID_NAME, null);
currentState.put(ISources.ACTIVE_EDITOR_NAME, null);
currentState.put(ISo... | public final Map getCurrentState() {
final Map currentState = new HashMap(7);
currentState.put(ISources.ACTIVE_SITE_NAME, null);
currentState.put(ISources.ACTIVE_PART_NAME, null);
currentState.put(ISources.ACTIVE_PART_ID_NAME, null);
currentState.put(ISources.ACTIVE_EDITOR_NAME, null);
currentState.put(ISo... |
private void updateDefaults() {
Object target = _container.getTarget();
if(target instanceof MAttribute) {
Profile profile = _container.getProfile();
setModel(new DefaultComboBoxModel(profile.getInitialValues(((MAttribute) target).getType())));
}
}
| private void updateDefaults() {
Object target = _container.getTarget();
if(target instanceof MAttribute) {
Profile profile = _container.getProfile();
// setModel(new DefaultComboBoxModel(profile.getInitialValues(((MAttribute) target).getType())));
}
}
|
private List<PotentialAssignment> potentialValues(Method method)
throws Exception {
return new AssignmentRequest(new HasDateMethod(), ParameterSignature
.signatures(method).get(0)).getPotentialAssignments();
| private List<PotentialAssignment> potentialValues(Method method)
throws Exception {
return new AssignmentRequest(HasDateMethod.class, ParameterSignature
.signatures(method).get(0)).getPotentialAssignments();
|
private static int arrange(Rectangle area, List caches,
boolean horizontally, int spacing) {
Point currentPosition = new Point(area.x, area.y);
List resizable = new ArrayList(caches.size());
List nonResizable = new ArrayList(caches.size());
TrimArea.filterResizable(caches, resizable, nonResizable, horizon... | private static int arrange(Rectangle area, List caches,
boolean horizontally, int spacing) {
Point currentPosition = new Point(area.x, area.y);
List resizable = new ArrayList(caches.size());
List nonResizable = new ArrayList(caches.size());
TrimArea.filterResizable(caches, resizable, nonResizable, horizon... |
public void convert(org.eclipse.jdt.internal.compiler.ast.Javadoc javadoc, PackageDeclaration packageDeclaration) {
if (ast.apiLevel == AST.JLS3 && packageDeclaration.getJavadoc() == null) {
if (javadoc != null) {
if (this.commentMapper == null || !this.commentMapper.hasSameTable(this.commentsTable)) {
t... | public void convert(org.eclipse.jdt.internal.compiler.ast.Javadoc javadoc, PackageDeclaration packageDeclaration) {
if (this.ast.apiLevel == AST.JLS3 && packageDeclaration.getJavadoc() == null) {
if (javadoc != null) {
if (this.commentMapper == null || !this.commentMapper.hasSameTable(this.commentsTable)) {
... |
protected boolean findSourceFiles(IResourceDelta delta) throws CoreException {
for (int i = 0, l = sourceLocations.length; i < l; i++) {
ClasspathMultiDirectory md = sourceLocations[i];
if (md.sourceFolder.equals(javaBuilder.currentProject)) {
// skip nested source & output folders when the project is a source ... | protected boolean findSourceFiles(IResourceDelta delta) throws CoreException {
for (int i = 0, l = sourceLocations.length; i < l; i++) {
ClasspathMultiDirectory md = sourceLocations[i];
if (md.sourceFolder.equals(javaBuilder.currentProject)) {
// skip nested source & output folders when the project is a source ... |
|| (codegenField.isProtected() // implicit protected access
&& codegenField.declaringClass.getPackage() != currentScope.enclosingSourceType().getPackage()))) {
if (this.syntheticAccessors == null)
this.syntheticAccessors = new MethodBinding[2];
this.syntheticAccessors[isReadAccess ? SingleNameRefere... | || (codegenField.isProtected() // implicit protected access
&& codegenField.declaringClass.getPackage() != currentScope.enclosingSourceType().getPackage()))) {
if (this.syntheticAccessors == null)
this.syntheticAccessors = new MethodBinding[2];
this.syntheticAccessors[isReadAccess ? SingleNameRefere... |
public static HelpManager getHelpManager() {
if (instance == null) {
instance = new HelpManager();
}
return instance;
}
} | public static HelpManager getInstance() {
if (instance == null) {
instance = new HelpManager();
}
return instance;
}
} |
public void run(IProgressMonitor monitor) throws CoreException {
JavaModelManager manager = JavaModelManager.getJavaModelManager();
DeltaProcessor deltaProcessor = manager.getDeltaProcessor();
int previousDeltaCount = deltaProcessor.javaModelDeltas.size();
try {
progressMonitor = monitor;
pushOperation(t... | public void run(IProgressMonitor monitor) throws CoreException {
JavaModelManager manager = JavaModelManager.getJavaModelManager();
DeltaProcessor deltaProcessor = manager.getDeltaProcessor();
int previousDeltaCount = deltaProcessor.javaModelDeltas.size();
try {
progressMonitor = monitor;
pushOperation(t... |
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName) {
if (!isPackage(qualifiedPackageName))
return null; // most common case
try {
ClassFileReader reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName);
if (reader != null) return n... | public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName) {
if (!isPackage(qualifiedPackageName))
return null; // most common case
try {
ClassFileReader reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName);
if (reader != null) return n... |
public ServerSession getNewSession(Request req, Context ctx) {
// Recycle or create a Session instance
ServerSession session = (ServerSession)recycled.get();
if (session == null) {
session = new ServerSession();
session.setManager( this );
}
session.setContext( ctx );
session.setStat... | public ServerSession getNewSession(Request req, Context ctx) {
// Recycle or create a Session instance
ServerSession session = (ServerSession)recycled.get();
if (session == null) {
session = ctx.getContextManager().createServerSession();
session.setManager( this );
}
session.setContext( ct... |
private Expression optionalExpression = null;
/**
* Creates a new AST node for a return statement owned by the
* given AST. By default, the statement has no expression.
*
* @param ast the AST that is to own this node
*/
ReturnStatement(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
*... | private Expression optionalExpression = null;
/**
* Creates a new AST node for a return statement owned by the
* given AST. By default, the statement has no expression.
*
* @param ast the AST that is to own this node
*/
ReturnStatement(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
*... |
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);
/* Update cycle marker */
IMarker... |
public String toString() {
return "--- CompilationUnit Scope : " + new String(referenceContext.getFileName());
}
| public String toString() {
return "--- CompilationUnit Scope : "/*nonNLS*/ + new String(referenceContext.getFileName());
}
|
protected void setTarget(Object target) {
if (_propertySetName == null || _propertySetName.equals(""))
throw new IllegalStateException("propertySetname not set!");
if (_target instanceof MBase) {
UmlModelEventPump.getPump().removeModelEventListener(this, (MBase)_target, _pro... | protected void setTarget(Object target) {
if (_propertySetName == null || _propertySetName.equals(""))
throw new IllegalStateException("propertySetname not set!");
if (_target instanceof MBase) {
UmlModelEventPump.getPump().removeModelEventListener(this, (MBase)_target, _pro... |
public void actionPerformed(ActionEvent arg0) {
super.actionPerformed(arg0);
// we have an edge
if (_edge == null) return;
// lets test which situation we have. 3 Possibilities:
// 1. The nodes are allready on the diagram, we can use canAddEdge for this
// 2. One of t... | public void actionPerformed(ActionEvent arg0) {
super.actionPerformed(arg0);
// we have an edge
if (_edge == null) return;
// lets test which situation we have. 3 Possibilities:
// 1. The nodes are allready on the diagram, we can use canAddEdge for this
// 2. One of t... |
public void engineInit(ContextManager cm) throws TomcatException {
}
// -------------------- Internal methods --------------------
String createNewId(String jsIdent) {
/**
* When using a SecurityManager and a JSP page or servlet triggers
* creation of a new session id it... | public void engineInit(ContextManager cm) throws TomcatException {
}
// -------------------- Internal methods --------------------
String createNewId(String jsIdent) {
/**
* When using a SecurityManager and a JSP page or servlet triggers
* creation of a new session id it... |
public FieldPattern(
boolean findDeclarations,
boolean readAccess,
boolean writeAccess,
char[] name,
char[] declaringQualification,
char[] declaringSimpleName,
char[] typeQualification,
char[] typeSimpleName,
int matchRule) {
super(FIELD_PATTERN, findDeclarations, readAccess, writeAccess, name, matchRule)... | public FieldPattern(
boolean findDeclarations,
boolean readAccess,
boolean writeAccess,
char[] name,
char[] declaringQualification,
char[] declaringSimpleName,
char[] typeQualification,
char[] typeSimpleName,
int matchRule) {
super(FIELD_PATTERN, findDeclarations, readAccess, writeAccess, name, matchRule)... |
public char[] getFileName() {
return CompilationUnit.this.getFileName();
}
}, true /*full parse to find local elements*/);
// update timestamp (might be IResource.NULL_STAMP if original does not exist)
if (underlyingResource == null) {
underlyingResource = getResource();
}
unitInfo.timestamp = ((IFi... | public char[] getFileName() {
return CompilationUnit.this.getFileName();
}
}, true /*full parse to find local elements*/);
// update timestamp (might be IResource.NULL_STAMP if original does not exist)
if (underlyingResource == null) {
underlyingResource = getResource();
}
unitInfo.timestamp = ((IFi... |
protected void configureShell(Shell shell) {
super.configureShell(shell);
detachedWindowShells = new ShellPool(shell, SWT.TOOL | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE | getDefaultOrientation());
String title = getWindowConfigurer().basicGetTitle();
if (title != null) {... | protected void configureShell(Shell shell) {
super.configureShell(shell);
detachedWindowShells = new ShellPool(shell, SWT.TOOL | SWT.TITLE | SWT.MAX | SWT.RESIZE | getDefaultOrientation());
String title = getWindowConfigurer().basicGetTitle();
if (title != null) {
... |
public String toString() {
StringBuffer buf = new StringBuffer("MethodIndictment("); //$NON-NLS-1$
buf.append(fName);
buf.append('/');
buf.append(fParmCount);
buf.append(')');
return buf.toString();
}
| public String toString() {
StringBuffer buf = new StringBuffer("MethodIndictment("/*nonNLS*/);
buf.append(fName);
buf.append('/');
buf.append(fParmCount);
buf.append(')');
return buf.toString();
}
|
public void put(Object o) {
int idx=-1;
synchronized( lock ) {
if( current < max - 1 )
idx=++current;
if( idx > 0 )
pool[idx]=o;
}
}
| public void put(Object o) {
int idx=-1;
synchronized( lock ) {
if( current < max - 1 )
idx=++current;
if( idx >= 0 )
pool[idx]=o;
}
}
|
public boolean execute() throws BuildException {
this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.usingJDTCompiler"), Project.MSG_VERBOSE); //$NON-NLS-1$
Commandline cmd = setupJavacCommand();
try {
Class c = Class.forName(compilerClass);
Constructor batchCompilerConstructor = c.getCo... | public boolean execute() throws BuildException {
this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.usingJDTCompiler"), Project.MSG_VERBOSE); //$NON-NLS-1$
Commandline cmd = setupJavacCommand();
try {
Class c = Class.forName(compilerClass);
Constructor batchCompilerConstructor = c.getCo... |
public CMenuItem(Action action) {
super(action);
// Enable JavaHelp support if topic id is defined
String topicID = (String) action.getValue(AbstractColumbaAction.TOPIC_ID);
if (topicID != null) {
HelpManager.getHelpManager().enableHelpOnButton(this, topicID);
}... | public CMenuItem(Action action) {
super(action);
// Enable JavaHelp support if topic id is defined
String topicID = (String) action.getValue(AbstractColumbaAction.TOPIC_ID);
if (topicID != null) {
HelpManager.getInstance().enableHelpOnButton(this, topicID);
}
... |
private void showDescription(DecoratorDefinition definition) {
if (descriptionText == null || descriptionText.isDisposed()) {
return;
}
String text = definition.getDescription();
if (text == null || text.length() == 0)
descriptionText.setText(
WorkbenchMessages.getString(
"DecoratorsPreferencePa... | private void showDescription(DecoratorDefinition definition) {
if (descriptionText == null || descriptionText.isDisposed()) {
return;
}
String text = definition.getDescription();
if (text == null || text.length() == 0)
descriptionText.setText(
WorkbenchMessages.getString(
"PreferencePage.noDescr... |
public String toString() {
return "OldBuilderType("/*nonNLS*/ + fOldTSEntry.getType().getName() + ")"/*nonNLS*/;
}
| public String toString() {
return "OldBuilderType(" + fOldTSEntry.getType().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
|
protected void beginToCompile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits, String[] bindingKeys) {
int sourceLength = sourceUnits.length;
int keyLength = bindingKeys.length;
int maxUnits = sourceLength + keyLength;
this.totalUnits = 0;
this.unitsToProcess = new CompilationUnitDeclara... | protected void beginToCompile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits, String[] bindingKeys) {
int sourceLength = sourceUnits.length;
int keyLength = bindingKeys.length;
int maxUnits = sourceLength + keyLength;
this.totalUnits = 0;
this.unitsToProcess = new CompilationUnitDeclara... |
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
// various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
int pc = codeStream.position;
lhs.ge... | public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
// various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
int pc = codeStream.position;
lhs.ge... |
public void setOwner(Classifier x) throws PropertyVetoException {
fireVetoableChange("owner", _visibility, x);
_owner = x;
setNamespace(x);
}
| public void setOwner(Classifier x) throws PropertyVetoException {
fireVetoableChange("owner", _visibility, x);
_owner = x;
//setNamespace(x);
}
|
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("Built delta:\n"/*nonNLS*/);
buffer.append(this.delta.toString());
| public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("Built delta:\n"); //$NON-NLS-1$
buffer.append(this.delta.toString());
|
public boolean isReadyToRun() {
if (this.indexSelector == null) { // only check once, i.e. as long as this job is used, it will keep the same index picture
this.indexSelector = new IndexSelector(this.scope, this.focus, this.isPolymorphicSearch, this.indexManager);
this.indexSelector.getIndexes(); // will only ... | public boolean isReadyToRun() {
if (this.indexSelector == null) { // only check once. As long as this job is used, it will keep the same index picture
this.indexSelector = new IndexSelector(this.scope, this.focus, this.isPolymorphicSearch, this.indexManager);
this.indexSelector.getIndexes(); // will only cache... |
public synchronized void paint(Graphics g)
{
Dimension size = getSize();
if(offscreenImg == null)
{
offscreenImg = createImage(size.width,size.height);
offscreenGfx = offscreenImg.getGraphics();
offscreenGfx.setFont(getFont());
}
offscreenGfx.setColor(Color.gray);
offscreenGfx.drawRect(0,0,size... | public synchronized void paint(Graphics g)
{
Dimension size = getSize();
if(offscreenImg == null)
{
offscreenImg = createImage(size.width,size.height);
offscreenGfx = offscreenImg.getGraphics();
offscreenGfx.setFont(getFont());
}
offscreenGfx.setColor(Color.gray);
offscreenGfx.drawRect(0,0,size... |
private String text = Util.EMPTY_STRING;
/**
* Creates a new AST node for a text element owned by the given AST.
* The new node has an empty text string.
* <p>
* N.B. This constructor is package-private; all subclasses must be
* declared in the same package; clients are unable to declare
* additional ... | private String text = Util.EMPTY_STRING;
/**
* Creates a new AST node for a text element owned by the given AST.
* The new node has an empty text string.
* <p>
* N.B. This constructor is package-private; all subclasses must be
* declared in the same package; clients are unable to declare
* additional ... |
public SetResponse
addMessage(Message in) {
boolean isAuth = in.getHeader().getFlag(Flags.AA);
Record question = in.getQuestion();
Name qname;
Name curname;
int qtype;
int qclass;
int cred;
int rcode = in.getHeader().getRcode();
boolean haveAnswer = false;
boolean completed = false;
RRset [] answers, auth, a... | public SetResponse
addMessage(Message in) {
boolean isAuth = in.getHeader().getFlag(Flags.AA);
Record question = in.getQuestion();
Name qname;
Name curname;
int qtype;
int qclass;
int cred;
int rcode = in.getHeader().getRcode();
boolean haveAnswer = false;
boolean completed = false;
RRset [] answers, auth, a... |
public void contextInit(Context ctx) {
if( ctx.getDebug() > 0 ) ctx.log("XmlReader - init " + ctx.getPath() + " " + ctx.getDocBase() );
// read default web.xml
try {
processFile(ctx, ctx.getContextManager().getHome() + "/conf/web.xml");
processFile(ctx, ctx.getDocBase() + "/WEB-INF/web.xml");
Xm... | public void contextInit(Context ctx) {
if( ctx.getDebug() > 0 ) ctx.log("XmlReader - init " + ctx.getPath() + " " + ctx.getDocBase() );
// read default web.xml
try {
processFile(ctx, ctx.getContextManager().getHome() + "/conf/web.xml");
processFile(ctx, ctx.getDocBase() + "/WEB-INF/web.xml");
Xm... |
public void resolveTypeExpecting(BlockScope scope, TypeBinding requiredType) {
if (this.value == null) {
this.compilerElementPair = new ElementValuePair(this.name, this.value, this.binding);
return;
}
if (requiredType == null) {
// fault tolerance: keep resolving
if (this.value instanceof ArrayIni... | public void resolveTypeExpecting(BlockScope scope, TypeBinding requiredType) {
if (this.value == null) {
this.compilerElementPair = new ElementValuePair(this.name, this.value, this.binding);
return;
}
if (requiredType == null) {
// fault tolerance: keep resolving
if (this.value instanceof ArrayIni... |
public static final int BINARY = 2;
ClasspathDirectory(File directory, String encoding, int mode) {
this.mode = mode;
this.path = directory.getAbsolutePath();
if (!this.path.endsWith(File.separator))
this.path += File.separator;
this.directoryCache = new Hashtable(11);
this.encoding = encoding;
}
ClasspathDire... | public static final int BINARY = 2;
ClasspathDirectory(File directory, String encoding, int mode) {
this.mode = mode;
this.path = directory.getAbsolutePath();
if (!this.path.endsWith(File.separator))
this.path += File.separator;
this.directoryCache = new Hashtable(11);
this.encoding = encoding;
}
ClasspathDire... |
public static void main(String argv[]) {
if(argv.length == 2)
init(argv[0], argv[1], null, null);
else if( argv.length == 4)
init(argv[0], argv[1], argv[2], argv[3]);
else
Usage("Wrong number of arguments.");
NDC.push("some context");
double delta;
String msg = "ABCDE... | public static void main(String argv[]) {
if(argv.length == 2)
init(argv[0], argv[1], null, null);
else if( argv.length == 4)
init(argv[0], argv[1], argv[2], argv[3]);
else
Usage("Wrong number of arguments.");
NDC.push("some context");
double delta;
String msg = "ABCDE... |
public DefaultCodeFormatter() {
this.preferences = FormattingPreferences.getSunSetttings();
this.options = JavaCore.getOptions();
}
| public DefaultCodeFormatter() {
this.preferences = FormattingPreferences.getDefault();
this.options = JavaCore.getOptions();
}
|
public NestedTypeBinding(char[][] typeName, ClassScope scope, SourceTypeBinding enclosingType) {
super(typeName, enclosingType.fPackage, scope);
this.tagBits |= TagBits.IsNestedType;
this.enclosingType = enclosingType;
}
| public NestedTypeBinding(char[][] typeName, ClassScope scope, SourceTypeBinding enclosingType) {
super(typeName, enclosingType.fPackage, scope);
this.tagBits |= (TagBits.IsNestedType | TagBits.ContainsNestedTypeReferences);
this.enclosingType = enclosingType;
}
|
public TextEdit format(String string, Expression expression) {
// reset the scribe
this.scribe.reset();
long startTime = System.currentTimeMillis();
final char[] compilationUnitSource = string.toCharArray();
this.localScanner.setSource(compilationUnitSource);
this.scribe.initializeScanner(compilatio... | public TextEdit format(String string, Expression expression) {
// reset the scribe
this.scribe.reset();
long startTime = System.currentTimeMillis();
final char[] compilationUnitSource = string.toCharArray();
this.localScanner.setSource(compilationUnitSource);
this.scribe.initializeScanner(compilatio... |
public char[] computeUniqueKey(boolean isLeaf) {
// declaring class
char[] declaringKey = this.declaringClass.computeUniqueKey(false/*not a leaf*/);
int declaringLength = declaringKey.length;
// selector
int selectorLength = this.selector == TypeConstants.INIT ? 0 : this.selector.length;
// generic signature... | public char[] computeUniqueKey(boolean isLeaf) {
// declaring class
char[] declaringKey = this.declaringClass.computeUniqueKey(false/*not a leaf*/);
int declaringLength = declaringKey.length;
// selector
int selectorLength = this.selector == TypeConstants.INIT ? 0 : this.selector.length;
// generic signature... |
public void actionPerformed (ActionEvent e) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Project p = pb.getProject();
if (p != null && p.needsSave()) {
String t = MessageFormat.format (
Localizer.localize ("Actions", "template.open_project.save_changes_to"),
new Object[... | public void actionPerformed (ActionEvent e) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Project p = pb.getProject();
if (p != null && p.needsSave()) {
String t = MessageFormat.format (
Localizer.localize ("Actions", "template.open_project.save_changes_to"),
new Object[... |
public void consumeWildCard(int kind) {
switch (kind) {
case Wildcard.EXTENDS:
case Wildcard.SUPER:
BindingKeyResolver boundResolver = (BindingKeyResolver) this.types.get(0);
this.typeBinding = this.environment.createWildcard((ReferenceBinding) this.typeBinding, this.wildcardRank, (TypeBinding) boundRe... | public void consumeWildCard(int kind) {
switch (kind) {
case Wildcard.EXTENDS:
case Wildcard.SUPER:
BindingKeyResolver boundResolver = (BindingKeyResolver) this.types.get(0);
this.typeBinding = this.environment.createWildcard((ReferenceBinding) this.typeBinding, this.wildcardRank, (TypeBinding) boundRe... |
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if the binding declaring class is not visible, need special action
// for runtime compatibility on 1.2 VMs : change the declaring class of the binding
// NOTE: from target 1.2 on, me... | public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if the binding declaring class is not visible, need special action
// for runtime compatibility on 1.2 VMs : change the declaring class of the binding
// NOTE: from target 1.2 on, me... |
extends org.tigris.scarab.om.BaseRModuleUserPeer
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.turb... | extends org.tigris.scarab.om.BaseRModuleUserPeer
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.turb... |
public void setJavaConventionsSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_argu... | public void setJavaConventionsSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_argu... |
public void recordNewProblems(IProblem[] newProblems) {
int length2 = newProblems.length;
if (length2 == 0) return;
int length1 = this.problems == null ? 0 : this.problems.length;
IProblem[] merged = new IProblem[length1 + length2];
if (length1 > 0) // always make a copy even if currently empty
System.arraycopy... | public void recordNewProblems(IProblem[] newProblems) {
int length2 = newProblems.length;
if (length2 == 0) return;
int length1 = this.problems == null ? 0 : this.problems.length;
IProblem[] merged = new IProblem[length1 + length2];
if (length1 > 0) // always make a copy even if currently empty
System.arraycopy... |
public List<IHeaderItem> getAllHeaderItems(String uid) throws StoreException{
if ( uid == null ) throw new IllegalArgumentException("uid == null");
Vector v = new Vector();
AddressbookTreeModel model = AddressbookTreeModel.getInstance();
IFolder f = model.getFolder(Integer.parseInt(uid));
if ( f == null )... | public List<IHeaderItem> getAllHeaderItems(String uid) throws StoreException{
if ( uid == null ) throw new IllegalArgumentException("uid == null");
Vector<IHeaderItem> v = new Vector<IHeaderItem>();
AddressbookTreeModel model = AddressbookTreeModel.getInstance();
IFolder f = model.getFolder(Integer.parseInt... |
public CopyMessageAction(AbstractFrameController frameController) {
super(
frameController,
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_copy"));
// toolbar text
setToolBarName(
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_copy_toolbar"));
// ... | public CopyMessageAction(AbstractFrameController frameController) {
super(
frameController,
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_copy"));
// toolbar text
setToolBarText(
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_copy_toolbar"));
// ... |
private static TypeDeclaration convert(IType type, IType alreadyComputedMember,TypeDeclaration alreadyComputedMemberDeclaration, CompilationResult compilationResult) throws JavaModelException {
/* create type declaration - can be member type */
TypeDeclaration typeDeclaration = new TypeDeclaration(compilationResul... | private static TypeDeclaration convert(IType type, IType alreadyComputedMember,TypeDeclaration alreadyComputedMemberDeclaration, CompilationResult compilationResult) throws JavaModelException {
/* create type declaration - can be member type */
TypeDeclaration typeDeclaration = new TypeDeclaration(compilationResul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.