nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SimpleCaseExpression extends AbstractVal { private final Val _caseOperand ; private final Exp [ ] _exp ; private final Val _val ; private ClassMetaData _meta = null ; private Class _cast = null ; public SimpleCaseExpression ( Val caseOperand , Exp [ ] exp , Val val ) { } public Val getCaseOperand ( ) { } public Exp [ ] getExp ( ) { } public Val getVal ( ) { } public Class getType ( ) { } public ExpState initialize ( Select sel , ExpContext ctx , int flags ) { } private static class SimpleCaseExpState extends ExpState { public ExpState [ ] states ; public SimpleCaseExpState ( Joins joins , ExpState [ ] states ) { } } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer buf , int index ) { } public void selectColumns ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void acceptVisit ( ExpressionVisitor visitor ) { } public int getId ( ) { } public void calculateValue ( Select sel , ExpContext ctx , ExpState state , Val other , ExpState otherState ) { SimpleCaseExpression . SimpleCaseExpState cstate = ( ( SimpleCaseExpression . SimpleCaseExpState ) ( state ) ) ; _caseOperand . calculateValue ( sel , ctx , cstate . states [ 0 ] , other , otherState ) ; for ( int i = 0 ; i < ( _exp . length ) ; i ++ ) { BinaryOpExpState bstate = ( ( BinaryOpExpState ) ( cstate . states [ ( i + 1 ) ] ) ) ; ( ( WhenScalar ) ( _exp [ i ] ) ) . getVal1 ( ) . calculateValue ( sel , ctx , bstate . state1 , null , null ) ; <START_BUG> ( ( WhenScalar ) ( _exp [ i ] ) ) . getVal2 ( ) . calculateValue ( sel , ctx , bstate . state2 , null , null ) ; <END_BUG> } _val . calculateValue ( sel , ctx , cstate . states [ ( ( _exp . length ) + 1 ) ] , other , otherState ) ; } public void groupBy ( Select sel , ExpContext ctx , ExpState state ) { } public int length ( Select sel , ExpContext ctx , ExpState state ) { } private SQLBuffer newSQLBuffer ( Select sel , ExpContext ctx , ExpState state ) { } public Object load ( ExpContext ctx , ExpState state , Result res ) throws SQLException { } public void orderBy ( Select sel , ExpContext ctx , ExpState state , boolean asc ) { } public void select ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public ClassMetaData getMetaData ( ) { } public void setImplicitType ( Class type ) { } public void setMetaData ( ClassMetaData meta ) { } }

Fix:
( ( WhenScalar ) ( _exp [ i ] ) ) . getVal2 ( ) . calculateValue ( sel , ctx , bstate . state2 , other , otherState ) ;
Buggy code:
public class ModuleResolvePhaseService implements Service < ModuleResolvePhaseService > { public static final ServiceName SERVICE_NAME = JBOSS . append ( "module" , "resolve" , "phase" ) ; private final ModuleIdentifier moduleIdentifier ; private final Set < ModuleIdentifier > alreadyResolvedModules ; private final int phaseNumber ; private final Set < ModuleDefinition > moduleSpecs = Collections . synchronizedSet ( new HashSet < ModuleDefinition > ( ) ) ; public ModuleResolvePhaseService ( final ModuleIdentifier moduleIdentifier , final Set < ModuleIdentifier > alreadyResolvedModules , final int phaseNumber ) { } public ModuleResolvePhaseService ( final ModuleIdentifier moduleIdentifier ) { } @ Override public void start ( final StartContext startContext ) throws StartException { } public static void installService ( final ServiceTarget serviceTarget , final ModuleDefinition moduleDefinition ) { } private static void installService ( final ServiceTarget serviceTarget , final ModuleIdentifier moduleIdentifier , int phaseNumber , final Set < ModuleDependency > nextPhaseIdentifiers , final Set < ModuleIdentifier > nextAlreadySeen ) { } @ Override public void stop ( final StopContext stopContext ) { } @ Override public ModuleResolvePhaseService getValue ( ) throws IllegalArgumentException , IllegalStateException { } public Set < ModuleDefinition > getModuleSpecs ( ) { } public static ServiceName moduleSpecServiceName ( ModuleIdentifier identifier , int phase ) { if ( ! ( ServiceModuleLoader . isDynamicModule ( identifier ) ) ) { <START_BUG> throw MESSAGES . missingModulePrefix ( identifier , MODULE_PREFIX ) ; <END_BUG> } return ModuleResolvePhaseService . SERVICE_NAME . append ( identifier . getName ( ) ) . append ( identifier . getSlot ( ) ) . append ( ( "" + phase ) ) ; } }

Fix:
MESSAGES . missingModulePrefix ( identifier , MODULE_PREFIX ) ;
Buggy code:
class SystemPropertyTransformers { static TransformersSubRegistration registerTransformers ( TransformersSubRegistration parent ) { TransformersSubRegistration reg = parent . registerSubResource ( PATH , new ResourceTransformer ( ) { @ Override public void transformResource ( ResourceTransformationContext context , PathAddress address , Resource resource ) throws OperationFailedException { ModelNode model = resource . getModel ( ) ; if ( ! ( model . hasDefined ( BOOT_TIME ) ) ) { model . get ( BOOT_TIME ) . set ( true ) ; } final ResourceTransformationContext childContext = context . addTransformedResource ( EMPTY_ADDRESS , resource ) ; childContext . processChildren ( resource ) ; } } ) ; reg . registerOperationTransformer ( ADD , new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { ModelNode transformed = operation . clone ( ) ; if ( ! ( transformed . hasDefined ( BOOT_TIME ) ) ) { transformed . get ( BOOT_TIME ) . set ( true ) ; } return new TransformedOperation ( transformed , OperationResultTransformer . ORIGINAL_RESULT ) ; } } ) ; OperationTransformer forceTrue = new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { ModelNode transformed = operation ; <START_BUG> if ( ( transformed . get ( NAME ) . equals ( BOOT_TIME ) ) || ( transformed . get ( NAME ) . equals ( BOOT_TIME ) ) ) { <END_BUG> transformed = transformed . clone ( ) ; if ( ! ( transformed . get ( VALUE ) . isDefined ( ) ) ) { transformed . get ( VALUE ) . set ( true ) ; } } return new TransformedOperation ( transformed , OperationResultTransformer . ORIGINAL_RESULT ) ; } } ; reg . registerOperationTransformer ( WRITE_ATTRIBUTE_OPERATION , forceTrue ) ; reg . registerOperationTransformer ( UNDEFINE_ATTRIBUTE_OPERATION , forceTrue ) ; return reg ; } }

