buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public synchronized boolean acquire(long delay) throws InterruptedException {
if (Thread.interrupted())
throw new InterruptedException();
long start = System.currentTimeMillis();
long timeLeft = delay;
while (true) {
if (notifications > 0) {
notifications--;
return true;
}
if (timeLeft < 0)... | public synchronized boolean acquire(long delay) throws InterruptedException {
if (Thread.interrupted())
throw new InterruptedException();
long start = System.currentTimeMillis();
long timeLeft = delay;
while (true) {
if (notifications > 0) {
notifications--;
return true;
}
if (timeLeft <= 0... |
public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope, true /* check bounds*/);
checkModifiers();
if (variableType != null) {
if (variableType == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
r... | public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope, true /* check bounds*/);
checkModifiers();
if (variableType != null) {
if (variableType == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
r... |
protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("operation.createUnitProgress"), 2); //$NON-NLS-1$
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
IPackageFragment pkg = (IPackageFragment) getParentElement();
IContainer fol... | protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("operation.createUnitProgress"), 2); //$NON-NLS-1$
JavaElementDelta delta = newJavaElementDelta();
ICompilationUnit unit = getCompilationUnit();
IPackageFragment pkg = (IPackageFragment) getParentElement();
IContainer fol... |
public static Class getOMClass(Record record, int offset)
throws TorqueException
{
Class c = null;
try
{
NumberKey attId = new NumberKey(record.getValue(offset-1 + 3)
.asString());
Attribute attribute = Attribute.getInstanc... | public static Class getOMClass(Record record, int offset)
throws TorqueException
{
Class c = null;
try
{
NumberKey attId = new NumberKey(record.getValue(offset-1 + 3)
.asString());
Attribute attribute = AttributeManager.get... |
protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(this.tabString(tab));
if (getElementName().length() == 0) {
buffer.append("[default]"); //$NON-NLS-1$
} else {
buffer.append(getElementName());
}
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
} else {
... | protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(this.tabString(tab));
if (getElementName().length() == 0) {
buffer.append("<default>"); //$NON-NLS-1$
} else {
buffer.append(getElementName());
}
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
} else {
... |
public int matchLevel(AstNode node, boolean resolve) {
if (!(node instanceof TypeReference)) return IMPOSSIBLE_MATCH;
TypeReference typeRef = (TypeReference)node;
if (resolve) {
TypeBinding binding = typeRef.binding;
if (binding == null) {
return INACCURATE_MATCH;
} else {
return this.matchLevelForType(... | public int matchLevel(AstNode node, boolean resolve) {
if (!(node instanceof TypeReference)) return IMPOSSIBLE_MATCH;
TypeReference typeRef = (TypeReference)node;
if (resolve) {
TypeBinding binding = typeRef.resolvedType;
if (binding == null) {
return INACCURATE_MATCH;
} else {
return this.matchLevelFor... |
public StringBuffer convert(LoggingEvent event) {
buf.setLength(0);
buf.append(Long.toString(event.timeStamp - LoggingEvent.getStartTime()));
return buf;
}
| public StringBuffer convert(LoggingEvent event) {
buf.setLength(0);
buf.append(Long.toString(event.getTimeStamp() - LoggingEvent.getStartTime()));
return buf;
}
|
protected boolean computeChildren(OpenableElementInfo info, IResource resource) throws JavaModelException {
ArrayList vChildren = new ArrayList();
int kind = getKind();
String extType;
if (kind == IPackageFragmentRoot.K_SOURCE) {
extType = "java"; //$NON-NLS-1$
} else {
extType = "class"; //$NON-NLS-1$
}
try... | protected boolean computeChildren(OpenableElementInfo info, IResource resource) throws JavaModelException {
ArrayList vChildren = new ArrayList();
int kind = getKind();
String extType;
if (kind == IPackageFragmentRoot.K_SOURCE) {
extType = "java"; //$NON-NLS-1$
} else {
extType = "class"; //$NON-NLS-1$
}
try... |
public CodeSnippetParser(ProblemReporter problemReporter, EvaluationContext evaluationContext, boolean optimizeStringLiterals, int codeSnippetStart, int codeSnippetEnd) {
super(problemReporter, optimizeStringLiterals);
this.codeSnippetStart = codeSnippetStart;
this.codeSnippetEnd = codeSnippetEnd;
this.evaluationCo... | public CodeSnippetParser(ProblemReporter problemReporter, EvaluationContext evaluationContext, boolean optimizeStringLiterals, int codeSnippetStart, int codeSnippetEnd) {
super(problemReporter, optimizeStringLiterals);
this.codeSnippetStart = codeSnippetStart;
this.codeSnippetEnd = codeSnippetEnd;
this.evaluationCo... |
protected void reportMatching(TypeDeclaration type, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) throws CoreException {
// create type handle
IJavaElement enclosingElement = parent;
if (enclosingElement == null) {
enclosingElement = createTypeHandle(new String(type.name));
} el... | protected void reportMatching(TypeDeclaration type, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) throws CoreException {
// create type handle
IJavaElement enclosingElement = parent;
if (enclosingElement == null) {
enclosingElement = createTypeHandle(new String(type.name));
} el... |
protected char[] getClassName() {
return CharOperation.concat(CODE_SNIPPET_CLASS_NAME_PREFIX, Integer.toString(this.context.CODE_SNIPPET_COUNTER + 1).toCharArray());
}
| protected char[] getClassName() {
return CharOperation.concat(CODE_SNIPPET_CLASS_NAME_PREFIX, Integer.toString(EvaluationContext.CODE_SNIPPET_COUNTER + 1).toCharArray());
}
|
public void actionPerformed(ActionEvent evt) {
((AbstractMailView) frameMediator.getBaseView()).showFolderInfoPanel();
}
| public void actionPerformed(ActionEvent evt) {
((AbstractMailView) frameMediator.getView()).showFolderInfoPanel();
}
|
// public boolean equalTo(Object other) { return true; }
// }
// interface Equivalent<T> { boolean equalTo(T other); }
// interface EqualityComparable { boolean equalTo(Object other); }
// class A<T extends Number> { void m(T t) {} }
// class B<S extends Integer> extends A<S> { void m(S t) {}}
// class ... | // public boolean equalTo(Object other) { return true; }
// }
// interface Equivalent<T> { boolean equalTo(T other); }
// interface EqualityComparable { boolean equalTo(Object other); }
// class A<T extends Number> { void m(T t) {} }
// class B<S extends Integer> extends A<S> { void m(S t) {}}
// class ... |
public PropPanelCollaboration() {
super("Collaboration", _collaborationIcon, ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"),new UMLTextField2(new UMLModelElementNameDocument()));
addField(Argo.localize("UMLMenu", "label.stereotype"),
... | public PropPanelCollaboration() {
super("Collaboration", ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"),new UMLTextField2(new UMLModelElementNameDocument()));
addField(Argo.localize("UMLMenu", "label.stereotype"),
new UMLComboBox... |
public void resolve(BlockScope scope) {
// the return type should be void for a constructor.
// the test is made into getConstructor
// mark the fact that we are in a constructor call.....
// unmark at all returns
MethodScope methodScope = scope.methodScope();
try {
AbstractMethodDeclaration methodDecl... | public void resolve(BlockScope scope) {
// the return type should be void for a constructor.
// the test is made into getConstructor
// mark the fact that we are in a constructor call.....
// unmark at all returns
MethodScope methodScope = scope.methodScope();
try {
AbstractMethodDeclaration methodDecl... |
sb.append ((int)footprint & 0xFFFF);
import java.net.*;
import java.io.*;
import java.util.*;
import java.text.*;
public class dnsSIGRecord extends dnsRecord {
short typeCovered;
byte alg;
byte labels;
int origTTL;
Date expire, timeSigned;
short footprint;
dnsName signer;
byte [] signature;
public dnsSIGRecord(dnsN... | sb.append ((int)footprint & 0xFFFF);
import java.net.*;
import java.io.*;
import java.util.*;
import java.text.*;
public class dnsSIGRecord extends dnsRecord {
short typeCovered;
byte alg;
byte labels;
int origTTL;
Date expire, timeSigned;
short footprint;
dnsName signer;
byte [] signature;
public dnsSIGRecord(dnsN... |
public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
ConfigurableOption[] settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, r... | public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
ConfigurableOption[] settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, r... |
protected void executeOperation() throws JavaModelException {
if (fMonitor != null){
if (fMonitor.isCanceled()) return;
fMonitor.beginTask(Util.bind("element.reconciling"), 10); //$NON-NLS-1$
}
CompilationUnit workingCopy = getWorkingCopy();
boolean wasConsistent = workingCopy.isConsistent();
JavaEle... | protected void executeOperation() throws JavaModelException {
if (fMonitor != null){
if (fMonitor.isCanceled()) return;
fMonitor.beginTask(Util.bind("element.reconciling"), 10); //$NON-NLS-1$
}
CompilationUnit workingCopy = getWorkingCopy();
boolean wasConsistent = workingCopy.isConsistent();
JavaEle... |
public WorkbenchWindow(int number) {
super(null);
this.number = number;
layout = new TrimLayout();
//layout.setMargins(3,3);
layout.setSpacing(5, 5, 5, 2);
// Make sure there is a workbench. This call will throw
// an exception if workbench not created yet.
PlatformUI.getWorkbench();
// Setup ... | public WorkbenchWindow(int number) {
super(null);
this.number = number;
layout = new TrimLayout();
//layout.setMargins(3,3);
layout.setSpacing(5, 5, 2, 2);
// Make sure there is a workbench. This call will throw
// an exception if workbench not created yet.
PlatformUI.getWorkbench();
// Setup ... |
private void elementAdded(Openable element, IResourceDelta delta, RootInfo rootInfo) {
int elementType = element.getElementType();
if (elementType == IJavaElement.JAVA_PROJECT) {
// project add is handled by JavaProject.configure() because
// when a project is created, it does not yet have a java nature
... | private void elementAdded(Openable element, IResourceDelta delta, RootInfo rootInfo) {
int elementType = element.getElementType();
if (elementType == IJavaElement.JAVA_PROJECT) {
// project add is handled by JavaProject.configure() because
// when a project is created, it does not yet have a java nature
... |
List getPatternBindingDefinitions();
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* w... | List getPatternBindingDefinitions();
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* w... |
public String toString() {
return Localizer.localize ("Tree", "Class->Attribute");
}
| public String toString() {
return Localizer.localize ("Tree", "misc.class.attribute");
}
|
public Constant resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
// switchExpressionType maybe null in error case
scope.enclosingCase = this; // record entering in a switch case block
if (constantExpression == null) {
// remember the default case into... | public Constant resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
// switchExpressionType maybe null in error case
scope.enclosingCase = this; // record entering in a switch case block
if (constantExpression == null) {
// remember the default case into... |
public IJavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (cu.owner == DefaultWorkingCopyOwner.PRIMARY) return this;
}
IJavaElement parent = fParent.getPrimaryElement(false);
switch (parent.getElementType()) {
case IJa... | public IJavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (cu.isPrimary()) return this;
}
IJavaElement parent = fParent.getPrimaryElement(false);
switch (parent.getElementType()) {
case IJavaElement.COMPILATION_UNIT:
... |
public SystemMenuMoveFolder(IStackPresentationSite site) {
this.site = site;
setText(WorkbenchMessages.getString("ViewPane.moveFolder")); //$NON-NLS-1$
}
| public SystemMenuMoveFolder(IStackPresentationSite site) {
this.site = site;
setText(WorkbenchMessages.ViewPane_moveFolder);
}
|
public Javadoc parse(int start, int length) {
// Init
this.source = this.scanner.source;
this.lineEnds = this.scanner.lineEnds;
this.docComment = this.ast.newJavadoc();
// Parse
if (this.checkDocComment) {
commentParse(start, start+length-1);
}
this.docComment.setSourceRange(start, length);
if... | public Javadoc parse(int start, int length) {
// Init
this.source = this.scanner.source;
this.lineEnds = this.scanner.lineEnds;
this.docComment = this.ast.newJavadoc();
// Parse
if (this.checkDocComment) {
commentParse(start, start+length-1);
}
this.docComment.setSourceRange(start, length);
if... |
public Object getContext(String key, Object data)
throws PolicyContextException
{
Object context = null;
if( key.equalsIgnoreCase(SEI_ARGS_KEY) == false )
context = ejbContext.get();
return context;
}
| public Object getContext(String key, Object data)
throws PolicyContextException
{
Object context = null;
if( key.equalsIgnoreCase(SEI_ARGS_KEY) == true )
context = ejbContext.get();
return context;
}
|
public BaseTurbineTestCase() {
System.setProperty("applicationRoot", "./target/scarab");
}
| public BaseTurbineTestCase() {
System.setProperty("applicationRoot", "./target/test-classes");
}
|
public static int findDelim2( byte bytes[], int off, int end )
{
while( off < end ) {
byte b=bytes[off];
if( b==' ' || b==';' || b==',' )
return off;
off++;
}
return off;
}
| public static int findDelim2( byte bytes[], int off, int end )
{
while( off < end ) {
byte b=bytes[off];
if( b==';' || b==',' )
return off;
off++;
}
return off;
}
|
public void insertUpdate(DocumentEvent e) {
System.out.println(getClass().getName() + " insert");
if (e.getDocument() == _nameField.getDocument()) setTargetName();
}
| public void insertUpdate(DocumentEvent e) {
//System.out.println(getClass().getName() + " insert");
if (e.getDocument() == _nameField.getDocument()) setTargetName();
}
|
private boolean isAnyVisible(Viewer viewer, Object parent, Object[] elements) {
if (matcher == null) {
return true;
}
Object[] filtered = (Object[]) cache.get(parent);
if (filtered != null) {
return filtered.length > 0;
}
Boolean foundAny = (Boolean) foundAnyCache.get... | private boolean isAnyVisible(Viewer viewer, Object parent, Object[] elements) {
if (matcher == null) {
return true;
}
Object[] filtered = (Object[]) cache.get(parent);
if (filtered != null) {
return filtered.length > 0;
}
Boolean foundAny = (Boolean) foundAnyCache.get... |
public int generateDelta(JavaElementDelta delta) {
JavaModelManager manager = JavaModelManager.getJavaModelManager();
DeltaProcessingState state = manager.deltaState;
if (state.findJavaProject(this.project.getElementName()) == null)
// project doesn't exist yet (we're in an IWorkspaceRunnable)
// no need t... | public int generateDelta(JavaElementDelta delta) {
JavaModelManager manager = JavaModelManager.getJavaModelManager();
DeltaProcessingState state = manager.deltaState;
if (state.findJavaProject(this.project.getElementName()) == null)
// project doesn't exist yet (we're in an IWorkspaceRunnable)
// no need t... |
public static Project makeEmptyProject() {
Argo.log.info("making empty project");
Project p = new Project();
p.defineType(JavaUML.VOID_TYPE); //J.101
p.defineType(JavaUML.CHAR_TYPE); //J.102
p.defineType(JavaUML.INT_TYPE); //J.103
p.defineType(JavaUML.BO... | public static Project makeEmptyProject() {
Argo.log.info("making empty project");
Project p = new Project();
p.defineType(JavaUML.VOID_TYPE); //J.101
p.defineType(JavaUML.CHAR_TYPE); //J.102
p.defineType(JavaUML.INT_TYPE); //J.103
p.defineType(JavaUML.BO... |
private Object[] computeNonJavaResources(IResource underlyingResource, PackageFragmentRoot handle) {
Object[] resources = 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)
if (underlyingResource.get... | private Object[] computeNonJavaResources(IResource underlyingResource, PackageFragmentRoot handle) {
Object[] resources = 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)
if (underlyingResource.get... |
public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
TypeBinding methodType =
(methodScope.referenceContext instanceof AbstractMethodDeclaration)
? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
? ... | public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
TypeBinding methodType =
(methodScope.referenceContext instanceof AbstractMethodDeclaration)
? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
? ... |
public void doRequestroles(RunData data, TemplateContext context)
throws Exception
{
String template = getCurrentTemplate(data, null);
String nextTemplate = getNextTemplate(data, template);
ScarabUser user = (ScarabUser)data.getUser();
SecurityAdminTool scarabA = getSecur... | public void doRequestroles(RunData data, TemplateContext context)
throws Exception
{
String template = getCurrentTemplate(data, null);
String nextTemplate = getNextTemplate(data, template);
ScarabUser user = (ScarabUser)data.getUser();
SecurityAdminTool scarabA = getSecur... |
public boolean visit(ParameterizedType node) {
node.getName().accept(this);
this.buffer.append("<");//$NON-NLS-1$
for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
Type t = (Type) it.next();
t.accept(this);
if (it.hasNext()) {
this.buffer.append(",");//$NON-NLS-1$
}
}
this... | public boolean visit(ParameterizedType node) {
node.getType().accept(this);
this.buffer.append("<");//$NON-NLS-1$
for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
Type t = (Type) it.next();
t.accept(this);
if (it.hasNext()) {
this.buffer.append(",");//$NON-NLS-1$
}
}
this... |
public void resolve(BlockScope scope) {
exceptionType = exception.resolveTypeExpecting(scope, scope.getJavaLangThrowable());
if (exceptionType == NullBinding
&& scope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3){
// if compliant with 1.4, this problem will not be reported
sco... | public void resolve(BlockScope scope) {
exceptionType = exception.resolveTypeExpecting(scope, scope.getJavaLangThrowable());
if (exceptionType == NullBinding
&& scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3){
// if compliant with 1.4, this problem will not be reported
scope.p... |
import org.eclipse.jdt.core.compiler.CharOperation;
/*******************************************************************************
* 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 t... | import org.eclipse.jdt.core.compiler.CharOperation;
/*******************************************************************************
* 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 t... |
public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "break "/*nonNLS*/;
if (label != null )
s = s + new String(label) ;
return s;
}
| public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "break "; //$NON-NLS-1$
if (label != null )
s = s + new String(label) ;
return s;
}
|
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position;
block.generateCode(currentScope, codeStream);
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
| public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachable) == 0) {
return;
}
int pc = codeStream.position;
block.generateCode(currentScope, codeStream);
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
|
public SyntheticMethodBinding(MethodBinding overridenMethodToBridge, MethodBinding targetMethod, SourceTypeBinding declaringClass) {
this.declaringClass = declaringClass;
this.selector = overridenMethodToBridge.selector;
// amongst other, clear the AccGenericSignature, so as to ensure no remains of o... | public SyntheticMethodBinding(MethodBinding overridenMethodToBridge, MethodBinding targetMethod, SourceTypeBinding declaringClass) {
this.declaringClass = declaringClass;
this.selector = overridenMethodToBridge.selector;
// amongst other, clear the AccGenericSignature, so as to ensure no remains of o... |
public
TXTRecord(Name _name, short _dclass, int _ttl,
int length, CountedDataInputStream in, Compression c)
throws IOException
| public
TXTRecord(Name _name, short _dclass, int _ttl,
int length, DataByteInputStream in, Compression c)
throws IOException
|
protected Object createArgumentReference(char[] name, int dim, Object typeRef, long dimPos, long argNamePos) throws InvalidInputException {
try {
TypeReference argTypeRef = (TypeReference) typeRef;
if (dim > 0) {
long pos = ((long) argTypeRef.sourceStart) << 32 + argTypeRef.sourceEnd;
if (typeRef insta... | protected Object createArgumentReference(char[] name, int dim, Object typeRef, long dimPos, long argNamePos) throws InvalidInputException {
try {
TypeReference argTypeRef = (TypeReference) typeRef;
if (dim > 0) {
long pos = (((long) argTypeRef.sourceStart) << 32) + argTypeRef.sourceEnd;
if (typeRef ins... |
public void insertUpdate(DocumentEvent e) {
System.out.println(getClass().getName() + " insert");
Component ed = _extendsField.getEditor().getEditorComponent();
Document extendsDoc = ((JTextField)ed).getDocument();
if (e.getDocument() == extendsDoc) setTargetExtends();
super.insertUpdate(e);
}
| public void insertUpdate(DocumentEvent e) {
//System.out.println(getClass().getName() + " insert");
Component ed = _extendsField.getEditor().getEditorComponent();
Document extendsDoc = ((JTextField)ed).getDocument();
if (e.getDocument() == extendsDoc) setTargetExtends();
super.insertUpdate(e);
}... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = expression
.analyseCode(currentScope, flowContext, flowInfo)
.unconditionalInits();
expression.checkNullStatus(currentScope, flowInfo, FlowInfo.NON_NULL);
return flowInfo;
}
| public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = expression
.analyseCode(currentScope, flowContext, flowInfo)
.unconditionalInits();
expression.checkNullStatus(currentScope, flowContext, flowInfo, FlowInfo.NON_NULL);
return flowInfo;
}
|
public void addDocumentName(String documentName) {
if (this.documentNames == null)
this.documentNames = new SimpleSet();
this.documentNames.add(documentName);
}
| public void addDocumentName(String documentName) {
if (this.documentNames == null)
this.documentNames = new SimpleSet(3);
this.documentNames.add(documentName);
}
|
private Object[] computeNonJavaResources(IResource resource) {
Object[] nonJavaResources = new IResource[5];
int nonJavaResourcesCounter = 0;
try{
IResource[] members = ((IContainer) resource).members();
for (int i = 0, max = members.length; i < max; i++) {
IResource child = members[i];
if (child.getType()... | private Object[] computeNonJavaResources(IResource resource) {
Object[] nonJavaResources = new IResource[5];
int nonJavaResourcesCounter = 0;
try{
IResource[] members = ((IContainer) resource).members();
for (int i = 0, max = members.length; i < max; i++) {
IResource child = members[i];
if (child.getType()... |
public TypeBinding resolveType(BlockScope scope) {
// compute a new constant if the cast is effective
// due to the fact an expression may start with ( and that a cast can also start with (
// the field is an expression....it can be a TypeReference OR a NameReference Or
// any kind of Expression <-- this last... | public TypeBinding resolveType(BlockScope scope) {
// compute a new constant if the cast is effective
// due to the fact an expression may start with ( and that a cast can also start with (
// the field is an expression....it can be a TypeReference OR a NameReference Or
// any kind of Expression <-- this last... |
public
dnsHINFORecord(dnsName _name, short _dclass, int _ttl, StringTokenizer st)
throws IOException
| public
dnsHINFORecord(dnsName _name, short _dclass, int _ttl, MyStringTokenizer st)
throws IOException
|
public void addInterceptor( BaseInterceptor bi ) {
bi.setContext( getContext() );
if( Hooks.hasHook( bi, "registerHooks" ) ) {
bi.registerHooks( hooks );
} else {
hooks.addModule( bi );
}
hooksCache=null;
allHooksCache=null;
}
| public void addInterceptor( BaseInterceptor bi ) {
bi.setContext( getContext() );
if( Hooks.hasHook( bi, "registerHooks" ) ) {
bi.registerHooks( hooks, contextM, context );
} else {
hooks.addModule( bi );
}
hooksCache=null;
allHooksCache=null;
}
|
public static String id() {
return "3.7";
}
| public static String id() {
return "@version@";
}
|
protected void executeOperation() throws JavaModelException {
beginTask(Util.bind("workingCopy.commit"), 2); //$NON-NLS-1$
ICompilationUnit copy = getCompilationUnit();
ICompilationUnit original = (ICompilationUnit) copy.getOriginalElement();
// creates the delta builder (this remembers the content of the cu)
... | protected void executeOperation() throws JavaModelException {
beginTask(Util.bind("workingCopy.commit"/*nonNLS*/), 2);
ICompilationUnit copy = getCompilationUnit();
ICompilationUnit original = (ICompilationUnit) copy.getOriginalElement();
// creates the delta builder (this remembers the content of the cu)
Java... |
private static StringManager sm =
StringManager.getManager("org.apache.tomcat.resources");
| private static StringManager sm =
StringManager.getManager("org.apache.tomcat.util.buf.res");
|
public ActionGoToDetails(String tabName) {
super(tabName);
_tabName = tabName;
}
| public ActionGoToDetails(String tabName) {
super(tabName, NO_ICON);
_tabName = tabName;
}
|
public void run()
{
for(;;)
{
long start = System.currentTimeMillis();
scrollPosition++;
FontMetrics fm = getFontMetrics(getFont());
int max = text.size() * fm.getHeight();
if(scrollPosition > max)
scrollPosition = -300;
try
{
Thread.sleep(Math.max(0,50 -
... | public void run()
{
for(;;)
{
long start = System.currentTimeMillis();
scrollPosition++;
FontMetrics fm = getFontMetrics(getFont());
int max = text.size() * fm.getHeight();
if(scrollPosition > max)
scrollPosition = -300;
try
{
Thread.sleep(Math.max(0,25 -
... |
public ColorComboBox() {
super();
// Add the default colors items.
addItem(new ColorItem(Color.black, "Black"));
addItem(new ColorItem(Color.blue, "Blue"));
addItem(new ColorItem(Color.gray, "Gray"));
addItem(new ColorItem(Color.green, "Green"));
addItem(new ... | public ColorComboBox() {
super();
// Add the default colors items.
addItem(new ColorItem(Color.black, "None"));
addItem(new ColorItem(Color.blue, "Blue"));
addItem(new ColorItem(Color.gray, "Gray"));
addItem(new ColorItem(Color.green, "Green"));
addItem(new C... |
public MethodBinding createsInternalConstructorWithBinding(MethodBinding inheritedConstructorBinding) {
//Add to method'set, the default constuctor that just recall the
//super constructor with the same arguments
String baseName = "$anonymous"/*nonNLS*/;
TypeBinding[] argumentTypes = inheritedConstructorBinding.pa... | public MethodBinding createsInternalConstructorWithBinding(MethodBinding inheritedConstructorBinding) {
//Add to method'set, the default constuctor that just recall the
//super constructor with the same arguments
String baseName = "$anonymous"; //$NON-NLS-1$
TypeBinding[] argumentTypes = inheritedConstructorBindin... |
private boolean convertAndSaveMessage(String msg, String replacementDate,
IWorkerStatusController worker, IMailbox destFolder) {
// divide message into headers and body
String[] divided = divideMessage(msg);
if (divided == null) {
LOG.severe("Error splitting message into headers and body");
return false... | private boolean convertAndSaveMessage(String msg, String replacementDate,
IWorkerStatusController worker, IMailbox destFolder) {
// divide message into headers and body
String[] divided = divideMessage(msg);
if (divided == null) {
LOG.severe("Error splitting message into headers and body");
return false... |
private TypeReference decodeType(String typeSignature, int length, int start, int end) {
int identCount = 1;
int dim = 0;
int nameFragmentStart = this.namePos, nameFragmentEnd = -1;
boolean nameStarted = false;
ArrayList fragments = null;
typeLoop: while (this.namePos < length) {
char currentChar = type... | private TypeReference decodeType(String typeSignature, int length, int start, int end) {
int identCount = 1;
int dim = 0;
int nameFragmentStart = this.namePos, nameFragmentEnd = -1;
boolean nameStarted = false;
ArrayList fragments = null;
typeLoop: while (this.namePos < length) {
char currentChar = type... |
public static final KeyStroke generateStroke(final Event event) {
int key = event.character;
if (key == 0) {
key = event.keyCode;
} else {
if (0 <= key && key <= 0x1F) {
if ((event.stateMask & SWT.CTRL) != 0) {
key += 0x40;
}
} else {
if ('a' <= key && key <= 'z') {
key -= 'a' -... | public static final KeyStroke generateStroke(final Event event) {
int key = event.character;
if (key == 0) {
key = event.keyCode;
} else {
if (0 <= key && key <= 0x1F) {
if ((event.stateMask & SWT.CTRL) != 0) {
key += 0x40;
}
} else {
if ('a' <= key && key <= 'z') {
key -= 'a' -... |
public ProgressMonitorFocusJobDialog(Shell parentShell) {
super(parentShell == null ? ProgressManagerUtil.getNonModalShell()
: parentShell);
setShellStyle(getDefaultOrientation() | SWT.BORDER | SWT.TITLE
| SWT.RESIZE | SWT.MODELESS);
setCancelable(true);
enableDetailsButton = true;
}
| public ProgressMonitorFocusJobDialog(Shell parentShell) {
super(parentShell == null ? ProgressManagerUtil.getNonModalShell()
: parentShell);
setShellStyle(getDefaultOrientation() | SWT.BORDER | SWT.TITLE
| SWT.RESIZE | SWT.MAX | SWT.MODELESS);
setCancelable(true);
enableDetailsButton = true;
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// initialize break and continue labels
breakLabel = new Label();
continueLabel = new Label();
// process the element variable and collection
flowInfo = this.elementVariable.analyseCode(scope, flowConte... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// initialize break and continue labels
breakLabel = new Label();
continueLabel = new Label();
// process the element variable and collection
flowInfo = this.elementVariable.analyseCode(scope, flowConte... |
protected NameReference getUnspecifiedReferenceOptimized() {
int completionIndex;
/* no need to take action if not inside completed identifiers */
if ((completionIndex = indexOfAssistIdentifier()) < 0) {
return super.getUnspecifiedReferenceOptimized();
}
/* retrieve identifiers subset and whole positions, the... | protected NameReference getUnspecifiedReferenceOptimized() {
int completionIndex;
/* no need to take action if not inside completed identifiers */
if ((completionIndex = indexOfAssistIdentifier()) < 0) {
return super.getUnspecifiedReferenceOptimized();
}
/* retrieve identifiers subset and whole positions, the... |
private IEditorReference reuseInternalEditor(EditorDescriptor desc, IEditorInput input) throws PartInitException {
IEditorReference reusableEditorRef = findReusableEditor(desc);
if (reusableEditorRef != null) {
IEditorPart reusableEditor = reusableEditorRef.getEditor(false);
if(reusableEditor == null) {
... | private IEditorReference reuseInternalEditor(EditorDescriptor desc, IEditorInput input) throws PartInitException {
IEditorReference reusableEditorRef = findReusableEditor(desc);
if (reusableEditorRef != null) {
IEditorPart reusableEditor = reusableEditorRef.getEditor(false);
if(reusableEditor == null) {
... |
package org.eclipse.ui.commands;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which... | package org.eclipse.ui.commands;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which... |
public void update(Observable arg0, Object arg1) {
IDefaultItem item = new DefaultItem(element);
boolean enabled = item.getBoolean("header_enabled", true);
setState(enabled);
}
| public void update(Observable arg0, Object arg1) {
IDefaultItem item = new DefaultItem(element);
boolean enabled = item.getBooleanWithDefault("header_enabled", true);
setState(enabled);
}
|
public String toStringExpression() {
return "<SelectOnName:" + super.toStringExpression() + ">"; //$NON-NLS-2$ //$NON-NLS-1$
}
| public String toStringExpression() {
return "<SelectOnName:"/*nonNLS*/ + super.toStringExpression() + ">"/*nonNLS*/;
}
|
private static Scanner getNameScanner(CompilerOptions compilerOptions) {
return
new Scanner(
false /*comment*/,
false /*whitespace*/,
false /*nls*/,
compilerOptions.sourceLevel >= CompilerOptions.JDK1_4 /*assert*/,
null /*taskTags*/,
null/*taskPriorities*/);
}
| private static Scanner getNameScanner(CompilerOptions compilerOptions) {
return
new Scanner(
false /*comment*/,
false /*whitespace*/,
false /*nls*/,
compilerOptions.sourceLevel /*sourceLevel*/,
null /*taskTags*/,
null/*taskPriorities*/);
}
|
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
//always ignore receiver cast, since may affect constant pool reference
boolean receiverCast = false;
if (this.receive... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
//always ignore receiver cast, since may affect constant pool reference
boolean receiverCast = false;
if (this.receive... |
protected void processAnnotations() {
int newUnitSize = 0;
int bottom = 0;
int top = this.unitsToProcess.length;
BinaryTypeBinding[] binaryTypeBindingsTemp = this.binaryTypeBindings;
if (top == 0 && binaryTypeBindingsTemp == null) return;
this.binaryTypeBindings = null;
do {
// extract units to proces... | protected void processAnnotations() {
int newUnitSize = 0;
int bottom = 0;
int top = this.unitsToProcess.length;
BinaryTypeBinding[] binaryTypeBindingsTemp = this.binaryTypeBindings;
if (top == 0 && binaryTypeBindingsTemp == null) return;
this.binaryTypeBindings = null;
do {
// extract units to proces... |
public void diagnoseParse() {
lexStream.reset();
currentToken = lexStream.getToken();
int prev_pos;
int pos;
int next_pos;
int act = START_STATE;
reallocateStacks();
//
// Start parsing
//
stateStackTop = 0;
stack[stateStackTop] = act;
int tok = lexStream.kind(currentToken);
locationSt... | public void diagnoseParse() {
lexStream.reset();
currentToken = lexStream.getToken();
int prev_pos;
int pos;
int next_pos;
int act = START_STATE;
reallocateStacks();
//
// Start parsing
//
stateStackTop = 0;
stack[stateStackTop] = act;
int tok = lexStream.kind(currentToken);
locationSt... |
public Object addMessage(InputStream in) throws Exception {
StringBuffer source = StreamUtils.readInString( in );
Message message = MessageParser.parse( new CharSequenceSource( source ) );
Object newUid = generateNextUid();
ColumbaLogger.log.debug("new UID=" + newUid);
ColumbaHeader h = new ColumbaHeader(... | public Object addMessage(InputStream in) throws Exception {
StringBuffer source = StreamUtils.readInString( in );
Message message = MessageParser.parse( new CharSequenceSource( source ) );
Object newUid = generateNextUid();
ColumbaLogger.log.debug("new UID=" + newUid);
ColumbaHeader h = new ColumbaHeader(... |
public String toString() {
return getDeclaringClass().getName() + "."/*nonNLS*/ + getName();
}
| public String toString() {
return getDeclaringClass().getName() + "." + getName(); //$NON-NLS-1$
}
|
public final TypeBinding getType(char[][] compoundName, int typeNameLength) {
if (typeNameLength == 1) {
// Would like to remove this test and require senders to specially handle base types
TypeBinding binding = getBaseType(compoundName[0]);
if (binding != null) return binding;
}
CompilationUnitScope u... | public final TypeBinding getType(char[][] compoundName, int typeNameLength) {
if (typeNameLength == 1) {
// Would like to remove this test and require senders to specially handle base types
TypeBinding binding = getBaseType(compoundName[0]);
if (binding != null) return binding;
}
CompilationUnitScope u... |
public PropPanelGeneralization() {
super("Generalization",_generalizationIcon,2);
Class mclass = MGeneralization.class;
Class[] namesToWatch = {MStereotype.class,MNamespace.class,MClassifier.class };
setNameEventListening(namesToWatch);
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
... | public PropPanelGeneralization() {
super("Generalization",_generalizationIcon,2);
Class mclass = MGeneralization.class;
Class[] namesToWatch = {MStereotype.class,MNamespace.class,MClassifier.class };
setNameEventListening(namesToWatch);
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
... |
private ActionSequenceDiagram() {
super("SequenceDiagram");
}
| private ActionSequenceDiagram() {
super("action.sequence-diagram");
}
|
private void printIndentationIfNecessary() {
StringBuffer buffer = new StringBuffer();
printIndentationIfNecessary(buffer);
if (buffer.length() > 0) {
addInsertEdit(this.scanner.getCurrentTokenStartPosition(), buffer.toString());
this.pendingSpace = false;
}
}
| private void printEmptyLines(int linesNumber, int insertPosition) {
final String buffer = getEmptyLines(linesNumber);
if (EMPTY_STRING == buffer) return;
addInsertEdit(insertPosition, buffer);
}
void printIndentationIfNecessary() {
StringBuffer buffer = new StringBuffer();
printIndent... |
// constructor will not be dumped as private, no emulation required thus
} else {
syntheticAccessor =
((SourceTypeBinding) binding.declaringClass).addSyntheticMethod(binding);
currentScope.problemReporter().needToEmulateMethodAccess(binding, this);
}
}
}
| // constructor will not be dumped as private, no emulation required thus
} else {
syntheticAccessor =
((SourceTypeBinding) binding.declaringClass).addSyntheticMethod(binding, isSuperAccess());
currentScope.problemReporter().needToEmulateMethodAccess(binding, this);
}
}
}
|
protected void storeTasksFor(SourceFile sourceFile, IProblem[] tasks) throws CoreException {
if (sourceFile == null || tasks == null || tasks.length == 0) return;
IResource resource = sourceFile.resource;
for (int i = 0, l = tasks.length; i < l; i++) {
IProblem task = tasks[i];
if (task.getID() == IProblem.Task... | protected void storeTasksFor(SourceFile sourceFile, IProblem[] tasks) throws CoreException {
if (sourceFile == null || tasks == null || tasks.length == 0) return;
IResource resource = sourceFile.resource;
for (int i = 0, l = tasks.length; i < l; i++) {
IProblem task = tasks[i];
if (task.getID() == IProblem.Task... |
public Object addMessage(
AbstractMessage message,
WorkerStatusController worker)
throws Exception {
// get headerlist before adding a message
getHeaderList(worker);
// call addMessage of superclass LocalFolder
// to do the dirty work
Object newUid = super.addMessage(message, worker);
// this mess... | public Object addMessage(
AbstractMessage message,
WorkerStatusController worker)
throws Exception {
// get headerlist before adding a message
getHeaderList(worker);
// call addMessage of superclass LocalFolder
// to do the dirty work
Object newUid = super.addMessage(message, worker);
// this mess... |
protected void getHandleMemento(StringBuffer buff) {
((JavaElement) getParent()).getHandleMemento(buff);
char delimiter = getHandleMementoDelimiter();
buff.append(delimiter);
escapeMementoName(buff, getElementName());
for (int i = 0; i < this.parameterTypes.length; i++) {
buff.append(delimiter);
buff.append(th... | protected void getHandleMemento(StringBuffer buff) {
((JavaElement) getParent()).getHandleMemento(buff);
char delimiter = getHandleMementoDelimiter();
buff.append(delimiter);
escapeMementoName(buff, getElementName());
for (int i = 0; i < this.parameterTypes.length; i++) {
buff.append(delimiter);
escapeMementoN... |
public String toString() {
return "JarEntryFile["/*nonNLS*/+this.zipName+"::"/*nonNLS*/+this.entryName+"]"/*nonNLS*/;
}
| public String toString() {
return "JarEntryFile["+this.zipName+"::"+this.entryName+"]"; //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$
}
|
private void
getDigest() {
if (alg.equals(HMAC_MD5))
digest = "md5";
else if (alg.equals(HMAC_SHA1))
digest = "sha";
else if (alg.equals(HMAC_SHA256))
digest = "sha-256";
else
throw new IllegalArgumentException("Invalid algorithm");
}
| private void
getDigest() {
if (alg.equals(HMAC_MD5))
digest = "md5";
else if (alg.equals(HMAC_SHA1))
digest = "sha-1";
else if (alg.equals(HMAC_SHA256))
digest = "sha-256";
else
throw new IllegalArgumentException("Invalid algorithm");
}
|
public void updateGUI() throws Exception {
if ((filter != null) && (srcFolder != null)) {
FilterDialog dialog = new FilterDialog(filter);
if (!dialog.wasCancelled()) {
srcFolder.getFilterList().add(filter);
}
}
}
| public void updateGUI() throws Exception {
if ((filter != null) && (srcFolder != null)) {
FilterDialog dialog = new FilterDialog(getFrameMediator().getView().getFrame(), filter);
if (!dialog.wasCancelled()) {
srcFolder.getFilterList().add(filter);
}
... |
protected static StringManager sm =
StringManager.getManager("org.apache.tomcat.resources");
| protected static StringManager sm =
StringManager.getManager("org.apache.tomcat.util.http.res");
|
public void indexAll(IProject project) {
if (JavaCore.getPlugin() == null || this.workspace == null) return;
// Also request indexing of binaries on the classpath
// determine the new children
try {
IJavaModel model = JavaModelManager.getJavaModel(this.workspace);
IJavaProject javaProject = ((JavaModel) model)... | public void indexAll(IProject project) {
if (JavaCore.getPlugin() == null || this.workspace == null) return;
// Also request indexing of binaries on the classpath
// determine the new children
try {
IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel();
IJavaProject javaProject = ((JavaModel... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// Consider the try block and catch block so as to compute the intersection of initializations and
// the minimum exit relative depth amongst all of them. Then consider the subroutine, and append its
// in... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// Consider the try block and catch block so as to compute the intersection of initializations and
// the minimum exit relative depth amongst all of them. Then consider the subroutine, and append its
// in... |
private boolean connectSuperInterfaces() {
SourceTypeBinding sourceType = referenceContext.binding;
sourceType.superInterfaces = NoSuperInterfaces;
if (referenceContext.superInterfaces == null)
return true;
if (sourceType.id == T_Object) // already handled the case of redefining java.lang.Object
return t... | private boolean connectSuperInterfaces() {
SourceTypeBinding sourceType = referenceContext.binding;
sourceType.superInterfaces = NoSuperInterfaces;
if (referenceContext.superInterfaces == null)
return true;
if (sourceType.id == T_Object) // already handled the case of redefining java.lang.Object
return t... |
private String makeAbsolute(Request req, String location) {
URL url = null;
try {
// Try making a URL out of the location
// Throws an exception if the location is relative
url = new URL(location);
} catch (MalformedURLException e) {
String requrl = getRequestURL(req);
... | private String makeAbsolute(Request req, String location) {
URL url = null;
try {
// Try making a URL out of the location
// Throws an exception if the location is relative
url = new URL(location);
} catch (MalformedURLException e) {
String requrl = getRequestURL(req);
... |
protected static byte[] readUntil(InputStream input, byte separator, int offset) throws IOException, JavaModelException{
int length = 0;
byte[] bytes = new byte[SIZE];
byte b;
while((b = (byte)input.read()) != separator && b != -1) {
if(bytes.length == length) {
System.arraycopy(bytes, 0, bytes = new byte[leng... | protected static byte[] readUntil(InputStream input, byte separator, int offset) throws IOException, JavaModelException{
int length = 0;
byte[] bytes = new byte[SIZE];
byte b;
while((b = (byte)input.read()) != separator && b != -1) {
if(bytes.length == length) {
System.arraycopy(bytes, 0, bytes = new byte[leng... |
public String toString() {
// don't use + with char[]
return new StringBuffer("AbstractMethodCollaboratorIndictment("/*nonNLS*/).append(fName).append(")"/*nonNLS*/).toString();
}
| public String toString() {
// don't use + with char[]
return new StringBuffer("AbstractMethodCollaboratorIndictment(").append(fName).append(")").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
|
public void recordSettingFinal(VariableBinding variable, Reference finalReference, FlowInfo flowInfo) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
// for initialization inside looping statement that effectively loops
FlowContext context = this;
while (context != null) {
if (!context.recordFinalAssignme... | public void recordSettingFinal(VariableBinding variable, Reference finalReference, FlowInfo flowInfo) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
// for initialization inside looping statement that effectively loops
FlowContext context = this;
while (context != null) {
if (!context.recordFinal... |
protected void checkCanceled() {
if (isCanceled()) {
throw new OperationCanceledException(Util.bind("operation.cancelled"/*nonNLS*/));
}
}
| protected void checkCanceled() {
if (isCanceled()) {
throw new OperationCanceledException(Util.bind("operation.cancelled")); //$NON-NLS-1$
}
}
|
public int registerHooks( Hooks hooks, ContextManager cm, Context ctx ) {
if( enabled || cm.getDebug() > 5 ) {
enabled=true;
log( "Adding LogEvents, cm.debug=" + cm.getDebug() + " "
+ enabled);
hooks.addModule( this );
}
return DECLINED;
}
| public int registerHooks( Hooks hooks, ContextManager cm, Context ctx ) {
if( enabled || cm.getDebug() > 5 ) {
enabled=true;
log( "Adding LogEvents, cm.debug=" + cm.getDebug() + " "
+ enabled);
hooks.addModule( this );
}
return OK;
}
|
public void setJavaConventionsSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
this.alignment_for_... | public void setJavaConventionsSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
this.alignment_for_... |
public MethodBinding[] getMethods(char[] selector) {
if (this.methods != null) {
long range;
if ((range = ReferenceBinding.binarySearch(selector, this.methods)) >= 0) {
int start = (int) range;
int length = (int) (range >> 32) - start + 1;
// cannot optimize since some clients rely on clone array
... | public MethodBinding[] getMethods(char[] selector) {
if (this.methods != null) {
long range;
if ((range = ReferenceBinding.binarySearch(selector, this.methods)) >= 0) {
int start = (int) range;
int length = (int) (range >> 32) - start + 1;
// cannot optimize since some clients rely on clone array
... |
protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(this.tabString(tab));
buffer.append("<import container>"); //$NON-NLS-1$
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
}
}
} | protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
buffer.append(this.tabString(tab));
buffer.append("<import container>"); //$NON-NLS-1$
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
}
}
} |
private
ZoneResponse() {}
ZoneResponse(byte _type, Object _data) {
type = _type;
data = _data;
}
ZoneResponse(byte _type) {
this(_type, null);
}
/**
* Sets a ZoneResponse to have a different value without destroying the
* backtrace
*/
void
set(byte _type, Object _data) {
type = _type;
data = _data;
}
void
... | private
ZoneResponse() {}
ZoneResponse(byte _type, Object _data) {
type = _type;
data = _data;
}
ZoneResponse(byte _type) {
this(_type, null);
}
/**
* Sets a ZoneResponse to have a different value without destroying the
* backtrace
*/
void
set(byte _type, Object _data) {
type = _type;
data = _data;
}
void
... |
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.
//----------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.