nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ArgumentsPanel extends AbstractConfigGui implements ActionListener , FocusListener , CellEditorListener { JTable table ; JButton add ; JButton delete ; protected PowerTableModel tableModel ; String name ; JLabel tableLabel ; private static String ADD = "add" ; private static String DELETE = "delete" ; public ArgumentsPanel ( ) { } public void editingCanceled ( ChangeEvent e ) { } public void editingStopped ( ChangeEvent e ) { } public ArgumentsPanel ( String label ) { } protected JTable getTable ( ) { } protected JButton getDeleteButton ( ) { } protected JButton getAddButton ( ) { } public Collection getMenuCategories ( ) { } public String getStaticLabel ( ) { } public TestElement createTestElement ( ) { } public void configure ( TestElement el ) { } public void focusLost ( FocusEvent e ) { } public void focusGained ( FocusEvent e ) { } public void actionPerformed ( ActionEvent e ) { } protected void deleteArgument ( ) { } protected void addArgument ( ) { } public void addInnerPanel ( ) { } protected void initializeTableModel ( ) { } protected void checkDeleteStatus ( ) { } private void init ( ) { } public static class Test extends TestCase { public Test ( String name ) { } public void testArgumentCreation ( ) throws Exception { ArgumentsPanel gui = new ArgumentsPanel ( ) ; gui . tableModel . addNewRow ( ) ; gui . tableModel . setValueAt ( "howdy" , 0 , 0 ) ; gui . tableModel . setValueAt ( "doody" , 0 , 1 ) ; <START_BUG> assertNull ( ( ( org . apache . jmeter . config . Argument ) ( ( ( org . apache . jmeter . config . Arguments ) ( gui . createTestElement ( ) ) ) . getArguments ( ) . get ( 0 ) ) ) . getMetaData ( ) ) ; <END_BUG> } } }

Fix:
assertEquals ( "=" , ( ( org . apache . jmeter . config . Argument ) ( ( ( org . apache . jmeter . config . Arguments ) ( gui . createTestElement ( ) ) ) . getArguments ( ) . get ( 0 ) ) ) . getMetaData ( ) ) ;
Buggy code:
public class Image extends WebComponent implements IResourceListener { private static final long serialVersionUID = 1L ; private final LocalizedImageResource localizedImageResource = new LocalizedImageResource ( this ) ; protected Image ( final String id ) { } public Image ( final String id , final ResourceReference resourceReference ) { } public Image ( final String id , final ResourceReference resourceReference , PageParameters resourceParameters ) { } public Image ( final String id , final IResource imageResource ) { } public Image ( final String id , final IModel < ? > model ) { } public Image ( final String id , final String string ) { } public void onResourceRequested ( ) { } public void setImageResource ( final IResource imageResource ) { } public void setImageResourceReference ( final ResourceReference resourceReference ) { } public void setImageResourceReference ( final ResourceReference resourceReference , final PageParameters parameters ) { } @ Override public Component setDefaultModel ( IModel < ? > model ) { } protected IResource getImageResource ( ) { } protected ResourceReference getImageResourceReference ( ) { } @ Override protected IModel < ? > initModel ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } protected final void addAntiCacheParameter ( final ComponentTag tag ) { String url = tag . getAttributes ( ) . getString ( "src" ) ; <START_BUG> url = url + ( url . contains ( "?" ) ? "&amp;" : "?" ) ; <END_BUG> url = ( url + "wicket:antiCache=" ) + ( System . currentTimeMillis ( ) ) ; tag . put ( "src" , url ) ; } @ Override protected boolean getStatelessHint ( ) { } @ Override public void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } }

Fix:
url = url + ( url . contains ( "?" ) ? "&" : "?" ) ;
Buggy code:
abstract class AbstractXServiceTestCase { abstract ServiceContainer getServiceContainer ( ) { } @ SuppressWarnings ( "unchecked" ) Bundle registerModule ( ModuleIdentifier identifier ) throws Exception { ServiceController < Framework > frameworkController = ( ( ServiceController < Framework > ) ( getServiceContainer ( ) . getRequiredService ( FRAMEWORK_ACTIVE ) ) ) ; new FutureServiceValue < Framework > ( frameworkController ) . get ( ) ; ServiceController < BundleManagerService > bundleManagerService = ( ( ServiceController < BundleManagerService > ) ( getServiceContainer ( ) . getRequiredService ( BUNDLE_MANAGER ) ) ) ; BundleManagerService bundleManager = bundleManagerService . getValue ( ) ; ServiceController < ModuleLoader > moduleLoaderService = ( ( ServiceController < ModuleLoader > ) ( getServiceContainer ( ) . getRequiredService ( ServiceName . parse ( "jboss.as.service-module-loader" ) ) ) ) ; ModuleLoader moduleLoader = moduleLoaderService . getValue ( ) ; Module module = moduleLoader . loadModule ( identifier ) ; ServiceTarget serviceTarget = getServiceContainer ( ) . subTarget ( ) ; <START_BUG> ServiceName serviceName = bundleManager . installBundle ( serviceTarget , module , null ) ; <END_BUG> return getBundleFromService ( serviceName ) ; } @ SuppressWarnings ( "unchecked" ) private Bundle getBundleFromService ( ServiceName serviceName ) throws ExecutionException , TimeoutException { } void assertServiceState ( ServiceName serviceName , State expState , long timeout ) throws Exception { } }

Fix:
ServiceName serviceName = bundleManager . registerModule ( serviceTarget , module , null ) ;
Buggy code:
; <START_BUG> adapterDef . getPropertyValues ( ) . add ( "customModelAndViewResolvers" , mavResolvers ) ; <END_BUG>

