nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Component class SurfaceMeshMapper { private static long MESH_BIT_MASK = 128L ; private final GraphicsProperties graphicsProperties ; @ Autowired SurfaceMeshMapper ( final GraphicsProperties graphicsProperties ) { } SurfaceMeshDTO newSurfaceMeshDTO ( final PointsTable points , final List < Triangle > triangles ) { } private List < Integer > getColorsList ( final List < Point > pointList ) { <START_BUG> List < Integer > colorsList = new java . util . ArrayList ( pointList . size ( ) ) ; <END_BUG> for ( Point point : pointList ) { colorsList . add ( point . getColor ( ) . getValue ( ) ) ; } return colorsList ; } private List < Double > getVertexList ( final List < Point > pointList ) { } private List < Long > getTriangleList ( final List < Triangle > triangleList ) { } private double getXValue ( final Point point ) { } private double getYValue ( final Point point ) { } private double getZValue ( final Point point ) { } }

Fix:
List < Integer > colorsList = new ArrayList < Integer > ( pointList . size ( ) ) ;
Buggy code:
public class Job { private Job ( ) { } public static void main ( String [ ] args ) throws IOException { if ( ( args . length ) == 7 ) { String input = args [ 0 ] ; String output = args [ 1 ] ; String measureClass = args [ 2 ] ; double t1 = Double . parseDouble ( args [ 3 ] ) ; double t2 = Double . parseDouble ( args [ 4 ] ) ; double convergenceDelta = Double . parseDouble ( args [ 5 ] ) ; int maxIterations = Integer . parseInt ( args [ 6 ] ) ; <START_BUG> Job . runJob ( input , output , measureClass , convergenceDelta , t1 , t2 , maxIterations ) ; <END_BUG> } else Job . runJob ( "testdata" , "output" , "org.apache.mahout.utils.EuclideanDistanceMeasure" , 80 , 55 , 0.5 , 10 ) ; } private static void runJob ( String input , String output , String measureClass , double t1 , double t2 , double convergenceDelta , int maxIterations ) throws IOException { } }

Fix:
Job . runJob ( input , output , measureClass , t1 , t2 , convergenceDelta , maxIterations ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class Population extends ArrayList < Sequence > { SequenceEvaluator sqE ; public Population ( SequenceEvaluator sqE ) { } public Population ( SequenceEvaluator sqE , int max ) { } private Population ( List < Sequence > popu , SequenceEvaluator sqE ) { } @ Override public boolean add ( Sequence sequence ) { } public void sort ( ) { } public Sequence best ( ) { } public Population best ( int n ) { <START_BUG> return new Population ( this . subList ( ( ( ( this . size ( ) ) - 1 ) - n ) , ( ( this . size ( ) ) - 1 ) ) , sqE ) ; <END_BUG> } public void probabilistic_distribution ( ) { } @ Override public String toString ( ) { } public void Mutate ( int index ) { } }

Fix:
return new Population ( this . subList ( ( ( this . size ( ) ) - n ) , ( ( this . size ( ) ) - 1 ) ) , sqE ) ;
Buggy code:
public class ReconcileWorkingCopyOperation extends JavaModelOperation { boolean createAST ; int astLevel ; boolean forceProblemDetection ; WorkingCopyOwner workingCopyOwner ; CompilationUnit ast ; public ReconcileWorkingCopyOperation ( IJavaElement workingCopy , boolean creatAST , int astLevel , boolean forceProblemDetection , WorkingCopyOwner workingCopyOwner ) { } protected void executeOperation ( ) throws JavaModelException { if ( ( this . progressMonitor ) != null ) { if ( this . progressMonitor . isCanceled ( ) ) return ; this . progressMonitor . beginTask ( org . eclipse . jdt . internal . core . util . Util . bind ( "element.reconciling" ) , 2 ) ; } CompilationUnit workingCopy = getWorkingCopy ( ) ; boolean wasConsistent = workingCopy . isConsistent ( ) ; try { if ( ! wasConsistent ) { JavaElementDeltaBuilder deltaBuilder = new JavaElementDeltaBuilder ( workingCopy ) ; this . ast = workingCopy . makeConsistent ( this . createAST , this . astLevel , this . progressMonitor ) ; deltaBuilder . buildDeltas ( ) ; if ( ( progressMonitor ) != null ) progressMonitor . worked ( 2 ) ; if ( ( deltaBuilder . delta ) != null ) { addReconcileDelta ( workingCopy , deltaBuilder . delta ) ; } } else { if ( forceProblemDetection ) { IProblemRequestor problemRequestor = workingCopy . getPerWorkingCopyInfo ( ) ; if ( ( problemRequestor != null ) && ( problemRequestor . isActive ( ) ) ) { CompilationUnitDeclaration unit = null ; try { problemRequestor . beginReporting ( ) ; char [ ] contents = workingCopy . getContents ( ) ; unit = CompilationUnitProblemFinder . process ( workingCopy , contents , this . workingCopyOwner , problemRequestor , false , this . progressMonitor ) ; problemRequestor . endReporting ( ) ; if ( ( progressMonitor ) != null ) progressMonitor . worked ( 1 ) ; if ( ( this . createAST ) && ( unit != null ) ) { Map options = workingCopy . getJavaProject ( ) . getOptions ( true ) ; <START_BUG> this . ast = AST . convertCompilationUnit ( this . astLevel , unit , contents , options , true , this . progressMonitor ) ; <END_BUG> if ( ( progressMonitor ) != null ) progressMonitor . worked ( 1 ) ; } } finally { if ( unit != null ) { unit . cleanUp ( ) ; } } } } } } finally { if ( ( progressMonitor ) != null ) progressMonitor . done ( ) ; } } protected CompilationUnit getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } protected IJavaModelStatus verify ( ) { } }