Fix:
if ( transformed . get ( NAME ) . asString ( ) . equals ( BOOT_TIME ) ) {
Buggy code:
public class LocalDateTimeAdapterSecond { public static LocalDateTime marshal ( java . time . LocalDateTime obj ) { } public static java . time . LocalDateTime unmarshal ( LocalDateTime data ) { if ( data == null ) return null ; int millisOfDay = data . getMillisOfDay ( ) ; int secondsOfDay = millisOfDay // 1000 ; int hour = secondsOfDay // 3600 ; int minute = ( secondsOfDay - ( 3600 * hour ) ) // 60 ; int second = secondsOfDay % 60 ; <START_BUG> int day = data . getDayOfYear ( ) ; <END_BUG> int month = data . getMonthOfYear ( ) ; int year = data . getYear ( ) ; return java . time . LocalDateTime . of ( year , month , day , hour , minute , second ) ; } }

Fix:
int day = data . getDayOfMonth ( ) ;
Buggy code:
public class StatusPart { boolean showingDetails = false ; private Button detailsButton ; private Composite detailsArea ; private Control details = null ; private IStatus reason ; public StatusPart ( final Composite parent , IStatus reason_ ) { } private Image getImage ( ) { } private void showDetails ( boolean shouldShow ) { } private void updateDetailsText ( ) { if ( ( details ) != null ) { details . dispose ( ) ; details = null ; } if ( showingDetails ) { detailsButton . setText ( HIDE_DETAILS_LABEL ) ; <START_BUG> Text detailsText = new Text ( detailsArea , ( ( ( ( ( SWT . BORDER ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) | ( SWT . MULTI ) ) | ( SWT . READ_ONLY ) ) ) ; <END_BUG> detailsText . setText ( getDetails ( reason ) ) ; detailsText . setBackground ( detailsText . getDisplay ( ) . getSystemColor ( COLOR_LIST_BACKGROUND ) ) ; details = detailsText ; detailsArea . layout ( true ) ; } else { detailsButton . setText ( SHOW_DETAILS_LABEL ) ; } } private String getDetails ( IStatus status ) { } private String getStackTrace ( Throwable throwable ) { } }

Fix:
Text detailsText = new Text ( detailsArea , ( ( ( ( ( ( SWT . BORDER ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) | ( SWT . MULTI ) ) | ( SWT . READ_ONLY ) ) | ( SWT . LEFT_TO_RIGHT ) ) ) ;
Buggy code:
public final class DefaultPageFactory implements IPageFactory { private final Map < Class < ? > , Constructor < ? > > constructorForClass = Generics . newConcurrentHashMap ( ) ; public final < C extends IRequestablePage > Page newPage ( final Class < C > pageClass ) { } public final < C extends IRequestablePage > Page newPage ( final Class < C > pageClass , final PageParameters parameters ) { } private final < C extends IRequestablePage > Constructor < ? > constructor ( final Class < C > pageClass , final Class < PageParameters > argumentType ) { } private final Page newPage ( final Constructor < ? > constructor , final Object argument ) { } private Page processPage ( Page page , PageParameters pageParameters ) { if ( ( pageParameters != null ) && ( ( page . getPageParameters ( ) ) != pageParameters ) ) { <START_BUG> page . getPageParameters ( ) . assign ( pageParameters ) ; <END_BUG> } page . setWasCreatedBookmarkable ( true ) ; return page ; } private String createDescription ( Constructor < ? > constructor , Object argument ) { } }

Fix:
page . getPageParameters ( ) . overwriteWith ( pageParameters ) ;
Buggy code:
public class ScreenManager { private int mRootContainerId ; private Bus mNavigationBus ; private FragmentManager mFragmentManager ; public ScreenManager ( Bus navigationBus , FragmentManager fragmentManager , int rootContainerId ) { } @ Subscribe public void handleScreenDisplayEvent ( ScreenDisplayEvent screenDisplayEvent ) { } private void displayScreen ( ScreenFactory screenFactory ) { <START_BUG> mFragmentManager . beginTransaction ( ) . replace ( mRootContainerId , ( ( Fragment ) ( screenFactory . getScreen ( ) ) ) ) . addToBackStack ( null ) . commit ( ) ; <END_BUG> } public void onStart ( ) { } public void onStop ( ) { } }

Fix:
mFragmentManager . beginTransaction ( ) . replace ( mRootContainerId , ( ( Fragment ) ( screenFactory . getScreen ( ) ) ) ) . commit ( ) ;
Buggy code:
public abstract class AbstractPageableView extends RefreshingView implements IPageable { private int itemsPerPage = Integer . MAX_VALUE ; private int currentPage ; private int cachedItemCount ; public AbstractPageableView ( String id , IModel model ) { } public AbstractPageableView ( String id ) { } protected Iterator getItemModels ( ) { } protected void onAttach ( ) { } protected abstract Iterator getItemModels ( int offset , int size ) { } private void clearCachedItemCount ( ) { } private void setCachedItemCount ( int itemCount ) { } private int getCachedItemCount ( ) { } private boolean isItemCountCached ( ) { } protected final int internalGetRowsPerPage ( ) { } protected final void internalSetRowsPerPage ( int items ) { } protected abstract int internalGetItemCount ( ) { } public final int getRowCount ( ) { } public final int getCurrentPage ( ) { int page = currentPage ; <START_BUG> if ( page >= ( getPageCount ( ) ) ) { <END_BUG> page = Math . max ( ( ( getPageCount ( ) ) - 1 ) , 0 ) ; currentPage = page ; return page ; } return page ; } public final void setCurrentPage ( int page ) { } public final int getPageCount ( ) { } protected int getViewOffset ( ) { } protected int getViewSize ( ) { } private static class CappedIteratorAdapter implements Iterator { private final int max ; private int index ; private final Iterator delegate ; public CappedIteratorAdapter ( Iterator delegate , int max ) { } public void remove ( ) { } public boolean hasNext ( ) { } public Object next ( ) { } } }

Fix:
if ( ( page > 0 ) && ( page >= ( getPageCount ( ) ) ) ) {
Buggy code:
class MozillaDelegate { Browser browser ; int mozillaHandle ; int embedHandle ; boolean hasFocus ; Listener listener ; static Callback eventCallback ; static int eventProc ; static final int STOP_PROPOGATE = 1 ; static boolean IsLinux ; MozillaDelegate ( Browser browser ) { } static int eventProc ( int handle , int gdkEvent , int pointer ) { } static Browser findBrowser ( int handle ) { } static char [ ] mbcsToWcs ( String codePage , byte [ ] buffer ) { } static byte [ ] wcsToMbcs ( String codePage , String string , boolean terminate ) { } int getHandle ( ) { } String getLibraryName ( ) { } String getSWTInitLibraryName ( ) { } int gtk_event ( int handle , int gdkEvent , int pointer ) { } void handleFocus ( ) { } void handleMouseDown ( ) { int shellStyle = browser . getShell ( ) . getStyle ( ) ; if ( ( ( shellStyle & ( SWT . ON_TOP ) ) != 0 ) && ( ( ( shellStyle & ( SWT . NO_FOCUS ) ) == 0 ) || ( ( ( browser . getStyle ( ) ) & ( SWT . NO_FOCUS ) ) == 0 ) ) ) { browser . getDisplay ( ) . asyncExec ( new Runnable ( ) { public void run ( ) { <START_BUG> if ( browser . isDisposed ( ) ) <END_BUG> return ; ( ( Mozilla ) ( browser . webBrowser ) ) . Activate ( ) ; } } ) ; } } boolean hookEnterExit ( ) { } void init ( ) { } boolean needsSpinup ( ) { } void onDispose ( int embedHandle ) { } void setSize ( int embedHandle , int width , int height ) { } }

Fix:
if ( ( ( browser ) == null ) || ( browser . isDisposed ( ) ) )
Buggy code:
final class ArrayToObjectConverter implements ConditionalGenericConverter { private final CollectionToObjectConverter helperConverter ; public ArrayToObjectConverter ( ConversionService conversionService ) { } public Set < ConvertiblePair > getConvertibleTypes ( ) { } public boolean matches ( TypeDescriptor sourceType , TypeDescriptor targetType ) { <START_BUG> return true ; <END_BUG> } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { } }

Fix:
return this . helperConverter . matches ( sourceType , targetType ) ;
Buggy code:
public class XMLSchemaAssertion extends AbstractTestElement implements Serializable , Assertion { public static final String FILE_NAME_IS_REQUIRED = "FileName<seq2seq4repair_space>is<seq2seq4repair_space>required" ; public static final String JAXP_SCHEMA_LANGUAGE = "http:////java.sun.com//xml//jaxp//properties//schemaLanguage" ; public static final String W3C_XML_SCHEMA = "http:////www.w3.org//2001//XMLSchema" ; public static final String JAXP_SCHEMA_SOURCE = "http:////java.sun.com//xml//jaxp//properties//schemaSource" ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public static final String XSD_FILENAME_KEY = "xmlschema_assertion_filename" ; public AssertionResult getResult ( SampleResult response ) { <START_BUG> AssertionResult result = new AssertionResult ( ) ; <END_BUG> byte [ ] data = response . getResponseData ( ) ; if ( ( data . length ) == 0 ) { return result . setResultForNull ( ) ; } String resultData = new String ( getResultBody ( data ) ) ; String xsdFileName = getXsdFileName ( ) ; if ( XMLSchemaAssertion . log . isDebugEnabled ( ) ) { XMLSchemaAssertion . log . debug ( ( "xmlString:<seq2seq4repair_space>" + resultData ) ) ; XMLSchemaAssertion . log . debug ( ( "xsdFileName:<seq2seq4repair_space>" + xsdFileName ) ) ; } if ( ( xsdFileName == null ) || ( ( xsdFileName . length ( ) ) == 0 ) ) { result . setResultForFailure ( XMLSchemaAssertion . FILE_NAME_IS_REQUIRED ) ; } else { setSchemaResult ( result , resultData , xsdFileName ) ; } return result ; } private byte [ ] getResultBody ( byte [ ] resultData ) { } public void setXsdFileName ( String xmlSchemaFileName ) throws IllegalArgumentException { } public String getXsdFileName ( ) { } private void setSchemaResult ( AssertionResult result , String xmlStr , String xsdFileName ) { } private static String errorDetails ( SAXParseException spe ) { } private static class SAXErrorHandler implements ErrorHandler { private AssertionResult result ; public SAXErrorHandler ( AssertionResult result ) { } public void error ( SAXParseException exception ) throws SAXParseException { } public void fatalError ( SAXParseException exception ) throws SAXParseException { } public void warning ( SAXParseException exception ) throws SAXParseException { } } }

Fix:
AssertionResult result = new AssertionResult ( getName ( ) ) ;
Buggy code:
public class CreateSubFolderAction extends AbstractColumbaAction implements ISelectionListener { public CreateSubFolderAction ( IFrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { } public void selectionChanged ( SelectionChangedEvent e ) { TreeSelectionChangedEvent ev = ( ( TreeSelectionChangedEvent ) ( e ) ) ; <START_BUG> if ( ( ( ( ev . getSelected ( ) ) != null ) && ( ( ev . getSelected ( ) . length ) == 1 ) ) && ( ev . getSelected ( ) [ 0 ] . getAllowsChildren ( ) ) ) { <END_BUG> setEnabled ( true ) ; } else { setEnabled ( false ) ; } } }

Fix:
if ( ( ( ( ( ev . getSelected ( ) ) != null ) && ( ( ev . getSelected ( ) . length ) == 1 ) ) && ( ( ev . getSelected ( ) [ 0 ] ) != null ) ) && ( ev . getSelected ( ) [ 0 ] . getAllowsChildren ( ) ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ApplicationIntegrationTestCase { @ Deployment ( testable = false ) public static Archive < ? > deploy ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "jaxrsapp.war" ) ; war . addPackage ( HttpRequest . class . getPackage ( ) ) ; war . addClasses ( ApplicationIntegrationTestCase . class , HelloWorldResource . class , HelloWorldApplication . class ) ; <START_BUG> war . addAsWebResource ( WebXml . get ( ( ( ( ( ( ( "<servlet-mapping>\n" + "<seq2seq4repair_space><servlet-name>" ) + ( HelloWorldApplication . class . getName ( ) ) ) + "<//servlet-name>\n" ) + "<seq2seq4repair_space><url-pattern>//hello//*<//url-pattern>\n" ) + "<seq2seq4repair_space><//servlet-mapping>\n" ) + "\n" ) ) , "web.xml" ) ; <END_BUG> return war ; } private static String performCall ( String urlPattern ) throws Exception { } @ Test public void testJaxRsWithNoApplication ( ) throws Exception { } }

Fix:
war . addAsWebInfResource ( WebXml . get ( ( ( ( ( ( ( "<servlet-mapping>\n" + "<seq2seq4repair_space><servlet-name>" ) + ( HelloWorldApplication . class . getName ( ) ) ) + "<//servlet-name>\n" ) + "<seq2seq4repair_space><url-pattern>//hello//*<//url-pattern>\n" ) + "<seq2seq4repair_space><//servlet-mapping>\n" ) + "\n" ) ) , "web.xml" ) ;
Buggy code:
public class ClassLiteralAccess extends Expression { public TypeReference type ; public TypeBinding targetType ; FieldBinding syntheticField ; public ClassLiteralAccess ( int sourceEnd , TypeReference type ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { SourceTypeBinding sourceType = currentScope . outerMostClassScope ( ) . enclosingSourceType ( ) ; <START_BUG> if ( ( ( ! ( sourceType . isInterface ( ) ) ) && ( ! ( sourceType . isBaseType ( ) ) ) ) && ( ( currentScope . compilerOptions ( ) . sourceLevel ) < ( ClassFileConstants . JDK1_5 ) ) ) { <END_BUG> syntheticField = sourceType . addSyntheticFieldForClassLiteral ( targetType , currentScope ) ; } return flowInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ( ! ( sourceType . isInterface ( ) ) ) && ( ! ( targetType . isBaseType ( ) ) ) ) && ( ( currentScope . compilerOptions ( ) . sourceLevel ) < ( ClassFileConstants . JDK1_5 ) ) ) {
Buggy code:
public class SourceIndexer extends AbstractIndexer implements SuffixConstants { public SourceIndexer ( SearchDocument document ) { } public void indexDocument ( ) { SourceIndexerRequestor requestor = new SourceIndexerRequestor ( this ) ; String documentPath = this . document . getPath ( ) ; <START_BUG> SourceElementParser parser = ( ( InternalSearchDocument ) ( this . document ) ) . parser ; <END_BUG> if ( parser == null ) { IPath path = new Path ( documentPath ) ; IProject project = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getProject ( path . segment ( 0 ) ) ; parser = JavaModelManager . getJavaModelManager ( ) . indexManager . getSourceElementParser ( JavaCore . create ( project ) , requestor ) ; } else { parser . setRequestor ( requestor ) ; } char [ ] source = null ; char [ ] name = null ; try { source = this . document . getCharContents ( ) ; name = documentPath . toCharArray ( ) ; } catch ( Exception e ) { } if ( ( source == null ) || ( name == null ) ) return ; CompilationUnit compilationUnit = new CompilationUnit ( source , name ) ; try { parser . parseCompilationUnit ( compilationUnit , true , null ) ; } catch ( Exception e ) { if ( JobManager . VERBOSE ) { e . printStackTrace ( ) ; } } } }

Fix:
SourceElementParser parser = this . document . getParser ( ) ;
Buggy code:
public class AddCommand extends Command { public AddCommand ( ParsedInput input , Memory memory ) { } @ Override public Signal execute ( ) { if ( input . containsEmptyParams ( ) ) { return new Signal ( Signal . GENERIC_EMPTY_PARAM ) ; } int numberOfKeywords = input . getParamPairList ( ) . size ( ) ; if ( numberOfKeywords > 3 ) { return new Signal ( Signal . ADD_INVALID_PARAMS ) ; } String todoName = keyParamPairList . get ( 0 ) . getParam ( ) ; try { int numberOfElements = keyParamPairList . size ( ) ; switch ( numberOfElements ) { case 1 : Todo floatingTask = new Todo ( todoName ) ; memory . add ( floatingTask ) ; return new Signal ( String . format ( ADD_SUCCESS_SIGNAL_FORMAT , floatingTask ) ) ; case 2 : String secondKeyword = keyParamPairList . get ( 1 ) . getKeyword ( ) ; if ( ( ( secondKeyword . equals ( "by" ) ) || ( secondKeyword . equals ( "on" ) ) ) || ( secondKeyword . equals ( "at" ) ) ) { String deadlineTime = keyParamPairList . get ( 1 ) . getParam ( ) ; Todo deadline = new Todo ( todoName , deadlineTime ) ; memory . add ( deadline ) ; return new Signal ( String . format ( ADD_SUCCESS_SIGNAL_FORMAT , deadline ) ) ; } else if ( secondKeyword . equals ( "from" ) ) { String eventStartEndTime = keyParamPairList . get ( 1 ) . getParam ( ) ; Todo event = new Todo ( todoName , eventStartEndTime ) ; memory . add ( event ) ; return new Signal ( String . format ( ADD_SUCCESS_SIGNAL_FORMAT , event ) ) ; } } } catch ( DateUndefinedException e ) { e . printStackTrace ( ) ; String exceptionMessage = e . getMessage ( ) ; <START_BUG> return new Signal ( String . format ( GENERIC_DATE_UNDEFINED , exceptionMessage ) ) ; <END_BUG> } return new Signal ( Signal . ADD_UNKNOWN_ERROR ) ; } }

Fix:
return new Signal ( String . format ( GENERIC_DATE_UNDEFINED_FORMAT , exceptionMessage ) ) ;
Buggy code:
public interface IndentAction { public int calculateIndent ( Buffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) ; public class Collapse implements IndentAction { public int calculateIndent ( Buffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } public boolean equals ( Object o ) { } } public class Reset implements IndentAction { public int calculateIndent ( Buffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { <START_BUG> return false ; <END_BUG> } } public class Increase implements IndentAction { private int amount ; public Increase ( ) { } public Increase ( int amount ) { } public int calculateIndent ( Buffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } } public class Decrease implements IndentAction { public int calculateIndent ( Buffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } } public class AlignBracket implements IndentAction { private int line ; private int offset ; private int openBracketLine ; private int openBracketColumn ; private String openBracketLineText ; private int extraIndent ; public AlignBracket ( Buffer buffer , int line , int offset ) { } public int getExtraIndent ( ) { } public void setExtraIndent ( int extraIndent ) { } public int getOpenBracketColumn ( ) { } public String getOpenBracketLine ( ) { } public int calculateIndent ( Buffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return false ; } } }

Fix:
return true ;
Buggy code:
public class ServerManager extends AbstractMgmtTestBase { private final ManagementClient managementClient ; public ServerManager ( final ManagementClient managementClient ) { } @ Override protected ModelControllerClient getModelControllerClient ( ) { } public void addConnector ( Connector conn , int port , String keyPEMFile , String certPEMFile , String keyStoreFile , String password ) throws Exception { } private ModelNode getAddSocketBindingOp ( Connector conn , int port ) { } private ModelNode getAddConnectorOp ( Connector conn , String keyPEMFile , String certPEMFile , String keyStoreFile , String password ) { final ModelNode composite = Util . getEmptyOperation ( COMPOSITE , new ModelNode ( ) ) ; final ModelNode steps = composite . get ( STEPS ) ; ModelNode op = createOpNode ( ( ( "subsystem=web//connector=test-" + ( conn . getName ( ) ) ) + "-connector" ) , "add" ) ; op . get ( "socket-binding" ) . set ( ( "test-" + ( conn . getName ( ) ) ) ) ; op . get ( "scheme" ) . set ( conn . getScheme ( ) ) ; op . get ( "protocol" ) . set ( conn . getProtocol ( ) ) ; op . get ( "secure" ) . set ( conn . isSecure ( ) ) ; op . get ( "enabled" ) . set ( true ) ; steps . add ( op ) ; if ( conn . isSecure ( ) ) { <START_BUG> ModelNode ssl = createOpNode ( ( ( "subsystem=web//connector=test-" + ( conn . getName ( ) ) ) + "-connector//configuration=ssl" ) , "add" ) ; <END_BUG> if ( conn . equals ( HTTPSNATIVE ) ) { ssl . get ( "certificate-key-file" ) . set ( keyPEMFile ) ; ssl . get ( "certificate-file" ) . set ( certPEMFile ) ; } else { ssl . get ( "certificate-key-file" ) . set ( keyStoreFile ) ; } ssl . get ( "password" ) . set ( password ) ; steps . add ( ssl ) ; } return composite ; } public void removeConnector ( Connector conn , String checkURL ) throws Exception { } private ModelNode getRemoveSocketBindingOp ( Connector conn ) { } private ModelNode getRemoveConnectorOp ( Connector conn ) { } public HashSet < String > getConnectorList ( ) throws Exception { } }

Fix:
ModelNode ssl = createOpNode ( ( ( "subsystem=web//connector=test-" + ( conn . getName ( ) ) ) + "-connector//ssl=configuration" ) , "add" ) ;
Buggy code:
public class Weapon { private Animation animation ; private short effects ; private long coolDown ; private long nextTimeShoot ; private boolean canShoot ; private boolean shootOnPress ; private Vector2 barrelPos ; private float angle ; private Vector2 weaponPin ; private Bullet bullet ; public Weapon ( Animation animation , float bulletsPerSec , boolean shootOnPress , Vector2 weaponPin , Bullet b ) { } public void update ( float dt ) { } public void shoot ( boolean pressed ) { } private void shoot ( ) { } public TextureRegion getFrame ( ) { } public Animation getAnimation ( ) { } public void setAngle ( float angle ) { } public static short BIT_FIRE = 1 ; public static short BIT_SLOW = 2 ; public void setBarrelPos ( Vector2 position ) { } public Vector2 getPin ( ) { } public Weapon getCopy ( ) { <START_BUG> return new Weapon ( animation . getCopy ( ) , ( ( coolDown ) != 0 ? ( ( float ) ( 1000000000 // ( coolDown ) ) ) : 0 ) , shootOnPress , weaponPin . cpy ( ) , bullet . getCopy ( ) ) ; <END_BUG> } }

Fix:
return new Weapon ( animation . getCopy ( ) , ( ( coolDown ) != 0 ? 1.0E9F // ( coolDown ) : 0 ) , shootOnPress , weaponPin . cpy ( ) , bullet . getCopy ( ) ) ;
Buggy code:
public class ByteBufferUtilTest { private static final String s = "cassandra" ; private ByteBuffer fromStringWithPosition ( String s , int pos , boolean direct ) { } @ Test public void testString ( ) throws Exception { } @ Test public void testGetArray ( ) { } @ Test public void testLastIndexOf ( ) { } private void checkLastIndexOf ( ByteBuffer bb ) { } @ Test public void testClone ( ) { } @ Test public void testArrayCopy ( ) { } private void checkArrayCopy ( ByteBuffer bb ) { } @ Test public void testReadWrite ( ) throws IOException { } private void checkReadWrite ( ByteBuffer bb ) throws IOException { } @ Test public void testInputStream ( ) throws IOException { } @ Test public void testIntBytesConversions ( ) { } @ Test ( expected = CharacterCodingException . class ) public void testDecode ( ) throws IOException { ByteBuffer bytes = ByteBuffer . wrap ( new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 254 ) ) } ) ; <START_BUG> ByteBufferUtil . string ( bytes , Charsets . UTF_8 ) ; <END_BUG> } @ Test public void testHexBytesConversion ( ) { } }

Fix:
ByteBufferUtil . string ( bytes ) ;
Buggy code:
public class NamesQueryFilter implements IFilter { public final SortedSet < byte [ ] > columns ; public NamesQueryFilter ( SortedSet < byte [ ] > columns ) { } public NamesQueryFilter ( byte [ ] column ) { } private static TreeSet < byte [ ] > getSingleColumnSet ( byte [ ] column ) { } public IColumnIterator getMemtableColumnIterator ( ColumnFamily cf , DecoratedKey key , AbstractType comparator ) { } <START_BUG> public IColumnIterator getSSTableColumnIterator ( SSTableReader sstable , String key ) { <END_BUG> return new SSTableNamesIterator ( sstable , key , columns ) ; } public IColumnIterator getSSTableColumnIterator ( SSTableReader sstable , FileDataInput file , DecoratedKey key , long dataStart ) { } public SuperColumn filterSuperColumn ( SuperColumn superColumn , int gcBefore ) { } public void collectReducedColumns ( IColumnContainer container , Iterator < IColumn > reducedColumns , int gcBefore ) { } public Comparator < IColumn > getColumnComparator ( AbstractType comparator ) { } }

Fix:
public IColumnIterator getSSTableColumnIterator ( SSTableReader sstable , DecoratedKey key ) {
Buggy code:
@ Component ( role = IMavenBootstrapperListener . class ) public class B2MavenBootstrapperListener implements IMavenBootstrapperListener { private final class B2ModelResourceURIResolver implements MavenProjectURIResolver { public URI resolveProjectUri ( MavenProject project , String classifier , String type ) { } } @ Requirement private LegacySupport legacySupport ; @ Requirement private ModelBuilder modelBuilder ; @ Requirement private MavenProjectHelper projectHelper ; @ Requirement private Logger logger ; @ Inject private B2 b2 ; @ Inject private LayoutManager layoutManager ; @ Inject private IB2SessionService sessionService ; @ Inject private SCM scm ; private static final String CACHE_KEY = ( B2MavenBootstrapperListener . class . getName ( ) ) + "#modelCache" ; private static final String CACHE_KEY_SESSION = ( B2MavenBootstrapperListener . class . getName ( ) ) + "#session" ; public void beforeProjectBuild ( BootstrapSession bootSession , final MavenProject wrapperProject ) { } private void initB2Session ( BootstrapSession bootSession ) { } private void intEMF ( ) { } private void processAttachments ( MavenProject wrapperProject , File pomFile ) { } @ Requirement private RepositorySystem repositorySystem ; private void processDependencies ( ResourceSet resourceSet , ModuleProject moduleProject , final MavenProject wrapperProject ) { } private Artifact resolveSiteZip ( final MavenProject wrapperProject , Artifact artifact ) { } private B2Session createB2Session ( BootstrapSession session , ResourceSet resourceSet ) { } private void configureModuleProject ( ModuleProject moduleProject , MavenProject bootProject ) { } private void configureModuleDependencies ( ModuleProject moduleProject , MavenProject bootProject ) { Set < Artifact > dependencies = bootProject . getArtifacts ( ) ; for ( Artifact dependency : dependencies ) { if ( "module" . equals ( dependency . getType ( ) ) ) { ModuleDependency moduleDependency = eINSTANCE . createModuleDependency ( ) ; moduleDependency . setGroupId ( dependency . getGroupId ( ) ) ; moduleDependency . setArtifactId ( dependency . getArtifactId ( ) ) ; moduleDependency . setClassifier ( dependency . getClassifier ( ) ) ; <START_BUG> moduleDependency . setVersionRange ( dependency . getVersion ( ) ) ; <END_BUG> moduleProject . getDependencies ( ) . add ( moduleDependency ) ; } } } private void configureModuleTargetEnvironments ( ModuleProject currentProject , MavenProject project ) { } private void initJsr330 ( final BootstrapSession session , final B2SessionService sessionService ) { } private DecouplingModelCache initModelCache ( BootstrapSession session , ResourceSet resourceSet ) { } private void storeModelCache ( BootstrapSession session , final DecouplingModelCache modelCache ) { } public void afterProjectBuild ( BootstrapSession session , MavenProject wrapperProject ) { } }

Fix:
moduleDependency . setVersionRange ( dependency . getBaseVersion ( ) ) ;
Buggy code:
public class CheckForNewMessagesCommand extends Command { IMAPFolder imapFolder ; private Action action ; public CheckForNewMessagesCommand ( Action action , ICommandReference reference ) { } public void execute ( IWorkerStatusController worker ) throws Exception { IMailFolderCommandReference r = ( ( IMailFolderCommandReference ) ( getReference ( ) ) ) ; imapFolder = ( ( IMAPFolder ) ( r . getSourceFolder ( ) ) ) ; ( ( StatusObservableImpl ) ( imapFolder . getObservable ( ) ) ) . setWorker ( worker ) ; int total = imapFolder . getMessageFolderInfo ( ) . getExists ( ) ; try { <START_BUG> imapFolder . ensureFolderIsSynced ( false ) ; <END_BUG> } catch ( IOException e ) { worker . cancel ( ) ; throw new CommandCancelledException ( e ) ; } int newTotal = imapFolder . getMessageFolderInfo ( ) . getExists ( ) ; if ( newTotal != total ) { if ( ( ( org . columba . mail . folder . imap . IMAPRootFolder ) ( imapFolder . getRootFolder ( ) ) ) . getAccountItem ( ) . getImapItem ( ) . getBoolean ( "enable_sound" ) ) { Toolkit kit = Toolkit . getDefaultToolkit ( ) ; kit . beep ( ) ; } } } public void updateGUI ( ) throws Exception { } }

Fix:
imapFolder . ensureFolderIsSynced ( false , false ) ;
Buggy code:
public class MinAccumulator implements Accumulator < Double > { private Double min = Double . POSITIVE_INFINITY ; @ Override public synchronized void add ( final Double value ) { } @ Override public synchronized Double getResult ( ) { } @ Override public synchronized void reset ( ) { <START_BUG> min = Double . MAX_VALUE ; <END_BUG> } }

Fix:
min = Double . POSITIVE_INFINITY ;
Buggy code:
public final class LLRReducerTest extends MahoutTestCase { private static final Logger log = LoggerFactory . getLogger ( LLRReducerTest . class ) ; private Context context ; private LLCallback ll ; private LLCallback cl ; @ Override @ Before public void setUp ( ) throws Exception { super . setUp ( ) ; context = EasyMock . createMock ( Context . class ) ; ll = EasyMock . createMock ( LLCallback . class ) ; cl = new LLCallback ( ) { @ Override <START_BUG> public double logLikelihoodRatio ( int k11 , int k12 , int k21 , int k22 ) { <END_BUG> LLRReducerTest . log . info ( "k11:{}<seq2seq4repair_space>k12:{}<seq2seq4repair_space>k21:{}<seq2seq4repair_space>k22:{}" , new Object [ ] { k11 , k12 , k21 , k22 } ) ; return LogLikelihood . logLikelihoodRatio ( k11 , k12 , k21 , k22 ) ; } } ; } @ Test public void testReduce ( ) throws Exception { } }

Fix:
public double logLikelihoodRatio ( long k11 , long k12 , long k21 , long k22 ) {
Buggy code:
public abstract class AbstractStreamServerService implements Service < AcceptingChannel < ? extends ConnectedStreamChannel > > { private final Logger log = Logger . getLogger ( "org.jboss.as.remoting" ) ; @ SuppressWarnings ( "rawtypes" ) private final InjectedValue < ServerAuthenticationProvider > authenticationProviderValue = new InjectedValue < ServerAuthenticationProvider > ( ) ; private final InjectedValue < OptionMap > optionMapInjectedValue = new InjectedValue < OptionMap > ( ) ; private final InjectedValue < Endpoint > endpointValue = new InjectedValue < Endpoint > ( ) ; private volatile AcceptingChannel < ? extends ConnectedStreamChannel > streamServer ; AbstractStreamServerService ( ) { } @ Override public AcceptingChannel < ? extends ConnectedStreamChannel > getValue ( ) throws IllegalArgumentException , IllegalStateException { } public InjectedValue < ServerAuthenticationProvider > getAuthenticationProviderInjector ( ) { } public InjectedValue < OptionMap > getOptionMapInjectedValue ( ) { } public InjectedValue < Endpoint > getEndpointInjector ( ) { } @ Override public void start ( final StartContext context ) throws StartException { try { NetworkServerProvider networkServerProvider = endpointValue . getValue ( ) . getConnectionProviderInterface ( "remote" , NetworkServerProvider . class ) ; ServerAuthenticationProvider sap = authenticationProviderValue . getValue ( ) ; OptionMap options = optionMapInjectedValue . getValue ( ) ; <START_BUG> streamServer = networkServerProvider . createServer ( getSocketAddress ( ) , options , sap ) ; <END_BUG> log . infof ( "Listening<seq2seq4repair_space>on<seq2seq4repair_space>%s" , getSocketAddress ( ) ) ; } catch ( BindException e ) { throw new StartException ( ( ( ( e . getMessage ( ) ) + "<seq2seq4repair_space>" ) + ( getSocketAddress ( ) ) ) , e ) ; } catch ( Exception e ) { throw new StartException ( e ) ; } } @ Override public void stop ( StopContext context ) { } abstract InetSocketAddress getSocketAddress ( ) { } }

Fix:
streamServer = networkServerProvider . createServer ( getSocketAddress ( ) , options , sap , null ) ;
Buggy code:
public class Transformation { private final Vector3 position ; private final Quaternion rotation ; private final Vector3 scale ; public Transformation ( Vector3 position , Quaternion rotation , Vector3 scale ) { } public Transformation transformTo ( Vector3 position , Quaternion rotation , Vector3 scale ) { <START_BUG> return new Transformation ( this . position . add ( position ) , this . rotation . add ( rotation ) , this . scale . multiply ( scale ) ) ; <END_BUG> } public FloatBuffer asFloatBuffer ( ) { } }

Fix:
return new Transformation ( this . position . add ( position ) , this . rotation . applyTo ( rotation ) , this . scale . multiply ( scale ) ) ;
Buggy code:
public class JavaBuilder extends IncrementalProjectBuilder { public static final boolean SAVE_ENABLED = true ; public JavaBuilder ( ) { } protected IProject [ ] build ( int kind , Map map , IProgressMonitor monitor ) throws CoreException { } protected Hashtable checkIncrementalBuild ( IProgressMonitor monitor ) throws CoreException { } protected boolean classpathChanged ( IState lastBuiltState ) throws CoreException { } protected void fullBuild ( JavaDevelopmentContextImpl dc , IProgressMonitor monitor ) throws CoreException { IProject project = getProject ( ) ; IProblemReporter problemReporter = new MarkerProblemReporter ( project , dc ) ; problemReporter . removeProblems ( project ) ; <START_BUG> ConfigurableOption [ ] options = org . eclipse . jdt . internal . core . JavaModelManager . convertConfigurableOptions ( JavaCore . getOptions ( ) ) ; <END_BUG> setLastBuiltState ( null ) ; IImageBuilder builder = dc . createState ( project , null , problemReporter , options ) ; setLastBuiltState ( builder . getNewState ( ) ) ; } protected JavaDevelopmentContextImpl getDevelopmentContext ( ) { } protected IJavaProject getJavaProject ( ) { } protected IState getLastBuiltState ( IProgressMonitor monitor ) { } public IProblemFactory getProblemFactory ( Locale locale ) { } protected IProject [ ] getRequiredProjects ( IState state ) { } protected void incrementalBuild ( JavaDevelopmentContextImpl dc , Hashtable deltas , IProgressMonitor monitor ) throws CoreException { } protected boolean isEmpty ( IResourceDelta change ) { } protected boolean needIncrementalBuild ( StateImpl oldState , Hashtable deltas ) throws CoreException { } protected boolean outputLocationChanged ( IState lastBuiltState ) throws CoreException { } protected void setLastBuiltState ( IState state ) { } public String toString ( ) { } }

Fix:
ConfigurableOption [ ] options = JavaModelManager . getOptions ( ) ;
Buggy code:
public class AntBot { public static void main ( String [ ] args ) throws IOException { <START_BUG> File program = new File ( "C:\\Users\\Felix\\Documents\\TeamProjekt\\AntBotsProject\\attackbot.cmd" ) ; <END_BUG> if ( ! ( program . exists ( ) ) ) { System . err . println ( ( "File<seq2seq4repair_space>not<seq2seq4repair_space>found!<seq2seq4repair_space>" + program ) ) ; return ; } ProcessBuilder builder = new ProcessBuilder ( "cmd" , "//c" , "start" , program . toString ( ) ) ; builder . redirectErrorStream ( true ) ; System . out . println ( "Starting<seq2seq4repair_space>process..." ) ; Process process = builder . start ( ) ; InputStream stream = process . getInputStream ( ) ; System . out . println ( "Reading<seq2seq4repair_space>output:" ) ; int i ; while ( ( i = stream . read ( ) ) > ( - 1 ) ) { System . out . print ( ( ( char ) ( i ) ) ) ; } System . out . println ( ( "\r\nProcess<seq2seq4repair_space>exited<seq2seq4repair_space>with<seq2seq4repair_space>code<seq2seq4repair_space>" + ( process . exitValue ( ) ) ) ) ; } }

Fix:
File program = new File ( "C:\\Users\\Felix\\Documents\\TeamProjekt\\AntBotsProject\\collectFoodBot.cmd" ) ;
Buggy code:
public class BcelObjectType extends AbstractReferenceTypeDelegate { private JavaClass javaClass ; private boolean isObject = false ; private LazyClassGen lazyClassGen = null ; private ResolvedTypeX [ ] interfaces = null ; private ResolvedTypeX superClass = null ; private ResolvedMember [ ] fields = null ; private ResolvedMember [ ] methods = null ; private ResolvedTypeX [ ] annotationTypes = null ; private AnnotationX [ ] annotations = null ; private boolean isUnpacked = false ; private ResolvedPointcutDefinition [ ] pointcuts = null ; private PerClause perClause = null ; private WeaverStateInfo weaverState = null ; private WeaverVersionInfo wvInfo = null ; private List typeMungers = Collections . EMPTY_LIST ; private List declares = Collections . EMPTY_LIST ; private ResolvedMember [ ] privilegedAccess = null ; private boolean discoveredWhetherAnnotationStyle = false ; private boolean isAnnotationStyleAspect = false ; private boolean isCodeStyleAspect = false ; public Collection getTypeMungers ( ) { } public Collection getDeclares ( ) { } public Collection getPrivilegedAccesses ( ) { } BcelObjectType ( ReferenceType resolvedTypeX , JavaClass javaClass , boolean exposedToWeaver ) { } public void setJavaClass ( JavaClass newclass ) { } public int getModifiers ( ) { } public ResolvedTypeX getSuperclass ( ) { } public ResolvedTypeX [ ] getDeclaredInterfaces ( ) { } public ResolvedMember [ ] getDeclaredMethods ( ) { } public ResolvedMember [ ] getDeclaredFields ( ) { } public ResolvedMember [ ] getDeclaredPointcuts ( ) { } public void addPointcutDefinition ( ResolvedPointcutDefinition d ) { } public boolean isAspect ( ) { } public boolean isAnnotationStyleAspect ( ) { } private void unpackAspectAttributes ( ) { } private void processAttributes ( List attributeList , List pointcuts , boolean fromAnnotations ) { } public PerClause getPerClause ( ) { } JavaClass getJavaClass ( ) { } public void resetState ( ) { } public void finishedWith ( ) { } public WeaverStateInfo getWeaverState ( ) { } void setWeaverState ( WeaverStateInfo weaverState ) { } public void printWackyStuff ( PrintStream out ) { } public LazyClassGen getLazyClassGen ( ) { } public boolean isInterface ( ) { } public boolean isEnum ( ) { } public boolean isAnnotation ( ) { } public void addAnnotation ( AnnotationX annotation ) { } public boolean isAnnotationWithRuntimeRetention ( ) { } public boolean isSynthetic ( ) { } public ISourceLocation getSourceLocation ( ) { <START_BUG> return getResolvedTypeX ( ) . getSourceContext ( ) . makeSourceLocation ( 0 ) ; <END_BUG> } public WeaverVersionInfo getWeaverVersionAttribute ( ) { } public void addParent ( ResolvedTypeX newParent ) { } public boolean hasAnnotation ( TypeX ofType ) { } private void ensureAnnotationTypesRetrieved ( ) { } public ResolvedTypeX [ ] getAnnotationTypes ( ) { } public AnnotationX [ ] getAnnotations ( ) { } public String getDeclaredGenericSignature ( ) { } }

Fix:
return getResolvedTypeX ( ) . getSourceContext ( ) . makeSourceLocation ( 0 , 0 ) ;
Buggy code:
public class ManagedDMRContentWriteAttributeHandler implements OperationStepHandler { private final AttributeDefinition contentAttribute ; public ManagedDMRContentWriteAttributeHandler ( final AttributeDefinition contentAttribute ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ModelNode model = new ModelNode ( ) ; ModelNode synthOp = new ModelNode ( ) ; synthOp . get ( contentAttribute . getName ( ) ) . set ( operation . get ( VALUE ) ) ; contentAttribute . validateAndSet ( synthOp , model ) ; final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; resource . writeModel ( model ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class ShowViewMenuAction extends ShowPartPaneMenuAction { public ShowViewMenuAction ( IWorkbenchWindow window ) { } protected void initText ( ) { } protected void showMenu ( PartPane pane ) { <START_BUG> pane . showViewMenu ( ) ; <END_BUG> } protected void updateState ( ) { } }

Fix:
pane . showPaneMenu ( ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private Integer CameraCount ; private static int InitialCameraStart = 1 ; private static int MaxCams = 15 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected void Init ( ) { } protected void addCamera ( ) { } protected void removeCamera ( ) { } protected int [ ] CalculateMinimumFrame ( ) { } protected void SetUpValues ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; View parentLayout = findViewById ( Main ) ; switch ( id ) { case id . action_about : Snackbar . make ( parentLayout , "Created<seq2seq4repair_space>by<seq2seq4repair_space>Daniel<seq2seq4repair_space>Quintero,<seq2seq4repair_space>idea<seq2seq4repair_space>by<seq2seq4repair_space>Roberto<seq2seq4repair_space>Brambila" , LENGTH_LONG ) . show ( ) ; return true ; case id . Email : <START_BUG> Snackbar . make ( parentLayout , "danielquintero@eagles.ewu.edu" , LENGTH_LONG ) . show ( ) ; <END_BUG> return true ; } return super . onOptionsItemSelected ( item ) ; } @ Override protected void onSaveInstanceState ( Bundle outState ) { } protected void Restore ( int cameraCount , ArrayList < Integer > values ) { } }

Fix:
Snackbar . make ( parentLayout , "Daniel<seq2seq4repair_space>Quintero:<seq2seq4repair_space>danielquintero@eagles.ewu.edu\nRoberto<seq2seq4repair_space>Brambila:<seq2seq4repair_space>robertobrambila@gmail.com" , LENGTH_LONG ) . show ( ) ;
Buggy code:
public class SolverTest { @ Test public void returnTrueWhenGivenBoardIsSolvable ( ) { } @ Test public void returnsFalseWhenGivenBoardIsNotSolvable ( ) { } @ Test public void returnsFalseWhenBoardIsNotSolvable ( ) { } @ Test public void returnsTrueWhenBoardIsSolvable ( ) { } @ Test public void calculateAmountOfMovesRequiredToBuildTheFinalBoard ( ) { } @ Test public void whenBoardIsUnsolvableThenReturnsMinusOne ( ) { } @ Test public void returnsNullWhenBoardIsUnSolvable ( ) { } @ Test public void returnSolutionWhenBoardIsSolvable ( ) { int [ ] [ ] boardPrototype = new int [ ] [ ] { new int [ ] { 0 , 1 , 3 } , new int [ ] { 4 , 2 , 5 } , new int [ ] { 7 , 8 , 6 } } ; Board board = new Board ( boardPrototype ) ; Solver solver = new Solver ( board ) ; ArrayList < Board > solution = ( ( ArrayList < Board > ) ( solver . solution ( ) ) ) ; <START_BUG> assertThat ( solution . size ( ) ) . isEqualTo ( 4 ) ; <END_BUG> } @ Test ( expected = NullPointerException . class ) public void constructorsThrowsNullPointerExceptionWhenArgumentIsNull ( ) { } }

Fix:
assertThat ( solution . size ( ) ) . isEqualTo ( 5 ) ;
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 310 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 311 , LocalizedFormats . values ( ) . length ) ;