nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FTPConnection { private FileTransferClient ftpClient = null ; private int subDirectoryDepth = 0 ; private String ftpServerAddress = null ; private int ftpPort = 0 ; private String ftpUser = null ; private String ftpPassword = null ; public FTPConnection ( String [ ] credentials ) throws TipressException { } private boolean openConnection ( ) throws TipressException { ftpClient = new FileTransferClient ( ) ; try { ftpClient . setRemoteHost ( ftpServerAddress ) ; ftpClient . setUserName ( ftpUser ) ; ftpClient . setPassword ( ftpPassword ) ; ftpClient . setRemotePort ( ftpPort ) ; ftpClient . connect ( ) ; } catch ( FTPException | IOException e ) { <START_BUG> throw new TipressException ( "There<seq2seq4repair_space>was<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>loging<seq2seq4repair_space>into<seq2seq4repair_space>the<seq2seq4repair_space>FTP-Login!<seq2seq4repair_space>No<seq2seq4repair_space>files<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>uploaded<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>FTP-Server." , "FTP-Login<seq2seq4repair_space>-<seq2seq4repair_space>Error" , TipressException . ERROR ) ; <END_BUG> } return true ; } public void uploadFile ( FTPFile file ) throws TipressException { } public void uploadFile ( File inputFile , File outputFile ) throws TipressException { } public void downloadFile ( File toDownload , File outputFile ) throws TipressException { } public boolean reconnect ( ) { } public void changeDirectory ( String directory ) throws TipressException { } public void changeToRootDirectory ( ) throws TipressException { } public void deleteFile ( File remoteFile ) throws TipressException { } public boolean close ( ) { } }

Fix:
throw new TipressException ( "There<seq2seq4repair_space>was<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>loging<seq2seq4repair_space>into<seq2seq4repair_space>the<seq2seq4repair_space>FTP-Login!<seq2seq4repair_space>No<seq2seq4repair_space>files<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>uploaded<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>FTP-Server." , "FTP-Login<seq2seq4repair_space>-<seq2seq4repair_space>Error" , TipressException . FATAL_ERROR ) ;
Buggy code:
public class ApiHelper { private final Token accessToken ; private final KhanOAuthService oauthService ; private final KhanAcademyApi api ; private final Gson gson = new GsonBuilder ( ) . setFieldNamingPolicy ( FieldNamingPolicy . LOWER_CASE_WITH_UNDERSCORES ) . create ( ) ; public ApiHelper ( final Token accessToken , final KhanOAuthService oauthService , final KhanAcademyApi api ) { } public List < Badge > getBadges ( ) { } public List < Exercise > getExercises ( ) { } private String getResponseBody ( final String requestEndpoint ) { <START_BUG> return oauthService . getSignedRequestUrl ( accessToken , requestEndpoint ) ; <END_BUG> } public User getUser ( ) { } }