Fix:
this . ast = AST . convertCompilationUnit ( this . astLevel , unit , contents , options , true , workingCopy . owner , this . progressMonitor ) ;
Buggy code:
public class FloatDatatypeValidator extends AbstractDatatypeValidator { private Locale fLocale = null ; private DatatypeValidator fBaseValidator = null ; private float [ ] fEnumFloats = null ; private String fPattern = null ; private boolean fDerivedByList = false ; private float fMaxInclusive = Float . MAX_VALUE ; private float fMaxExclusive = Float . MAX_VALUE ; private float fMinInclusive = Float . MIN_VALUE ; private float fMinExclusive = Float . MIN_VALUE ; private int fFacetsDefined = 0 ; private boolean isMaxExclusiveDefined = false ; private boolean isMaxInclusiveDefined = false ; private boolean isMinExclusiveDefined = false ; private boolean isMinInclusiveDefined = false ; private DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider ( ) ; private RegularExpression fRegex = null ; public FloatDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public FloatDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList ) throws InvalidDatatypeFacetException { } public Object validate ( String content , Object state ) throws InvalidDatatypeValueException { } private void boundsCheck ( float f ) throws InvalidDatatypeValueException { } private void enumCheck ( float v ) throws InvalidDatatypeValueException { } public void setLocale ( Locale locale ) { } public int compare ( String content1 , String content2 ) { } public Hashtable getFacets ( ) { } public Object clone ( ) throws CloneNotSupportedException { } private String getErrorString ( int major , int minor , Object [ ] args ) { } private void setBasetype ( DatatypeValidator base ) { } private void checkContent ( String content ) throws InvalidDatatypeValueException { if ( ( ( fFacetsDefined ) & ( DatatypeValidator . FACET_PATTERN ) ) != 0 ) { if ( ( ( fRegex ) == null ) || ( ( fRegex . matches ( content ) ) == false ) ) throw new InvalidDatatypeValueException ( ( ( ( "Value'" + content ) + "does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>regular<seq2seq4repair_space>expression<seq2seq4repair_space>facet" ) + ( fPattern ) ) ) ; } float f = 0 ; try { f = Float . valueOf ( content ) . floatValue ( ) ; } catch ( NumberFormatException nfe ) { if ( content . equals ( "INF" ) ) { f = Float . POSITIVE_INFINITY ; } else if ( content . equals ( "-INF" ) ) { f = Float . NEGATIVE_INFINITY ; } else if ( content . equals ( "NaN" ) ) { f = Float . NaN ; } else { <START_BUG> throw new InvalidDatatypeValueException ( getErrorString ( NotReal , MSG_NONE , new Object [ ] { content } ) ) ; <END_BUG> } } boundsCheck ( f ) ; if ( ( ( fFacetsDefined ) & ( DatatypeValidator . FACET_ENUMERATION ) ) != 0 ) enumCheck ( f ) ; } }

