nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FlatFileResourceFileLocationDB implements ResourceFileLocationDB { private static final Logger LOGGER = Logger . getLogger ( FlatFileResourceFileLocationDB . class . getName ( ) ) ; private String path = null ; private FlatFile flatFile = null ; private String delimiter = "\t" ; public void addNameUrl ( String name , String url ) throws IOException { } public long getCurrentMark ( ) throws IOException { } public CloseableIterator < String > getNamesBetweenMarks ( long start , long end ) throws IOException { } @ SuppressWarnings ( "unchecked" ) public String [ ] nameToUrls ( String name ) throws IOException { ArrayList < String > urls = new ArrayList < String > ( ) ; String prefix = name + ( delimiter ) ; Iterator < String > itr = flatFile . getRecordIterator ( prefix ) ; while ( itr . hasNext ( ) ) { String line = itr . next ( ) ; if ( line . startsWith ( prefix ) ) { urls . add ( line . substring ( prefix . length ( ) ) ) ; } else { break ; } } <START_BUG> if ( ( ( ( urls . size ( ) ) == 0 ) && ( ( name . indexOf ( "?" ) ) == ( - 1 ) ) ) && ( ! ( name . endsWith ( "//" ) ) ) ) { <END_BUG> prefix = ( name + "//" ) + ( delimiter ) ; itr = flatFile . getRecordIterator ( ( prefix + "" ) ) ; while ( itr . hasNext ( ) ) { String line = itr . next ( ) ; if ( line . startsWith ( prefix ) ) { urls . add ( line . substring ( prefix . length ( ) ) ) ; } else { break ; } } } else if ( ( ( name . indexOf ( "?" ) ) == ( - 1 ) ) && ( name . endsWith ( "//" ) ) ) { prefix = ( name . substring ( 0 , ( ( name . length ( ) ) - 1 ) ) ) + ( delimiter ) ; itr = flatFile . getRecordIterator ( ( prefix + "" ) ) ; while ( itr . hasNext ( ) ) { String line = itr . next ( ) ; if ( line . startsWith ( prefix ) ) { urls . add ( line . substring ( prefix . length ( ) ) ) ; } else { break ; } } } if ( itr instanceof CloseableIterator ) { CloseableIterator < String > citr = ( ( CloseableIterator < String > ) ( itr ) ) ; citr . close ( ) ; } if ( ( urls . size ( ) ) == 0 ) { FlatFileResourceFileLocationDB . LOGGER . info ( ( ( ( "No<seq2seq4repair_space>locations<seq2seq4repair_space>for<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( path ) ) ) ; } String [ ] a = new String [ urls . size ( ) ] ; for ( int i = 0 ; i < ( urls . size ( ) ) ; i ++ ) { a [ i ] = urls . get ( i ) ; } return a ; } public void removeNameUrl ( String name , String url ) throws IOException { } public void shutdown ( ) throws IOException { } public void setPath ( String path ) { } public String getPath ( ) { } public void setDelimiter ( String delimiter ) { } public String getDelimiter ( ) { } }

Fix:
if ( ( ( name . indexOf ( "?" ) ) == ( - 1 ) ) && ( ! ( name . endsWith ( "//" ) ) ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class RemoteCallWhileShuttingDownTestCase { private static final Logger logger = Logger . getLogger ( RemoteCallWhileShuttingDownTestCase . class ) ; public static final String DEP1 = "dep1" ; public static final String CONTAINER = "default-jbossas" ; @ ArquillianResource private ContainerController container ; @ ArquillianResource private Deployer deployer ; private static Context context ; private static ContextSelector < EJBClientContext > previousClientContextSelector ; @ BeforeClass public static void beforeClass ( ) throws Exception { } @ AfterClass public static void afterClass ( ) { } @ Deployment ( name = RemoteCallWhileShuttingDownTestCase . DEP1 , managed = false , testable = false ) public static Archive createContainer1Deployment ( ) { } @ Test public void testServerShutdownRemoteCall ( ) throws Exception { this . container . start ( RemoteCallWhileShuttingDownTestCase . CONTAINER ) ; final ModelControllerClient client = TestSuiteEnvironment . getModelControllerClient ( ) ; <START_BUG> ManagementClient managementClient = new ManagementClient ( client , TestSuiteEnvironment . getServerAddress ( ) , TestSuiteEnvironment . getServerPort ( ) ) ; <END_BUG> try { this . deployer . deploy ( RemoteCallWhileShuttingDownTestCase . DEP1 ) ; RemoteLatch latch = ( ( RemoteLatch ) ( RemoteCallWhileShuttingDownTestCase . context . lookup ( ( "ejb://dep1//LatchBean!" + ( RemoteLatch . class . getName ( ) ) ) ) ) ) ; final ModelNode op = new ModelNode ( ) ; op . get ( ADDRESS ) ; op . get ( OP_ADDR ) . set ( new ModelNode ( ) ) ; op . get ( OP ) . set ( SHUTDOWN ) ; ManagementOperations . executeOperation ( client , op ) ; Thread . sleep ( 1000 ) ; Assert . assertEquals ( "Real<seq2seq4repair_space>hello" , latch . getEchoMessage ( ) ) ; latch . testDone ( ) ; while ( managementClient . isServerInRunningState ( ) ) { Thread . sleep ( 50 ) ; } } finally { try { if ( ! ( managementClient . isServerInRunningState ( ) ) ) { container . start ( RemoteCallWhileShuttingDownTestCase . CONTAINER ) ; } this . deployer . undeploy ( RemoteCallWhileShuttingDownTestCase . DEP1 ) ; this . container . stop ( RemoteCallWhileShuttingDownTestCase . CONTAINER ) ; } catch ( Exception e ) { RemoteCallWhileShuttingDownTestCase . logger . warn ( "Exception<seq2seq4repair_space>during<seq2seq4repair_space>container<seq2seq4repair_space>shutdown" , e ) ; } client . close ( ) ; } } private static ContextSelector < EJBClientContext > setupEJBClientContextSelector ( ) throws IOException { } }

Fix:
ManagementClient managementClient = new ManagementClient ( client , TestSuiteEnvironment . getServerAddress ( ) , TestSuiteEnvironment . getServerPort ( ) , "http-remoting" ) ;
Buggy code:
public class SwitchStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( SwitchStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildListPropertyDescriptor STATEMENTS_PROPERTY = new ChildListPropertyDescriptor ( SwitchStatement . class , "statements" , Statement . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; private ASTNode . NodeList statements = new ASTNode . NodeList ( SwitchStatement . STATEMENTS_PROPERTY ) ; SwitchStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { if ( ( this . expression ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . expression ) == null ) { preLazyInit ( ) ; this . expression = new SimpleName ( this . ast ) ; postLazyInit ( this . expression , SwitchStatement . EXPRESSION_PROPERTY ) ; } } } return this . expression ; } public void setExpression ( Expression expression ) { } public List statements ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class IteratingRow extends AbstractIterator < IColumn > implements Comparable < IteratingRow > { private final DecoratedKey key ; private final long finishedAt ; private final BufferedRandomAccessFile file ; private SSTableReader sstable ; private long dataStart ; private final IPartitioner partitioner ; public IteratingRow ( BufferedRandomAccessFile file , SSTableReader sstable ) throws IOException { } public DecoratedKey getKey ( ) { } public String getPath ( ) { } public void echoData ( DataOutput out ) throws IOException { } public ColumnFamily getColumnFamily ( ) throws IOException { } public void skipRemaining ( ) throws IOException { } public long getEndPosition ( ) { } protected IColumn computeNext ( ) { } public int compareTo ( IteratingRow o ) { <START_BUG> return partitioner . getDecoratedKeyComparator ( ) . compare ( key , o . key ) ; <END_BUG> } }

Fix:
return key . compareTo ( o . key ) ;
Buggy code:
public class SpringFrameworkTest extends WebTestCase { public SpringFrameworkTest ( String name ) { } public void setUp ( ) throws Exception { } public void testHomePage ( ) { beginAt ( "//spring" ) ; <START_BUG> assertTitleEquals ( "Wicket:<seq2seq4repair_space>Spring<seq2seq4repair_space>integration<seq2seq4repair_space>example" ) ; <END_BUG> } public static Test suite ( ) { } }

Fix:
assertTitleEquals ( "Wicket<seq2seq4repair_space>Examples<seq2seq4repair_space>-<seq2seq4repair_space>springframework" ) ;
Buggy code:
public class PageAndComponentProvider extends PageProvider implements IPageAndComponentProvider { private IRequestableComponent component ; private String componentPath ; public PageAndComponentProvider ( IRequestablePage page , String componentPath ) { } public PageAndComponentProvider ( IRequestablePage page , IRequestableComponent component ) { } public PageAndComponentProvider ( Class < ? extends IRequestablePage > pageClass , PageParameters pageParameters , String componentPath ) { } public PageAndComponentProvider ( Class < ? extends IRequestablePage > pageClass , String componentPath ) { } public PageAndComponentProvider ( int pageId , Class < ? extends IRequestablePage > pageClass , Integer renderCount , String componentPath ) { } public PageAndComponentProvider ( int pageId , Class < ? extends IRequestablePage > pageClass , PageParameters pageParameters , Integer renderCount , String componentPath ) { } public PageAndComponentProvider ( int pageId , Integer renderCount , String componentPath ) { } public IRequestableComponent getComponent ( ) { if ( ( component ) == null ) { IRequestablePage page = getPageInstance ( ) ; component = page . get ( componentPath ) ; if ( ( component ) == null ) { <START_BUG> if ( ( getPageId ( ) ) == null ) { <END_BUG> Page p = ( ( Page ) ( page ) ) ; p . internalInitialize ( ) ; p . internalPrepareForRender ( false ) ; component = page . get ( componentPath ) ; } } } if ( ( component ) == null ) { throw new ComponentNotFoundException ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>component<seq2seq4repair_space>'" + ( componentPath ) ) + "'<seq2seq4repair_space>on<seq2seq4repair_space>page<seq2seq4repair_space>'" ) + ( getPageClass ( ) ) ) ) ; } return component ; } public String getComponentPath ( ) { } private void setComponentPath ( String componentPath ) { } }

Fix:
if ( page . isPageStateless ( ) ) {
Buggy code:
public class DatacenterWriteResponseHandler extends WriteResponseHandler { private final AtomicInteger blockFor ; private final DatacenterEndpointSnitch endpointsnitch ; private final InetAddress localEndpoint ; public DatacenterWriteResponseHandler ( int blockFor , String table ) { } @ Override public void response ( Message message ) { int b = - 1 ; try { <START_BUG> if ( endpointsnitch . isInSameDataCenter ( localEndpoint , message . getFrom ( ) ) ) { <END_BUG> b = blockFor . decrementAndGet ( ) ; } } catch ( UnknownHostException e ) { throw new RuntimeException ( e ) ; } responses . add ( message ) ; if ( b == 0 ) { condition . signal ( ) ; } if ( logger . isDebugEnabled ( ) ) logger . debug ( ( "Processed<seq2seq4repair_space>Message:<seq2seq4repair_space>" + ( message . toString ( ) ) ) ) ; } }

Fix:
if ( endpointsnitch . getDatacenter ( localEndpoint ) . equals ( endpointsnitch . getDatacenter ( message . getFrom ( ) ) ) ) {
Buggy code:
public abstract class Openable extends JavaElement implements IBufferChangedListener , IOpenable { protected Openable ( JavaElement parent , String name ) { } public void bufferChanged ( BufferChangedEvent event ) { } protected abstract boolean buildStructure ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } public boolean canBeRemovedFromCache ( ) { } public boolean canBufferBeRemovedFromCache ( IBuffer buffer ) { } protected void closeBuffer ( ) { } protected void closing ( Object info ) throws JavaModelException { } protected void codeComplete ( ICompilationUnit cu , ICompilationUnit unitToSkip , int position , ICompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException { } protected IJavaElement [ ] codeSelect ( ICompilationUnit cu , int offset , int length , WorkingCopyOwner owner ) throws JavaModelException { } protected Object createElementInfo ( ) { } protected void generateInfos ( Object info , HashMap newElements , IProgressMonitor monitor ) throws JavaModelException { } public IBuffer getBuffer ( ) throws JavaModelException { } public IBufferFactory getBufferFactory ( ) { } protected BufferManager getBufferManager ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IOpenable getOpenable ( ) { } public IResource getUnderlyingResource ( ) throws JavaModelException { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean hasUnsavedChanges ( ) throws JavaModelException { } public boolean isConsistent ( ) throws JavaModelException { } public boolean isOpen ( ) { } protected boolean isSourceElement ( ) { } public void makeConsistent ( IProgressMonitor monitor ) throws JavaModelException { } public void open ( IProgressMonitor pm ) throws JavaModelException { } protected IBuffer openBuffer ( IProgressMonitor pm , Object info ) throws JavaModelException { } protected void openParent ( Object childInfo , HashMap newElements , IProgressMonitor pm ) throws JavaModelException { } protected boolean parentExists ( ) { } protected boolean resourceExists ( ) { } public void save ( IProgressMonitor pm , boolean force ) throws JavaModelException { <START_BUG> if ( ( isReadOnly ( ) ) || ( this . getResource ( ) . isReadOnly ( ) ) ) { <END_BUG> throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . READ_ONLY , this ) ) ; } IBuffer buf = getBuffer ( ) ; if ( buf != null ) { buf . save ( pm , force ) ; this . makeConsistent ( pm ) ; } } public PackageFragmentRoot getPackageFragmentRoot ( ) { } protected void codeComplete ( ICompilationUnit cu , ICompilationUnit unitToSkip , int position , final ICodeCompletionRequestor requestor ) throws JavaModelException { } }

Fix:
if ( isReadOnly ( ) ) {
Buggy code:
public class ViewMessageCommand extends Command implements ISelectionListener { private Flags flags ; private IMailbox srcFolder ; private Object uid ; private IFrameMediator mediator ; private boolean updateGui ; public ViewMessageCommand ( IFrameMediator mediator , ICommandReference reference ) { } public void updateGUI ( ) throws Exception { } public void execute ( IWorkerStatusController wsc ) throws Exception { if ( ! ( updateGui ) ) return ; IMailFolderCommandReference r = ( ( IMailFolderCommandReference ) ( getReference ( ) ) ) ; srcFolder = ( ( IMailbox ) ( r . getSourceFolder ( ) ) ) ; ( ( StatusObservableImpl ) ( srcFolder . getObservable ( ) ) ) . setWorker ( wsc ) ; uid = r . getUids ( ) [ 0 ] ; if ( ! ( srcFolder . exists ( uid ) ) ) { return ; } try { flags = srcFolder . getFlags ( uid ) ; } catch ( FolderInconsistentException ex ) { Object [ ] options = new String [ ] { MailResourceLoader . getString ( "" , "global" , "ok" ) . replaceAll ( "&" , "" ) } ; <START_BUG> int result = JOptionPane . showOptionDialog ( null , MailResourceLoader . getString ( "dialog" , "error" , "message_deleted" ) , "Error" , JOptionPane . DEFAULT_OPTION , JOptionPane . ERROR_MESSAGE , null , options , options [ 0 ] ) ; <END_BUG> CommandProcessor . getInstance ( ) . addOp ( new org . columba . mail . gui . table . command . ViewHeaderListCommand ( mediator , r ) ) ; return ; } IMessageController messageController = ( ( org . columba . mail . gui . frame . MessageViewOwner ) ( mediator ) ) . getMessageController ( ) ; messageController . showMessage ( srcFolder , uid ) ; restartMarkAsReadTimer ( flags , messageController , r ) ; } private void restartMarkAsReadTimer ( Flags flags , IMessageController messageController , IMailFolderCommandReference r ) throws Exception { } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
JOptionPane . showOptionDialog ( null , MailResourceLoader . getString ( "dialog" , "error" , "message_deleted" ) , "Error" , JOptionPane . DEFAULT_OPTION , JOptionPane . ERROR_MESSAGE , null , options , options [ 0 ] ) ;
Buggy code:
public class RarConfigProcessor implements DeploymentUnitProcessor { private static ModuleIdentifier JAVAX_ID = ModuleIdentifier . create ( "javax.resource.api" ) ; private static ModuleIdentifier LOGGING_ID = ModuleIdentifier . create ( "org.jboss.logging" ) ; private static ModuleIdentifier IRON_JACAMAR_ID = ModuleIdentifier . create ( "org.jboss.ironjacamar.api" ) ; private static ModuleIdentifier IRON_JACAMAR_IMPL_ID = ModuleIdentifier . create ( "org.jboss.ironjacamar.impl" ) ; private static ModuleIdentifier NAMING_ID = ModuleIdentifier . create ( "org.jboss.as.naming" ) ; private static ModuleIdentifier VALIDATION_ID = ModuleIdentifier . create ( "javax.validation.api" ) ; private static ModuleIdentifier HIBERNATE_VALIDATOR_ID = ModuleIdentifier . create ( "org.hibernate.validator" ) ; private static ModuleIdentifier COMMON_CORE_ID = ModuleIdentifier . create ( "org.jboss.common-core" ) ; private static ModuleIdentifier SYSTEM_ID = ModuleIdentifier . create ( "javax.api" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { <START_BUG> if ( ( phaseContext . getAttachment ( ATTACHMENT_KEY ) ) == null ) { <END_BUG> return ; } phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . JAVAX_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . LOGGING_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . IRON_JACAMAR_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . IRON_JACAMAR_IMPL_ID , false , true ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . SYSTEM_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . NAMING_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . VALIDATION_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . HIBERNATE_VALIDATOR_ID , false , false ) ) ; phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , new org . jboss . as . deployment . module . ModuleDependency ( RarConfigProcessor . COMMON_CORE_ID , false , false ) ) ; } public void undeploy ( final DeploymentUnitContext context ) { } }

Fix:
if ( ( phaseContext . getDeploymentUnitContext ( ) . getAttachment ( ATTACHMENT_KEY ) ) == null ) {
Buggy code:
public class StreamingService implements StreamingServiceMBean { private static final Logger logger = LoggerFactory . getLogger ( StreamingService . class ) ; public static final String MBEAN_OBJECT_NAME = "org.apache.cassandra.service:type=StreamingService" ; public static final StreamingService instance = new StreamingService ( ) ; private StreamingService ( ) { } public String getStatus ( ) { } public Set < InetAddress > getStreamDestinations ( ) { } public List < String > getOutgoingFiles ( String host ) throws IOException { } public Set < InetAddress > getStreamSources ( ) { } public List < String > getIncomingFiles ( String host ) throws IOException { List < String > files = new ArrayList < String > ( ) ; for ( PendingFile pf : StreamInManager . getIncomingFiles ( InetAddress . getByName ( host ) ) ) { <START_BUG> files . add ( String . format ( "%s:<seq2seq4repair_space>%s" , pf . getDescriptor ( ) . ksname , pf . toString ( ) ) ) ; <END_BUG> } return files ; } }

Fix:
files . add ( String . format ( "%s:<seq2seq4repair_space>%s" , pf . desc . ksname , pf . toString ( ) ) ) ;
Buggy code:
public class ParentPathReferenceRewriter implements IRequestMapper { private final IProvider < String > escapeSequence ; private final IRequestMapper chain ; public ParentPathReferenceRewriter ( IRequestMapper chain , IProvider < String > escapeSequence ) { } public ParentPathReferenceRewriter ( IRequestMapper chain ) { } public IRequestHandler mapRequest ( Request request ) { Url url = request . getUrl ( ) ; if ( ( escapeSequence . get ( ) ) != null ) { for ( int i = 0 ; i < ( url . getSegments ( ) . size ( ) ) ; i ++ ) { if ( url . getSegments ( ) . get ( i ) . equals ( escapeSequence . get ( ) ) ) { url . getSegments ( ) . set ( i , ".." ) ; } } } <START_BUG> return chain . mapRequest ( request . requestWithUrl ( url ) ) ; <END_BUG> } public Url mapHandler ( IRequestHandler requestHandler ) { } public int getCompatibilityScore ( Request request ) { } }

Fix:
return chain . mapRequest ( request . cloneWithUrl ( url ) ) ;
Buggy code:
public abstract class Loop extends AbstractRepeater < Integer > { public static final class LoopItem extends WebMarkupContainer < Integer > { private static final long serialVersionUID = 1L ; private final int iteration ; private LoopItem ( MarkupContainer parent , final int iteration ) { } public int getIteration ( ) { } } public Loop ( MarkupContainer parent , final String id , final int iterations ) { } public Loop ( MarkupContainer parent , final String id , final IModel < Integer > model ) { } public final int getIterations ( ) { } @ Override protected void internalOnAttach ( ) { } protected Loop . LoopItem newItem ( int iteration ) { } @ Override protected final void onRender ( final MarkupStream markupStream ) { } protected abstract void populateItem ( Loop . LoopItem item ) { } protected void renderItem ( final Loop . LoopItem item ) { <START_BUG> item . render ( new MarkupStream ( getMarkupFragment ( ) ) ) ; <END_BUG> } }

Fix:
item . render ( ) ;
Buggy code:
public abstract class AbstractInterval implements ReadableInterval { protected AbstractInterval ( ) { } protected void checkInterval ( long start , long end ) { if ( end < start ) { <START_BUG> throw new IllegalArgumentException ( "The<seq2seq4repair_space>end<seq2seq4repair_space>instant<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>greater<seq2seq4repair_space>or<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>start" ) ; <END_BUG> } } public DateTime getStart ( ) { } public DateTime getEnd ( ) { } public boolean contains ( long millisInstant ) { } public boolean containsNow ( ) { } public boolean contains ( ReadableInstant instant ) { } public boolean contains ( ReadableInterval interval ) { } public boolean overlaps ( ReadableInterval interval ) { } public boolean isEqual ( ReadableInterval other ) { } public boolean isBefore ( long millisInstant ) { } public boolean isBeforeNow ( ) { } public boolean isBefore ( ReadableInstant instant ) { } public boolean isBefore ( ReadableInterval interval ) { } public boolean isAfter ( long millisInstant ) { } public boolean isAfterNow ( ) { } public boolean isAfter ( ReadableInstant instant ) { } public boolean isAfter ( ReadableInterval interval ) { } public Interval toInterval ( ) { } public MutableInterval toMutableInterval ( ) { } public long toDurationMillis ( ) { } public Duration toDuration ( ) { } public Period toPeriod ( ) { } public Period toPeriod ( PeriodType type ) { } public boolean equals ( Object readableInterval ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
throw new IllegalArgumentException ( "The<seq2seq4repair_space>end<seq2seq4repair_space>instant<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>greater<seq2seq4repair_space>the<seq2seq4repair_space>start" ) ;
Buggy code:
public class ANTLRTest extends TaskdefsTest { private static final String TASKDEFS_DIR = "src//etc//testcases//taskdefs//optional//antlr//" ; public ANTLRTest ( String name ) { } public void setUp ( ) { } public void test1 ( ) { } public void test2 ( ) { } public void test3 ( ) { } public void test4 ( ) { <START_BUG> expectBuildException ( "test4" , "ANTLR<seq2seq4repair_space>exited<seq2seq4repair_space>with<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>code<seq2seq4repair_space>of<seq2seq4repair_space>1<seq2seq4repair_space>(<seq2seq4repair_space>try<seq2seq4repair_space>forking<seq2seq4repair_space>)" ) ; <END_BUG> } public void test5 ( ) { } public void test6 ( ) { } public void test7 ( ) { } }

Fix:
executeTarget ( "test4" ) ;
Buggy code:
@ Configuration @ EnableWebSecurity public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter { @ Autowired @ Qualifier ( "userService" ) private UserService userService ; @ Override protected void configure ( HttpSecurity http ) throws Exception { http . csrf ( ) . disable ( ) ; <START_BUG> http . authorizeRequests ( ) . antMatchers ( "//" , "//home" , "//css//**" , "//scss//**" , "//images//**" , "//js//**" , "//webjars//**" , "//fonts//**" , "//register" , "//rest//**" , "//rest//register" , "//send-mail" , "//index.html" , "//about-us.html" , "//contact-us.html" , "//services.html" , "//blog.html" , "//send-mail" , "//register&login" ) . permitAll ( ) . antMatchers ( "//doctor" ) . hasRole ( "DOCTOR" ) . anyRequest ( ) . authenticated ( ) . and ( ) . formLogin ( ) . loginPage ( "//login" ) . permitAll ( ) . and ( ) . logout ( ) . permitAll ( ) . and ( ) . sessionManagement ( ) . maximumSessions ( 1 ) ; <END_BUG> } @ Autowired public void configureGlobal ( AuthenticationManagerBuilder auth ) throws Exception { } @ Bean public PasswordEncoder passwordEncoder ( ) { } }

Fix:
http . authorizeRequests ( ) . antMatchers ( "//" , "//home" , "//css//**" , "//scss//**" , "//images//**" , "//js//**" , "//webjars//**" , "//fonts//**" , "//register" , "//rest//**" , "//rest//register" , "//send-mail" , "//index.html" , "//about-us.html" , "//contact-us.html" , "//services.html" , "//blog.html" , "//send-mail" , "//register&login.html" , "//register&login" ) . permitAll ( ) . antMatchers ( "//doctor" ) . hasRole ( "DOCTOR" ) . anyRequest ( ) . authenticated ( ) . and ( ) . formLogin ( ) . loginPage ( "//login" ) . permitAll ( ) . and ( ) . logout ( ) . permitAll ( ) . and ( ) . sessionManagement ( ) . maximumSessions ( 1 ) ;
Buggy code:
public class TeacherloginController { public Hyperlink goBack ; public void goBack ( ) { Stage stage = ( ( Stage ) ( goBack . getScene ( ) . getWindow ( ) ) ) ; <START_BUG> stage . hide ( ) ; <END_BUG> } }

Fix:
stage . close ( ) ;
Buggy code:
public class ACAMP extends BasePacket implements IPacket { private static final int PREAMBLE = 1 ; private static final int HEADER_LENGTH = 16 ; public static final byte REGISTER_REQUEST = 17 ; public static final byte REGISTER_RESPONSE = 18 ; public static final byte DISCONNET_REQUEST = 19 ; public static final byte DISCONNET_RESPONSE = 20 ; public static final byte CONFIGURATION_REQUEST = 33 ; public static final byte CONFIGURATION_RESPONSE = 34 ; public static final byte CONFIGURATION_RESET_REQ = 35 ; public static final byte CONFIGURATION_RESET_RSP = 36 ; public static final byte STATISTIC_STAT_RP = 49 ; public static final byte STATISTIC_STAT_QUERY = 50 ; public static final byte STATISTIC_STAT_REPLY = 51 ; public static final byte STAT_REQUEST = 65 ; public static final byte STAT_RESPONSE = 66 ; private byte version ; private byte type ; private short apid ; private int sequenceNumber ; private short messageType ; private short messageLength ; @ Override public byte [ ] serialize ( ) { } @ Override public IPacket deserialize ( byte [ ] data , int offset , int length ) throws PacketParsingException { ByteBuffer bb = ByteBuffer . wrap ( data ) ; bb . getInt ( ) ; this . version = bb . get ( ) ; this . type = bb . get ( ) ; this . apid = bb . getShort ( ) ; this . sequenceNumber = bb . getInt ( ) ; this . messageType = bb . getShort ( ) ; this . messageLength = bb . getShort ( ) ; <START_BUG> if ( bb . hasArray ( ) ) { <END_BUG> ACAMPData acampData = new ACAMPData ( ) ; int payloadLength = length - ( ACAMP . HEADER_LENGTH ) ; byte [ ] payloadData = new byte [ payloadLength ] ; bb . get ( payloadData ) ; this . payload = acampData . deserialize ( payloadData , 0 , payloadLength ) ; } return this ; } public byte getVersion ( ) { } public ACAMP setVersion ( byte version ) { } public byte getType ( ) { } public ACAMP setType ( byte type ) { } public short getAPID ( ) { } public ACAMP setAPID ( short aPID ) { } public int getSequenceNumber ( ) { } public ACAMP setSequenceNumber ( int sequenceNumber ) { } public short getMessageType ( ) { } public ACAMP setMessageType ( short messageType ) { } public short getMessageLength ( ) { } public ACAMP setMessageLength ( short messageLength ) { } }

Fix:
if ( bb . hasRemaining ( ) ) {
Buggy code:
public class FileUtil { public static final String DEFAULT_URL_FILENAME = "index.html" ; public static void main ( String [ ] args ) { } public static Diffs dirDiffs ( final String label , final File dir , final long startTime , final String requiredSuffix , final String [ ] expectedPaths , final boolean acceptFilePrefix ) { } public static void visitZipEntries ( ZipFile zipfile , StringVisitor visitor ) { } public static void visitZipEntries ( ZipFile zipfile , StringVisitor visitor , StringBuffer errs ) { } public static void descendFileTree ( File file , FileFilter filter ) { } public static boolean descendFileTree ( File file , FileFilter fileFilter , boolean userRecursion ) { } public static Collection directoryToString ( File dir , Collection results ) { } public static Collection zipFileToString ( final File zipfile , Collection results ) { } public static boolean isZipFile ( File f ) { } public static String renderZipEntry ( File zipfile , ZipEntry entry ) { } public static boolean createJarFile ( File jarFile , File directory , String mainClass , FileFilter filter ) { } protected static Manifest createManifest ( String mainClass ) { } protected static void addFileToZip ( File in , File parent , ZipOutputStream out ) throws IOException { } public static void returnTempDir ( File dir ) { } public static boolean isResourcePath ( String path ) { } public static void render ( Throwable t , StringBuffer err ) { } private static boolean report ( StringBuffer err , String context , String status , Throwable throwable ) { } public static boolean copyFile ( File src , File dest , StringBuffer err ) { boolean result = false ; String label = "start" ; Throwable throwable = null ; try { if ( ! ( FILE_EXISTS . accept ( src ) ) ) { label = "src<seq2seq4repair_space>file<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ; } else { if ( dest . isDirectory ( ) ) { dest = new File ( dest , src . getName ( ) ) ; } if ( FILE_EXISTS . accept ( dest ) ) { label = "dest<seq2seq4repair_space>file<seq2seq4repair_space>exists" ; } boolean closeWhenDone = true ; result = FileUtil . copy ( new FileInputStream ( src ) , new FileOutputStream ( dest ) , closeWhenDone ) ; } label = null ; } catch ( Throwable t ) { throwable = t ; } String context = "FileUtil.copyFile(src,<seq2seq4repair_space>dest,<seq2seq4repair_space>err)" ; boolean report = FileUtil . report ( err , context , label , throwable ) ; <START_BUG> return result && report ; <END_BUG> } public static boolean copyURL ( URL url , File dest , StringBuffer err ) { } public static boolean copy ( InputStream src , OutputStream dest , boolean close ) throws IOException { } protected static boolean deleteDirectory ( File dir ) { } public static String [ ] getPaths ( File [ ] files ) { } protected static final FileFilter DELETE_DIRS = new FileFilter ( ) { public boolean accept ( File file ) { } } ; protected static final FileFilter DELETE_FILES = new FileFilter ( ) { public boolean accept ( File file ) { } } ; }

Fix:
return result && ( ! report ) ;
Buggy code:
public class InterpolatingAltitudeMap implements AltitudeMap { private AltitudeMap toWrap ; private double NUDGE = 0.25 ; public InterpolatingAltitudeMap ( AltitudeMap toWrap ) { } @ Override public double heightAt ( double x , double z ) { } @ Override public double getWidth ( ) { } @ Override public double getHeight ( ) { } public Vector3D normalAt ( double x , double z ) { final double magX = ( ( heightAt ( ( x - ( NUDGE ) ) , z ) ) - ( heightAt ( ( x + ( NUDGE ) ) , z ) ) ) // ( NUDGE ) ; final double magZ = ( ( heightAt ( x , ( z - ( NUDGE ) ) ) ) - ( heightAt ( x , ( z + ( NUDGE ) ) ) ) ) // ( NUDGE ) ; final double magY = Math . sqrt ( ( 1 - ( ( magX * magX ) + ( magZ * magZ ) ) ) ) ; <START_BUG> return new Vector3D ( magZ , magY , magX ) . normalize ( ) ; <END_BUG> } }

Fix:
return new Vector3D ( magX , magY , magZ ) . normalize ( ) ;
Buggy code:
public class MethodReferencePattern extends MethodPattern { public char [ ] [ ] [ ] allSuperDeclaringTypeNames ; public MethodReferencePattern ( char [ ] selector , int matchMode , boolean isCaseSensitive , char [ ] declaringQualification , char [ ] declaringSimpleName , char [ ] returnQualification , char [ ] returnSimpleName , char [ ] [ ] parameterQualifications , char [ ] [ ] parameterSimpleNames ) { } public void decodeIndexEntry ( IEntryResult entryResult ) { } public void feedIndexRequestor ( IIndexSearchRequestor requestor , int detailLevel , int [ ] references , IndexInput input , IJavaSearchScope scope ) throws IOException { } public String getPatternName ( ) { } public char [ ] indexEntryPrefix ( ) { } protected int matchContainer ( ) { } public void initializePolymorphicSearch ( MatchLocator locator , IJavaProject project , IProgressMonitor progressMonitor ) { } private boolean isVirtualInvoke ( MethodBinding method , MessageSend messageSend ) { } public int matchLevel ( AstNode node , boolean resolve ) { if ( ! ( node instanceof MessageSend ) ) return IMPOSSIBLE_MATCH ; MessageSend messageSend = ( ( MessageSend ) ( node ) ) ; if ( resolve ) { return this . matchLevel ( messageSend . binding , messageSend ) ; } else { if ( ( ( this . selector ) != null ) && ( ! ( this . matchesName ( this . selector , messageSend . selector ) ) ) ) return IMPOSSIBLE_MATCH ; int argumentCount = ( ( this . parameterSimpleNames ) == null ) ? - 1 : this . parameterSimpleNames . length ; if ( argumentCount > ( - 1 ) ) { int parameterCount = ( ( messageSend . arguments ) == null ) ? 0 : messageSend . arguments . length ; if ( parameterCount != argumentCount ) return IMPOSSIBLE_MATCH ; } <START_BUG> return POSSIBLE_MATCH ; <END_BUG> } } public int matchLevel ( Binding binding , MessageSend messageSend ) { } protected void matchReportReference ( AstNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } }

Fix:
return this . needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH ;
Buggy code:
public interface GeneticAlgorithm < O > { Solution < O > run ( Arguments arguments , StepProvider < O > provider ) ; class Default < O > implements GeneticAlgorithm < O > { @ Override public Solution < O > run ( Arguments arguments , StepProvider < O > provider ) { int iterations = 0 ; Population < O > population = provider . creator ( ) . create ( arguments ) ; while ( iterations < ( arguments . numIterations ( ) ) ) { Collection < O > children = provider . breeder ( ) . breed ( arguments , population ) ; children = provider . mutator ( ) . mutate ( arguments , children ) ; population . addAll ( children ) ; <START_BUG> provider . killer ( ) . kill ( arguments , population ) ; <END_BUG> iterations ++ ; } FitnessComparator < O > comparator = new FitnessComparator ( provider . fitter ( ) ) ; O bestOrganism = population . getAll ( ) . stream ( ) . max ( comparator ) . get ( ) ; Number bestFitness = provider . fitter ( ) . calculate ( bestOrganism ) ; return new Solution ( bestFitness , bestOrganism , population ) ; } } }

Fix:
population = provider . killer ( ) . kill ( arguments , population ) ;
Buggy code:
public final class Font extends Resource { public byte [ ] handle ; Font ( ) { } public Font ( Device device , FontData fd ) { } public Font ( Device device , FontData [ ] fds ) { } public Font ( Device device , String name , int height , int style ) { } public void dispose ( ) { } public boolean equals ( Object object ) { } public FontData [ ] getFontData ( ) { } public int hashCode ( ) { } public boolean isDisposed ( ) { } void init ( Device device , String name , int height , int style , byte [ ] stem ) { if ( height < 0 ) SWT . error ( ERROR_INVALID_ARGUMENT ) ; this . device = device ; if ( stem != null ) { handle = stem ; } else { byte [ ] description = Converter . wcsToMbcs ( null , name , true ) ; int osStyle = 0 ; if ( ( style & ( SWT . BOLD ) ) != 0 ) osStyle |= OS . PF_STYLE_BOLD ; if ( ( style & ( SWT . ITALIC ) ) != 0 ) osStyle |= OS . PF_STYLE_ITALIC ; byte [ ] buffer = new byte [ OS . MAX_FONT_TAG ] ; if ( ( OS . PfGenerateFontName ( description , osStyle , height , buffer ) ) != 0 ) handle = buffer ; if ( ( handle ) == null ) { <START_BUG> byte [ ] defaultFont = device . systemFont ; <END_BUG> int fontID = OS . PfDecomposeStemToID ( defaultFont ) ; if ( fontID != 0 ) { int desc = OS . PfFontDescription ( fontID ) ; int length = OS . strlen ( desc ) ; byte [ ] defaultFontName = new byte [ length + 1 ] ; OS . memmove ( defaultFontName , desc , length ) ; OS . PfFreeFont ( fontID ) ; if ( ( OS . PfGenerateFontName ( defaultFontName , osStyle , height , buffer ) ) != 0 ) handle = buffer ; } if ( ( handle ) == null ) handle = defaultFont ; } } if ( ( handle ) == null ) SWT . error ( ERROR_NO_HANDLES ) ; } public static Font photon_new ( Device device , byte [ ] stem ) { } public String toString ( ) { } }

Fix:
byte [ ] defaultFont = device . systemFont . handle ;
Buggy code:
public class MainActivity extends AppCompatActivity { private ViewPager viewPager ; private TabLayout tabLayout ; private Toolbar toolBarTop ; private Toolbar playingSongToolbar ; private TextView tabTitle ; private TextView selectedTrackTitle ; private TextView selectedTrackArtist ; private ImageView selectedAlbumCover ; private ImageView playerControl ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onPause ( ) { } @ Override protected void onDestroy ( ) { } @ Override protected void onResumeFragments ( ) { if ( ( ( MusicPlayerHelper . getInstance ( ) . getMediaPlayer ( ) ) != null ) && ( ( MusicPlayerHelper . getInstance ( ) . getMediaPlayer ( ) . isPlaying ( ) ) || ( MusicPlayerHelper . getInstance ( ) . getIsPaused ( ) ) ) ) { Intent intent = new Intent ( this , MediaPlayerService . class ) ; intent . setAction ( STOP_NOTIFICATION ) ; startService ( intent ) ; Song song = allSongsList . get ( MusicPlayerHelper . getInstance ( ) . getSongPosition ( ) ) ; selectedTrackTitle . setText ( song . getSongTitle ( ) ) ; selectedTrackArtist . setText ( song . getSongArtist ( ) ) ; <START_BUG> Log . e ( "Main<seq2seq4repair_space>Activity" , ( "Song<seq2seq4repair_space>state:<seq2seq4repair_space>" + ( MusicPlayerHelper . getInstance ( ) . getIsPaused ( ) ) ) ) ; <END_BUG> if ( MusicPlayerHelper . getInstance ( ) . getIsPaused ( ) ) { playerControl . setImageResource ( ic_media_play ) ; } else { Log . e ( "Main<seq2seq4repair_space>Activity" , "Getting<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>pause" ) ; playerControl . setImageResource ( ic_media_pause ) ; } MediaMetadataRetriever mmr = new MediaMetadataRetriever ( ) ; byte [ ] rawArt ; Bitmap art ; BitmapFactory . Options bfo = new BitmapFactory . Options ( ) ; Uri uri = song . getUri ( ) ; mmr . setDataSource ( this , uri ) ; try { rawArt = mmr . getEmbeddedPicture ( ) ; art = BitmapFactory . decodeByteArray ( rawArt , 0 , rawArt . length , bfo ) ; selectedAlbumCover . setImageBitmap ( art ) ; } catch ( Exception e ) { selectedAlbumCover . setImageResource ( ic_action_ic_default_cover ) ; } } super . onResumeFragments ( ) ; } private void setUpTabIcon ( ) { } private void setupViewPager ( ViewPager viewPager ) { } class ViewPagerAdapter extends FragmentPagerAdapter { private final List < Fragment > mFragmentList = new ArrayList < > ( ) ; private final List < String > mFragmentTitleList = new ArrayList < > ( ) ; public ViewPagerAdapter ( FragmentManager manager ) { } @ Override public Fragment getItem ( int position ) { } @ Override public int getCount ( ) { } public void addFragment ( Fragment fragment ) { } @ Override public CharSequence getPageTitle ( int position ) { } } }

Fix:
Log . e ( "Main<seq2seq4repair_space>Activity" , ( "Song<seq2seq4repair_space>playing:<seq2seq4repair_space>" + ( song . getSongTitle ( ) ) ) ) ;
Buggy code:
public class OpenMessageWithComposerCommand extends FolderCommand { protected ComposerController controller ; protected ComposerModel model ; protected MessageFolder folder ; protected Object uid ; public OpenMessageWithComposerCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( WorkerStatusController worker ) throws Exception { model = new ComposerModel ( ) ; folder = ( ( MessageFolder ) ( ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getFolder ( ) ) ) ; Object [ ] uids = ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getUids ( ) ; uid = uids [ 0 ] ; InputStream messageSourceStream = folder . getMessageSourceStream ( uid ) ; <START_BUG> Source tempSource = TempSourceFactory . createTempSource ( messageSourceStream , ( - 1 ) , null ) ; <END_BUG> messageSourceStream . close ( ) ; Message message = MessageParser . parse ( tempSource ) ; initHeader ( message ) ; Integer accountUid = ( ( Integer ) ( folder . getAttribute ( uids [ 0 ] , "columba.accountuid" ) ) ) ; AccountItem accountItem = MessageBuilderHelper . getAccountItem ( accountUid ) ; model . setAccountItem ( accountItem ) ; XmlElement html = config . getMainFrameOptionsConfig ( ) . getRoot ( ) . getElement ( "//options//html" ) ; boolean preferHtml = Boolean . valueOf ( html . getAttribute ( "prefer" ) ) . booleanValue ( ) ; initBody ( message , preferHtml ) ; } private void initBody ( Message message , boolean preferHtml ) throws Exception { } private void initHeader ( Message message ) { } private void initAttachments ( MimeTree collection , MimePart bodyPart ) { } }

Fix:
Source tempSource = TempSourceFactory . createTempSource ( messageSourceStream , ( - 1 ) ) ;
Buggy code:
public class TestP2PServer extends WCTestCase { private P2PServer serverb ; private P2PServer servera ; @ Override protected void setUp ( ) throws Exception { } public void testStartAndStop ( ) { } public void testAddSelfAsNode ( ) { } public void testNodeListener ( ) { } public void testCanDownload ( ) throws SAXException { } private String getTempPath ( ) { } public void testTwoNodes ( ) { log . info ( ( "time<seq2seq4repair_space>servera<seq2seq4repair_space>" + ( System . currentTimeMillis ( ) ) ) ) ; P2PServer servera = getServer ( ) ; log . info ( ( "time<seq2seq4repair_space>serverb<seq2seq4repair_space>" + ( System . currentTimeMillis ( ) ) ) ) ; <START_BUG> P2PServer serverb = getOtherServer ( ) ; <END_BUG> log . info ( "time<seq2seq4repair_space>getting<seq2seq4repair_space>servers<seq2seq4repair_space>done" ) ; try { log . info ( ( "time<seq2seq4repair_space>addnode<seq2seq4repair_space>" + ( System . currentTimeMillis ( ) ) ) ) ; final Node n = serverb . addNode ( new MHost ( "localhost" ) , servera . getPort ( ) ) ; log . info ( "time<seq2seq4repair_space>waiting" ) ; new ConditionWaiter ( new Condition ( ) { public boolean test ( ) { return n . isConnected ( ) ; } } , 20000 ) ; log . info ( ( "time<seq2seq4repair_space>check<seq2seq4repair_space>node<seq2seq4repair_space>" + ( System . currentTimeMillis ( ) ) ) ) ; assertNotNull ( n . getID ( ) ) ; log . info ( ( "time<seq2seq4repair_space>getrecmessages<seq2seq4repair_space>" + ( System . currentTimeMillis ( ) ) ) ) ; assertTrue ( ( ( n . getReceivedMessages ( ) ) > 0 ) ) ; } finally { log . info ( ( "time<seq2seq4repair_space>closing<seq2seq4repair_space>" + ( System . currentTimeMillis ( ) ) ) ) ; log . info ( "time<seq2seq4repair_space>closing" ) ; servera . forceClose ( ) ; serverb . forceClose ( ) ; } } public void testABConnection ( ) { } private void createTwoServers ( ) { } public void testBroadcast ( ) { } public void testReporting ( ) { } private P2PServer getOtherServer ( ) { } }

Fix:
P2PServer serverb = getOtherServerNoBind ( ) ;
Buggy code:
public class ConstrainedRewriteRelation { ConstrainedTerm finalTerm ; Optional < ConstrainedExecutionGraph > constrainedExecutionGraph ; public ConstrainedRewriteRelation ( ) { } public ConstrainedRewriteRelation ( ConstrainedTerm finalTerm , Optional < ConstrainedExecutionGraph > constrainedExecutionGraph ) { } public ConstrainedTerm getFinalTerm ( ) { } public void setFinalTerm ( ConstrainedTerm finalTerm ) { } public Optional < ConstrainedExecutionGraph > getConstrainedExecutionGraph ( ) { } public void setConstrainedExecutionGraph ( ConstrainedExecutionGraph constrainedExecutionGraph ) { <START_BUG> this . constrainedExecutionGraph = Optional . of ( constrainedExecutionGraph ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
this . constrainedExecutionGraph = Optional . ofNullable ( constrainedExecutionGraph ) ;
Buggy code:
public class YVMasm extends YVM { private int compteurChaine = 0 ; public YVMasm ( ) { } public YVMasm ( String name ) { } public String getFileExtension ( ) { } public void iadd ( ) { } public void isub ( ) { } public void imul ( ) { } public void idiv ( ) { } public void inot ( ) { } public void ineg ( ) { } public void iand ( ) { } public void ior ( ) { } public void iinf ( ) { } public void isup ( ) { } public void iinfegal ( ) { } public void isupegal ( ) { } public void iegal ( ) { } public void idiff ( ) { } public void iconst ( int valeur ) { } public void istore ( int offset ) { } public void iload ( int offset ) { } public void ifeq ( String etiquette ) { } public void iffaux ( String etiquette ) { } public void jump ( String etiquette ) { } public void entete ( ) { } public void ouvrePrinc ( int nbVar ) { } public void queue ( ) { } public void ecrireChaine ( String chaine ) { } public void ecrireEnt ( ) { } public void ecrireBool ( ) { } public void lireEnt ( int offset ) { Ecriture . ecrireStringln ( flux , ( ";lireEnt<seq2seq4repair_space>" + offset ) ) ; <START_BUG> Ecriture . ecrireStringln ( flux , "lea<seq2seq4repair_space>dx,[bp-4]" ) ; <END_BUG> Ecriture . ecrireStringln ( flux , "push<seq2seq4repair_space>dx" ) ; Ecriture . ecrireStringln ( flux , "call<seq2seq4repair_space>lirent" ) ; } public void aLaLigne ( ) { } }

Fix:
Ecriture . ecrireStringln ( flux , ( ( "lea<seq2seq4repair_space>dx,[bp" + offset ) + "]" ) ) ;