nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MidpointIntegratorTest extends TestCase { public MidpointIntegratorTest ( String name ) { } public void testDimensionCheck ( ) { } public void testDecreasingSteps ( ) throws DerivativeException , IntegratorException { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousError = Double . NaN ; for ( int i = 4 ; i < 10 ; ++ i ) { <START_BUG> TestProblemAbstract pb = ( ( TestProblemAbstract ) ( problems [ k ] . clone ( ) ) ) ; <END_BUG> double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( Math . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new MidpointIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . addStepHandler ( handler ) ; EventHandler [ ] functions = pb . getEventsHandlers ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { integ . addEventHandler ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ; } double stopTime = integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; if ( ( functions . length ) == 0 ) { assertEquals ( pb . getFinalTime ( ) , stopTime , 1.0E-10 ) ; } double error = handler . getMaximalValueError ( ) ; if ( i > 4 ) { assertTrue ( ( error < ( Math . abs ( previousError ) ) ) ) ; } previousError = error ; assertEquals ( 0 , handler . getMaximalTimeError ( ) , 1.0E-12 ) ; } } } public void testSmallStep ( ) throws DerivativeException , IntegratorException { } public void testBigStep ( ) throws DerivativeException , IntegratorException { } public void testBackward ( ) throws DerivativeException , IntegratorException { } public void testStepSize ( ) throws DerivativeException , IntegratorException { } public static Test suite ( ) { } }