Fix:
throw new InvalidDatatypeValueException ( getErrorString ( NotFloat , MSG_NONE , new Object [ ] { content } ) ) ;
Buggy code:
abstract class AbstractPlatformMBeanAttributeHandler implements OperationStepHandler { protected final ParametersValidator readAttributeValidator = new ParametersValidator ( ) ; protected final ParametersValidator writeAttributeValidator = new ParametersValidator ( ) ; protected AbstractPlatformMBeanAttributeHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { String op = operation . require ( OP ) . asString ( ) ; if ( READ_ATTRIBUTE_OPERATION . equals ( op ) ) { readAttributeValidator . validate ( operation ) ; executeReadAttribute ( context , operation ) ; } else if ( WRITE_ATTRIBUTE_OPERATION . equals ( op ) ) { writeAttributeValidator . validate ( operation ) ; executeWriteAttribute ( context , operation ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } protected abstract void executeReadAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } protected abstract void executeWriteAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } protected abstract void register ( ManagementResourceRegistration registration ) { } protected static OperationFailedException unknownAttribute ( final ModelNode operation ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class AdvertisedService extends ServiceInfo implements IService , INode { private static final long serialVersionUID = 1001026250299416572L ; private String uuid ; private Properties internalProperties = new Properties ( ) ; private static Map < String , IServiceInfo > publishedServices = new HashMap < String , IServiceInfo > ( ) ; private ServiceReference serviceReference ; public AdvertisedService ( ServiceReference ref ) { } @ SuppressWarnings ( "unchecked" ) public AdvertisedService ( IServiceInfo serviceInfo ) { } public static Map < String , IServiceInfo > getPublishedServices ( ) { } public static synchronized IServiceInfo removePublished ( String id ) { } public Properties getProperties ( ) { } public String getNodeId ( ) { } public void regenerateNodeId ( ) { } public URI getLocation ( ) { } public IServiceID getServiceID ( ) { } public int compareTo ( Object o ) { } public ServiceReference getServiceReference ( ) { } public byte [ ] getPropertiesAsBytes ( ) { } public String getPropertiesAsString ( ) { } public String getPath ( ) { <START_BUG> return ( ( ( ( getNodeId ( ) ) + ( INode . _URI_ ) ) + ( Geo . getHost ( ) ) ) + ( INode . _ZOODISCOVERYID_ ) ) + ( INSTANCE . getID ( ) . toString ( ) ) ; <END_BUG> } public String getAbsolutePath ( ) { } public boolean isLocalNode ( ) { } public IService getWrappedService ( ) { } private String arrayToString ( String [ ] arr ) { } }

Fix:
return ( ( ( ( getNodeId ( ) ) + ( INode . _URI_ ) ) + ( Geo . getHost ( ) ) ) + ( INode . _ZOODISCOVERYID_ ) ) + ( INSTANCE . getID ( ) . getName ( ) ) ;
Buggy code:
public class SearchFrame extends JDialog implements ActionListener { private JLabel folderLabel ; private JLabel nameLabel ; private JTextField folderTextField ; private JButton addButton ; private JButton selectButton ; private JButton searchButton ; private JCheckBox includeSubfolderButton ; private CriteriaList criteriaList ; private VirtualFolder destFolder ; private JComboBox condList ; private FrameMediator frameController ; public SearchFrame ( FrameMediator frameController , MessageFolder folder ) { } private JPanel createCenterPanel ( ) { } public JPanel createTopPanel ( String title , String description , ImageIcon icon ) { } public void updateComponents ( boolean b ) { } public void setSourceFolder ( MessageFolder f ) { } public void actionPerformed ( ActionEvent e ) { String action = e . getActionCommand ( ) ; if ( action . equals ( "CLOSE" ) ) { updateComponents ( false ) ; setVisible ( false ) ; } else if ( action . equals ( "ADD_CRITERION" ) ) { criteriaList . add ( ) ; } else if ( action . equals ( "SELECT" ) ) { <START_BUG> SelectFolderDialog dialog = treeModel . getSelectFolderDialog ( ) ; <END_BUG> if ( dialog . success ( ) ) { MessageFolder folder = dialog . getSelectedFolder ( ) ; String path = folder . getTreePath ( ) ; selectButton . setText ( path ) ; } } else if ( action . equals ( "SEARCH" ) ) { updateComponents ( false ) ; setVisible ( false ) ; try { ( ( VirtualFolder ) ( destFolder ) ) . addSearchToHistory ( ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } FolderCommandReference [ ] r = new FolderCommandReference [ 1 ] ; r [ 0 ] = new FolderCommandReference ( destFolder ) ; ( ( MailFrameMediator ) ( frameController ) ) . setTreeSelection ( r ) ; processor . addOp ( new org . columba . mail . gui . table . command . ViewHeaderListCommand ( frameController , r ) ) ; } } }

Fix:
SelectFolderDialog dialog = new SelectFolderDialog ( frameController ) ;
Buggy code:
public class CloudFoundryTargetProperties extends TargetProperties { public static final String ORG_PROP = "organization" ; public static final String SPACE_PROP = "space" ; public static final String SELF_SIGNED_PROP = "selfsigned" ; public CloudFoundryTargetProperties ( ) { } public CloudFoundryTargetProperties ( TargetProperties targetProperties ) { } public String getSpaceName ( ) { } public String getOrganizationName ( ) { } public boolean isSelfsigned ( ) { <START_BUG> return ( ( map . get ( CloudFoundryTargetProperties . SELF_SIGNED_PROP ) ) != null ) && ( Boolean . getBoolean ( getAllProperties ( ) . get ( CloudFoundryTargetProperties . SELF_SIGNED_PROP ) ) ) ; <END_BUG> } @ Override public Map < String , String > getPropertiesToPersist ( ) { } public static String getId ( CloudFoundryTargetProperties cloudProps ) { } public static String getName ( CloudFoundryTargetProperties cloudProps ) { } public static String getId ( String userName , String url , String orgName , String spaceName ) { } }

Fix:
return ( ( map . get ( CloudFoundryTargetProperties . SELF_SIGNED_PROP ) ) != null ) && ( Boolean . parseBoolean ( map . get ( CloudFoundryTargetProperties . SELF_SIGNED_PROP ) ) ) ;
Buggy code:
@ RunWith ( Parameterized . class ) public class CSVFileParserTest { private static final File BASE = new File ( "src//test//resources//CSVFileParser" ) ; private final BufferedReader testData ; private final String testName ; public CSVFileParserTest ( final File file ) throws FileNotFoundException { } private String readTestData ( ) throws IOException { } @ Parameters public static Collection < Object [ ] > generateData ( ) { } @ Test public void testCSVFile ( ) throws Exception { String line = readTestData ( ) ; assertNotNull ( "file<seq2seq4repair_space>must<seq2seq4repair_space>contain<seq2seq4repair_space>config<seq2seq4repair_space>line" , line ) ; final String [ ] split = line . split ( "<seq2seq4repair_space>" ) ; assertTrue ( ( ( testName ) + "<seq2seq4repair_space>require<seq2seq4repair_space>1<seq2seq4repair_space>param" ) , ( ( split . length ) >= 1 ) ) ; final BufferedReader csvFile = new BufferedReader ( new FileReader ( new File ( CSVFileParserTest . BASE , split [ 0 ] ) ) ) ; <START_BUG> CSVFormat fmt = PRISTINE . withDelimiter ( ',' ) . withEncapsulator ( '"' ) ; <END_BUG> boolean checkComments = false ; for ( int i = 1 ; i < ( split . length ) ; i ++ ) { final String option = split [ i ] ; final String [ ] option_parts = option . split ( "=" , 2 ) ; if ( "IgnoreEmpty" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { fmt = fmt . withIgnoreEmptyLines ( Boolean . parseBoolean ( option_parts [ 1 ] ) ) ; } else if ( "IgnoreSpaces" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { fmt = fmt . withIgnoreSurroundingSpaces ( Boolean . parseBoolean ( option_parts [ 1 ] ) ) ; } else if ( "CommentStart" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { fmt = fmt . withCommentStart ( option_parts [ 1 ] . charAt ( 0 ) ) ; } else if ( "CheckComments" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { checkComments = true ; } else { fail ( ( ( ( testName ) + "<seq2seq4repair_space>unexpected<seq2seq4repair_space>option:<seq2seq4repair_space>" ) + option ) ) ; } } line = readTestData ( ) ; assertEquals ( ( ( testName ) + "<seq2seq4repair_space>Expected<seq2seq4repair_space>format<seq2seq4repair_space>" ) , line , fmt . toString ( ) ) ; for ( final CSVRecord rec : fmt . parse ( csvFile ) ) { String parsed = rec . toString ( ) ; if ( checkComments ) { final String comment = rec . getComment ( ) . replace ( "\n" , "\\n" ) ; if ( comment != null ) { parsed += "#" + comment ; } } final int count = rec . size ( ) ; assertEquals ( testName , readTestData ( ) , ( ( count + ":" ) + parsed ) ) ; } } }

Fix:
CSVFormat fmt = PRISTINE . withDelimiter ( ',' ) . withQuoteChar ( '"' ) ;
Buggy code:
public class BarcodeLendModel { private BookDao book ; private PersonDao person ; private String code ; private List < LoanRecordDisplay > checkedoutforuser ; private Boolean multicheckout ; public BookDao getBook ( ) { } public void setBook ( BookDao book ) { } public PersonDao getPerson ( ) { } public void setPerson ( PersonDao person ) { } public String getCode ( ) { } public void setCode ( String code ) { } public void setCheckedoutForUser ( List < LoanRecordDisplay > checkedoutforuser ) { } public List < LoanRecordDisplay > getCheckedoutForUser ( ) { } public boolean matchesPerson ( PersonDao person2 ) { } public Boolean getMulticheckout ( ) { <START_BUG> return multicheckout ; <END_BUG> } public void setMulticheckout ( Boolean multicheckout ) { } }

Fix:
return ( multicheckout ) != null ? multicheckout : false ;
Buggy code:
class BinaryMethod extends BinaryMember implements IMethod { class DecodeParametersNames extends SourceElementRequestorAdapter { String [ ] parametersNames ; public void enterMethod ( ISourceElementRequestor . MethodInfo methodInfo ) { } public void enterConstructor ( ISourceElementRequestor . MethodInfo methodInfo ) { } public String [ ] getParametersNames ( ) { } } protected String [ ] parameterTypes ; protected String [ ] parameterNames ; protected static final String [ ] NO_TYPES = new String [ ] { } ; protected String [ ] exceptionTypes ; protected String returnType ; protected BinaryMethod ( JavaElement parent , String name , String [ ] paramTypes ) { } public boolean equals ( Object o ) { } public String [ ] getExceptionTypes ( ) throws JavaModelException { } public int getElementType ( ) { } public int getFlags ( ) throws JavaModelException { } protected void getHandleMemento ( StringBuffer buff ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( boolean forceOpen ) throws JavaModelException { <START_BUG> return getKey ( this , true , forceOpen ) ; <END_BUG> } public int getNumberOfParameters ( ) { } public String [ ] getParameterNames ( ) throws JavaModelException { } public String [ ] getParameterTypes ( ) { } public ITypeParameter getTypeParameter ( String typeParameterName ) { } public ITypeParameter [ ] getTypeParameters ( ) throws JavaModelException { } public String [ ] getTypeParameterSignatures ( ) throws JavaModelException { } public String getReturnType ( ) throws JavaModelException { } private String getReturnType ( IBinaryMethod info ) { } public String getSignature ( ) throws JavaModelException { } public int hashCode ( ) { } public boolean isConstructor ( ) throws JavaModelException { } public boolean isMainMethod ( ) throws JavaModelException { } public boolean isResolved ( ) { } public boolean isSimilar ( IMethod method ) { } public String readableName ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } protected void toStringName ( StringBuffer buffer ) { } protected void toStringName ( StringBuffer buffer , int flags ) { } }

Fix:
return getKey ( this , forceOpen ) ;
Buggy code:
public class SecurityDomainProcessor extends AbstractAnnotationEJBProcessor < EJBComponentDescription > { private static final Logger logger = Logger . getLogger ( SecurityDomainProcessor . class ) ; private static final DotName SECURITY_DOMAIN_DOT_NAME = DotName . createSimple ( "org.jboss.ejb3.annotation.SecurityDomain" ) ; @ Override protected Class < EJBComponentDescription > getComponentDescriptionType ( ) { } @ Override protected void processAnnotations ( ClassInfo beanClass , CompositeIndex index , EJBComponentDescription componentDescription ) throws DeploymentUnitProcessingException { Map < DotName , List < AnnotationInstance > > annotationsOnBean = beanClass . annotations ( ) ; if ( ( annotationsOnBean == null ) || ( annotationsOnBean . isEmpty ( ) ) ) { return ; } List < AnnotationInstance > securityDomainAnnotations = annotationsOnBean . get ( SecurityDomainProcessor . SECURITY_DOMAIN_DOT_NAME ) ; if ( ( securityDomainAnnotations == null ) || ( securityDomainAnnotations . isEmpty ( ) ) ) { return ; } final AnnotationInstance securityDomainAnnotation = securityDomainAnnotations . get ( 0 ) ; final String securityDomain = securityDomainAnnotation . value ( ) . asString ( ) ; SecurityDomainProcessor . logger . debug ( ( ( ( "EJB<seq2seq4repair_space>" + ( componentDescription . getEJBName ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>annotated<seq2seq4repair_space>with<seq2seq4repair_space>@SecurityDomain<seq2seq4repair_space>named:<seq2seq4repair_space>" ) + securityDomain ) ) ; if ( securityDomain . trim ( ) . isEmpty ( ) ) { <START_BUG> throw new DeploymentUnitProcessingException ( ( ( "SecurtiyDomain<seq2seq4repair_space>value<seq2seq4repair_space>on<seq2seq4repair_space>bean<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( componentDescription . getEJBClassName ( ) ) ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>empty<seq2seq4repair_space>string" ) ) ; <END_BUG> } componentDescription . setSecurityDomain ( securityDomain ) ; } }

Fix:
throw new DeploymentUnitProcessingException ( ( ( "SecurityDomain<seq2seq4repair_space>value<seq2seq4repair_space>on<seq2seq4repair_space>bean<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( componentDescription . getEJBClassName ( ) ) ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>empty<seq2seq4repair_space>string" ) ) ;
Buggy code:
public class ServletWrapper extends Handler { protected String servletName ; protected String servletClassName ; protected Class servletClass ; protected Servlet servlet ; protected ServletConfig configF ; private String path = null ; protected String description = null ; Exception unavailable = null ; long unavailableTime = - 1 ; protected boolean isReloadable = false ; protected long lastAccessed ; protected int serviceCount = 0 ; int loadOnStartup = 0 ; Hashtable securityRoleRefs = new Hashtable ( ) ; public ServletWrapper ( ) { } public void setContext ( Context context ) { } public String toString ( ) { <START_BUG> return ( ( ( ( name ) + "(" ) + ( servletClassName ) ) + "//" ) + ( path ) ; <END_BUG> } public void setLoadOnStartUp ( int level ) { } public void setLoadOnStartUp ( String level ) { } public int getLoadOnStartUp ( ) { } void setReloadable ( boolean reloadable ) { } public String getServletName ( ) { } public void setServletName ( String servletName ) { } public String getServletDescription ( ) { } public void setDescription ( String d ) { } public void setServletDescription ( String description ) { } public String getServletClass ( ) { } public void setServletClass ( String servletClassName ) { } public void addSecurityMapping ( String name , String role , String description ) { } public String getSecurityRole ( String name ) { } public String getPath ( ) { } public void setPath ( String path ) { } public Servlet getServlet ( ) { } protected void doDestroy ( ) throws TomcatException { } private void loadServlet ( ) throws ClassNotFoundException , IllegalAccessException , InstantiationException { } public void init ( ) throws Exception { } protected void doInit ( ) throws Exception { } public void service ( Request req , Response res ) { } protected void doService ( Request req , Response res ) throws Exception { } void handleReload ( Request req ) throws TomcatException { } void handleJspInit ( ) { } private boolean stillUnavailable ( ) { } private void handleUnavailable ( Request req , Response res ) { } private void handleNotFound ( Request req , Response res ) { } }

Fix:
return ( ( ( ( ( name ) + "(" ) + ( servletClassName ) ) + "//" ) + ( path ) ) + ")" ;
Buggy code:
public class MultiProtocolTests extends TestCase { private String basicName = null ; private String basicMultiName = null ; private String basicRefName = null ; private InitialContext ic = null ; private BasicObjectItf ba = null ; private BasicMultiObjectItf bma = null ; public MultiProtocolTests ( String name ) { } public void setUp ( ) { } public void setInitialContext ( InitialContext ic ) { } public void tearDown ( ) { } public void testString ( ) { } public void testMultiString ( ) { } public void testReferenceString ( ) { try { String expected = bma . getBasicRefString ( ) ; <START_BUG> assertEquals ( expected , "string" ) ; <END_BUG> } catch ( Exception e ) { e . printStackTrace ( ) ; fail ( ( "Can't<seq2seq4repair_space>get<seq2seq4repair_space>ref<seq2seq4repair_space>string" + e ) ) ; } } public void testStub ( ) { } }

Fix:
assertEquals ( expected , "string2" ) ;
Buggy code:
public class GenericSignatureParserTest extends TestCase { GenericSignatureParser parser ; public void testSimpleTokenize ( ) { } public void testTokenizeWithWildTypeArguments ( ) { } public void testTokenizeWithExtendsTypeArguments ( ) { } public void testTokenizeWithSuperTypeArguments ( ) { } public void testTokenizeArrayType ( ) { } public void testTokenizeFormalTypeParameters ( ) { } public void testParseClassSignatureSimple ( ) { } public void testParseClassSignatureTypeArgs ( ) { } public void testParseClassSignatureTheFullMonty ( ) { } public void testClassSignatureParsingInJDK ( ) throws Exception { } public void testFieldSignatureParsingClassType ( ) { } public void testFieldSignatureParsingArrayType ( ) { } public void testFieldSignatureParsingTypeVariable ( ) { } public void testSimpleMethodSignatureParsing ( ) { } public void testMethodSignatureTypeParams ( ) { } public void testMethodSignatureGenericReturn ( ) { } public void testMethodSignatureThrows ( ) { } public void testMethodSignaturePrimitiveParams ( ) { } public void testMethodSignatureParsingInJDK ( ) throws Exception { } public void testFullyQualifiedSuperclassAfterTypeParams ( ) { try { Signature . FieldTypeSignature cSig = parser . parseAsFieldSignature ( "Ljava//util//List<//;" ) ; fail ( "Expected<seq2seq4repair_space>IllegalStateException" ) ; } catch ( IllegalStateException ex ) { <START_BUG> assertTrue ( ex . getMessage ( ) . contains ( "Ljava//util//List<//;" ) ) ; <END_BUG> } } public void testPr107784 ( ) { } private void assertEquals ( String [ ] expected , String [ ] actual ) { } private String tokensToString ( String [ ] tokens ) { } protected void setUp ( ) throws Exception { } }

Fix:
assertTrue ( ( ( ex . getMessage ( ) . indexOf ( "Ljava//util//List<//;" ) ) != ( - 1 ) ) ) ;
Buggy code:
public class FalseLiteral extends MagicLiteral { static final char [ ] source = new char [ ] { 'f' , 'a' , 'l' , 's' , 'e' } ; public FalseLiteral ( int s , int e ) { } public void computeConstant ( ) { <START_BUG> constant = BooleanConstant . fromValue ( false ) ; <END_BUG> } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBoolean ( BlockScope currentScope , CodeStream codeStream , BranchLabel trueLabel , BranchLabel falseLabel , boolean valueRequired ) { } public TypeBinding literalType ( BlockScope scope ) { } public char [ ] source ( ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
this . constant = BooleanConstant . fromValue ( false ) ;
Buggy code:
public class ShiftLeftTwo implements Clockable { Pin in = new Pin ( ) ; Pin out = new Pin ( ) ; int outputBits ; ShiftLeftTwo ( int outputBits ) { } public void clockEdge ( ) { String myStr = BinaryUtil . pad ( Long . toBinaryString ( in . getValue ( ) ) , outputBits ) ; <START_BUG> out . setValue ( Long . parseLong ( ( ( myStr . substring ( 2 , ( ( outputBits ) - 1 ) ) ) + "00" ) , 2 ) ) ; <END_BUG> System . out . println ( ( ( ( ( "[DEBUG]<seq2seq4repair_space>Class:<seq2seq4repair_space>ShiftLeftTwo" + "\nin:" ) + ( BinaryUtil . pad ( Long . toBinaryString ( in . getValue ( ) ) , 32 ) ) ) + "\nout:" ) + ( BinaryUtil . pad ( Long . toBinaryString ( out . getValue ( ) ) , 32 ) ) ) ) ; } }

Fix:
out . setValue ( Long . parseLong ( ( ( myStr . substring ( 2 , outputBits ) ) + "00" ) , 2 ) ) ;
Buggy code:
public class JmsListenerAnnotationBeanPostProcessorTests { @ Test public void simpleMessageListener ( ) { } @ Test public void metaAnnotationIsDiscovered ( ) { } @ Component static class SimpleMessageListenerTestBean { @ JmsListener ( destination = "testQueue" ) public void handleIt ( String body ) { } } @ Component static class MetaAnnotationTestBean { @ JmsListenerAnnotationBeanPostProcessorTests . FooListener public void handleIt ( String body ) { } } @ JmsListener ( destination = "metaTestQueue" ) @ Target ( ElementType . METHOD ) @ Retention ( RetentionPolicy . RUNTIME ) static @ interface FooListener { } @ Configuration static class Config { @ Bean public JmsListenerAnnotationBeanPostProcessor postProcessor ( ) { JmsListenerAnnotationBeanPostProcessor postProcessor = new JmsListenerAnnotationBeanPostProcessor ( ) ; postProcessor . setEndpointRegistry ( jmsListenerEndpointRegistry ( ) ) ; <START_BUG> postProcessor . setDefaultContainerFactory ( testFactory ( ) ) ; <END_BUG> return postProcessor ; } @ Bean public JmsListenerEndpointRegistry jmsListenerEndpointRegistry ( ) { } @ Bean public JmsListenerContainerTestFactory testFactory ( ) { } } }

Fix:
postProcessor . setContainerFactoryBeanName ( "testFactory" ) ;
Buggy code:
public abstract class Record { protected Name name ; protected short type ; protected short dclass ; protected int ttl ; protected int wireLength = - 1 ; protected Record ( ) { } Record ( Name _name , short _type , short _dclass , int _ttl ) { } private static Class toClass ( short type ) throws ClassNotFoundException { } private static Record newRecord ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in , Compression c ) throws IOException { } public static Record newRecord ( Name name , short type , short dclass , int ttl , int length , byte [ ] data ) { } public static Record newRecord ( Name name , short type , short dclass , int ttl ) { } public static Record newRecord ( Name name , short type , short dclass ) { } static Record fromWire ( DataByteInputStream in , int section , Compression c ) throws IOException { } void toWire ( DataByteOutputStream out , int section , Compression c ) throws IOException { } public byte [ ] toWire ( int section ) throws IOException { } void toWireCanonical ( DataByteOutputStream out ) throws IOException { } public byte [ ] toWireCanonical ( int section ) throws IOException { } StringBuffer toStringNoData ( ) { } public String toString ( ) { } public static Record fromString ( Name name , short type , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws IOException { } public Name getName ( ) { } public short getType ( ) { } public short getRRsetType ( ) { } public short getDClass ( ) { } public int getTTL ( ) { } public short getWireLength ( ) { } abstract void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } <START_BUG> byte [ ] rrToWireCanonical ( DataByteOutputStream out ) throws IOException { <END_BUG> rrToWire ( out , null ) ; } public boolean equals ( Object arg ) { } public int hashCode ( ) { } }

Fix:
void rrToWireCanonical ( DataByteOutputStream out ) throws IOException {
Buggy code:
public class ModuleDependenciesComparator implements Comparator < ITernModule > { private static final ModuleDependenciesComparator INSTANCE = new ModuleDependenciesComparator ( ) ; public static Comparator < ITernModule > getInstance ( ) { } @ Override public int compare ( ITernModule mod1 , ITernModule mod2 ) { TernModuleMetadata metadata1 = mod1 . getMetadata ( ) ; if ( metadata1 == null ) { return 0 ; } Collection < String > dependencies = metadata1 . getDependencies ( mod1 . getVersion ( ) ) ; if ( dependencies == null ) { return 0 ; } <START_BUG> return dependencies . contains ( mod2 . getName ( ) ) ? 1000 : 0 ; <END_BUG> } }

Fix:
return dependencies . contains ( mod2 . getName ( ) ) ? 1000 : 500 ;
Buggy code:
public class SimpleStrategyTest extends CleanupHelper { @ Test public void tryValidTable ( ) { } @ Test public void testBigIntegerEndpoints ( ) throws UnknownHostException , ConfigurationException { } @ Test public void testStringEndpoints ( ) throws UnknownHostException , ConfigurationException { } private void verifyGetNaturalEndpoints ( Token [ ] endpointTokens , Token [ ] keyTokens ) throws UnknownHostException , ConfigurationException { } @ Test public void testGetEndpointsDuringBootstrap ( ) throws UnknownHostException , ConfigurationException { final int RING_SIZE = 10 ; TokenMetadata tmd = new TokenMetadata ( ) ; TokenMetadata oldTmd = StorageServiceAccessor . setTokenMetadata ( tmd ) ; Token [ ] endpointTokens = new Token [ RING_SIZE ] ; Token [ ] keyTokens = new Token [ RING_SIZE ] ; for ( int i = 0 ; i < RING_SIZE ; i ++ ) { endpointTokens [ i ] = new BigIntegerToken ( String . valueOf ( ( ( RING_SIZE * 2 ) * i ) ) ) ; keyTokens [ i ] = new BigIntegerToken ( String . valueOf ( ( ( ( RING_SIZE * 2 ) * i ) + RING_SIZE ) ) ) ; } List < InetAddress > hosts = new ArrayList < InetAddress > ( ) ; for ( int i = 0 ; i < ( endpointTokens . length ) ; i ++ ) { InetAddress ep = InetAddress . getByName ( ( "127.0.0." + ( String . valueOf ( ( i + 1 ) ) ) ) ) ; tmd . updateNormalToken ( endpointTokens [ i ] , ep ) ; hosts . add ( ep ) ; } Token bsToken = new BigIntegerToken ( String . valueOf ( 210 ) ) ; InetAddress bootstrapEndpoint = InetAddress . getByName ( "127.0.0.11" ) ; tmd . addBootstrapToken ( bsToken , bootstrapEndpoint ) ; AbstractReplicationStrategy strategy = null ; for ( String table : DatabaseDescriptor . getNonSystemTables ( ) ) { strategy = getStrategy ( table , tmd ) ; StorageService . calculatePendingRanges ( strategy , table ) ; int replicationFactor = strategy . getReplicationFactor ( ) ; for ( int i = 0 ; i < ( keyTokens . length ) ; i ++ ) { <START_BUG> Collection < InetAddress > endpoints = tmd . getWriteEndpoints ( keyTokens [ i ] , table , strategy . getNaturalEndpoints ( keyTokens [ i ] ) ) ; <END_BUG> assertTrue ( ( ( endpoints . size ( ) ) >= replicationFactor ) ) ; for ( int j = 0 ; j < replicationFactor ; j ++ ) { assertTrue ( endpoints . contains ( hosts . get ( ( ( ( i + j ) + 1 ) % ( hosts . size ( ) ) ) ) ) ) ; } if ( i < ( RING_SIZE - replicationFactor ) ) assertFalse ( endpoints . contains ( bootstrapEndpoint ) ) ; else assertTrue ( endpoints . contains ( bootstrapEndpoint ) ) ; } } StorageServiceAccessor . setTokenMetadata ( oldTmd ) ; } private AbstractReplicationStrategy getStrategyWithNewTokenMetadata ( AbstractReplicationStrategy strategy , TokenMetadata newTmd ) throws ConfigurationException { } private AbstractReplicationStrategy getStrategy ( String table , TokenMetadata tmd ) throws ConfigurationException { } }

Fix:
Collection < InetAddress > endpoints = tmd . getWriteEndpoints ( keyTokens [ i ] , table , strategy . getNaturalEndpoints ( keyTokens [ i ] ) ) . left ;
Buggy code:
public class ParsedServiceDeploymentProcessor implements DeploymentUnitProcessor { public static final long PRIORITY = INSTALL_SERVICES . plus ( 101L ) ; public static final Logger log = Logger . getLogger ( "org.jboss.as.deployment.service" ) ; public void processDeployment ( DeploymentUnitContext context ) throws DeploymentUnitProcessingException { final JBossServiceXmlDescriptor serviceXmlDescriptor = context . getAttachment ( ATTACHMENT_KEY ) ; if ( serviceXmlDescriptor == null ) return ; final Module module = context . getAttachment ( MODULE_ATTACHMENT_KEY ) ; if ( module == null ) <START_BUG> throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>module<seq2seq4repair_space>attachment<seq2seq4repair_space>for<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( context . getName ( ) ) ) ) ; <END_BUG> final ClassLoader classLoader = module . getClassLoader ( ) ; final Value < ClassLoader > classLoaderValue = Values . immediateValue ( classLoader ) ; final JBossServiceXmlDescriptor . ControllerMode controllerMode = serviceXmlDescriptor . getControllerMode ( ) ; final List < JBossServiceConfig > serviceConfigs = serviceXmlDescriptor . getServiceConfigs ( ) ; final BatchBuilder batchBuilder = context . getBatchBuilder ( ) ; for ( final JBossServiceConfig serviceConfig : serviceConfigs ) { addService ( batchBuilder , serviceConfig , classLoaderValue ) ; } } private void addService ( final BatchBuilder batchBuilder , final JBossServiceConfig serviceConfig , final Value < ClassLoader > classLoaderValue ) { } private Injector < Object > getPropertyInjector ( final Value < Class < ? > > classValue , final String propertyName , final JBossService < ? > jBossService , final Value < ? > value ) { } private ServiceName convert ( final String name ) { } private < T > Value < T > cached ( final Value < T > value ) { } private static class AttributeValue < T > implements Value < T > { private final Value < Class < ? > > targetClassValue ; private final String name ; private final String value ; private AttributeValue ( Value < Class < ? > > targetClassValue , String name , String value ) { } @ Override public T getValue ( ) throws IllegalStateException { } } private static class ArgumentValue < T > implements Value < T > { private final Value < Class < ? > > typeValue ; private final String value ; private ArgumentValue ( final Value < Class < ? > > typeValue , final String value ) { } @ Override public T getValue ( ) throws IllegalStateException { } } }

Fix:
throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>module<seq2seq4repair_space>attachment<seq2seq4repair_space>for<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( context . getName ( ) ) ) , null ) ;
Buggy code:
public class AgentExecutor { public static void main ( String [ ] args ) { String map = args [ 0 ] ; String level = args [ 1 ] ; String playerClassString = args [ 2 ] ; String action_file = args [ 3 ] ; System . out . println ( ( "Map:<seq2seq4repair_space>" + map ) ) ; System . out . println ( ( "level:<seq2seq4repair_space>" + level ) ) ; System . out . println ( ( "Player<seq2seq4repair_space>Class:<seq2seq4repair_space>" + playerClassString ) ) ; System . out . println ( ( "Agent<seq2seq4repair_space>Action<seq2seq4repair_space>file:<seq2seq4repair_space>" + action_file ) ) ; int seed = new Random ( ) . nextInt ( ) ; <START_BUG> double gameScore = ArcadeMachine . runOneGame ( map , level , false , playerClassString , action_file , seed ) ; <END_BUG> } }

Fix:
double gameScore = ArcadeMachine . runOneGame ( map , level , false , playerClassString , action_file , seed , false ) ;
Buggy code:
public class CoarseSessionFactory < L > implements SessionFactory < CoarseSessionEntry < L > , L > { private final SessionContext context ; private final Cache < String , CoarseSessionCacheEntry < L > > sessionCache ; private final Cache < SessionAttributesCacheKey , MarshalledValue < Map < String , Object > , MarshallingContext > > attributesCache ; private final CacheInvoker invoker ; private final SessionAttributeMarshaller < Map < String , Object > , MarshalledValue < Map < String , Object > , MarshallingContext > > marshaller ; private final LocalContextFactory < L > localContextFactory ; public CoarseSessionFactory ( Cache < String , CoarseSessionCacheEntry < L > > sessionCache , Cache < SessionAttributesCacheKey , MarshalledValue < Map < String , Object > , MarshallingContext > > attributesCache , CacheInvoker invoker , SessionContext context , SessionAttributeMarshaller < Map < String , Object > , MarshalledValue < Map < String , Object > , MarshallingContext > > marshaller , LocalContextFactory < L > localContextFactory ) { } @ Override public Session < L > createSession ( String id , CoarseSessionEntry < L > entry ) { } @ Override public ImmutableSession createImmutableSession ( String id , CoarseSessionEntry < L > entry ) { } @ Override public CoarseSessionEntry < L > createValue ( String id ) { } @ Override public CoarseSessionEntry < L > findValue ( String id ) { <START_BUG> CoarseSessionCacheEntry < L > entry = this . invoker . invoke ( this . sessionCache , new LockingFindOperation < String , CoarseSessionCacheEntry < L > > ( id ) ) ; <END_BUG> if ( entry == null ) return null ; MarshalledValue < Map < String , Object > , MarshallingContext > value = this . invoker . invoke ( this . attributesCache , new FindOperation < SessionAttributesCacheKey , MarshalledValue < Map < String , Object > , MarshallingContext > > ( new SessionAttributesCacheKey ( id ) ) , SKIP_LOCKING ) ; return new CoarseSessionEntry ( entry , value ) ; } @ Override public void remove ( String id ) { } @ Override public void evict ( String id ) { } }

Fix:
CoarseSessionCacheEntry < L > entry = this . invoker . invoke ( this . sessionCache , new FindOperation < String , CoarseSessionCacheEntry < L > > ( id ) ) ;
Buggy code:
public class SelectExistingTournament extends ActionBarActivity { Vector < String > tournamentNamesVector = new Vector < String > ( ) ; String tournamentSelected = "" ; int tournamentID ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void createDisplay ( ) { } public void select ( View view ) { } public void GetTournaments ( ) { String myQuery = "SELECT<seq2seq4repair_space>COUNT(ROWID)<seq2seq4repair_space>FROM<seq2seq4repair_space>Tournament" ; Cursor myCursor = DatabaseCommunicator . CreateFetchQuery ( myQuery ) ; myCursor . moveToFirst ( ) ; int tourneyExists = myCursor . getInt ( 0 ) ; <START_BUG> if ( tourneyExists == 1 ) { <END_BUG> myQuery = "SELECT<seq2seq4repair_space>TournamentName<seq2seq4repair_space>FROM<seq2seq4repair_space>Tournament" ; myCursor = DatabaseCommunicator . CreateFetchQuery ( myQuery ) ; Log . d ( "SelectExistingTourney" , "Query<seq2seq4repair_space>Complete" ) ; myCursor . moveToFirst ( ) ; tournamentNamesVector . add ( myCursor . getString ( 0 ) ) ; while ( myCursor . moveToNext ( ) ) { tournamentNamesVector . add ( myCursor . getString ( 0 ) ) ; } } else { Toast . makeText ( getApplicationContext ( ) , ( "No<seq2seq4repair_space>Tournaments<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>created<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>System<seq2seq4repair_space>yet.<seq2seq4repair_space>" + "Please<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>Tournament<seq2seq4repair_space>first." ) , LENGTH_SHORT ) . show ( ) ; thread . start ( ) ; } } Thread thread = new Thread ( ) { @ Override public void run ( ) { } } ; }

Fix:
if ( tourneyExists > 0 ) {
Buggy code:
public class SimplePasswordStrengthCheckerTestCase { private Keyboard keyboard = new SimpleKeyboard ( ) ; private Dictionary dictionary = new SimpleDictionary ( ) ; public static final PasswordCheckUtil PCU = PasswordCheckUtil . create ( null ) ; public static final PasswordRestriction ALPHA_RESTRICTION = SimplePasswordStrengthCheckerTestCase . PCU . createAlphaRestriction ( 1 ) ; public static final PasswordRestriction SYMBOL_RESTRICTION = SimplePasswordStrengthCheckerTestCase . PCU . createSymbolRestriction ( 1 ) ; public static final PasswordRestriction DIGIT_RESTRICTION = SimplePasswordStrengthCheckerTestCase . PCU . createDigitRestriction ( 1 ) ; public static final LengthRestriction LENGTH_RESTRICTION = new LengthRestriction ( 8 ) ; @ Test public void testLengthRestriction ( ) { } @ Test public void testDigitsRestriction ( ) { } @ Test public void testSymbolsRestriction ( ) { } @ Test public void testAlphaRestriction ( ) { } @ Test public void testAdHocRestriction ( ) { List < PasswordRestriction > restrictions = new ArrayList < PasswordRestriction > ( ) ; restrictions . add ( SimplePasswordStrengthCheckerTestCase . ALPHA_RESTRICTION ) ; restrictions . add ( SimplePasswordStrengthCheckerTestCase . SYMBOL_RESTRICTION ) ; SimplePasswordStrengthChecker checker = new SimplePasswordStrengthChecker ( restrictions , this . dictionary , this . keyboard ) ; String pwd = "!#*_3x" ; List < PasswordRestriction > adHocRestrictions = new ArrayList < PasswordRestriction > ( ) ; <START_BUG> ValueRestriction restriction = new ValueRestriction ( new String [ ] { pwd } ) ; <END_BUG> adHocRestrictions . add ( restriction ) ; PasswordStrengthCheckResult result = checker . check ( "" , pwd , adHocRestrictions ) ; assertNotNull ( result ) ; assertNotNull ( result . getPassedRestrictions ( ) ) ; assertNotNull ( result . getRestrictionFailures ( ) ) ; assertEquals ( 2 , result . getPassedRestrictions ( ) . size ( ) ) ; assertEquals ( 1 , result . getRestrictionFailures ( ) . size ( ) ) ; assertNotNull ( result . getStrength ( ) ) ; assertEquals ( SimplePasswordStrengthCheckerTestCase . ALPHA_RESTRICTION , result . getPassedRestrictions ( ) . get ( 0 ) ) ; assertEquals ( SimplePasswordStrengthCheckerTestCase . SYMBOL_RESTRICTION , result . getPassedRestrictions ( ) . get ( 1 ) ) ; assertEquals ( DomainManagementMessages . MESSAGES . passwordMustNotBeEqual ( pwd ) . getMessage ( ) , result . getRestrictionFailures ( ) . get ( 0 ) . getMessage ( ) ) ; } }

Fix:
ValueRestriction restriction = new ValueRestriction ( new String [ ] { pwd } , true ) ;
Buggy code:
public class ConnectionManager { private static final Logger log = Logger . getLogger ( ConnectionManager . class ) ; private static ConnectionManager instance = new ConnectionManager ( ) ; HashMap requestConnections = new HashMap ( ) ; protected ClockDaemon clockDaemon = new ClockDaemon ( ) ; protected long checkPeriod = 1000 * 60 ; protected long expirationPeriod = 1000 * 60 ; Object checkTaskId ; private Class clientClass ; public ThreadGroup threadGroup = new ThreadGroup ( "Client<seq2seq4repair_space>Sockets" ) ; private WorkManager workManager ; class CheckTask implements Runnable { public void run ( ) { } } public static ThreadGroup oiThreadGroup = new ThreadGroup ( "Optimized<seq2seq4repair_space>Invoker" ) ; protected ConnectionManager ( ) { } private void startCheckThread ( ) { } private void stopCheckThread ( ) { } public static ConnectionManager getInstance ( ) { } AbstractClient connect ( ServerAddress serverAddress ) throws IOException { } public void connectionClosed ( AbstractClient connection , Exception reason ) { } <START_BUG> public void handleRequest ( AbstractClient connection , TunkRequest request ) { <END_BUG> } }

Fix:
public void handleRequest ( AbstractClient connection , TrunkRequest request ) {