Fix:
adapterDef . getPropertyValues ( ) . add ( "modelAndViewResolvers" , mavResolvers ) ;
Buggy code:
public class DeploymentScannerExtension implements Extension { public static final String SUBSYSTEM_NAME = CommonAttributes . DEPLOYMENT_SCANNER ; protected static final PathElement SCANNERS_PATH = PathElement . pathElement ( "scanner" ) ; static final String DEFAULT_SCANNER_NAME = "default" ; private static final String RESOURCE_NAME = ( DeploymentScannerExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { DeploymentScannerLogger . ROOT_LOGGER . debug ( "Initializing<seq2seq4repair_space>Deployment<seq2seq4repair_space>Scanner<seq2seq4repair_space>Extension" ) ; final SubsystemRegistration subsystem = context . registerSubsystem ( DEPLOYMENT_SCANNER , 1 , 0 ) ; subsystem . registerXMLElementWriter ( INSTANCE ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( new DeploymentScannerSubsystemDefinition ( ) ) ; registration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <START_BUG> registration . registerSubModel ( DeploymentScannerDefinition . INSTANCE ) ; <END_BUG> } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

Fix:
registration . registerSubModel ( new DeploymentScannerDefinition ( context . getPathManager ( ) ) ) ;
Buggy code:
public class IFileDocument extends PropertyDocument { protected IFile file ; protected char [ ] charContents ; protected byte [ ] byteContents ; public IFileDocument ( IFile file ) { } public IFileDocument ( IFile file , byte [ ] byteContents ) { } public IFileDocument ( IFile file , char [ ] charContents ) { } public byte [ ] getByteContent ( ) throws IOException { } public char [ ] getCharContent ( ) throws IOException { if ( ( charContents ) != null ) return charContents ; IPath location = file . getLocation ( ) ; if ( location == null ) return new char [ 0 ] ; <START_BUG> return charContents = Util . getFileCharContent ( location . toFile ( ) ) ; <END_BUG> } public String getName ( ) { } public String getStringContent ( ) throws IOException { } public String getType ( ) { } }

Fix:
return charContents = Util . getFileCharContent ( location . toFile ( ) , null ) ;
Buggy code:
public class SimpleFragmentsBuilderTest extends AbstractTestCase { public void test1TermIndex ( ) throws Exception { } public void test2Frags ( ) throws Exception { } public void test3Frags ( ) throws Exception { } public void testTagsAndEncoder ( ) throws Exception { } private FieldFragList ffl ( String queryValue , String indexValue ) throws Exception { } public void test1PhraseShortMV ( ) throws Exception { } public void test1PhraseLongMV ( ) throws Exception { } public void test1PhraseLongMVB ( ) throws Exception { } public void testUnstoredField ( ) throws Exception { } protected void makeUnstoredIndex ( ) throws Exception { } public void test1StrMV ( ) throws Exception { } public void testMVSeparator ( ) throws Exception { makeIndexShortMV ( ) ; FieldQuery fq = new FieldQuery ( tq ( "d" ) , true , true ) ; FieldTermStack stack = new FieldTermStack ( reader , 0 , F , fq ) ; FieldPhraseList fpl = new FieldPhraseList ( stack , fq ) ; SimpleFragListBuilder sflb = new SimpleFragListBuilder ( ) ; FieldFragList ffl = sflb . createFieldFragList ( fpl , 100 ) ; SimpleFragmentsBuilder sfb = new SimpleFragmentsBuilder ( ) ; sfb . setMultiValuedSeparator ( '//' ) ; <START_BUG> assertEquals ( "<seq2seq4repair_space>b<seq2seq4repair_space>c////<b>d<//b><seq2seq4repair_space>e" , sfb . createFragment ( reader , 0 , F , ffl ) ) ; <END_BUG> } }

Fix:
assertEquals ( "////a<seq2seq4repair_space>b<seq2seq4repair_space>c////<b>d<//b><seq2seq4repair_space>e" , sfb . createFragment ( reader , 0 , F , ffl ) ) ;
Buggy code:
public class ServiceDeploymentParsingProcessor implements DeploymentUnitProcessor { private final XMLMapper xmlMapper = Factory . create ( ) ; private final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; public ServiceDeploymentParsingProcessor ( ) { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { <START_BUG> final VirtualFile deploymentRoot = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <END_BUG> if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) return ; final String deploymentRootName = deploymentRoot . getName ( ) ; VirtualFile serviceXmlFile = null ; if ( ( deploymentRootName . endsWith ( ".jar" ) ) || ( deploymentRootName . endsWith ( ".sar" ) ) ) { serviceXmlFile = deploymentRoot . getChild ( "META-INF//jboss-service.xml" ) ; } else if ( deploymentRootName . endsWith ( "-service.xml" ) ) { serviceXmlFile = deploymentRoot ; } if ( ( serviceXmlFile == null ) || ( ! ( serviceXmlFile . exists ( ) ) ) ) return ; InputStream xmlStream = null ; try { xmlStream = serviceXmlFile . openStream ( ) ; final XMLStreamReader reader = inputFactory . createXMLStreamReader ( xmlStream ) ; final ParseResult < JBossServiceXmlDescriptor > result = new ParseResult < JBossServiceXmlDescriptor > ( ) ; xmlMapper . parseDocument ( result , reader ) ; final JBossServiceXmlDescriptor xmlDescriptor = result . getResult ( ) ; if ( xmlDescriptor != null ) phaseContext . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ; else throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) , e ) ; } finally { VFSUtils . safeClose ( xmlStream ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;
Buggy code:
@ SuppressWarnings ( "rawtypes" ) public class bfCollection { static int IndexSize = 4 ; static Logger logger = LoggerFactory . getLogger ( bfCollection . class ) ; CountingBloomFilter [ ] superMaskArray ; int [ ] indexArray ; ArrayList < LinkedList < Integer > > MaskList ; ArrayList < LinkedList < CountingBloomFilter > > bloomFilterList ; public bfCollection ( int prefix ) { } public static int index ( int prefix ) { <START_BUG> if ( ( prefix == 3232 ) || ( prefix == 0 ) ) <END_BUG> return 0 ; if ( ( prefix % 100 ) == 0 ) { if ( prefix >= 2400 ) return 1 ; if ( prefix >= 1600 ) return 2 ; if ( prefix >= 800 ) return 3 ; System . out . println ( prefix ) ; return 4 ; } if ( ( prefix // 100 ) == 0 ) { if ( prefix >= 24 ) return 1 ; if ( prefix >= 16 ) return 2 ; if ( prefix >= 8 ) return 3 ; System . out . println ( prefix ) ; return 4 ; } if ( prefix >= 2424 ) return 1 ; if ( prefix >= 1616 ) return 2 ; if ( prefix >= 808 ) return 3 ; System . out . println ( prefix ) ; return 4 ; } public static int cat_prefix ( int prefix ) throws Exception { } public boolean check ( MatchSequence ms ) { } public void add ( MatchSequence ms ) { } public void remove ( MatchSequence ms ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( prefix == 3232 ) || ( prefix == 0 ) ) || ( prefix == 3200 ) ) || ( prefix == 32 ) )
Buggy code:
public class SaveMessageSourceAsAction extends AbstractColumbaAction implements SelectionListener { public SaveMessageSourceAsAction ( FrameMediator controller ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <START_BUG> log . debug ( "Save<seq2seq4repair_space>Message<seq2seq4repair_space>Source<seq2seq4repair_space>As...<seq2seq4repair_space>called" ) ; <END_BUG> SaveMessageSourceAsCommand c = new SaveMessageSourceAsCommand ( r ) ; processor . addOp ( c ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
log . info ( "Save<seq2seq4repair_space>Message<seq2seq4repair_space>Source<seq2seq4repair_space>As...<seq2seq4repair_space>called" ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; int cIcon ; boolean isImage ; boolean grayed ; public Button ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void click ( ) { } int callPaintEventHandler ( int control , int damageRgn , int visibleRgn , int theEvent , int nextHandler ) { int [ ] context = null ; if ( ( ( style ) & ( SWT . ARROW ) ) != 0 ) { boolean invert = false ; if ( ( OS . VERSION ) < 4176 ) { invert = ( ( style ) & ( SWT . UP ) ) != 0 ; } else { <START_BUG> invert = ( ( ( style ) & ( SWT . UP ) ) != 0 ) || ( ( ( style ) & ( SWT . RIGHT ) ) != 0 ) ; <END_BUG> } if ( invert ) { context = new int [ 1 ] ; OS . GetEventParameter ( theEvent , kEventParamCGContextRef , typeCGContextRef , null , 4 , null , context ) ; OS . CGContextSaveGState ( context [ 0 ] ) ; CGRect rect = new CGRect ( ) ; OS . HIViewGetBounds ( handle , rect ) ; OS . CGContextRotateCTM ( context [ 0 ] , ( ( float ) ( PI ) ) ) ; OS . CGContextTranslateCTM ( context [ 0 ] , ( - ( rect . width ) ) , ( - ( rect . height ) ) ) ; } } int result = super . callPaintEventHandler ( control , damageRgn , visibleRgn , theEvent , nextHandler ) ; if ( context != null ) OS . CGContextRestoreGState ( context [ 0 ] ) ; return result ; } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultThemeFont ( ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } Rect getInset ( ) { } boolean isDescribedByLabel ( ) { } int kEventAccessibleGetNamedAttribute ( int nextHandler , int theEvent , int userData ) { } int kEventControlHit ( int nextHandler , int theEvent , int userData ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void _setAlignment ( int alignment ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setDefault ( boolean value ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image image ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int traversalCode ( int key , int theEvent ) { } }

Fix:
invert = ( ( ( style ) & ( SWT . UP ) ) != 0 ) || ( ( ( style ) & ( SWT . LEFT ) ) != 0 ) ;
Buggy code:
public class StructureModelUtil { public static Map getLinesToAspectMap ( String sourceFilePath ) { <START_BUG> Map annotationsMap = INSTANCE . getInlineAnnotations ( sourceFilePath , true , true ) ; <END_BUG> Map aspectMap = new HashMap ( ) ; Set keys = annotationsMap . keySet ( ) ; for ( Iterator it = keys . iterator ( ) ; it . hasNext ( ) ; ) { Object key = it . next ( ) ; List annotations = ( ( List ) ( annotationsMap . get ( key ) ) ) ; for ( Iterator it2 = annotations . iterator ( ) ; it2 . hasNext ( ) ; ) { ProgramElementNode node = ( ( ProgramElementNode ) ( it2 . next ( ) ) ) ; List relations = node . getRelations ( ) ; for ( Iterator it3 = relations . iterator ( ) ; it3 . hasNext ( ) ; ) { RelationNode relationNode = ( ( RelationNode ) ( it3 . next ( ) ) ) ; if ( relationNode . getKind ( ) . equals ( "Advice" ) ) { List children = relationNode . getChildren ( ) ; List aspects = new Vector ( ) ; for ( Iterator it4 = children . iterator ( ) ; it4 . hasNext ( ) ; ) { Object object = it4 . next ( ) ; if ( object instanceof LinkNode ) { ProgramElementNode pNode = ( ( LinkNode ) ( object ) ) . getProgramElementNode ( ) ; if ( ( pNode . getProgramElementKind ( ) ) == ( Kind . ADVICE ) ) { StructureNode theAspect = pNode . getParent ( ) ; aspects . add ( theAspect ) ; } } } if ( ! ( aspects . isEmpty ( ) ) ) { aspectMap . put ( key , aspects ) ; } } } } } return aspectMap ; } public static Set getAspectsAffectingPackage ( ProgramElementNode packageNode ) { } public static List getPackagesInModel ( ) { } private static List getPackagesHelper ( ProgramElementNode node , ProgramElementNode . Kind kind , String prename , List matches ) { } private List sortElements ( List oldElements ) { } private static List sortArray ( List oldElements ) { } private class SortingComparator implements Comparator { public int compare ( Object o1 , Object o2 ) { } } private static class SortArrayComparator implements Comparator { public int compare ( Object o1 , Object o2 ) { } } public static List getFilesInPackage ( ProgramElementNode packageNode ) { } }

Fix:
Map annotationsMap = StructureModelManager . getDefault ( ) . getInlineAnnotations ( sourceFilePath , true , true ) ;
Buggy code:
public class ServerHandler { public static void handles ( ObjectInputStream objIn , ObjectOutputStream objOut ) throws IOException { } private static void handleGetRequest ( ObjectOutputStream objOut , Message msg ) { Message rsp = null ; if ( ! ( Path . checkPath ( msg . getPath ( ) . toString ( ) ) ) ) { try { objOut . writeObject ( new Message ( Message . ERROR_RSP , "Error:<seq2seq4repair_space>Requested<seq2seq4repair_space>file<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>retrieved" ) ) ; } catch ( IOException innerE ) { System . out . println ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>error<seq2seq4repair_space>message" ) ; } return ; } <START_BUG> System . out . println ( "Path<seq2seq4repair_space>valid<seq2seq4repair_space>&<seq2seq4repair_space>access<seq2seq4repair_space>granted" ) ; <END_BUG> byte [ ] file ; byte [ ] hash ; try { file = IO . readFileThrowsException ( msg . getPath ( ) . toString ( ) ) ; hash = IO . readFileThrowsException ( ( ( msg . getPath ( ) . toString ( ) ) + ".sha256" ) ) ; if ( ( msg . getType ( ) ) == ( Message . GET_REQ_N ) ) { rsp = new Message ( Message . GET_RSP_N , msg . getPath ( ) , file , hash ) ; } else { rsp = new Message ( Message . GET_RSP_E , msg . getPath ( ) , file , hash ) ; } } catch ( IOException e ) { try { objOut . writeObject ( new Message ( Message . ERROR_RSP , "Error:<seq2seq4repair_space>Requested<seq2seq4repair_space>file<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>retrieved" ) ) ; } catch ( IOException innerE ) { System . out . println ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>error<seq2seq4repair_space>message" ) ; } } try { if ( rsp != null ) objOut . writeObject ( rsp ) ; } catch ( IOException e ) { System . out . println ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>requested<seq2seq4repair_space>file" ) ; } } private static void handlePutRequest ( ObjectOutputStream objOut , Message msg ) { } }

Fix:
System . out . println ( "Path<seq2seq4repair_space>valid" ) ;
Buggy code:
public class UpgradeUser extends UpgradeProcess { @ Override protected void doUpgrade ( ) throws Exception { ActionableDynamicQuery actionableDynamicQuery = new UserActionableDynamicQuery ( ) { @ Override protected void performAction ( Object object ) throws PortalException , SystemException { User user = ( ( User ) ( object ) ) ; try { if ( user . isDefaultUser ( ) ) { <START_BUG> continue ; <END_BUG> } Group group = user . getGroup ( ) ; LayoutSet layoutSet = LayoutSetLocalServiceUtil . getLayoutSet ( group . getGroupId ( ) , false ) ; String themeId = layoutSet . getThemeId ( ) ; if ( ! ( themeId . equals ( "so_WAR_sotheme" ) ) ) { return ; } Role role = RoleLocalServiceUtil . getRole ( user . getCompanyId ( ) , SOCIAL_OFFICE_USER ) ; UserLocalServiceUtil . addRoleUsers ( role . getRoleId ( ) , new long [ ] { user . getUserId ( ) } ) ; updateUserGroup ( group ) ; updateSocialRelations ( user ) ; } catch ( Exception e ) { } } } ; } protected void updateSocialRelations ( User user ) throws Exception { } protected void updateUserGroup ( Group group ) throws Exception { } private static MethodKey _mergeLayoutSetPrototypeLayoutsMethodKey = new MethodKey ( ClassResolverUtil . resolveByPortalClassLoader ( "com.liferay.portlet.sites.util.SitesUtil" ) , "mergeLayoutSetPrototypeLayouts" , Group . class , LayoutSet . class ) ; No newline ; at end ; of file ; }

Fix:
return ;
Buggy code:
class MessagingPathHandlers { static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { CommonAttributes . PATH , CommonAttributes . RELATIVE_TO } ; static final OperationStepHandler PATH_ADD = new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } } ; static final OperationStepHandler PATH_ATTR = new org . jboss . as . controller . ReloadRequiredWriteAttributeHandler ( CommonAttributes . RELATIVE_TO , CommonAttributes . PATH ) ; static final OperationStepHandler PATH_REMOVE = new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } ; static void register ( final ManagementResourceRegistration registration ) { } static ModelNode createAddOperation ( final ModelNode address , final ModelNode subModel ) { } static void reloadRequiredStep ( final OperationContext context ) { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices . getHornetQServiceName ( PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ) ; final ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( hqServiceName ) ; if ( controller != null ) { context . reloadRequired ( ) ; } context . completeStep ( ) ; } } , RUNTIME ) ; } } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public class Group extends Composite { String text = "" ; public Group ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { } void drawBackground ( int control , int context ) { <START_BUG> drawBackground ( control , context , background ) ; <END_BUG> } public Rectangle getClientArea ( ) { } String getNameText ( ) { } public String getText ( ) { } public void setText ( String string ) { } }

Fix:
fillBackground ( control , context , null ) ;
Buggy code:
public class LoadProperties extends AbstractTask { private static final Resources REZ = ResourceManager . getPackageResources ( LoadProperties . class ) ; private String m_prefix ; private File m_file ; public void setPrefix ( final String prefix ) { } public void setFile ( final File file ) { } public void execute ( ) throws TaskException { } private void loadFile ( final File file ) throws TaskException { } protected final void addUnresolvedValue ( final String name , final String value ) { try { <START_BUG> final Object objectValue = resolveValue ( value . toString ( ) ) ; <END_BUG> final String name1 = ( m_prefix ) + name ; getContext ( ) . setProperty ( name1 , objectValue ) ; } catch ( final TaskException te ) { final String message = LoadProperties . REZ . getString ( "loadprop.bad-resolve.error" , name , value ) ; getLogger ( ) . info ( message , te ) ; } } }

Fix:
final Object objectValue = getContext ( ) . resolveValue ( value . toString ( ) ) ;
Buggy code:
public class ConvertToXml { private static final DatatypeFactory DATATYPE_FACTORY ; private final ElementParser parser = new ElementParser ( ) ; public XMLElement convertToXml ( File file ) throws IOException { } public XMLElement convertToXml ( List < BPListElement < ? > > list ) throws IOException { } private void convertObjectTableToXML ( XMLElement parent , BPListElement < ? > object ) { } private static XMLGregorianCalendar fromDate ( Date date ) { <START_BUG> GregorianCalendar gc = new GregorianCalendar ( ) ; <END_BUG> gc . setTime ( date ) ; XMLGregorianCalendar xmlgc = ConvertToXml . DATATYPE_FACTORY . newXMLGregorianCalendar ( gc ) ; xmlgc . setFractionalSecond ( null ) ; xmlgc . setTimezone ( DatatypeConstants . FIELD_UNDEFINED ) ; return xmlgc ; } }

Fix:
GregorianCalendar gc = new GregorianCalendar ( TimeZone . getTimeZone ( "UTC" ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//owners//*//pets//{petId}//edit" ) @ SessionAttributes ( "pet" ) public class EditPetForm { private final Clinic clinic ; @ Autowired public EditPetForm ( Clinic clinic ) { } @ ModelAttribute ( "types" ) public Collection < PetType > populatePetTypes ( ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( "id" ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( @ PathVariable ( "petId" ) int petId , Model model ) { } @ RequestMapping ( method = { RequestMethod . PUT , RequestMethod . POST } ) public String processSubmit ( @ ModelAttribute ( "pet" ) Pet pet , BindingResult result , SessionStatus status ) { } @ RequestMapping ( method = RequestMethod . DELETE ) public String deletePet ( @ PathVariable int petId ) { } }

Fix:
dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ;
Buggy code:
public class WarmUp { private static HashMap < String , Integer > players = new HashMap < String , Integer > ( ) ; public enum Reason { DAMAGE , MOVEMENT , EVENTCANCEL , NONE ; } public static void addPlayer ( Player player , Home home , Plugin plugin ) { if ( SuperPermsManager . hasPermission ( player , bypassWarmup ) ) { home . warp ( player , plugin . getServer ( ) ) ; return ; } int timer = WarmUp . getTimer ( player ) ; if ( timer > 0 ) { if ( WarmUp . isWarming ( player ) ) { plugin . getServer ( ) . getScheduler ( ) . cancelTask ( WarmUp . players . get ( player . getName ( ) ) ) ; } if ( HomeConfig . warmUpNotify ) { HashMap < String , String > params = new HashMap < String , String > ( ) ; params . put ( "WU_TIME" , Integer . toString ( timer ) ) ; <START_BUG> player . sendMessage ( LocaleManager . getString ( "warmup.wait" ) ) ; <END_BUG> } int taskIndex = plugin . getServer ( ) . getScheduler ( ) . scheduleSyncDelayedTask ( plugin , new WarmUp . WarmTask ( player , home , plugin . getServer ( ) ) , ( timer * 20 ) ) ; WarmUp . players . put ( player . getName ( ) , taskIndex ) ; } else { home . warp ( player , plugin . getServer ( ) ) ; } } public static boolean playerHasWarmed ( Player player ) { } private static void sendPlayer ( Player player , Home home , Server server ) { } public static boolean isWarming ( Player player ) { } public static void cancelWarming ( Player player , Plugin plugin , WarmUp . Reason reason ) { } public static int getTimer ( Player player ) { } private static int playerGetWarmup ( Player player ) { } private static class WarmTask implements Runnable { private Player player ; private Home home ; private Server server ; public WarmTask ( Player player , Home home , Server server ) { } public void run ( ) { } } }

Fix:
player . sendMessage ( LocaleManager . getString ( "warmup.wait" , params ) ) ;
Buggy code:
public class ScoreboardManager implements Listener { static org . bukkit . scoreboard . ScoreboardManager sbmanager ; static Scoreboard sb ; static Objective obj ; static Score s1 ; static Score s2 ; static Score s3 ; static int id = 0 ; static int numPlayers = Bukkit . getServer ( ) . getOnlinePlayers ( ) . size ( ) ; public ScoreboardManager ( ) { } public static void initScoreboard ( ) { } public static void startCountdown ( ) { } public static void resetPlayersScore ( ) { } @ EventHandler public void onPlayerQuit ( PlayerQuitEvent e ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void onPlayerJoin ( PlayerJoinEvent e ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onPlayerDeath ( PlayerDeathEvent e ) { ( ScoreboardManager . numPlayers ) -- ; ScoreboardManager . resetPlayersScore ( ) ; if ( ( ScoreboardManager . numPlayers ) == 1 ) { Player winner = null ; for ( Player temp : Bukkit . getOnlinePlayers ( ) ) { <START_BUG> if ( temp != ( e . getEntity ( ) ) ) { <END_BUG> winner = temp ; GameManager . endGame ( winner ) ; } } } } }

Fix:
if ( ( ! ( temp . isDead ( ) ) ) && ( temp . getGameMode ( ) . equals ( SURVIVAL ) ) ) {
Buggy code:
public class AIjdbc { public static void main ( String [ ] args ) { } private static boolean createTable ( Connection conn ) throws SQLException { } private static boolean testSelect ( Connection conn ) { Statement s ; boolean passed = true ; System . out . println ( "Test<seq2seq4repair_space>AIjdbc:select<seq2seq4repair_space>from<seq2seq4repair_space>base<seq2seq4repair_space>table" ) ; try { s = conn . createStatement ( ) ; ResultSet rs = s . executeQuery ( "select<seq2seq4repair_space>x,z<seq2seq4repair_space>from<seq2seq4repair_space>tab1" ) ; ResultSetMetaData rsmd = rs . getMetaData ( ) ; if ( ( rsmd . getColumnCount ( ) ) != 2 ) throw new SQLException ( "column<seq2seq4repair_space>count<seq2seq4repair_space>doesn't<seq2seq4repair_space>match" ) ; if ( rsmd . isAutoIncrement ( 1 ) ) throw new SQLException ( "column<seq2seq4repair_space>1<seq2seq4repair_space>is<seq2seq4repair_space>NOT<seq2seq4repair_space>ai!" ) ; if ( rsmd . isAutoIncrement ( 2 ) ) throw new SQLException ( "column<seq2seq4repair_space>2<seq2seq4repair_space>is<seq2seq4repair_space>NOT<seq2seq4repair_space>ai!" ) ; rs . close ( ) ; rs = s . executeQuery ( "select<seq2seq4repair_space>y,<seq2seq4repair_space>x,z<seq2seq4repair_space>from<seq2seq4repair_space>tab1" ) ; rsmd = rs . getMetaData ( ) ; if ( ( rsmd . getColumnCount ( ) ) != 3 ) throw new SQLException ( "column<seq2seq4repair_space>count<seq2seq4repair_space>doesn't<seq2seq4repair_space>match" ) ; if ( ! ( rsmd . isAutoIncrement ( 1 ) ) ) throw new SQLException ( "column<seq2seq4repair_space>1<seq2seq4repair_space>IS<seq2seq4repair_space>ai!" ) ; if ( rsmd . isAutoIncrement ( 2 ) ) throw new SQLException ( "column<seq2seq4repair_space>2<seq2seq4repair_space>is<seq2seq4repair_space>NOT<seq2seq4repair_space>ai!" ) ; if ( rsmd . isAutoIncrement ( 3 ) ) <START_BUG> throw new SQLException ( "column<seq2seq4repair_space>2<seq2seq4repair_space>is<seq2seq4repair_space>NOT<seq2seq4repair_space>ai!" ) ; <END_BUG> rs . close ( ) ; s . close ( ) ; } catch ( SQLException se ) { passed = false ; JDBCDisplayUtil . ShowSQLException ( System . out , se ) ; } return passed ; } private static boolean testSelectView ( Connection conn ) { } }

Fix:
throw new SQLException ( "column<seq2seq4repair_space>3<seq2seq4repair_space>is<seq2seq4repair_space>NOT<seq2seq4repair_space>ai!" ) ;
Buggy code:
public class GameActivity extends ActionBarActivity implements AccelerometerListener , GameListener { private static final Logger logger = new Logger ( "GameActivity" ) ; private static final double noise = 0.1 ; private AccelerometerManager accelerometerManager ; private PlaygroundView playground ; private Game game ; private int score ; private TextView scoreTextView ; public GameActivity ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { GameActivity . logger . log ( "OnCreate" ) ; super . onCreate ( savedInstanceState ) ; setContentView ( activity_game ) ; this . scoreTextView = ( ( TextView ) ( this . findViewById ( score_view ) ) ) ; ViewGroup viewGroup = ( ( ViewGroup ) ( this . findViewById ( playground_owner ) ) ) ; this . playground = new PlaygroundView ( this ) ; viewGroup . addView ( this . playground ) ; this . game = GameApplication . getGame ( ) ; this . setScore ( ( - 1 ) ) ; <START_BUG> this . setScore ( game . score ) ; <END_BUG> SensorManager sensorManager = ( ( SensorManager ) ( getSystemService ( this . SENSOR_SERVICE ) ) ) ; this . accelerometerManager = new AccelerometerManager ( this , sensorManager ) ; } private void setScore ( int score ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void OnGameChanged ( GameInfo gameInfo ) { } @ Override public void onAccelerometerChanged ( AccelerometerEvent accelerometerEvent ) { } }

Fix:
this . setScore ( this . game . score ) ;
Buggy code:
public class DoomsdayManager { public static Logger logger = LogManager . getLogger ( ( ( TragicMC . MODID ) + "//Doomsday<seq2seq4repair_space>Manager" ) ) ; private static Map < UUID , ArrayList < DoomsdayEffect > > playerMap = new HashMap ( ) ; private static Set < Doomsday > combinations = Sets . newConcurrentHashSet ( ) ; public static synchronized void registerDoomsdayEffect ( UUID playerID , DoomsdayEffect effect ) { } public static synchronized void clearRegistry ( ) { } public static synchronized void clearPlayerFromRegistry ( UUID playerID , String reason ) { try { if ( DoomsdayManager . playerMap . containsKey ( playerID ) ) { DoomsdayManager . playerMap . remove ( playerID ) ; if ( reason != null ) { <START_BUG> DoomsdayManager . logger . info ( ( ( ( "Registry<seq2seq4repair_space>removed<seq2seq4repair_space>registration<seq2seq4repair_space>for<seq2seq4repair_space>" + playerID ) + ",<seq2seq4repair_space>reason:<seq2seq4repair_space>" ) + reason ) ) ; <END_BUG> } } else { DoomsdayManager . logger . error ( "Attempted<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>a<seq2seq4repair_space>player<seq2seq4repair_space>that<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>registered<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>map,<seq2seq4repair_space>there<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>problem<seq2seq4repair_space>somewhere." ) ; } } catch ( Exception e ) { DoomsdayManager . logger . error ( "Error<seq2seq4repair_space>caught<seq2seq4repair_space>while<seq2seq4repair_space>attempting<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>a<seq2seq4repair_space>player<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>playerMap" , e ) ; } } @ SubscribeEvent public void onTick ( ServerTickEvent event ) { } @ SubscribeEvent public void onPlayerDisconnect ( ServerDisconnectionFromClientEvent event ) { } }

Fix:
DoomsdayManager . logger . info ( ( ( ( "Registry<seq2seq4repair_space>removed<seq2seq4repair_space>registration<seq2seq4repair_space>for<seq2seq4repair_space>player<seq2seq4repair_space>with<seq2seq4repair_space>UUID<seq2seq4repair_space>of<seq2seq4repair_space>" + playerID ) + ",<seq2seq4repair_space>reason:<seq2seq4repair_space>" ) + reason ) ) ;
Buggy code:
public interface OFile { boolean open ( ) throws IOException { } void create ( ) throws IOException { } void close ( ) throws IOException { } void delete ( ) throws IOException { } boolean synch ( ) throws IOException { } void read ( long iOffset , byte [ ] iDestBuffer , int iLenght ) throws IOException { } short readShort ( long iLogicalPosition ) throws IOException { } int readInt ( long iLogicalPosition ) throws IOException { } long readLong ( long iOffset ) throws IOException { } byte readByte ( long iOffset ) throws IOException { } void writeInt ( long iOffset , int iValue ) throws IOException { } void writeLong ( long iOffset , long iValue ) throws IOException { } void writeShort ( long iOffset , short iValue ) throws IOException { } void writeByte ( long iOffset , byte iValue ) throws IOException { } long write ( long iOffset , byte [ ] iSourceBuffer ) throws IOException { } void lock ( ) throws IOException { } FileLock lock ( final long iRangeFrom , final long iRangeSize , final boolean iShared ) throws IOException { } OFile unlock ( final FileLock iLock ) throws IOException { } void unlock ( ) throws IOException { } void shrink ( final long iSize ) throws IOException { } String getName ( ) { } String getPath ( ) { } String getAbsolutePath ( ) { } boolean renameTo ( File newFile ) throws IOException { } long allocateSpace ( final long iSize ) throws IOException { } long getFileSize ( ) { } String toString ( ) { } boolean isOpen ( ) { } boolean exists ( ) { } void read ( long iOffset , byte [ ] iData , int iLength , int iArrayOffset ) throws IOException { } void write ( long iOffset , byte [ ] iData , int iSize , int iArrayOffset ) throws IOException { } void read ( long offset , ByteBuffer buffer ) throws IOException { } <START_BUG> void read ( long offset , ByteBuffer [ ] buffers ) throws IOException ; <END_BUG> void write ( long offset , ByteBuffer buffer ) throws IOException { } }

Fix:
long read ( long offset , ByteBuffer [ ] buffers ) throws IOException ;
Buggy code:
public class GetMyReviews extends HttpServlet { @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { resp . setContentType ( "application//json;<seq2seq4repair_space>charset=UTF-8" ) ; String userEmail = req . getParameter ( "email" ) ; String loginsession = req . getParameter ( "loginsession" ) ; if ( ! ( ErrorChecker . checkNotNull ( new String [ ] { userEmail , loginsession } ) ) ) { resp . setStatus ( 400 ) ; } else { PrintWriter writer = resp . getWriter ( ) ; try { Connection conn = DbConnect . getConnection ( ) ; DatabaseStuff . DatabaseHandler db = new DatabaseStuff . DatabaseHandler ( conn ) ; if ( ! ( db . checkLoginSession ( userEmail , loginsession ) ) ) { resp . setStatus ( 401 ) ; } else { List < Review > reviews = db . getReviewsByUser ( userEmail ) ; JSONArray reviewsJson = new JSONArray ( ) ; for ( Review review : reviews ) { JSONObject reviewJson = new JSONObject ( review ) ; reviewJson . remove ( "class" ) ; Teacher teacher = db . getTeacherById ( review . teacherid ( ) ) ; reviewJson . put ( "teacherId" , teacher . getId ( ) ) ; reviewJson . put ( "teacherName" , teacher . getName ( ) ) ; Course course = db . getCourseById ( review . courseid ( ) ) ; <START_BUG> reviewsJson . put ( "courseid" , review . courseid ( ) ) ; <END_BUG> reviewJson . put ( "courseName" , course . getName ( ) ) ; School school = db . getSchoolById ( course . schoolId ( ) ) ; reviewJson . put ( "schoolName" , school . getName ( ) ) ; reviewsJson . put ( reviewJson ) ; } writer . print ( reviewsJson . toString ( ) ) ; } } catch ( ClassNotFoundException e ) { resp . setStatus ( 500 ) ; e . printStackTrace ( ) ; } catch ( SQLException e ) { resp . setStatus ( 500 ) ; e . printStackTrace ( ) ; } catch ( JSONException e ) { resp . setStatus ( 500 ) ; e . printStackTrace ( ) ; } } } }

Fix:
reviewJson . put ( "courseid" , review . courseid ( ) ) ;
Buggy code:
public class FinancialSystemMaintenanceDocument extends MaintenanceDocumentBase implements FinancialSystemDocument { private static final Logger LOG = Logger . getLogger ( FinancialSystemMaintenanceDocument . class ) ; private transient Map < String , Boolean > canEditCache ; public FinancialSystemMaintenanceDocument ( ) { } public FinancialSystemMaintenanceDocument ( String documentTypeName ) { } @ Override public void setDocumentHeader ( DocumentHeader documentHeader ) { } @ Override public void processAfterRetrieve ( ) { try { DocumentHeader correctingDocumentHeader = SpringContext . getBean ( FinancialSystemDocumentHeaderDao . class ) . getCorrectingDocumentHeader ( getDocumentHeader ( ) . getDocumentNumber ( ) ) ; <START_BUG> if ( correctingDocumentHeader != null ) { <END_BUG> getFinancialSystemDocumentHeader ( ) . setCorrectedByDocumentId ( correctingDocumentHeader . getDocumentNumber ( ) ) ; } } catch ( RuntimeException e ) { FinancialSystemMaintenanceDocument . LOG . error ( "Received<seq2seq4repair_space>WorkflowException<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>route<seq2seq4repair_space>header<seq2seq4repair_space>id<seq2seq4repair_space>from<seq2seq4repair_space>workflow<seq2seq4repair_space>document" , e ) ; throw new WorkflowRuntimeException ( e ) ; } super . processAfterRetrieve ( ) ; } @ Override public void doRouteStatusChange ( DocumentRouteStatusChange statusChangeEvent ) { } @ Override public boolean answerSplitNodeQuestion ( String nodeName ) { } public String getInitiatorChartOfAccountsCode ( ) { } public String getInitiatorOrganizationCode ( ) { } protected String [ ] getInitiatorPrimaryDepartmentCode ( ) { } @ Override public FinancialSystemDocumentHeader getFinancialSystemDocumentHeader ( ) { } @ Override public void prepareForSave ( ) { } }

Fix:
if ( ( ( ObjectUtils . isNotNull ( correctingDocumentHeader ) ) && ( ! ( correctingDocumentHeader . getWorkflowDocument ( ) . isCanceled ( ) ) ) ) && ( ! ( correctingDocumentHeader . getWorkflowDocument ( ) . isDisapproved ( ) ) ) ) {
Buggy code:
public class PropertyFileFinderTestCase extends PropertyTestHelper { @ Before public void setup ( ) throws IOException { } private File createPropertyFile ( String filename , String mode ) throws IOException { } @ Test public void overridePropertyfileLocationRead ( ) throws IOException { } @ Test public void overridePropertyfileLocationWrite ( ) throws IOException , StartException { File domainUserFile = createPropertyFile ( "application-users.properties" , "domain" ) ; File standaloneUserFile = createPropertyFile ( "application-users.properties" , "standalone" ) ; File domainRolesFile = createPropertyFile ( "application-roles.properties" , "domain" ) ; File standaloneRolesFile = createPropertyFile ( "application-roles.properties" , "standalone" ) ; String newUserName = "Hugh.Jackman" ; <START_BUG> values . setRoles ( null ) ; <END_BUG> values . setUserName ( newUserName ) ; values . setFileMode ( APPLICATION ) ; System . setProperty ( "jboss.server.config.user.dir" , domainUserFile . getParent ( ) ) ; System . setProperty ( "jboss.domain.config.user.dir" , standaloneUserFile . getParent ( ) ) ; State propertyFileFinder = new PropertyFileFinder ( consoleMock , values ) ; State nextState = propertyFileFinder . execute ( ) ; assertTrue ( ( nextState instanceof PromptRealmState ) ) ; File locatedDomainPropertyFile = values . getUserFiles ( ) . get ( values . getUserFiles ( ) . indexOf ( domainUserFile ) ) ; File locatedStandalonePropertyFile = values . getUserFiles ( ) . get ( values . getUserFiles ( ) . indexOf ( standaloneUserFile ) ) ; UpdateUser updateUserState = new UpdateUser ( consoleMock , values ) ; AssertConsoleBuilder consoleBuilder = new AssertConsoleBuilder ( ) . expectedDisplayText ( updateUserState . consoleUserMessage ( locatedDomainPropertyFile . getCanonicalPath ( ) ) ) . expectedDisplayText ( NEW_LINE ) . expectedDisplayText ( updateUserState . consoleUserMessage ( locatedStandalonePropertyFile . getCanonicalPath ( ) ) ) . expectedDisplayText ( NEW_LINE ) ; consoleMock . setResponses ( consoleBuilder ) ; updateUserState . update ( values ) ; assertUserPropertyFile ( newUserName ) ; consoleBuilder . validate ( ) ; } }

Fix:
values . setGroups ( null ) ;
Buggy code:
public class TestGame { public static void main ( String [ ] args ) { } public static void bet ( ArrayList < DealerPlayer > dplayer ) { } public static void getWinner ( ArrayList < DealerPlayer > player ) { } public static void initializePlayer ( ArrayList < DealerPlayer > player ) { } public static void setPlayerCards ( ArrayList < DealerPlayer > dplayer , int [ ] cardDeck , int counter , int round ) { int playerCount = 0 ; Value value = new Value ( ) ; boolean gameBool = false ; for ( DealerPlayer dp : dplayer ) dp . getMyCards ( ) . clear ( ) ; while ( gameBool == false ) { for ( DealerPlayer dp : dplayer ) { if ( ( 2 * ( dplayer . size ( ) ) ) > counter ) { for ( int i = 0 ; i <= 1 ; i ++ ) { dp . setMyCards ( cardDeck [ counter ] ) ; counter ++ ; } } if ( ( ( round >= 2 ) && ( ( value . getValue ( dp . getMyCards ( ) ) ) < 21 ) ) && ( dp instanceof Player ) ) { System . out . println ( ( ( dp . getName ( ) ) + "<seq2seq4repair_space>One<seq2seq4repair_space>more<seq2seq4repair_space>Card?<seq2seq4repair_space>(y//n)" ) ) ; String input = TestGame . GetInput ( ) ; if ( input . equals ( "y" ) ) { dp . setMyCards ( cardDeck [ counter ] ) ; counter ++ ; } <START_BUG> if ( ( input . equals ( "n" ) ) || ( ( value . getValue ( dp . getMyCards ( ) ) ) > 21 ) ) { <END_BUG> playerCount ++ ; } } if ( ( playerCount == ( ( dplayer . size ( ) ) - 1 ) ) && ( dp instanceof Dealer ) ) { while ( ( value . getValue ( dp . getMyCards ( ) ) ) <= 16 ) { dp . setMyCards ( cardDeck [ counter ] ) ; counter ++ ; } } } TestGame . printData ( dplayer ) ; System . out . println ( "" ) ; if ( playerCount == ( ( dplayer . size ( ) ) - 1 ) ) { gameBool = true ; } round ++ ; } } public static void printData ( ArrayList < DealerPlayer > dplayer ) { } public static String GetInput ( ) { } }

Fix:
if ( ( input . equals ( "n" ) ) || ( ( value . getValue ( dp . getMyCards ( ) ) ) >= 21 ) ) {