Fix:
return oauthService . sendSignedRequest ( accessToken , requestEndpoint ) ;
Buggy code:
public class ConvertListeners implements HashTreeTraverser { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public void addNode ( Object node , HashTree subTree ) { Iterator < ? > iter = subTree . list ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Object item = iter . next ( ) ; if ( item instanceof AbstractThreadGroup ) { <START_BUG> ConvertListeners . log . info ( ( "num<seq2seq4repair_space>threads<seq2seq4repair_space>=<seq2seq4repair_space>" + ( ( ( AbstractThreadGroup ) ( item ) ) . getNumThreads ( ) ) ) ) ; <END_BUG> } if ( item instanceof Remoteable ) { if ( item instanceof ThreadListener ) { ConvertListeners . log . error ( ( "Cannot<seq2seq4repair_space>handle<seq2seq4repair_space>ThreadListener<seq2seq4repair_space>Remotable<seq2seq4repair_space>item<seq2seq4repair_space>" + ( item . getClass ( ) . getName ( ) ) ) ) ; continue ; } try { RemoteSampleListener rtl = new RemoteSampleListenerImpl ( item ) ; if ( ( item instanceof TestListener ) && ( item instanceof SampleListener ) ) { RemoteListenerWrapper wrap = new RemoteListenerWrapper ( rtl ) ; subTree . replace ( item , wrap ) ; } else if ( item instanceof TestListener ) { RemoteTestListenerWrapper wrap = new RemoteTestListenerWrapper ( rtl ) ; subTree . replace ( item , wrap ) ; } else if ( item instanceof SampleListener ) { RemoteSampleListenerWrapper wrap = new RemoteSampleListenerWrapper ( rtl ) ; subTree . replace ( item , wrap ) ; } else { ConvertListeners . log . warn ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>replace<seq2seq4repair_space>Remotable<seq2seq4repair_space>item<seq2seq4repair_space>" + ( item . getClass ( ) . getName ( ) ) ) ) ; } } catch ( RemoteException e ) { ConvertListeners . log . error ( "" , e ) ; } } } } public void subtractNode ( ) { } public void processPath ( ) { } }

Fix:
ConvertListeners . log . debug ( ( "num<seq2seq4repair_space>threads<seq2seq4repair_space>=<seq2seq4repair_space>" + ( ( ( AbstractThreadGroup ) ( item ) ) . getNumThreads ( ) ) ) ) ;
Buggy code:
public class Pvcs extends org . apache . tools . ant . Task { private static final String PCLI_EXE = "pcli" ; private static final String PCLI_LVF_ARGS = "lvf<seq2seq4repair_space>-z<seq2seq4repair_space>-aw" ; private static final String GET_EXE = "get" ; private String filenameFormat ; private String force ; private boolean ignorerc ; private String label ; private String lineStart ; private String promotiongroup ; private String pvcsProject ; private Vector pvcsProjects ; private String pvcsbin ; private String repository ; private boolean updateOnly ; private String workspace ; public Pvcs ( ) { } public void setFilenameFormat ( String f ) { } public void setForce ( String f ) { } public void setIgnoreReturnCode ( boolean b ) { } public void setLabel ( String l ) { } public void setLineStart ( String l ) { } public void setPromotiongroup ( String w ) { } public void setPvcsbin ( String bin ) { } public void setPvcsproject ( String prj ) { } public void setRepository ( String repo ) { } public void setUpdateOnly ( boolean l ) { } public void setWorkspace ( String ws ) { } public String getFilenameFormat ( ) { } public String getForce ( ) { } public boolean getIgnoreReturnCode ( ) { } public String getLabel ( ) { } public String getLineStart ( ) { } public String getPromotiongroup ( ) { } public String getPvcsbin ( ) { } public String getPvcsproject ( ) { } public Vector getPvcsprojects ( ) { } public String getRepository ( ) { } public boolean getUpdateOnly ( ) { } public String getWorkspace ( ) { } public void addPvcsproject ( PvcsProject p ) { } public void execute ( ) throws TaskException { } protected int runCmd ( Commandline cmd , ExecuteStreamHandler out ) throws TaskException { try { Project aProj = getProject ( ) ; Execute exe = new Execute ( out ) ; exe . setAntRun ( aProj ) ; <START_BUG> exe . setWorkingDirectory ( aProj . getBaseDir ( ) ) ; <END_BUG> exe . setCommandline ( cmd . getCommandline ( ) ) ; return exe . execute ( ) ; } catch ( IOException e ) { String msg = ( ( "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( cmd . toString ( ) ) ) + ".<seq2seq4repair_space>Exception:<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ; throw new TaskException ( msg ) ; } } private String getExecutable ( String exe ) { } private void createFolders ( File file ) throws IOException , ParseException { } private void massagePCLI ( File in , File out ) throws FileNotFoundException , IOException { } }

Fix:
exe . setWorkingDirectory ( getBaseDirectory ( ) ) ;
Buggy code:
public class DependClassLoader12 extends DependClassLoader { DependClassLoader12 ( ) { } public DependClassLoader12 ( DependManager depM , ClassLoader parent , Object pd ) { } protected synchronized Class loadClass ( String name , boolean resolve ) throws ClassNotFoundException { final String lname = name ; final boolean lresolve = resolve ; try { return ( ( Class ) ( AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws Exception { <START_BUG> return loadClassInternal ( lname , lresolve ) ; <END_BUG> } } ) ) ) ; } catch ( PrivilegedActionException pex ) { Exception ex = pex . getException ( ) ; if ( ex instanceof ClassNotFoundException ) throw ( ( ClassNotFoundException ) ( ex ) ) ; ex . printStackTrace ( ) ; throw new ClassNotFoundException ( name ) ; } } protected Class defineClassCompat ( String name , byte [ ] data , int s , int end , URL res ) throws ClassNotFoundException { } }

Fix:
return loadClassInternal1 ( lname , lresolve ) ;
Buggy code:
public class PanelTest extends WicketTestCase { public PanelTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { boolean hit = false ; try { executeTest ( PanelPage_2 . class , "Dummy.html" ) ; } catch ( MarkupException mex ) { hit = true ; assertNotNull ( mex . getMarkupStream ( ) ) ; <START_BUG> assertTrue ( ( ( mex . getMessage ( ) . indexOf ( "has<seq2seq4repair_space>to<seq2seq4repair_space>contain<seq2seq4repair_space>part<seq2seq4repair_space>'<org.apache.wicket:panel>'" ) ) != ( - 1 ) ) ) ; <END_BUG> assertTrue ( ( ( mex . getMessage ( ) . indexOf ( "SimplePanel_2.html" ) ) != ( - 1 ) ) ) ; } assertTrue ( "Did<seq2seq4repair_space>expect<seq2seq4repair_space>a<seq2seq4repair_space>MarkupException" , hit ) ; } public void testInlinePanel ( ) throws Exception { } public void testInlinePanel_2 ( ) throws Exception { } public void testInlinePanel_3 ( ) throws Exception { } public void testInlinePanel_4 ( ) throws Exception { } public void testInlinePanel_5 ( ) throws Exception { } public void testPanelWithAttributeModifier ( ) throws Exception { } }

Fix:
assertTrue ( ( ( mex . getMessage ( ) . indexOf ( "has<seq2seq4repair_space>to<seq2seq4repair_space>contain<seq2seq4repair_space>part<seq2seq4repair_space>'<wicket:panel>'" ) ) != ( - 1 ) ) ) ;
Buggy code:
@ Aspect public class A1 { @ Around ( "call(void<seq2seq4repair_space>M.method(String))<seq2seq4repair_space>&&<seq2seq4repair_space>args(p)" ) public void a ( ProceedingJoinPoint pjp , String p ) throws Throwable { System . err . println ( "advice<seq2seq4repair_space>from<seq2seq4repair_space>ataj<seq2seq4repair_space>aspect" ) ; <START_BUG> pjp . proceed ( new Object [ ] { pjp . getTarget ( ) , "faked" } ) ; <END_BUG> } public static void main ( String [ ] argv ) { } }

Fix:
pjp . proceed ( new Object [ ] { "faked" } ) ;
Buggy code:
public class RemoteSpecification extends RamlSpecification { private final URI resource ; private final RamlResourceHandler handler ; public RemoteSpecification ( String name , String url , RamlResourceHandler handler ) { } @ Override protected Raml getRaml ( ) { try { File file = File . createTempFile ( "raml-mock-server-" , ".spec" ) ; file . deleteOnExit ( ) ; FileUtils . copyURLToFile ( this . resource . toURL ( ) , file ) ; File specificationFile = handler . handle ( file ) ; ResourceLoader loader = new FileResourceLoader ( specificationFile . getParent ( ) ) ; <START_BUG> return new org . raml . parser . visitor . RamlDocumentBuilder ( loader ) . build ( FileUtils . readFileToString ( specificationFile ) , specificationFile . getParent ( ) ) ; <END_BUG> } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } }

Fix:
return new org . raml . parser . visitor . RamlDocumentBuilder ( loader ) . build ( FileUtils . readFileToString ( specificationFile ) , "//" ) ;
Buggy code:
public class CompilationUnitDeclaration extends ASTNode implements ReferenceContext , ProblemSeverities { private static final char [ ] PACKAGE_INFO_FILE_NAME = "package-info.java" . toCharArray ( ) ; public ImportReference currentPackage ; public ImportReference [ ] imports ; public TypeDeclaration [ ] types ; public int [ ] [ ] comments ; public boolean ignoreFurtherInvestigation = false ; public boolean ignoreMethodBodies = false ; public CompilationUnitScope scope ; public ProblemReporter problemReporter ; public CompilationResult compilationResult ; public LocalTypeBinding [ ] localTypes ; public int localTypeCount = 0 ; public boolean isPropagatingInnerClassEmulation ; public CompilationUnitDeclaration ( ProblemReporter problemReporter , CompilationResult compilationResult , int sourceLength ) { } public void abort ( int abortLevel , IProblem problem ) { } public void analyseCode ( ) { } public void cleanUp ( ) { if ( ( this . types ) != null ) { for ( int i = 0 , max = this . types . length ; i < max ; i ++ ) { cleanUp ( this . types [ i ] ) ; } for ( int i = 0 , max = this . localTypeCount ; i < max ; i ++ ) { LocalTypeBinding localType = localTypes [ i ] ; localType . scope = null ; <START_BUG> localType . switchCase = null ; <END_BUG> } } ClassFile [ ] classFiles = compilationResult . getClassFiles ( ) ; for ( int i = 0 , max = classFiles . length ; i < max ; i ++ ) { ClassFile classFile = classFiles [ i ] ; classFile . referenceBinding = null ; classFile . codeStream = null ; classFile . innerClassesBindings = null ; } } private void cleanUp ( TypeDeclaration type ) { } public void checkUnusedImports ( ) { } public CompilationResult compilationResult ( ) { } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ) { } public char [ ] getFileName ( ) { } public char [ ] getMainTypeName ( ) { } public boolean isEmpty ( ) { } public boolean hasErrors ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public void propagateInnerEmulationForAllLocalTypes ( ) { } public void record ( LocalTypeBinding localType ) { } public void resolve ( ) { } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , CompilationUnitScope unitScope ) { } }

Fix:
localType . enclosingCase = null ;
Buggy code:
public class MockApplication extends WebApplication { public MockApplication ( ) { } @ Override public Class < ? extends Page > getHomePage ( ) { } @ Override public RuntimeConfigurationType getConfigurationType ( ) { } public Session getSession ( ) { } @ Override public final String getInitParameter ( String key ) { } @ Override protected void internalInit ( ) { super . internalInit ( ) ; setSessionStoreProvider ( new MockApplication . MockSessionStoreProvider ( ) ) ; setPageManagerProvider ( new MockApplication . MockPageManagerProvider ( ) ) ; <START_BUG> getResourceSettings ( ) . setResourceCachingStrategy ( INSTANCE ) ; <END_BUG> } private static class MockSessionStoreProvider implements IProvider < ISessionStore > { public ISessionStore get ( ) { } } private static class MockPageManagerProvider implements IPageManagerProvider { public IPageManager get ( IPageManagerContext pageManagerContext ) { } } }

Fix:
getResourceSettings ( ) . setCachingStrategy ( INSTANCE ) ;
Buggy code:
public class PatternParser { private static final char ESCAPE_CHAR = '%' ; private static final int LITERAL_STATE = 0 ; private static final int CONVERTER_STATE = 1 ; private static final int MINUS_STATE = 2 ; private static final int DOT_STATE = 3 ; private static final int MIN_STATE = 4 ; private static final int MAX_STATE = 5 ; static HashMap globalRulesRegistry ; int state ; protected StringBuffer currentLiteral = new StringBuffer ( 32 ) ; protected int patternLength ; protected int i ; PatternConverter head ; PatternConverter tail ; protected FormattingInfo formattingInfo = new FormattingInfo ( ) ; protected String pattern ; HashMap converterRegistry ; static Logger logger = Logger . getLogger ( ( "LOG4J." + ( PatternParser . class . getName ( ) ) ) ) ; public PatternParser ( String pattern ) { } private void addToList ( PatternConverter pc ) { } protected String extractConverter ( char lastChar ) { } protected String extractOption ( ) { } public PatternConverter parse ( ) { } String findConverterClass ( String converterId ) { } protected void finalizeConverter ( char c ) { PatternConverter pc = null ; String converterId = extractConverter ( c ) ; String className = ( ( String ) ( findConverterClass ( converterId ) ) ) ; String option = extractOption ( ) ; if ( className != null ) { pc = ( ( PatternConverter ) ( OptionConverter . instantiateByClassName ( className , PatternConverter . class , null ) ) ) ; pc . setFormattingInfo ( formattingInfo ) ; pc . setOption ( option ) ; currentLiteral . setLength ( 0 ) ; } else { switch ( c ) { case 'd' : String dateFormatStr = AbsoluteTimeDateFormat . ISO8601_DATE_FORMAT ; if ( option != null ) { dateFormatStr = option ; } if ( dateFormatStr . equalsIgnoreCase ( AbsoluteTimeDateFormat . ISO8601_DATE_FORMAT ) ) { <START_BUG> option = "yyyy-mm-dd<seq2seq4repair_space>HH:mm:ss,SSS" ; <END_BUG> } else if ( dateFormatStr . equalsIgnoreCase ( AbsoluteTimeDateFormat . ABS_TIME_DATE_FORMAT ) ) { option = "HH:mm:ss,SSS" ; } else if ( dateFormatStr . equalsIgnoreCase ( AbsoluteTimeDateFormat . DATE_AND_TIME_DATE_FORMAT ) ) { option = "dd<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyy<seq2seq4repair_space>HH:mm:ss,SSS" ; } pc = new DatePatternConverter ( formattingInfo ) ; pc . setOption ( option ) ; currentLiteral . setLength ( 0 ) ; break ; default : LogLog . error ( ( ( ( ( "Unexpected<seq2seq4repair_space>char<seq2seq4repair_space>[" + c ) + "]<seq2seq4repair_space>at<seq2seq4repair_space>position<seq2seq4repair_space>" ) + ( i ) ) + "<seq2seq4repair_space>in<seq2seq4repair_space>conversion<seq2seq4repair_space>patterrn." ) ) ; pc = new LiteralPatternConverter ( currentLiteral . toString ( ) ) ; currentLiteral . setLength ( 0 ) ; } } addConverter ( pc ) ; } protected void addConverter ( PatternConverter pc ) { } public HashMap getConverterRegistry ( ) { } public void setConverterRegistry ( HashMap converterRegistry ) { } }

Fix:
option = "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss,SSS" ;
Buggy code:
public interface VEXDocument { public void addDocumentListener ( DocumentListener listener ) { } public boolean canInsertFragment ( int offset , VEXDocumentFragment fragment ) { } public boolean canInsertText ( int offset ) { } <START_BUG> public IPosition createPosition ( int offset ) ; <END_BUG> public void delete ( int startOffset , int endOffset ) throws DocumentValidationException { } public VEXElement findCommonElement ( int offset1 , int offset2 ) { } public char getCharacterAt ( int offset ) { } public VEXElement getElementAt ( int offset ) { } public String getEncoding ( ) { } public VEXDocumentFragment getFragment ( int startOffset , int endOffset ) { } public int getLength ( ) { } public String [ ] getNodeNames ( int startOffset , int endOffset ) { } public VEXNode [ ] getNodes ( int startOffset , int endOffset ) { } public String getRawText ( int startOffset , int endOffset ) { } public VEXElement getRootElement ( ) { } public String getText ( int startOffset , int endOffset ) { } public Validator getValidator ( ) { } public void insertElement ( int offset , VEXElement defaults ) throws DocumentValidationException { } public void insertFragment ( int offset , VEXDocumentFragment fragment ) throws DocumentValidationException { } public void insertText ( int offset , String text ) throws DocumentValidationException { } public boolean isUndoEnabled ( ) { } public void removeDocumentListener ( DocumentListener listener ) { } public String getPublicID ( ) { } public void setPublicID ( String publicID ) { } public void setSystemID ( String systemID ) { } public String getSystemID ( ) { } public void setUndoEnabled ( boolean undoEnabled ) { } public void setValidator ( Validator validator ) { } public void fireAttributeChanged ( DocumentEvent documentEvent ) { } }

Fix:
public Position createPosition ( int offset ) ;
Buggy code:
public class MangaFetcher extends Fetcher { private Descriptor descriptor ; public MangaFetcher ( Descriptor descriptor ) { } private static final String TAG = MangaFetcher . class . getName ( ) ; public String [ ] fetch ( ) { try { setHasMore ( false ) ; Log . i ( MangaFetcher . TAG , descriptor . getUrl ( ) ) ; Document doc = Jsoup . connect ( descriptor . getUrl ( ) ) . get ( ) ; URI uri = URI . create ( descriptor . getUrl ( ) ) ; List < String > links = new ArrayList < > ( ) ; for ( Element img : doc . select ( descriptor . getItemSelector ( ) ) ) { String result = img . attr ( "src" ) ; if ( result . isEmpty ( ) ) { result = img . attr ( "href" ) ; } if ( ! ( result . isEmpty ( ) ) ) { result = uri . resolve ( result ) . toString ( ) ; if ( ( descriptor . getHandler ( ) ) != null ) { Descriptor childDescriptor = descriptor . getHandler ( ) . clone ( ) ; childDescriptor . setUrl ( result ) ; MangaFetcher child = new MangaFetcher ( childDescriptor ) ; links . addAll ( Arrays . asList ( child . fetch ( ) ) ) ; } else { links . add ( result ) ; } } } if ( ( links . size ( ) ) == 0 ) { setHasMore ( false ) ; } else if ( ( descriptor . getNextPageSelector ( ) ) != null ) { Elements nextPageLink = doc . select ( descriptor . getNextPageSelector ( ) ) ; <START_BUG> setHasMore ( ( ( nextPageLink . size ( ) ) > 0 ) ) ; <END_BUG> if ( hasMore ( ) ) { descriptor . setUrl ( uri . resolve ( nextPageLink . get ( 0 ) . attr ( "href" ) ) . toString ( ) ) ; } } return links . toArray ( new String [ links . size ( ) ] ) ; } catch ( IOException e ) { Log . e ( MangaFetcher . TAG , e . getMessage ( ) ) ; return new String [ 0 ] ; } } @ Override public boolean isContainerProvider ( ) { } }

Fix:
setHasMore ( ( ( ( nextPageLink . size ( ) ) > 0 ) && ( ! ( nextPageLink . get ( 0 ) . attr ( "href" ) . isEmpty ( ) ) ) ) ) ;
Buggy code:
public class GameBoard { private GameObject [ ] [ ] gameboard = new GameObject [ 4 ] [ 9 ] ; private Image playingfield ; private Random random ; private int rightHand ; private int leftHand ; GameObject movingobj1 = null ; GameObject movingobj2 = null ; int place1 = 0 ; int place2 = 0 ; public void draw ( Graphics g ) throws SlickException { } public void Insert ( int row , int col , GameObject object ) throws SlickException { } public void spawnObjects ( ) throws SlickException { } public void moveObjects ( ) { } public void swapColumns ( int leftHand , int rightHand ) throws SlickException { int a = leftHand ; int b = rightHand ; for ( int i = ( gameboard [ a ] . length ) - 1 ; i >= 0 ; i -- ) { GameObject tempA = gameboard [ a ] [ i ] ; GameObject tempB = gameboard [ b ] [ i ] ; if ( ( tempA == null ) && ( tempB == null ) ) { continue ; } else if ( ( tempA == null ) && ( tempB != null ) ) { if ( tempB . isMovingObject ( ) ) { continue ; } else { gameboard [ a ] [ i ] = gameboard [ b ] [ i ] ; gameboard [ b ] [ i ] = tempA ; } } else if ( ( tempA != null ) && ( tempB == null ) ) { if ( tempA . isMovingObject ( ) ) { continue ; } else { gameboard [ a ] [ i ] = gameboard [ b ] [ i ] ; gameboard [ b ] [ i ] = tempA ; } } else if ( ( tempA != null ) && ( tempB != null ) ) { <START_BUG> if ( ( tempA . isMovingObject ( ) ) || ( tempB . isMovingObject ( ) ) ) { <END_BUG> continue ; } else { gameboard [ a ] [ i ] = gameboard [ b ] [ i ] ; gameboard [ b ] [ i ] = tempA ; } } } } public boolean hasMovingObjects ( ) { } public GameObject randomObject ( ) throws SlickException { } }

Fix:
if ( ( tempA . isMovingObject ( ) ) && ( tempB . isMovingObject ( ) ) ) {
Buggy code:
public class TabResults extends TabSpawnable implements ActionListener , MouseListener , Runnable , ListSelectionListener { protected static Category cat = Category . getInstance ( TabResults . class ) ; public static int _numJumpToRelated = 0 ; PredicateFind _pred ; ChildGenerator _cg = null ; Object _root = null ; JSplitPane _mainPane ; Vector _results = new Vector ( ) ; Vector _related = new Vector ( ) ; Vector _diagrams = new Vector ( ) ; boolean _showRelated = false ; JLabel _resultsLabel = new JLabel ( "Search<seq2seq4repair_space>Results:" ) ; JTable _resultsTable = new JTable ( 10 , 4 ) ; TMResults _resultsModel = new TMResults ( ) ; JLabel _relatedLabel = new JLabel ( "Related<seq2seq4repair_space>Elements:" ) ; JTable _relatedTable = new JTable ( 4 , 4 ) ; TMResults _relatedModel = new TMResults ( ) ; public TabResults ( ) { } public TabResults ( boolean showRelated ) { } public void setPredicate ( PredicateFind p ) { } public void setRoot ( Object root ) { } public void setGenerator ( ChildGenerator gen ) { } public void setResults ( Vector res , Vector dia ) { } public TabSpawnable spawn ( ) { } public void actionPerformed ( ActionEvent ae ) { } public void mousePressed ( MouseEvent me ) { } public void mouseReleased ( MouseEvent me ) { } public void mouseClicked ( MouseEvent me ) { } public void mouseEntered ( MouseEvent me ) { } public void mouseExited ( MouseEvent me ) { } public void myDoubleClick ( Object src ) { int row = _resultsTable . getSelectionModel ( ) . getMinSelectionIndex ( ) ; Object sel = null ; Diagram d = null ; if ( src == ( _resultsTable ) ) { sel = _results . elementAt ( row ) ; d = ( ( Diagram ) ( _diagrams . elementAt ( row ) ) ) ; } else { ( TabResults . _numJumpToRelated ) ++ ; sel = _related . elementAt ( row ) ; } TabResults . cat . debug ( ( ( ( "go<seq2seq4repair_space>" + sel ) + "<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( d . getName ( ) ) ) ) ; ProjectBrowser pb = ProjectBrowser . TheInstance ; if ( d != null ) pb . setTarget ( d ) ; <START_BUG> pb . select ( sel ) ; <END_BUG> } public void valueChanged ( ListSelectionEvent lse ) { } public void run ( ) { } public void depthFirst ( Object node , Diagram lastDiagram ) { } }

Fix:
pb . setTarget ( sel ) ;
Buggy code:
public class DatastoreShardStrategyTest extends TestCase { private final int SHARD_COUNT = 5 ; private DatastoreShardStrategy strategy ; static final String ENTITY_KIND_NAME = "kind" ; static final String PROPERTY_NAME = Entity . KEY_RESERVED_PROPERTY ; private Query baseQuery ; private final LocalServiceTestHelper helper = new LocalServiceTestHelper ( new LocalDatastoreServiceTestConfig ( ) ) ; private DatastoreService ds ; private static Query createQuery ( String kind , String property , Object lowerBound , Object upperBound ) { } @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } public void testByte ( ) { } public void testShort ( ) { } public void testInt ( ) { } public void testLong ( ) { } public void testDate ( ) { <START_BUG> validateSplits ( DatastoreShardStrategyTest . createQuery ( DatastoreShardStrategyTest . ENTITY_KIND_NAME , DatastoreShardStrategyTest . PROPERTY_NAME , new Date ( 0 ) , new Date ( 100 ) ) , longRanges ( 0 , 20 , 40 , 60 , 80 , 100 ) ) ; <END_BUG> } public void testRating ( ) { } @ Test public void testSplitRangeLongs ( ) { } @ Test public void testSplitRangeDouble ( ) { } private void assertExpectedValues ( long [ ] expected , SortedSet < Long > observed ) { } private void assertExpectedValues ( double [ ] expected , SortedSet < Double > observed ) { } @ SafeVarargs private final List < Query > longRanges ( long first , long ... rest ) { } private < T extends Serializable & Comparable < T > > void validateSplits ( Query orig , List < Query > expectedResults ) { } }

Fix:
validateSplits ( DatastoreShardStrategyTest . createQuery ( DatastoreShardStrategyTest . ENTITY_KIND_NAME , DatastoreShardStrategyTest . PROPERTY_NAME , new Date ( 0 ) , new Date ( 100 ) ) , longRanges ( 0 , 20000 , 40000 , 60000 , 80000 , 100000 ) ) ;
Buggy code:
public class EmbeddedDatabaseFactory { private static Log logger = LogFactory . getLog ( EmbeddedDatabaseFactory . class ) ; private String databaseName = "testdb" ; private DataSourceFactory dataSourceFactory = new SimpleDriverDataSourceFactory ( ) ; private EmbeddedDatabaseConfigurer databaseConfigurer ; private DatabasePopulator databasePopulator ; private DataSource dataSource ; public void setDatabaseName ( String databaseName ) { } public void setDatabaseType ( EmbeddedDatabaseType type ) { } public void setDatabaseConfigurer ( EmbeddedDatabaseConfigurer configurer ) { } public void setDatabasePopulator ( DatabasePopulator populator ) { } public void setDataSourceFactory ( DataSourceFactory dataSourceFactory ) { } public EmbeddedDatabase getDatabase ( ) { } protected void initDatabase ( ) { } private void populateDatabase ( ) { } protected DataSource getDataSource ( ) { } protected void shutdownDatabase ( ) { } private class EmbeddedDataSourceProxy implements EmbeddedDatabase { private final DataSource dataSource ; public EmbeddedDataSourceProxy ( DataSource dataSource ) { } public Connection getConnection ( ) throws SQLException { } public Connection getConnection ( String username , String password ) throws SQLException { } public PrintWriter getLogWriter ( ) throws SQLException { } public void setLogWriter ( PrintWriter out ) throws SQLException { } public int getLoginTimeout ( ) throws SQLException { } public void setLoginTimeout ( int seconds ) throws SQLException { } public < T > T unwrap ( Class < T > iface ) throws SQLException { } public boolean isWrapperFor ( Class < ? > iface ) throws SQLException { } public Logger getParentLogger ( ) { <START_BUG> return Logger . getGlobal ( ) ; <END_BUG> } public void shutdown ( ) { } } }

Fix:
return Logger . getLogger ( Logger . GLOBAL_LOGGER_NAME ) ;
Buggy code:
public class SharedObjectFactory implements ISharedObjectFactory { private static Hashtable sharedobjectdescriptions = new Hashtable ( ) ; protected static ISharedObjectFactory instance = null ; protected SharedObjectFactory ( ) { } public static ISharedObjectFactory getDefault ( ) { } private static void trace ( String msg ) { } private static void dumpStack ( String msg , Throwable e ) { } public SharedObjectTypeDescription addDescription ( SharedObjectTypeDescription description ) { } public List getDescriptions ( ) { } protected List getDescriptions0 ( ) { } protected SharedObjectTypeDescription addDescription0 ( SharedObjectTypeDescription n ) { } public boolean containsDescription ( SharedObjectTypeDescription scd ) { } protected boolean containsDescription0 ( SharedObjectTypeDescription scd ) { } protected SharedObjectTypeDescription getDescription0 ( SharedObjectTypeDescription scd ) { } protected SharedObjectTypeDescription getDescription0 ( String name ) { } public SharedObjectTypeDescription getDescriptionByName ( String name ) throws SharedObjectCreateException { SharedObjectFactory . trace ( ( ( "getDescriptionByName(" + name ) + ")" ) ) ; SharedObjectTypeDescription res = getDescription0 ( name ) ; if ( res == null ) { <START_BUG> throw new SharedObjectCreateException ( NLS . bind ( SharedObjectFactory_SharedObjectCreateException_X_Not_Found , name ) ) ; <END_BUG> } return res ; } public ISharedObject createSharedObject ( SharedObjectTypeDescription desc , Object [ ] args ) throws SharedObjectCreateException { } public ISharedObject createSharedObject ( String descriptionName ) throws SharedObjectCreateException { } public ISharedObject createSharedObject ( String descriptionName , Object [ ] args ) throws SharedObjectCreateException { } public SharedObjectTypeDescription removeDescription ( SharedObjectTypeDescription scd ) { } protected SharedObjectTypeDescription removeDescription0 ( SharedObjectTypeDescription n ) { } }

Fix:
throw new SharedObjectCreateException ( NLS . bind ( SharedObjectFactory_SharedObjectDescription_X_Not_Found , name ) ) ;
Buggy code:
public class homeFragment extends ListFragment { public static String [ ] names ; private DatabaseHelper dbHelper ; private Fragment fragment ; private FragmentManager manager ; public homeFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { <START_BUG> homeFragment . names = getArguments ( ) . getStringArray ( "names" ) ; <END_BUG> if ( ( homeFragment . names ) != null ) { ArrayAdapter < String > adapter = new ArrayAdapter < String > ( inflater . getContext ( ) , layout . simple_list_item_1 , homeFragment . names ) ; setListAdapter ( adapter ) ; } return super . onCreateView ( inflater , container , savedInstanceState ) ; } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { } }

Fix:
homeFragment . names = MainActivity . pokemonNamesAndId ;
Buggy code:
public class tab_setting extends Fragment { public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { <START_BUG> View V = inflater . inflate ( tab_search , container , false ) ; <END_BUG> return V ; } }

Fix:
View V = inflater . inflate ( activity_about , container , false ) ;
Buggy code:
public class UnitTestCategory extends TestCase { Category cat ; Appender a1 ; Appender a2 ; ResourceBundle rbUS ; ResourceBundle rbFR ; ResourceBundle rbCH ; static String MSG = "M" ; public UnitTestCategory ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { <START_BUG> org . apache . log4j . Hierarchy . getDefaultHierarchy ( ) . clear ( ) ; <END_BUG> BasicConfigurator . resetConfiguration ( ) ; a1 = null ; a2 = null ; } public void testAppender1 ( ) { } public void testAppender2 ( ) { } public void testAdditivity1 ( ) { } public void testAdditivity2 ( ) { } public void testAdditivity3 ( ) { } public void testDisable1 ( ) { } public void testRB1 ( ) { } public void testRB2 ( ) { } public void testRB3 ( ) { } public void testExists ( ) { } public void testHierarchy1 ( ) { } public static Test suite ( ) { } private static class CountingAppender extends AppenderSkeleton { int counter ; CountingAppender ( ) { } public void close ( ) { } public void append ( LoggingEvent event ) { } public boolean requiresLayout ( ) { } } }

Fix:
Category . getDefaultHierarchy ( ) . clear ( ) ;
Buggy code:
public class WithinPointcut extends Pointcut { private TypePattern typePattern ; public WithinPointcut ( TypePattern type ) { } public TypePattern getTypePattern ( ) { } private FuzzyBoolean isWithinType ( ResolvedType type ) { } public Set couldMatchKinds ( ) { } public Pointcut parameterizeWith ( Map typeVariableMap ) { } public FuzzyBoolean fastMatch ( FastMatchInfo info ) { } protected FuzzyBoolean matchInternal ( Shadow shadow ) { ResolvedType enclosingType = shadow . getIWorld ( ) . resolve ( shadow . getEnclosingType ( ) , true ) ; <START_BUG> if ( enclosingType == ( ResolvedType . MISSING ) ) { <END_BUG> shadow . getIWorld ( ) . getLint ( ) . cantFindType . signal ( new String [ ] { WeaverMessages . format ( CANT_FIND_TYPE_WITHINPCD , shadow . getEnclosingType ( ) . getName ( ) ) } , shadow . getSourceLocation ( ) , new ISourceLocation [ ] { getSourceLocation ( ) } ) ; } typePattern . resolve ( shadow . getIWorld ( ) ) ; return isWithinType ( enclosingType ) ; } public void write ( DataOutputStream s ) throws IOException { } public static Pointcut read ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public void resolveBindings ( IScope scope , Bindings bindings ) { } public void postRead ( ResolvedType enclosingType ) { } public boolean couldEverMatchSameJoinPointsAs ( WithinPointcut other ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } protected Test findResidueInternal ( Shadow shadow , ExposedState state ) { } public Pointcut concretize1 ( ResolvedType inAspect , ResolvedType declaringType , IntMap bindings ) { } public Object accept ( PatternNodeVisitor visitor , Object data ) { } }

Fix:
if ( enclosingType . isMissing ( ) ) {
Buggy code:
public class PathAddress implements Iterable < PathElement > { public static final PathAddress EMPTY_ADDRESS = new PathAddress ( Collections . < PathElement > emptyList ( ) ) ; public static PathAddress pathAddress ( final ModelNode node ) { } public static PathAddress pathAddress ( List < PathElement > elements ) { } public static PathAddress pathAddress ( PathElement ... elements ) { } public static PathAddress pathAddress ( PathAddress parent , PathElement ... elements ) { } <START_BUG> private static IllegalArgumentException duplicateElement ( final String name ) { <END_BUG> return ControllerMessages . MESSAGES . duplicateElement ( name ) ; } private final List < PathElement > pathAddressList ; PathAddress ( final List < PathElement > pathAddressList ) { } public PathElement getElement ( int index ) { } public PathElement getLastElement ( ) { } public PathAddress subAddress ( int start ) { } public PathAddress subAddress ( int start , int end ) { } public PathAddress append ( List < PathElement > additionalElements ) { } public PathAddress append ( PathElement ... additionalElements ) { } public PathAddress append ( PathAddress address ) { } public ModelNode navigate ( ModelNode model , boolean create ) throws NoSuchElementException { } public ModelNode remove ( ModelNode model ) throws NoSuchElementException { } public ModelNode toModelNode ( ) { } public boolean isMultiTarget ( ) { } public int size ( ) { } @ Override public ListIterator < PathElement > iterator ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object other ) { } public boolean equals ( PathAddress other ) { } @ Override public String toString ( ) { } }

Fix:
private static OperationFailedRuntimeException duplicateElement ( final String name ) {
Buggy code:
public class JavaConfigGui extends AbstractConfigGui implements ActionListener { private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String CLASSNAMECOMBO = "classnamecombo" ; private JComboBox classnameCombo ; private boolean displayName = true ; private ArgumentsPanel argsPanel ; public JavaConfigGui ( ) { } public JavaConfigGui ( boolean displayNameField ) { } public String getLabelResource ( ) { } protected void init ( ) { } private JPanel createClassnamePanel ( ) { } public void actionPerformed ( ActionEvent evt ) { if ( ( evt . getSource ( ) ) == ( classnameCombo ) ) { String className = ( ( String ) ( classnameCombo . getSelectedItem ( ) ) ) . trim ( ) ; try { JavaSamplerClient client = ( ( JavaSamplerClient ) ( Class . forName ( className , true , Thread . currentThread ( ) . getContextClassLoader ( ) ) . newInstance ( ) ) ) ; Arguments currArgs = new Arguments ( ) ; argsPanel . modifyTestElement ( currArgs ) ; Map currArgsMap = currArgs . getArgumentsAsMap ( ) ; Arguments newArgs = new Arguments ( ) ; Arguments testParams = null ; try { testParams = client . getDefaultParameters ( ) ; } catch ( AbstractMethodError e ) { JavaConfigGui . log . warn ( ( ( "JavaSamplerClient<seq2seq4repair_space>doesn't<seq2seq4repair_space>implement<seq2seq4repair_space>" + ( "getDefaultParameters.<seq2seq4repair_space>Default<seq2seq4repair_space>parameters<seq2seq4repair_space>won't<seq2seq4repair_space>" + "be<seq2seq4repair_space>shown.<seq2seq4repair_space>Please<seq2seq4repair_space>update<seq2seq4repair_space>your<seq2seq4repair_space>client<seq2seq4repair_space>class:<seq2seq4repair_space>" ) ) + className ) ) ; } if ( testParams != null ) { PropertyIterator i = testParams . getArguments ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Argument arg = ( ( Argument ) ( i . next ( ) . getObjectValue ( ) ) ) ; String name = arg . getName ( ) ; String value = arg . getValue ( ) ; if ( currArgsMap . containsKey ( name ) ) { String newVal = ( ( String ) ( currArgsMap . get ( name ) ) ) ; <START_BUG> if ( ( newVal != null ) && ( ( newVal . toString ( ) . length ( ) ) > 0 ) ) { <END_BUG> value = newVal ; } } newArgs . addArgument ( name , value ) ; } } argsPanel . configure ( newArgs ) ; } catch ( Exception e ) { JavaConfigGui . log . error ( ( "Error<seq2seq4repair_space>getting<seq2seq4repair_space>argument<seq2seq4repair_space>list<seq2seq4repair_space>for<seq2seq4repair_space>" + className ) , e ) ; } } } private JPanel createParameterPanel ( ) { } public void configure ( TestElement config ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement config ) { } }

Fix:
if ( ( newVal != null ) && ( ( newVal . length ( ) ) > 0 ) ) {
Buggy code:
public class TestTimestampVersion extends SingleEMFTestCase { public void setUp ( ) { } public void testBulkUpdateOnTimestampedVersion ( ) { TimestampedEntity pc = new TimestampedEntity ( ) ; pc . setName ( "Original" ) ; EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . persist ( pc ) ; em . getTransaction ( ) . commit ( ) ; try { <START_BUG> Thread . sleep ( 500 ) ; <END_BUG> } catch ( InterruptedException e ) { } em . getTransaction ( ) . begin ( ) ; Timestamp oldVersion = pc . getVersion ( ) ; String jpql = "UPDATE<seq2seq4repair_space>TimestampedEntity<seq2seq4repair_space>t<seq2seq4repair_space>SET<seq2seq4repair_space>t.name=:newname<seq2seq4repair_space>WHERE<seq2seq4repair_space>t.name=:oldname" ; em . createQuery ( jpql ) . setParameter ( "newname" , "Updated" ) . setParameter ( "oldname" , "Original" ) . executeUpdate ( ) ; em . getTransaction ( ) . commit ( ) ; em . getTransaction ( ) . begin ( ) ; em . refresh ( pc ) ; Timestamp newVersion = pc . getVersion ( ) ; assertTrue ( ( ( ( "Expected<seq2seq4repair_space>newVersion=" + ( newVersion . toString ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>after<seq2seq4repair_space>oldVersion=" ) + ( oldVersion . toString ( ) ) ) , newVersion . after ( oldVersion ) ) ; } public void testBulkUpdateOnNumericVersion ( ) { } }

Fix:
Thread . sleep ( 1000 ) ;
Buggy code:
public class PropertyDialog extends PreferenceDialog { private ISelection selection ; private static String lastPropertyId = null ; public PropertyDialog ( Shell parentShell , PreferenceManager mng , ISelection selection ) { } public ISelection getSelection ( ) { } public void setSelection ( ISelection newSelection ) { } protected String getSelectedNodePreference ( ) { } protected void setSelectedNodePreference ( String pageId ) { } protected void createTreeItemFor ( Widget parent , IPreferenceNode node ) { IObjectActivityManager propManager = WorkbenchPlugin . getDefault ( ) . getWorkbench ( ) . getObjectActivityManager ( PL_PROPERTY_PAGES , false ) ; if ( propManager != null ) { <START_BUG> Collection activeContributions = propManager . getActiveObjects ( ) ; <END_BUG> if ( ( node instanceof PropertyPageNode ) && ( ! ( activeContributions . contains ( ( ( PropertyPageNode ) ( node ) ) . getContributor ( ) ) ) ) ) { return ; } } super . createTreeItemFor ( parent , node ) ; } }

Fix:
Collection activeContributions = propManager . getEnabledObjects ( ) ;
Buggy code:
public class EditorUtils { public static Range computeNewCaretPosition ( Range oldCaretPosition ) { } public static Node getAncestorBelowParagraph ( Node node ) { } public static Node getAncestorParagraph ( Node node ) { } public static List < OperationTarget > getIntermediaryTargets ( Range range ) { } public static List < Text > getNonEmptyTextNodes ( Range range ) { } private static List < Text > getLeftTextNodesInSameP ( Range range ) { } private static List < Text > getRightTextNodesInSameP ( Range range ) { Range rightRange = range . cloneRange ( ) ; Node parentPNode = EditorUtils . getAncestorParagraph ( range . getEndContainer ( ) ) ; <START_BUG> rightRange . setEndAfter ( parentPNode . getLastChild ( ) ) ; <END_BUG> return EditorUtils . getNonEmptyTextNodes ( rightRange ) ; } public static boolean isNonEmptyTextNode ( Node node ) { } public Node getPreviousNodeInSameParagraph ( Range range ) { } }

Fix:
rightRange . setEnd ( parentPNode , parentPNode . getChildCount ( ) ) ;
Buggy code:
public class ScrollBar extends Widget { Scrollable parent ; ScrollBar ( Scrollable parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void createHandle ( ) { } void deregister ( ) { } void destroyWidget ( ) { } public boolean getEnabled ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public Scrollable getParent ( ) { } public int getSelection ( ) { } public Point getSize ( ) { } public int getThumb ( ) { } public boolean getVisible ( ) { } void HandleScroll ( int sender , int e ) { } void hookEvents ( ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setEnabled ( boolean enabled ) { checkWidget ( ) ; <START_BUG> OS . UIElement_IsEnabled ( topHandle ( ) , enabled ) ; <END_BUG> } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int selection ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } public void setVisible ( boolean visible ) { } int topHandle ( ) { } }

Fix:
OS . UIElement_IsEnabled ( handle , enabled ) ;
Buggy code:
public final class ModuleEntryBuilder extends _ConfigEntryBuilder < ModuleEntry > { private static final int FLAG_MODULE_SET = ( _ConfigEntryBuilder . FLAG_CONFIG_BUILDER_CREATED ) << 1 ; private IEvaluationModule m_module ; ModuleEntryBuilder ( final HierarchicalFSM owner ) { } @ Override protected final void fsmFlagsAppendName ( final int flagValue , final int flagIndex , final MemoryTextOutput append ) { } public final synchronized void setModule ( final IEvaluationModule module ) { } public final void setModule ( final String module ) { } @ SuppressWarnings ( "resource" ) @ Override final ConfigurationBuilder _createConfigurationBuilder ( ) { } @ Override protected final synchronized void afterChildClosed ( final HierarchicalFSM child ) { } @ SuppressWarnings ( "resource" ) @ Override protected final ModuleEntry compile ( ) { final IEvaluationModule module ; final HierarchicalFSM owner ; Configuration config ; this . fsmFlagsAssertTrue ( ModuleEntryBuilder . FLAG_MODULE_SET ) ; config = this . m_config ; this . m_config = null ; module = this . m_module ; this . m_module = null ; if ( config == null ) { owner = this . getOwner ( ) ; if ( owner instanceof EvaluationModulesBuilder ) { <START_BUG> config = ( ( EvaluationModulesBuilder ) ( owner ) ) . m_config ; <END_BUG> } } if ( config == null ) { this . fsmFlagsAssertTrue ( FLAG_CONFIG_SET ) ; throw new IllegalStateException ( "Configuration<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>set<seq2seq4repair_space>but<seq2seq4repair_space>is<seq2seq4repair_space>null?" ) ; } return new ModuleEntry ( config , module ) ; } }

Fix:
config = ( ( EvaluationModulesBuilder ) ( owner ) ) . _getConfiguration ( ) ;
Buggy code:
public class Admin { public static class SiteStatistics { int numberOfUsers ; int quizzesTaken ; int numberOfQuizzes ; public SiteStatistics ( ) throws SQLException { } public int getNumberOfUsers ( ) { } public int getQuizzesTaken ( ) { } public int getNumberOfQuizzes ( ) { } } public static void createAnnouncement ( String announcement ) throws SQLException { <START_BUG> announcement = StringUtils . escapeQuote ( announcement , "'" ) ; <END_BUG> Statement s = SQL . getStatement ( ) ; s . executeUpdate ( String . format ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>Announcements<seq2seq4repair_space>VALUES<seq2seq4repair_space>('%s',<seq2seq4repair_space>%s)" , announcement , SQL . convertDateToSQLDate ( new Date ( ) ) ) ) ; s . close ( ) ; } public static ArrayList < String > getRecentAnnouncements ( ) throws SQLException { } private static Date getMessageTimeBound ( ) { } public static void removeAccount ( Account targetAcc ) throws SQLException { } public static void removeQuiz ( Quiz q ) throws SQLException { } public static void removeQuizHistory ( Quiz q ) throws SQLException { } public static void promoteAccount ( Account targetAcc ) throws SQLException { } public static Admin . SiteStatistics getSiteStatistics ( ) throws SQLException { } }

Fix:
announcement = SQL . escapeQuote ( announcement ) ;