Fix:
TestProblemAbstract pb = problems [ k ] . copy ( ) ;
Buggy code:
public class AlarmReceiver extends BroadcastReceiver { @ Override public void onReceive ( Context context , Intent intent ) { String notifKey = intent . getStringExtra ( "NOTIF_KEY" ) ; SharedStorage . initializeInstance ( context ) ; Log . i ( "AlarmReceiver" , "in<seq2seq4repair_space>Receiver" ) ; if ( notifKey == null ) { Log . i ( "AlarmReceiver" , "notifKey<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } else { Log . i ( "AlarmReceiver" , notifKey ) ; Calendar rightNow = Calendar . getInstance ( ) ; Notification n = Storage . getInstance ( ) . getNotification ( notifKey ) ; boolean isInKeychain = false ; List < Notification > notifications = Storage . getInstance ( ) . getAllNotifications ( ) ; for ( Notification notif : notifications ) { if ( notif . getKey ( ) . equals ( n . getKey ( ) ) ) { isInKeychain = true ; break ; } } Lifestyle lifeContainer = Storage . getInstance ( ) . getLifestyle ( n . getLifestyleContainerKey ( ) ) ; Reminder reminderContainer = Storage . getInstance ( ) . getReminder ( n . getReminderContainerKey ( ) ) ; Action action = Storage . getInstance ( ) . getAction ( n . getActionKey ( ) ) ; if ( ( ( ( ( ( n . isEnabled ( ) ) && ( lifeContainer . isEnabled ( ) ) ) && ( reminderContainer . isEnabled ( ) ) ) && ( ! ( NOTIFICATION_FAILED_KEY . equals ( notifKey ) ) ) ) && ( ! ( ACTION_FAILED_KEY . equals ( action . getKey ( ) ) ) ) ) && isInKeychain ) { Log . i ( "AlarmReceiver" , "Valid<seq2seq4repair_space>notification" ) ; if ( ( ( rightNow . getTimeInMillis ( ) ) - 60000 ) <= ( n . getTime ( ) . getTimeInMillis ( ) ) ) n . sendNotification ( context ) ; n . makeNextNotificationTime ( context ) ; if ( ( Storage . getInstance ( ) . getOption ( OPTION_TEST_KEY4 ) . isEnabled ( ) ) && ( ( ! ( n . isRepeatDaysEnabled ( ) ) ) && ( ! ( n . isRepeatEveryBlankDaysEnabled ( ) ) ) ) ) { Storage . getInstance ( ) . deleteAbstractBaseEvent ( n ) ; if ( MainActivity . activityIsVisible ( ) ) { Intent mainIntent = new Intent ( context , MainActivity . class ) ; <START_BUG> mainIntent . addFlags ( FLAG_ACTIVITY_NEW_TASK ) ; <END_BUG> context . startActivity ( mainIntent ) ; } } } else { Log . i ( "AlarmReceiver" , "Invalid<seq2seq4repair_space>notification" ) ; if ( ! ( n . isEnabled ( ) ) ) { Log . i ( "AlarmReceiver" , "notification<seq2seq4repair_space>not<seq2seq4repair_space>Enabled" ) ; } if ( ! ( lifeContainer . isEnabled ( ) ) ) { Log . i ( "AlarmReceiver" , "lifestyle<seq2seq4repair_space>not<seq2seq4repair_space>Enabled" ) ; } if ( ! ( reminderContainer . isEnabled ( ) ) ) { Log . i ( "AlarmReceiver" , "reminder<seq2seq4repair_space>not<seq2seq4repair_space>Enabled" ) ; } if ( NOTIFICATION_FAILED_KEY . equals ( notifKey ) ) { Log . i ( "AlarmReceiver" , "Notification<seq2seq4repair_space>key<seq2seq4repair_space>is<seq2seq4repair_space>Failed" ) ; } if ( ACTION_FAILED_KEY . equals ( action . getKey ( ) ) ) { Log . i ( "AlarmReceiver" , "Action<seq2seq4repair_space>Key<seq2seq4repair_space>is<seq2seq4repair_space>Failed" ) ; } } } } No newline ; at end ; of file ; }

Fix:
mainIntent . addFlags ( ( ( Intent . FLAG_ACTIVITY_CLEAR_TOP ) | ( Intent . FLAG_ACTIVITY_NEW_TASK ) ) ) ;
Buggy code:
class QueryBasedIsDescendantOfSearchResultsFilter implements Function < List < CompositeSearchResult > , List < CompositeSearchResult > > { private final IsDescendantOfFilter filter ; public QueryBasedIsDescendantOfSearchResultsFilter ( IsDescendantOfFilter filter ) { } @ Override public List < CompositeSearchResult > apply ( List < CompositeSearchResult > results ) { final Set < UUID > forSetCustomCollection = new HashSet < > ( ) ; for ( CompositeSearchResult result : results ) { forSetCustomCollection . add ( result . getContainingConcept ( ) . getPrimordialUuid ( ) ) ; } final ConceptVersionBI concept = OTFUtility . getConceptVersion ( filter . getNid ( ) ) ; final ForSetSpecification forSetSpecification = new ForSetSpecification ( ComponentCollectionTypes . CUSTOM_SET ) ; forSetSpecification . setCustomCollection ( forSetCustomCollection ) ; Query q = new Query ( ) { @ Override public void Let ( ) throws IOException { let ( concept . getPrimordialUuid ( ) . toString ( ) , new org . ihtsdo . otf . tcc . api . spec . ConceptSpec ( OTFUtility . getDescription ( concept ) , concept . getPrimordialUuid ( ) ) ) ; } @ Override public Clause Where ( ) { if ( filter . getInvert ( ) ) { return Not ( ConceptIsDescendentOf ( concept . getPrimordialUuid ( ) . toString ( ) ) ) ; } else { return ConceptIsDescendentOf ( concept . getPrimordialUuid ( ) . toString ( ) ) ; } } @ Override protected ForSetSpecification ForSetSpecification ( ) throws IOException { return forSetSpecification ; } } ; NativeIdSetBI outputNids = null ; try { LOG . debug ( ( ( ( ( ( "Applying<seq2seq4repair_space>" + ( filter . getInvert ( ) ? "Not(ConceptIsDescendentOf())" : "ConceptIsDescendentOf()" ) ) + ( filter ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( forSetCustomCollection . size ( ) ) ) + "<seq2seq4repair_space>uuids" ) ) ; outputNids = q . compute ( ) ; <START_BUG> LOG . debug ( ( ( ( ( outputNids . size ( ) ) + "<seq2seq4repair_space>nids<seq2seq4repair_space>remained<seq2seq4repair_space>after<seq2seq4repair_space>filtering<seq2seq4repair_space>a<seq2seq4repair_space>total<seq2seq4repair_space>of<seq2seq4repair_space>" ) + forSetCustomCollection ) + "<seq2seq4repair_space>uuids" ) ) ; <END_BUG> } catch ( Exception e ) { throw new SearchResultsFilterException ( this , "Failed<seq2seq4repair_space>calling<seq2seq4repair_space>Query.compute()" , e ) ; } List < CompositeSearchResult > filteredResults = new java . util . ArrayList ( results . size ( ) ) ; for ( CompositeSearchResult result : results ) { if ( outputNids . contains ( result . getContainingConcept ( ) . getNid ( ) ) ) { filteredResults . add ( result ) ; } } return filteredResults ; } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
LOG . debug ( ( ( ( ( outputNids . size ( ) ) + "<seq2seq4repair_space>nids<seq2seq4repair_space>remained<seq2seq4repair_space>after<seq2seq4repair_space>filtering<seq2seq4repair_space>a<seq2seq4repair_space>total<seq2seq4repair_space>of<seq2seq4repair_space>" ) + ( forSetCustomCollection . size ( ) ) ) + "<seq2seq4repair_space>uuids" ) ) ;
Buggy code:
public class RecursiveDiscardAndRemoveTestCase { private static PathElement PATH = PathElement . pathElement ( "toto" , "testSubsystem" ) ; private static PathElement DISCARDED_WILDCARD = PathElement . pathElement ( "removeall" ) ; private static PathElement DISCARDED_WILDCARD_ENTRY = PathElement . pathElement ( "removeall" , "entry" ) ; private static PathElement DISCARDED_SPECIFIC = PathElement . pathElement ( "remove" , "one" ) ; private static PathElement DISCARDED_CHILD = PathElement . pathElement ( "child" , "one" ) ; private Resource resourceRoot = Factory . create ( ) ; private TransformerRegistry registry = TransformerRegistry . Factory . create ( null ) ; private ManagementResourceRegistration resourceRegistration = ManagementResourceRegistration . Factory . create ( RecursiveDiscardAndRemoveTestCase . ROOT ) ; private TransformersSubRegistration transformersSubRegistration ; private ModelNode resourceModel ; @ Before public void setUp ( ) { } @ Test public void testDiscardResource ( ) throws Exception { } @ Test public void testRejectResource ( ) throws Exception { } private void sanityTestNonDiscardedResource ( ) throws Exception { } private void discardResourceOperationsTest ( PathAddress pathAddress ) throws Exception { } private void rejectResourceOperationsTest ( PathAddress pathAddress ) throws Exception { } private Resource transformResource ( ) throws OperationFailedException { } private TransformedOperation transformOperation ( final ModelNode operation ) throws OperationFailedException { } private ResourceTransformationContext createContext ( final TransformationTarget target ) { <START_BUG> return Transformers . Factory . create ( target , resourceRoot , resourceRegistration , DEFAULT , NORMAL , STANDALONE_SERVER ) ; <END_BUG> } private Transformers getTransfomers ( final TransformationTarget target ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version , TransformationTarget . TransformationTargetType type ) { } private static final ResourceDefinition ROOT = new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "test" ) , new NonResolvingResourceDescriptionResolver ( ) ) ; protected void assertRejected ( final ModelNode original , final TransformedOperation transformed ) { } private void assertDiscarded ( final TransformedOperation transformed ) { } private static final ModelNode success ( ) { } }

Fix:
return Transformers . Factory . create ( target , resourceRoot , resourceRegistration , TEST_RESOLVER , NORMAL , STANDALONE_SERVER ) ;
Buggy code:
public class PageRequestTarget implements IPageRequestTarget { private final Page page ; public PageRequestTarget ( Page page ) { } public void respond ( RequestCycle requestCycle ) { } public final Page getPage ( ) { } public void detach ( RequestCycle requestCycle ) { <START_BUG> page . internalDetach ( ) ; <END_BUG> } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
page . detach ( ) ;
Buggy code:
public class DefinitionsQuestionTest { @ Test public void testIsAMunicipality ( ) { } @ Test public void testIsAComicStrip ( ) { } public void testIsALawCase ( ) { } @ Test public void testIsAnActressAndSingerConjunction ( ) { } @ Test public void testIsAGlacier ( ) { } @ Test public void testIsABusinessman ( ) { } @ Test public void testIsAFormerFootballPlayer ( ) { String sentence = "Which<seq2seq4repair_space>former<seq2seq4repair_space>American<seq2seq4repair_space>professional<seq2seq4repair_space>football<seq2seq4repair_space>player<seq2seq4repair_space>was<seq2seq4repair_space>a<seq2seq4repair_space>defensive<seq2seq4repair_space>tackle<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>National<seq2seq4repair_space>Football<seq2seq4repair_space>League<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>World<seq2seq4repair_space>League<seq2seq4repair_space>of<seq2seq4repair_space>American<seq2seq4repair_space>Football?" ; Set < String > definitions = DefinitionExtractor . getDefinitions ( sentence ) ; <START_BUG> Set < String > expected = Sets . newHashSet ( "American" , "professional<seq2seq4repair_space>football<seq2seq4repair_space>player" , "football<seq2seq4repair_space>player" , "former<seq2seq4repair_space>football<seq2seq4repair_space>player" , "player" , "former<seq2seq4repair_space>professional<seq2seq4repair_space>football<seq2seq4repair_space>player" ) ; <END_BUG> assertEquals ( "Wrong<seq2seq4repair_space>definitions" , expected , definitions ) ; } @ Test public void testWereABand ( ) { } public void testIsAPolitician ( ) { } public void testIsAPoliticianEasy ( ) { } @ Test public void testIsAHeiressConjunction ( ) { } public void testWasAMusician ( ) { } @ Test public void testThreeConjunctions ( ) { } @ Test public void testAreABand ( ) { } @ Test public void testAdamScott ( ) { } @ Test public void testGrantGoodeve ( ) { } @ Test public void testAction ( ) { } public void testIceHockeyPlayer ( ) { } public void testJohnSigler ( ) { } @ Test public void testTuringShort ( ) { } @ Test public void testPoliceForces ( ) { } @ Test public void testFlyingCorpsUnit ( ) { } @ Test public void testBritishConservativeParty1 ( ) { } @ Test public void testARandom ( ) { } }

Fix:
Set < String > expected = Sets . newHashSet ( "American" , "professional<seq2seq4repair_space>football<seq2seq4repair_space>player" , "football<seq2seq4repair_space>player" , "former<seq2seq4repair_space>football<seq2seq4repair_space>player" , "player" , "former<seq2seq4repair_space>professional<seq2seq4repair_space>football<seq2seq4repair_space>player" , "former<seq2seq4repair_space>professional<seq2seq4repair_space>player" , "former<seq2seq4repair_space>player" , "professional<seq2seq4repair_space>player" ) ;
Buggy code:
public class MainSubsystemExtension implements Extension { public static final String NAMESPACE = "urn:mycompany:main:1.0" ; public static final String SUBSYSTEM_NAME = "main" ; private final MainSubsystemExtension . SubsystemParser parser = new MainSubsystemExtension . SubsystemParser ( ) ; @ Override public void initializeParsers ( ExtensionParsingContext context ) { } @ Override public void initialize ( ExtensionContext context ) { } private static ModelNode createAddSubsystemOperation ( ) { } private static class SubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } } private static class SubsystemDescribeHandler implements OperationStepHandler , DescriptionProvider { static final MainSubsystemExtension . SubsystemDescribeHandler INSTANCE = new MainSubsystemExtension . SubsystemDescribeHandler ( ) ; public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . getResult ( ) . add ( MainSubsystemExtension . createAddSubsystemOperation ( ) ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class Processor { @ Autowired private WidelineManager widelineManager ; @ Autowired private VardgivareManager vardgivareManager ; @ Autowired private LakareManager lakareManager ; private int processedCounter ; public void accept ( JsonNode utlatande , JsonNode hsa , long logId , String correlationId , EventType type ) { ObjectNode preparedDoc = DocumentHelper . prepare ( utlatande ) ; <START_BUG> vardgivareManager . saveEnhet ( hsa ) ; <END_BUG> lakareManager . saveLakare ( hsa ) ; widelineManager . accept ( preparedDoc , hsa , logId , correlationId , type ) ; ( processedCounter ) ++ ; } public int getProcessedCounter ( ) { } }

Fix:
vardgivareManager . saveEnhet ( hsa , preparedDoc ) ;
Buggy code:
public class LocalPatchRollbackHandler implements OperationStepHandler { public static final LocalPatchRollbackHandler INSTANCE = new LocalPatchRollbackHandler ( ) ; @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final String patchId = PATCH_ID . resolveModelAttribute ( context , operation ) . asString ( ) ; final boolean rollbackTo = ROLLBACK_TO . resolveModelAttribute ( context , operation ) . asBoolean ( ) ; final boolean restoreConfiguration = RESTORE_CONFIGURATION . resolveModelAttribute ( context , operation ) . asBoolean ( ) ; context . acquireControllerLock ( ) ; final PatchInfoService service = ( ( PatchInfoService ) ( context . getServiceRegistry ( false ) . getRequiredService ( NAME ) . getValue ( ) ) ) ; if ( service . requiresRestart ( ) ) { throw PatchMessages . MESSAGES . serverRequiresRestart ( ) ; } <START_BUG> final PatchInfo info = service . getValue ( ) ; <END_BUG> final DirectoryStructure structure = service . getStructure ( ) ; final PatchTool runner = Factory . create ( info , structure ) ; final ContentVerificationPolicy policy = Factory . create ( operation ) ; try { final PatchingResult result = runner . rollback ( patchId , policy , rollbackTo , restoreConfiguration ) ; service . restartRequired ( ) ; context . restartRequired ( ) ; context . completeStep ( new OperationContext . ResultHandler ( ) { @ Override public void handleResult ( OperationContext . ResultAction resultAction , OperationContext context , ModelNode operation ) { if ( resultAction == ( ResultAction . KEEP ) ) { result . commit ( ) ; } else { service . clearRestartRequired ( ) ; context . revertRestartRequired ( ) ; result . rollback ( ) ; } } } ) ; } catch ( PatchingException e ) { if ( e . hasConflicts ( ) ) { final ModelNode failureDescription = context . getFailureDescription ( ) ; for ( final ContentItem item : e . getConflicts ( ) ) { final ContentType type = item . getContentType ( ) ; switch ( type ) { case BUNDLE : failureDescription . get ( BUNDLES ) . add ( item . getRelativePath ( ) ) ; break ; case MODULE : failureDescription . get ( MODULES ) . add ( item . getRelativePath ( ) ) ; break ; case MISC : failureDescription . get ( MISC ) . add ( item . getRelativePath ( ) ) ; break ; } } context . stepCompleted ( ) ; } else { throw new OperationFailedException ( e . getMessage ( ) , e ) ; } } finally { } } }

Fix:
final PatchInfo info = service . getPatchInfo ( ) ;
Buggy code:
public class Javac13 extends DefaultCompilerAdapter { private static final int MODERN_COMPILER_SUCCESS = 0 ; public boolean execute ( ) throws BuildException { attributes . log ( "Using<seq2seq4repair_space>modern<seq2seq4repair_space>compiler" , MSG_VERBOSE ) ; <START_BUG> Commandline cmd = setupJavacCommand ( ) ; <END_BUG> try { Class c = Class . forName ( "com.sun.tools.javac.Main" ) ; Object compiler = c . newInstance ( ) ; Method compile = c . getMethod ( "compile" , new Class [ ] { new String [ ] { } . getClass ( ) } ) ; int result = ( ( Integer ) ( compile . invoke ( compiler , new Object [ ] { cmd . getArguments ( ) } ) ) ) . intValue ( ) ; return result == ( Javac13 . MODERN_COMPILER_SUCCESS ) ; } catch ( Exception ex ) { if ( ex instanceof BuildException ) { throw ( ( BuildException ) ( ex ) ) ; } else { throw new BuildException ( "Error<seq2seq4repair_space>starting<seq2seq4repair_space>modern<seq2seq4repair_space>compiler" , ex , location ) ; } } } }

Fix:
Commandline cmd = setupModernJavacCommand ( ) ;
Buggy code:
public class Get2ABusArrival { @ Test public void test ( ) throws CouldNotLoadDatabaseException , InvalidArrivalTargetException { final String busno = "2A" ; final String stopcode = "LO02T10000" ; final String stopname = "LOK<seq2seq4repair_space>WAH<seq2seq4repair_space>BUS<seq2seq4repair_space>TERMINUS" ; final int bound = 1 ; <START_BUG> ArrivalManager arr = new ArrivalManager ( busno , stopcode , bound , ArrivalManager . ENGLISH_LANG ) ; <END_BUG> arr . fetchNewData ( ) ; System . out . println ( ( ( ( "Arrival<seq2seq4repair_space>status<seq2seq4repair_space>at<seq2seq4repair_space>" + stopname ) + "<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( arr . getArrivalTimeRemaining_Formatted ( ) ) ) ) ; System . out . println ( ( "Stopname:<seq2seq4repair_space>" + stopname ) ) ; System . out . println ( ( "Stopcode:" + stopcode ) ) ; } }

Fix:
ArrivalManager arr = new ArrivalManager ( busno , stopcode , bound , ArrivalManager . ENGLISH_LANG , false ) ;
Buggy code:
public class Network { protected Env env = new EnvSimple ( ) ; protected ServiceFactorySpring factory = new ServiceFactorySpring ( ) ; public Network ( ) { } public void setEnv ( Env env ) { } public Env getEnv ( ) { } protected final NetworkRpcBase rpc = new NetworkRpcBase ( this ) ; public NetworkRpc getRpc ( ) { } public Node getRandomNode ( EntropySource eSource ) { } public void dispose ( ) { } public Map . Entry < Key , Object > selectMapping ( EntropySource source ) { } public Node generateNode ( Node newParent , EntropySource eSource , AtomicInteger nodeFailureCounter ) throws SimulatorException { } public void removeNode ( Node nodeToRemove , final boolean forceFailure ) throws CommunicationException { } public Collection < Node > getAllNodes ( ) { } protected double elapsedTime ; public void reset ( ) { } public void registerRpcCall ( Node caller , final Address calleeAddress ) { } public double getElapsedTime ( ) { } public Node createNode ( EntropySource eSource ) { } public void setFactory ( ServiceFactorySpring factory ) { } public void insertNodes ( int count , AtomicInteger failCounter , final EntropySource eSource ) throws SimulatorException { } public void removeNodes ( int count , final boolean forceFailure , final EntropySource eSource ) throws CommunicationException { } public void putDataEntries ( int n , final EntropySource eSource ) throws SimulatorException { final byte [ ] bytes = new byte [ 20 ] ; for ( int i = 0 ; i < n ; i ++ ) { eSource . nextBytes ( bytes ) ; final Key key = API . createKey ( bytes ) ; final Address responsibleAddress = getRandomNode ( eSource ) . getServices ( ) . getLookup ( ) . lookup ( key , false ) ; final Node owner = env . getNode ( responsibleAddress ) ; <START_BUG> owner . getServices ( ) . getStorage ( ) . put ( key , bytes ) ; <END_BUG> } } private NetworkInterceptor metrics ; public NetworkInterceptor getInterceptor ( ) { } public void setInterceptor ( NetworkInterceptor newInterceptor ) { } public void registerSuccess ( final double lookupStartTime , final Stack < Address > route ) { } No newline ; at end ; of file ; }

Fix:
owner . getServices ( ) . getStorage ( ) . put ( key , bytes . clone ( ) ) ;
Buggy code:
public class NamespaceMemberContext extends StatementContext { private IType [ ] namespaces ; private int elementStart ; private boolean isGlobal ; public boolean isValid ( ISourceModule sourceModule , int offset , CompletionRequestor requestor ) { if ( ! ( super . isValid ( sourceModule , offset , requestor ) ) ) { return false ; } if ( getPhpVersion ( ) . isLessThan ( PHP5_3 ) ) { return false ; } TextSequence statementText = getStatementText ( ) ; if ( ( statementText . length ( ) ) >= 4 ) { if ( ( "use" . equals ( statementText . subSequence ( 0 , 3 ) . toString ( ) ) ) && ( Character . isWhitespace ( statementText . subSequence ( 3 , 4 ) . charAt ( 0 ) ) ) ) { return false ; } } int totalLength = statementText . length ( ) ; int endPosition = PHPTextSequenceUtilities . readBackwardSpaces ( statementText , totalLength ) ; elementStart = PHPTextSequenceUtilities . readIdentifierStartIndex ( statementText , endPosition , true ) ; elementStart = PHPTextSequenceUtilities . readBackwardSpaces ( statementText , elementStart ) ; if ( ( elementStart ) < 1 ) { return false ; } String triggerText = statementText . subSequence ( ( ( elementStart ) - 1 ) , elementStart ) . toString ( ) ; if ( ! ( triggerText . equals ( "\\" ) ) ) { return false ; } isGlobal = false ; if ( ( elementStart ) == 1 ) { isGlobal = true ; return true ; } <START_BUG> int endNamespace = PHPTextSequenceUtilities . readBackwardSpaces ( statementText , ( ( elementStart ) - 1 ) ) ; <END_BUG> int nsNameStart = PHPTextSequenceUtilities . readNamespaceStartIndex ( statementText , endNamespace , false ) ; String nsName = statementText . subSequence ( nsNameStart , elementStart ) . toString ( ) ; if ( nsName . equals ( "\\" ) ) { isGlobal = true ; return true ; } try { namespaces = PHPModelUtils . getNamespaceOf ( nsName , sourceModule , offset , null , null ) ; } catch ( ModelException e ) { if ( DLTKCore . DEBUG ) { e . printStackTrace ( ) ; } } return true ; } public int getElementStart ( ) { } public IType [ ] getNamespaces ( ) { } public boolean isGlobal ( ) { } public String getPrefix ( ) throws BadLocationException { } public int getPrefixEnd ( ) throws BadLocationException { } }

Fix:
int endNamespace = PHPTextSequenceUtilities . readBackwardSpaces ( statementText , elementStart ) ;
Buggy code:
public class MainFragement extends Fragment { private static final String TAG = MainFragement . class . getName ( ) ; Tab Tab1 ; Tab Tab2 ; Tab Tab3 ; private ViewPager viewPager ; private MyPagerAdapter mAdapter ; private PagerSlidingTabStrip tabs ; private Activity myContext ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { super . onCreateView ( inflater , container , savedInstanceState ) ; View view = inflater . inflate ( main_fragement , container , false ) ; System . out . println ( "in<seq2seq4repair_space>mainFragment......" ) ; tabs = ( ( PagerSlidingTabStrip ) ( view . findViewById ( R . id . tabs ) ) ) ; viewPager = ( ( ViewPager ) ( view . findViewById ( pager ) ) ) ; mAdapter = new MyPagerAdapter ( getChildFragmentManager ( ) ) ; viewPager . setAdapter ( mAdapter ) ; final int pageMargin = ( ( int ) ( TypedValue . applyDimension ( COMPLEX_UNIT_DIP , 2 , getResources ( ) . getDisplayMetrics ( ) ) ) ) ; viewPager . setPageMargin ( pageMargin ) ; tabs . setViewPager ( viewPager ) ; tabs . setTextColor ( getResources ( ) . getColor ( dark_gray ) ) ; tabs . setIndicatorColor ( getResources ( ) . getColor ( actionbar_selected_text ) ) ; <START_BUG> final int indicatorHeight = ( ( int ) ( TypedValue . applyDimension ( COMPLEX_UNIT_DIP , 4 , getResources ( ) . getDisplayMetrics ( ) ) ) ) ; <END_BUG> tabs . setIndicatorHeight ( indicatorHeight ) ; final int textSize = ( ( int ) ( TypedValue . applyDimension ( COMPLEX_UNIT_DIP , 16 , getResources ( ) . getDisplayMetrics ( ) ) ) ) ; tabs . setTextSize ( textSize ) ; return view ; } @ Override public void onAttach ( Activity activity ) { } }

Fix:
final int indicatorHeight = ( ( int ) ( TypedValue . applyDimension ( COMPLEX_UNIT_DIP , 5 , getResources ( ) . getDisplayMetrics ( ) ) ) ) ;
Buggy code:
public class NamespaceImpl extends ModelElementImpl implements Namespace { public Vector _ownedElement = new Vector ( ) ; public NamespaceImpl ( ) { } public NamespaceImpl ( Name name ) { } public NamespaceImpl ( String nameStr ) { } public Vector getOwnedElement ( ) { } public void setOwnedElement ( Vector x ) throws PropertyVetoException { if ( ( _ownedElement ) == null ) _ownedElement = new Vector ( ) ; <START_BUG> fireVetoableChange ( "ownedElement" , _ownedElement , x ) ; <END_BUG> _ownedElement = x ; } public void addOwnedElement ( ElementOwnership x ) throws PropertyVetoException { } public void removeOwnedElement ( ElementOwnership x ) throws PropertyVetoException { } public void addPublicOwnedElement ( ModelElement x ) throws PropertyVetoException { } public void addPrivateOwnedElement ( ModelElement x ) throws PropertyVetoException { } public void addProtectedOwnedElement ( ModelElement x ) throws PropertyVetoException { } public void addUnspecOwnedElement ( ModelElement x ) throws PropertyVetoException { } public ElementOwnership elementOwnershipFor ( ModelElement me , VisibilityKind vk ) { } public boolean contains ( ModelElement me ) { } public boolean contains ( ModelElement me , VisibilityKind vk ) { } public boolean containsPublic ( ModelElement me ) { } }

Fix:
fireVetoableChangeNoCompare ( "ownedElement" , _ownedElement , x ) ;
Buggy code:
public class CreateIPATask extends AbstractRoboVMTask { @ Override public void invoke ( ) { try { <START_BUG> Config config = build ( ios , thumbv7 , TargetType . ios , false ) ; <END_BUG> IOSTarget target = ( ( IOSTarget ) ( config . getTarget ( ) ) ) ; target . createIpa ( ) ; } catch ( IOException e ) { throw new GradleException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>IPA" , e ) ; } } }

Fix:
Config config = build ( ios , thumbv7 , TargetType . ios , false ) . getConfig ( ) ;
Buggy code:
public class CCommonOps { public static CDenseMatrix64F diag ( double ... data ) { } public static void convert ( D1Matrix64F input , CD1Matrix64F output ) { } public static DenseMatrix64F stripReal ( CD1Matrix64F input , DenseMatrix64F output ) { } public static DenseMatrix64F stripImaginary ( CD1Matrix64F input , DenseMatrix64F output ) { } public static void magnitude ( CD1Matrix64F input , D1Matrix64F output ) { } public static void conjugate ( CD1Matrix64F input , CD1Matrix64F output ) { } public static void fill ( CD1Matrix64F a , double real , double imaginary ) { } public static void add ( CD1Matrix64F a , CD1Matrix64F b , CD1Matrix64F c ) { } public static void subtract ( CD1Matrix64F a , CD1Matrix64F b , CD1Matrix64F c ) { } public static void mult ( CDenseMatrix64F a , CDenseMatrix64F b , CDenseMatrix64F c ) { } public static void mult ( double realAlpha , double imgAlpha , CDenseMatrix64F a , CDenseMatrix64F b , CDenseMatrix64F c ) { } public static void multAdd ( CDenseMatrix64F a , CDenseMatrix64F b , CDenseMatrix64F c ) { } public static void multAdd ( double realAlpha , double imgAlpha , CDenseMatrix64F a , CDenseMatrix64F b , CDenseMatrix64F c ) { } public static void transpose ( CDenseMatrix64F mat ) { } public static void transposeConjugate ( CDenseMatrix64F mat ) { } public static CDenseMatrix64F transpose ( CDenseMatrix64F input , CDenseMatrix64F output ) { } public static CDenseMatrix64F transposeConjugate ( CDenseMatrix64F input , CDenseMatrix64F output ) { } public static boolean invert ( CDenseMatrix64F A ) { LUDecompositionAlt_CD64 alg = new LUDecompositionAlt_CD64 ( ) ; LinearSolverLu_CD64 solver = new LinearSolverLu_CD64 ( alg ) ; if ( solver . setA ( A ) ) { solver . invert ( A ) ; } else { return false ; } <START_BUG> return false ; <END_BUG> } public static boolean invert ( CDenseMatrix64F input , CDenseMatrix64F output ) { } public static boolean solve ( CDenseMatrix64F a , CDenseMatrix64F b , CDenseMatrix64F x ) { } public static Complex64F det ( CDenseMatrix64F mat ) { } public static void elementMultiply ( CD1Matrix64F input , double real , double imaginary , CD1Matrix64F output ) { } public static void elementDivide ( CD1Matrix64F input , double real , double imaginary , CD1Matrix64F output ) { } public static void elementDivide ( double real , double imaginary , CD1Matrix64F input , CD1Matrix64F output ) { } public static double elementMinReal ( CD1Matrix64F a ) { } public static double elementMinImaginary ( CD1Matrix64F a ) { } public static double elementMaxReal ( CD1Matrix64F a ) { } public static double elementMaxImaginary ( CD1Matrix64F a ) { } public static double elementMaxMagnitude2 ( CD1Matrix64F a ) { } public static void setIdentity ( CDenseMatrix64F mat ) { } }

Fix:
return true ;
Buggy code:
public class ExceptionLabel extends Label { public int [ ] ranges = new int [ ] { Label . POS_NOT_SET , Label . POS_NOT_SET } ; public int count = 0 ; public TypeBinding exceptionType ; public ExceptionLabel ( CodeStream codeStream , TypeBinding exceptionType ) { } public void place ( ) { codeStream . registerExceptionHandler ( this ) ; if ( DEBUG ) System . out . println ( ( ( ( "\t\t\t\t<place<seq2seq4repair_space>at:<seq2seq4repair_space>" + ( codeStream . position ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( this ) ) ) ; <START_BUG> this . position = codeStream . position ; <END_BUG> } public void placeEnd ( ) { } public void placeStart ( ) { } public String toString ( ) { } }

Fix:
this . position = codeStream . getPosition ( ) ;
Buggy code:
public class WebRequestCodingStrategyTest extends TestCase { public void testEncodeStringArray ( ) { WebRequestCodingStrategy wrcs = new WebRequestCodingStrategy ( ) ; WicketTester app = new WicketTester ( ) ; app . startPage ( MockPage . class ) ; PageParameters params = new PageParameters ( ) ; params . add ( "a" , "1" ) ; params . add ( "a" , "2" ) ; BookmarkablePageRequestTarget requestTarget = new BookmarkablePageRequestTarget ( MockPage . class , params ) ; app . setupRequestAndResponse ( ) ; CharSequence cs = wrcs . encode ( app . createRequestCycle ( ) , requestTarget ) ; <START_BUG> assertEquals ( "?wicket:bookmarkablePage=%3Aorg.apache.wicket.protocol.http.MockPage&a=1&a=2" , cs . toString ( ) ) ; <END_BUG> app . destroy ( ) ; } }

Fix:
assertEquals ( "?wicket:bookmarkablePage=:org.apache.wicket.protocol.http.MockPage&a=1&a=2" , cs . toString ( ) ) ;
Buggy code:
public class OutputFormatTest { private static final Logger LOGGER = Logger . getLogger ( OutputFormatTest . class . getName ( ) ) ; BarcodeGeneratorProvider provider ; File outFile ; OutputStream out ; @ Before public void setup ( ) throws IOException , BarcodeException { } @ After public void tearDown ( ) { } @ Test public void createAndDecodeEan13Barcode ( ) throws NotFoundException , IOException , BarcodeException { } @ Test public void createAndDecodeDatamatrixCode ( ) throws NotFoundException , IOException , BarcodeException { } @ Test public void createAndDecodeQRCode ( ) throws NotFoundException , IOException , BarcodeException { String message = "visit<seq2seq4repair_space>http:////barcode4j.sourceforge.net" ; BarcodeGenerator gen = provider . getBarcodeGenerator ( "qr-code" ) ; <START_BUG> BitmapCanvasProvider bitmap = new BitmapCanvasProvider ( out , "image//x-png" , 300 , BufferedImage . TYPE_BYTE_GRAY , true , Orientation . NINETY ) ; <END_BUG> gen . generateBarcode ( bitmap , message ) ; bitmap . finish ( ) ; try { out . close ( ) ; } catch ( IOException ex ) { OutputFormatTest . LOGGER . log ( Level . SEVERE , null , ex ) ; } Result res = decode ( outFile . getAbsolutePath ( ) ) ; TestCase . assertEquals ( message , res . getText ( ) ) ; TestCase . assertEquals ( QR_CODE , res . getBarcodeFormat ( ) ) ; } private Result decode ( String filename ) throws NotFoundException , IOException { } }

Fix:
BitmapCanvasProvider bitmap = new BitmapCanvasProvider ( out , "image//x-png" , 300 , BufferedImage . TYPE_BYTE_BINARY , false , Orientation . ONEHUNDRED_EIGHTY ) ;
Buggy code:
public class DurationFormatUtilsTest extends TestCase { public static void main ( String [ ] args ) { } public static Test suite ( ) { } public DurationFormatUtilsTest ( String s ) { } public void testConstructor ( ) { } public void testFormatWords ( ) { } public void testFormatISOStyle ( ) { } public void testISODurationFormat ( ) { TimeZone timeZone = TimeZone . getTimeZone ( "GMT-3" ) ; Calendar cal = Calendar . getInstance ( timeZone ) ; cal . set ( 2002 , 1 , 23 , 9 , 11 , 12 ) ; cal . set ( Calendar . MILLISECOND , 1 ) ; String text ; <START_BUG> text = ISO_DATETIME_TIMEZONE_FORMAT . format ( cal ) ; <END_BUG> assertEquals ( "2002-02-23T09:11:12-03:00" , text ) ; text = ISO_EXTENDED_FORMAT . format ( cal ) ; assertEquals ( "P2002Y2M23DT9H11M12.1S" , text ) ; cal . set ( 1 , 1 , 3 , 10 , 30 , 0 ) ; cal . set ( Calendar . MILLISECOND , 0 ) ; text = ISO_EXTENDED_FORMAT . format ( cal ) ; assertEquals ( "P1Y2M3DT10H30M0.0S" , text ) ; } }

Fix:
text = ISO_DATETIME_TIME_ZONE_FORMAT . format ( cal ) ;
Buggy code:
public class InBetweenScreen implements Screen { private Button btnNextLevel ; private Button btnRedoLevel ; private Button btnMainMenu ; public static ArrayList < Disposable > content = new ArrayList < Disposable > ( ) ; private SpriteBatch batch ; private BitmapFont font ; @ Override public void create ( ) { System . out . println ( ( "content.size()<seq2seq4repair_space>inbetween<seq2seq4repair_space>" + ( InBetweenScreen . content . size ( ) ) ) ) ; InBetweenScreen . content . add ( ( batch = new SpriteBatch ( ) ) ) ; InBetweenScreen . content . add ( ( font = new BitmapFont ( ) ) ) ; input . setInputProcessor ( new InBetweenScreen . InputHandler ( ) ) ; Texture bg ; InBetweenScreen . content . add ( ( bg = new Texture ( ( ( PhysicsMain . ASSETPATH ) + "background//btn_bg.png" ) ) ) ) ; Runnable nextLevel = ( ) -> { ScreenManager . setScreen ( new GameScreen ( ) ) ; } ; Runnable redo = ( ) -> { ( GameScreen . levelOn ) -- ; ScreenManager . setScreen ( new GameScreen ( ) ) ; } ; Runnable mainMenu = ( ) -> { ScreenManager . setScreen ( new MainMenuScreen ( ) ) ; } ; btnNextLevel = new Button ( ( ( ( graphics . getWidth ( ) ) // 2 ) - ( ( bg . getWidth ( ) ) // 2 ) ) , ( ( ( ( graphics . getHeight ( ) ) // 2 ) - ( ( bg . getHeight ( ) ) // 2 ) ) + 75 ) , nextLevel , bg , "Next<seq2seq4repair_space>Level" ) ; <START_BUG> btnRedoLevel = new Button ( ( ( ( graphics . getWidth ( ) ) // 2 ) - ( ( bg . getWidth ( ) ) // 2 ) ) , ( ( ( graphics . getHeight ( ) ) // 2 ) - ( ( bg . getHeight ( ) ) // 2 ) ) , redo , bg , "Redo<seq2seq4repair_space>Level" ) ; <END_BUG> btnMainMenu = new Button ( ( ( ( graphics . getWidth ( ) ) // 2 ) - ( ( bg . getWidth ( ) ) // 2 ) ) , ( ( ( ( graphics . getHeight ( ) ) // 2 ) - ( ( bg . getHeight ( ) ) // 2 ) ) - 20 ) , mainMenu , bg , "Main<seq2seq4repair_space>Menu" ) ; } @ Override public void render ( ) { } @ Override public void resize ( int width , int height ) { } @ Override public void dispose ( ) { } private class InputHandler implements InputProcessor { @ Override public boolean keyDown ( int keycode ) { } @ Override public boolean keyUp ( int keycode ) { } @ Override public boolean keyTyped ( char character ) { } @ Override public boolean touchDown ( int screenX , int screenY , int pointer , int button ) { } @ Override public boolean touchUp ( int screenX , int screenY , int pointer , int button ) { } @ Override public boolean touchDragged ( int screenX , int screenY , int pointer ) { } @ Override public boolean mouseMoved ( int screenX , int screenY ) { } @ Override public boolean scrolled ( int amount ) { } } No newline ; at end ; of file ; }

Fix:
btnRedoLevel = new Button ( ( ( ( graphics . getWidth ( ) ) // 2 ) - ( ( bg . getWidth ( ) ) // 2 ) ) , ( ( ( ( graphics . getHeight ( ) ) // 2 ) - ( ( bg . getHeight ( ) ) // 2 ) ) + 25 ) , redo , bg , "Redo<seq2seq4repair_space>Level" ) ;
Buggy code:
@ Target ( { ElementType . FIELD , ElementType . METHOD , ElementType . ANNOTATION_TYPE } ) @ Retention ( RetentionPolicy . RUNTIME ) @ NotNull @ Constraint ( validatedBy = ContextsValidator . class ) @ Documented public @ interface Contexts { <START_BUG> String message ( ) default "Context<seq2seq4repair_space>definitions<seq2seq4repair_space>are<seq2seq4repair_space>required<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>and<seq2seq4repair_space>[a-z]+" ; <END_BUG> Class < ? > [ ] groups ( ) default { } ; Class < ? extends Payload > [ ] payload ( ) default { } ; }

Fix:
String message ( ) default "Context<seq2seq4repair_space>definitions<seq2seq4repair_space>are<seq2seq4repair_space>required<seq2seq4repair_space>to<seq2seq4repair_space>match<seq2seq4repair_space>[a-z0-9]+" ;
Buggy code:
public abstract class EntityMetricsHandler extends AbstractRuntimeOnlyHandler { private final PersistenceUnitServiceRegistry persistenceUnitRegistry ; private EntityMetricsHandler ( PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { EntityStatistics statistics = entityStatistics ( operation ) ; if ( statistics != null ) { handle ( statistics , context , operation . require ( NAME ) . asString ( ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } protected abstract void handle ( EntityStatistics statistics , OperationContext context , String attributeName ) { } private EntityStatistics entityStatistics ( ModelNode operation ) { } static final EntityMetricsHandler getDeleteCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final EntityMetricsHandler getInsertCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final EntityMetricsHandler getLoadCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final EntityMetricsHandler getUpdateCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final EntityMetricsHandler getFetchCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final EntityMetricsHandler getOptimisticFailureCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class DebugHelper { final Logger log = Logger . getLogger ( this . getClass ( ) . getName ( ) ) ; private final AIClasses ai ; public DebugHelper ( final AIClasses ai ) { } public String getHumanNameProtected ( final UnitDef def ) { } public String unitDebugString ( final Unit unit ) { } public String oldCommandDebugString ( final CurrentCommand command ) { String commandDesc ; <START_BUG> if ( ( command . getId ( ) ) > 0 ) { <END_BUG> commandDesc = OldCmdHelper . get ( command . getId ( ) ) . toString ( ) ; } else { UnitDef unitDef = UnitDef . getInstance ( this . ai . cb , ( - ( command . getId ( ) ) ) ) ; commandDesc = "Build-" + ( getHumanNameProtected ( unitDef ) ) ; } if ( ! ( command . getParams ( ) . isEmpty ( ) ) ) { commandDesc += "(" ; boolean first = true ; for ( final float param : command . getParams ( ) ) { if ( ! first ) { commandDesc += "," ; } else { first = false ; } commandDesc += param ; } commandDesc += ")" ; } return commandDesc ; } public void debugLine ( final AIFloat3 from , final AIFloat3 to , final Color color , final int framesStay ) { } public void assertTrue ( final boolean condition ) { } }

Fix:
if ( ( command . getId ( ) ) >= 0 ) {
Buggy code:
public class WeakCheckStateTestCase extends PropertyTestHelper { @ Test public void testState ( ) throws IOException , StartException { } @ Test public void testWrongPassword ( ) { } @ Test public void testForbiddenPassword ( ) { } @ Test public void testWeakPassword ( ) { } @ Test public void testTooShortPassword ( ) { values . setUserName ( "willFail" ) ; values . setPassword ( "1QwD%rf" . toCharArray ( ) ) ; WeakCheckState weakCheckState = new WeakCheckState ( consoleMock , values ) ; <START_BUG> AssertConsoleBuilder consoleBuilder = new AssertConsoleBuilder ( ) . expectedErrorMessage ( DomainManagementMessages . MESSAGES . passwordNotLontEnough ( 8 ) ) ; <END_BUG> consoleMock . setResponses ( consoleBuilder ) ; State errorState = weakCheckState . execute ( ) ; assertTrue ( "Expected<seq2seq4repair_space>the<seq2seq4repair_space>next<seq2seq4repair_space>state<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>ErrorState" , ( errorState instanceof ErrorState ) ) ; State promptNewUserState = errorState . execute ( ) ; assertTrue ( "Expected<seq2seq4repair_space>the<seq2seq4repair_space>next<seq2seq4repair_space>state<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>PromptNewUserState" , ( promptNewUserState instanceof PromptNewUserState ) ) ; consoleBuilder . validate ( ) ; } @ Test public void testNoDigitInPassword ( ) { } @ Test public void testNoSymbolInPassword ( ) { } @ Test public void testNoAlphaInPassword ( ) { } @ Test public void testUsernameNotAlphaNumeric ( ) { } @ Test public void testBadUsername ( ) { } @ Test public void testUsernameWithValidPunctuation ( ) { } }

Fix:
AssertConsoleBuilder consoleBuilder = new AssertConsoleBuilder ( ) . expectedErrorMessage ( DomainManagementMessages . MESSAGES . passwordNotLongEnough ( 8 ) ) ;
Buggy code:
public class Neo4jInserter { private GraphDatabaseService graphDb ; public Neo4jInserter ( GraphDatabaseService graphDb ) { } public Node createPlayer ( Player player ) { } public Node createTeam ( Team team ) { } public Node createTournament ( Tournament tournament ) { } public Relationship addTeamToTournament ( Tournament tournament , Team team ) { } public Relationship addPlayerToTeam ( Team team , Player player ) { } public List < Relationship > addPlayerContracts ( Player player ) { } private TournamentCrawler getTournamentCrawler ( TeamCrawler teamCrawler ) { } private TeamCrawler getTeamCrawler ( PlayerCrawler playerCrawler ) { } private PlayerCrawler getPlayerCrawler ( ) { } public void crawlPlayers ( ) { } public Set < Tournament > crawlWebsite ( String rootUri ) throws IOException { } public Tournament crawlTournament ( Tournament tournament ) { } public void completeTeamInformation ( ) { } public static void main ( String [ ] args ) { String dbPath = args [ 0 ] ; String command = args [ 1 ] ; GraphDatabaseService graphDb = Neo4jHelper . openGraphDb ( dbPath ) ; Neo4jHelper . createSchema ( graphDb ) ; Neo4jInserter inserter = new Neo4jInserter ( graphDb ) ; try { if ( "tournament" . equals ( command ) ) { <START_BUG> inserter . crawlTournament ( new Tournament ( args [ 2 ] , args [ 3 ] ) ) ; <END_BUG> } else if ( "all" . equals ( command ) ) { String rootUri = "http:////www.soccerbase.com//tournaments//home.sd" ; inserter . crawlWebsite ( rootUri ) ; } else if ( "fixTeams" . equals ( command ) ) { inserter . completeTeamInformation ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
inserter . crawlTournament ( new Tournament ( args [ 2 ] , ( ( args . length ) > 3 ? args [ 3 ] : "" ) ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class QueueHtmlToPratilipiServlet extends HttpServlet { private static final Logger logger = Logger . getLogger ( QueueHtmlToPratilipiServlet . class . getName ( ) ) ; @ Override public void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException { String pratilipiIdStr = request . getParameter ( "pratilipiId" ) ; Long pratilipiId = Long . parseLong ( pratilipiIdStr ) ; BlobAccessor blobAccessor = DataAccessorFactory . getBlobAccessor ( ) ; String fileName = PratilipiHelper . getContentHtml ( pratilipiId ) ; BlobEntry blobEntry = blobAccessor . getBlob ( fileName ) ; String html = new String ( blobEntry . getData ( ) ) ; QueueHtmlToPratilipiServlet . logger . log ( Level . INFO , ( "Raw<seq2seq4repair_space>content<seq2seq4repair_space>length:<seq2seq4repair_space>" + ( html . length ( ) ) ) ) ; Matcher matcher = REGEX_HTML_BODY . matcher ( html ) ; if ( matcher . matches ( ) ) { QueueHtmlToPratilipiServlet . logger . log ( Level . INFO , ( ( ( "Discarding<seq2seq4repair_space>pre-<body><seq2seq4repair_space>content<seq2seq4repair_space>(lenght:<seq2seq4repair_space>" + ( matcher . group ( 1 ) . length ( ) ) ) + "):\n" ) + ( matcher . group ( 1 ) ) ) ) ; QueueHtmlToPratilipiServlet . logger . log ( Level . INFO , ( ( ( "Discarding<seq2seq4repair_space>post-<//body><seq2seq4repair_space>content<seq2seq4repair_space>(lenght:<seq2seq4repair_space>" + ( matcher . group ( 3 ) . length ( ) ) ) + "):\n" ) + ( matcher . group ( 3 ) ) ) ) ; html = matcher . group ( 2 ) ; } System . out . println ( ( "Processed<seq2seq4repair_space>content<seq2seq4repair_space>lenght:<seq2seq4repair_space>" + ( html . length ( ) ) ) ) ; <START_BUG> blobEntry = blobAccessor . newBlob ( PratilipiHelper . getContent ( pratilipiId ) , html . getBytes ( Charset . forName ( "UTF-8" ) ) , "text//html" , "private" ) ; <END_BUG> blobAccessor . createOrUpdateBlob ( blobEntry ) ; } }

Fix:
blobEntry = blobAccessor . newBlob ( PratilipiHelper . getContent ( pratilipiId ) , html . getBytes ( Charset . forName ( "UTF-8" ) ) , "text//html" ) ;