nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SubscriptionManagementBeans { public static SubscriptionManagementBeans self = new SubscriptionManagementBeans ( ) ; public static SubscriptionManagementBeans getInstance ( ) { } public ArrayList < Subscription > getTopicSubscriptions ( String isDurable , String isActive ) throws SubscriptionManagerException { ArrayList < Subscription > subscriptionDetailsList = new ArrayList < > ( ) ; MBeanServer mBeanServer = ManagementFactory . getPlatformMBeanServer ( ) ; try { ObjectName objectName = new ObjectName ( ( "org.wso2.andes:type=SubscriptionManagementInformation," + "name=SubscriptionManagementInformation" ) ) ; Object [ ] parameters = new Object [ ] { isDurable , isActive } ; String [ ] signature = new String [ ] { String . class . getName ( ) , String . class . getName ( ) } ; Object result = mBeanServer . invoke ( objectName , TOPIC_SUBSCRIPTIONS_MBEAN_ATTRIBUTE , parameters , signature ) ; if ( result != null ) { String [ ] subscriptionInformationList = ( ( String [ ] ) ( result ) ) ; for ( String subscriptionInfo : subscriptionInformationList ) { Subscription sub = Utils . parseStringToASubscription ( subscriptionInfo ) ; subscriptionDetailsList . add ( sub ) ; } } return subscriptionDetailsList ; } catch ( MalformedObjectNameException | InstanceNotFoundException | MBeanException | ReflectionException e ) { <START_BUG> throw new SubscriptionManagerException ( ( "Cannot<seq2seq4repair_space>access<seq2seq4repair_space>mBean<seq2seq4repair_space>operations<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>" + "subscription<seq2seq4repair_space>list" ) , e ) ; <END_BUG> } } public ArrayList < Subscription > getQueueSubscriptions ( String isDurable , String isActive ) throws SubscriptionManagerException { } @ Deprecated public ArrayList < Subscription > getAllSubscriptions ( ) throws SubscriptionManagerException { } public void closeSubscription ( String subscriptionID , String destination ) throws SubscriptionManagerException { } }

Fix:
throw new SubscriptionManagerException ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>invoking<seq2seq4repair_space>mBean<seq2seq4repair_space>operations<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>" + "subscription<seq2seq4repair_space>list" ) , e ) ;
Buggy code:
public class PropertySetter { static Logger logger = Logger . getLogger ( ( "LOG4J." + ( PropertySetter . class . getName ( ) ) ) ) ; public static final int NOT_FOUND = 0 ; public static final int AS_PROPERTY = 1 ; public static final int AS_COLLECTION = 2 ; protected Object obj ; protected Class objClass ; protected PropertyDescriptor [ ] propertyDescriptors ; protected MethodDescriptor [ ] methodDescriptors ; public PropertySetter ( Object obj ) { } protected void introspect ( ) { } public static void setProperties ( Object obj , Properties properties , String prefix ) { } public void setProperties ( Properties properties , String prefix ) { } public void setProperty ( String name , String value ) { } public void setProperty ( PropertyDescriptor prop , String name , String value ) throws PropertySetterException { } public int canContainComponent ( String name ) { } public Class getObjClass ( ) { } public void addComponent ( String name , Object childComponent ) { } public void setComponent ( String name , Object childComponent ) { } String capitalizeFirstLetter ( String name ) { } protected Object convertArg ( String val , Class type ) { if ( val == null ) { return null ; } String v = val . trim ( ) ; if ( String . class . isAssignableFrom ( type ) ) { return val ; } else if ( Integer . TYPE . isAssignableFrom ( type ) ) { return new Integer ( v ) ; } else if ( Long . TYPE . isAssignableFrom ( type ) ) { return new Long ( v ) ; } else if ( Boolean . TYPE . isAssignableFrom ( type ) ) { if ( "true" . equalsIgnoreCase ( v ) ) { return Boolean . TRUE ; } else if ( "false" . equalsIgnoreCase ( v ) ) { return Boolean . FALSE ; } } else <START_BUG> if ( Priority . class . isAssignableFrom ( type ) ) { <END_BUG> return OptionConverter . toLevel ( v , ( ( Level ) ( Level . DEBUG ) ) ) ; } return null ; } protected Method getMethod ( String methodName ) { } protected PropertyDescriptor getPropertyDescriptor ( String name ) { } }

Fix:
if ( Level . class . isAssignableFrom ( type ) ) {
Buggy code:
public class TestNRTReaderWithThreads extends LuceneTestCase { AtomicInteger seq = new AtomicInteger ( 1 ) ; public void testIndexing ( ) throws Exception { Directory mainDir = newDirectory ( ) ; if ( mainDir instanceof MockDirectoryWrapper ) { ( ( MockDirectoryWrapper ) ( mainDir ) ) . setAssertNoDeleteOpenFile ( true ) ; } IndexWriter writer = new IndexWriter ( mainDir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMaxBufferedDocs ( 10 ) . setMergePolicy ( newLogMergePolicy ( false , 2 ) ) ) ; IndexReader reader = writer . getReader ( ) ; reader . close ( ) ; TestNRTReaderWithThreads . RunThread [ ] indexThreads = new TestNRTReaderWithThreads . RunThread [ 4 ] ; for ( int x = 0 ; x < ( indexThreads . length ) ; x ++ ) { indexThreads [ x ] = new TestNRTReaderWithThreads . RunThread ( ( x % 2 ) , writer ) ; indexThreads [ x ] . setName ( ( "Thread<seq2seq4repair_space>" + x ) ) ; indexThreads [ x ] . start ( ) ; } long startTime = System . currentTimeMillis ( ) ; long duration = 1000 ; while ( ( ( System . currentTimeMillis ( ) ) - startTime ) < duration ) { Thread . sleep ( 100 ) ; } int delCount = 0 ; int addCount = 0 ; for ( int x = 0 ; x < ( indexThreads . length ) ; x ++ ) { indexThreads [ x ] . run = false ; assertNull ( ( "Exception<seq2seq4repair_space>thrown:<seq2seq4repair_space>" + ( indexThreads [ x ] . ex ) ) , indexThreads [ x ] . ex ) ; addCount += indexThreads [ x ] . addCount ; delCount += indexThreads [ x ] . delCount ; } for ( int x = 0 ; x < ( indexThreads . length ) ; x ++ ) { indexThreads [ x ] . join ( ) ; } for ( int x = 0 ; x < ( indexThreads . length ) ; x ++ ) { assertNull ( ( "Exception<seq2seq4repair_space>thrown:<seq2seq4repair_space>" + ( indexThreads [ x ] . ex ) ) , indexThreads [ x ] . ex ) ; } <START_BUG> writer . close ( ) ; <END_BUG> mainDir . close ( ) ; } public class RunThread extends Thread { IndexWriter writer ; volatile boolean run = true ; volatile Throwable ex ; int delCount = 0 ; int addCount = 0 ; int type ; final Random r = new Random ( random ( ) . nextLong ( ) ) ; public RunThread ( int type , IndexWriter writer ) { } @ Override public void run ( ) { } } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class MultiPassIndexSplitter { public void split ( Version version , IndexReader in , Directory [ ] outputs , boolean seq ) throws IOException { } @ SuppressWarnings ( "deprecation" ) public static void main ( String [ ] args ) throws Exception { } private static final class FakeDeleteIndexReader extends BaseCompositeReader < MultiPassIndexSplitter . FakeDeleteAtomicIndexReader > { public FakeDeleteIndexReader ( IndexReader reader ) { } private static MultiPassIndexSplitter . FakeDeleteAtomicIndexReader [ ] initSubReaders ( IndexReader reader ) { <START_BUG> final List < AtomicReaderContext > leaves = reader . getTopReaderContext ( ) . leaves ( ) ; <END_BUG> final MultiPassIndexSplitter . FakeDeleteAtomicIndexReader [ ] subs = new MultiPassIndexSplitter . FakeDeleteAtomicIndexReader [ leaves . size ( ) ] ; int i = 0 ; for ( final AtomicReaderContext ctx : leaves ) { subs [ ( i ++ ) ] = new MultiPassIndexSplitter . FakeDeleteAtomicIndexReader ( ctx . reader ( ) ) ; } return subs ; } public void deleteDocument ( int docID ) { } public void undeleteAll ( ) { } @ Override protected void doClose ( ) { } } private static final class FakeDeleteAtomicIndexReader extends FilterAtomicReader { FixedBitSet liveDocs ; public FakeDeleteAtomicIndexReader ( AtomicReader reader ) { } @ Override public int numDocs ( ) { } public void undeleteAll ( ) { } public void deleteDocument ( int n ) { } @ Override public boolean hasDeletions ( ) { } @ Override public Bits getLiveDocs ( ) { } } }

Fix:
final List < AtomicReaderContext > leaves = reader . leaves ( ) ;
Buggy code:
public class SpamTest { public static void main ( String [ ] args ) throws ControllerException , IOException , InterruptedException { for ( int i = 0 ; i < 3 ; i ++ ) { Injector injector = Guice . createInjector ( new AppInjector ( ) ) ; DataLoader loader = injector . getInstance ( DataLoader . class ) ; List < LabeledSample > data = loader . readCSVFileReturnSamples ( "..//data//uci_spambase_centered.csv" , "start" , true ) ; Collections . shuffle ( data ) ; double trainRatio = 0.8 ; int peerCount = 10 ; int groupSize = 5 ; double testCost = 0.1 ; double regularization = 1.0 ; double perUpdateBudget = 0.05 ; int parameters = data . get ( 0 ) . getFeatures ( ) . length ; <START_BUG> double epsilon = 0.11 ; <END_BUG> int iterations = ( ( int ) ( ( ( epsilon // perUpdateBudget ) * peerCount ) // groupSize ) ) ; ExperimentConfiguration configuration = new ExperimentConfiguration ( iterations , perUpdateBudget , trainRatio , peerCount , testCost , parameters , epsilon , regularization , groupSize ) ; injector = injector . createChildInjector ( new application . ExperimentModule ( configuration , new CountDownLatch ( peerCount ) ) ) ; ExperimentFactory experimentFactory = injector . getInstance ( ExperimentFactory . class ) ; Experiment experiment = experimentFactory . getExperiment ( data , configuration ) ; SpamTest . runExperiment ( experiment ) ; } } private static void runExperiment ( Experiment experiment ) throws ControllerException , InterruptedException { } private static String meanstd ( List < Double > test ) { } }

Fix:
double epsilon = 0.1 ;
Buggy code:
public class DisableOverrideTest { static Category CAT = Category . getInstance ( DisableOverrideTest . class ) ; public static void main ( String [ ] argv ) { String configFile = null ; if ( ( argv . length ) == 1 ) configFile = argv [ 0 ] ; else DisableOverrideTest . Usage ( "Wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments." ) ; DOMConfigurator . configure ( configFile ) ; <START_BUG> Category . getDefaultHierarchy ( ) . enable ( Level . WARN ) ; <END_BUG> DisableOverrideTest . CAT . debug ( "Hello<seq2seq4repair_space>world" ) ; } static void Usage ( String msg ) { } }

Fix:
Category . getDefaultHierarchy ( ) . setThreshold ( Level . WARN ) ;
Buggy code:
@ UseNoMemoryExpensiveCodec public class TestSearchWithThreads extends LuceneTestCase { final int NUM_DOCS = atLeast ( 10000 ) ; final int NUM_SEARCH_THREADS = 5 ; final int RUN_TIME_MSEC = atLeast ( 1000 ) ; public void test ( ) throws Exception { final Directory dir = newDirectory ( ) ; final RandomIndexWriter w = new RandomIndexWriter ( random , dir ) ; final long startTime = System . currentTimeMillis ( ) ; final Document doc = new Document ( ) ; final Field body = newField ( "body" , "" , TYPE_UNSTORED ) ; doc . add ( body ) ; final StringBuilder sb = new StringBuilder ( ) ; for ( int docCount = 0 ; docCount < ( NUM_DOCS ) ; docCount ++ ) { final int numTerms = random . nextInt ( 10 ) ; for ( int termCount = 0 ; termCount < numTerms ; termCount ++ ) { sb . append ( ( random . nextBoolean ( ) ? "aaa" : "bbb" ) ) ; sb . append ( '<seq2seq4repair_space>' ) ; } <START_BUG> body . setValue ( sb . toString ( ) ) ; <END_BUG> w . addDocument ( doc ) ; sb . delete ( 0 , sb . length ( ) ) ; } final IndexReader r = w . getReader ( ) ; w . close ( ) ; final long endTime = System . currentTimeMillis ( ) ; if ( VERBOSE ) System . out . println ( ( "BUILD<seq2seq4repair_space>took<seq2seq4repair_space>" + ( endTime - startTime ) ) ) ; final IndexSearcher s = newSearcher ( r ) ; final AtomicBoolean failed = new AtomicBoolean ( ) ; final AtomicLong netSearch = new AtomicLong ( ) ; Thread [ ] threads = new Thread [ NUM_SEARCH_THREADS ] ; for ( int threadID = 0 ; threadID < ( NUM_SEARCH_THREADS ) ; threadID ++ ) { threads [ threadID ] = new Thread ( ) { TotalHitCountCollector col = new TotalHitCountCollector ( ) ; @ Override public void run ( ) { try { long totHits = 0 ; long totSearch = 0 ; long stopAt = ( System . currentTimeMillis ( ) ) + ( RUN_TIME_MSEC ) ; while ( ( ( System . currentTimeMillis ( ) ) < stopAt ) && ( ! ( failed . get ( ) ) ) ) { s . search ( new TermQuery ( new Term ( "body" , "aaa" ) ) , col ) ; totHits += col . getTotalHits ( ) ; s . search ( new TermQuery ( new Term ( "body" , "bbb" ) ) , col ) ; totHits += col . getTotalHits ( ) ; totSearch ++ ; } assertTrue ( ( ( totSearch > 0 ) && ( totHits > 0 ) ) ) ; netSearch . addAndGet ( totSearch ) ; } catch ( Exception exc ) { failed . set ( true ) ; throw new RuntimeException ( exc ) ; } } } ; threads [ threadID ] . setDaemon ( true ) ; } for ( Thread t : threads ) { t . start ( ) ; } for ( Thread t : threads ) { t . join ( ) ; } if ( VERBOSE ) System . out . println ( ( ( ( ( NUM_SEARCH_THREADS ) + "<seq2seq4repair_space>threads<seq2seq4repair_space>did<seq2seq4repair_space>" ) + ( netSearch . get ( ) ) ) + "<seq2seq4repair_space>searches" ) ) ; r . close ( ) ; dir . close ( ) ; } }

Fix:
body . setStringValue ( sb . toString ( ) ) ;
Buggy code:
public abstract class AbstractHandlerElement < E extends AbstractHandlerElement < E > > extends AbstractModelRootElement < E > { private static final long serialVersionUID = - 8326499785021909600L ; private static final String [ ] NONE = new String [ 0 ] ; private final String name ; private String [ ] subhandlers = AbstractHandlerElement . NONE ; private String encoding ; private Boolean autoflush ; private String levelName ; private AbstractFormatterElement < ? > formatter ; private PropertiesElement properties ; protected AbstractHandlerElement ( final String name , final QName elementName ) { } public List < String > getSubhandlers ( ) { } public String getName ( ) { } public String getEncoding ( ) { } public Boolean getAutoflush ( ) { } public String getLevelName ( ) { } public AbstractFormatterElement < ? > getFormatter ( ) { } public PropertiesElement getProperties ( ) { } @ Override public void writeContent ( final XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { } protected void writeElements ( final XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { if ( ( levelName ) != null ) { streamWriter . writeEmptyElement ( "level" ) ; streamWriter . writeAttribute ( "name" , levelName ) ; } if ( ( formatter ) != null ) { streamWriter . writeStartElement ( "formatter" ) ; final QName elementName = formatter . getElementName ( ) ; streamWriter . writeStartElement ( elementName . getNamespaceURI ( ) , elementName . getLocalPart ( ) ) ; formatter . writeContent ( streamWriter ) ; streamWriter . writeEndElement ( ) ; } if ( ( ( subhandlers ) != null ) && ( ( subhandlers . length ) > 0 ) ) { streamWriter . writeStartElement ( "subhandlers" ) ; for ( String name : subhandlers ) { streamWriter . writeEmptyElement ( "handler" ) ; streamWriter . writeAttribute ( "name" , name ) ; } streamWriter . writeEndElement ( ) ; } <START_BUG> if ( ( properties ) != null ) { <END_BUG> streamWriter . writeStartElement ( "properties" ) ; properties . writeContent ( streamWriter ) ; } } protected void writeAttributes ( final XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { } void setLevelName ( final String levelName ) { } void setEncoding ( final String encoding ) { } void setAutoflush ( final Boolean autoflush ) { } void setFormatter ( final AbstractFormatterElement < ? > formatter ) { } void setProperties ( final PropertiesElement properties ) { } void setSubhandlers ( final String [ ] subhandlers ) { } AbstractHandlerAdd getAdd ( ) { } abstract AbstractHandlerAdd createAdd ( String name ) { } }

Fix:
if ( ( ( properties ) != null ) && ( ( properties . size ( ) ) > 0 ) ) {
Buggy code:
public class IdentifierRule { public static final Set < String > EMPTY_SET = new HashSet < String > ( 0 ) ; public static final String DEFAULT_RULE = "default" ; public static char UNDERSCORE = '_' ; private String _name ; private int _maxLength = 128 ; private boolean _nullable = false ; private boolean _allowTruncation = false ; private boolean _allowCompaction = true ; private boolean _canDelimit = true ; private boolean _mustDelimit = false ; private boolean _mustBeginWithLetter = true ; private boolean _onlyLettersDigitsUnderscores = true ; private String _specialCharacters = "" ; private Set < String > _reservedWords = null ; private boolean _delimitReservedWords = false ; private String _wildcard = "%" ; public void setName ( String name ) { } public String getName ( ) { } public void setMaxLength ( int maxLength ) { } public int getMaxLength ( ) { } public void setAllowTruncation ( boolean allowTruncation ) { } public boolean isAllowTruncation ( ) { } public void setNullable ( boolean nullable ) { } public boolean isNullable ( ) { } public void setAllowCompaction ( boolean allowCompaction ) { } public boolean getAllowCompaction ( ) { } public void setCanDelimit ( boolean canDelimit ) { } public boolean getCanDelimit ( ) { } public void setMustDelimit ( boolean mustDelimit ) { } public boolean getMustDelimit ( ) { } public void setMustBeginWithLetter ( boolean mustBeginWithLetter ) { } public boolean isMustBeginWithLetter ( ) { } public void setOnlyLettersDigitsUnderscores ( boolean onlyLettersDigitsUnderscores ) { } public boolean isOnlyLettersDigitsUnderscores ( ) { } public void setReservedWords ( Set < String > reservedWords ) { } public Set < String > getReservedWords ( ) { } public void setSpecialCharacters ( String specialCharacters ) { } public String getSpecialCharacters ( ) { } public void setDelimitReservedWords ( boolean delimitReservedWords ) { <START_BUG> delimitReservedWords = _delimitReservedWords ; <END_BUG> } public boolean getDelimitReservedWords ( ) { } public boolean requiresDelimiters ( String identifier ) { } public boolean isReservedWord ( String identifier ) { } }

Fix:
_delimitReservedWords = delimitReservedWords ;
Buggy code:
public class PayloadHelper { private byte [ ] payloadField = new byte [ ] { 1 } ; private byte [ ] payloadMultiField1 = new byte [ ] { 2 } ; private byte [ ] payloadMultiField2 = new byte [ ] { 4 } ; public static final String NO_PAYLOAD_FIELD = "noPayloadField" ; public static final String MULTI_FIELD = "multiField" ; public static final String FIELD = "field" ; public class PayloadAnalyzer extends Analyzer { public TokenStream tokenStream ( String fieldName , Reader reader ) { } } public class PayloadFilter extends TokenFilter { String fieldName ; int numSeen = 0 ; PayloadAttribute payloadAtt ; public PayloadFilter ( TokenStream input , String fieldName ) { } public boolean incrementToken ( ) throws IOException { } } public IndexSearcher setUp ( Similarity similarity , int numDocs ) throws IOException { RAMDirectory directory = new RAMDirectory ( ) ; PayloadHelper . PayloadAnalyzer analyzer = new PayloadHelper . PayloadAnalyzer ( ) ; IndexWriter writer = new IndexWriter ( directory , analyzer , true ) ; writer . setSimilarity ( similarity ) ; for ( int i = 0 ; i < numDocs ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( PayloadHelper . FIELD , English . intToEnglish ( i ) , Store . YES , Index . ANALYZED ) ) ; doc . add ( new org . apache . lucene . document . Field ( PayloadHelper . MULTI_FIELD , ( ( ( English . intToEnglish ( i ) ) + "<seq2seq4repair_space>" ) + ( English . intToEnglish ( i ) ) ) , Store . YES , Index . ANALYZED ) ) ; doc . add ( new org . apache . lucene . document . Field ( PayloadHelper . NO_PAYLOAD_FIELD , English . intToEnglish ( i ) , Store . YES , Index . ANALYZED ) ) ; writer . addDocument ( doc ) ; } writer . close ( ) ; <START_BUG> IndexSearcher searcher = new IndexSearcher ( directory ) ; <END_BUG> searcher . setSimilarity ( similarity ) ; return searcher ; } }

Fix:
IndexSearcher searcher = new IndexSearcher ( directory , true ) ;
Buggy code:
public class RelationalDataUnitImpl extends AbstractWritableMetadataDataUnit implements ManageableWritableRelationalDataUnit { private static final Logger LOG = LoggerFactory . getLogger ( RelationalDataUnitImpl . class ) ; private final DataUnitDatabaseConnectionProvider dataUnitDatabase ; private static final String DB_TABLE_NAME_BINDING = "dbTableName" ; private Set < String > databaseTables = new HashSet < > ( ) ; private static final String UPDATE_EXISTING_TABLE = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + ( ( "DELETE<seq2seq4repair_space>" + "{<seq2seq4repair_space>" ) + "?s<seq2seq4repair_space><" ) ) + ( RelationalDataUnit . PREDICATE_DB_TABLE_NAME ) ) + "><seq2seq4repair_space>?o<seq2seq4repair_space>" ) + "}<seq2seq4repair_space>" ) + "INSERT<seq2seq4repair_space>" ) + "{<seq2seq4repair_space>" ) + "?s<seq2seq4repair_space><" ) + ( RelationalDataUnit . PREDICATE_DB_TABLE_NAME ) ) + "><seq2seq4repair_space>?" ) + ( RelationalDataUnitImpl . DB_TABLE_NAME_BINDING ) ) + "<seq2seq4repair_space>" ) + "}<seq2seq4repair_space>" ) + "WHERE<seq2seq4repair_space>" ) + "{" ) + "?s<seq2seq4repair_space><" ) + ( MetadataDataUnit . PREDICATE_SYMBOLIC_NAME ) ) + "><seq2seq4repair_space>?" ) + ( SYMBOLIC_NAME_BINDING ) ) + "<seq2seq4repair_space>.<seq2seq4repair_space>" ) + "?s<seq2seq4repair_space><" ) + ( RelationalDataUnit . PREDICATE_DB_TABLE_NAME ) ) + "><seq2seq4repair_space>?o<seq2seq4repair_space>" ) + "}" ; private AtomicInteger tableIndex = new AtomicInteger ( 1 ) ; public RelationalDataUnitImpl ( String dataUnitName , String databaseURL , String writeContextString , CoreServiceBus coreServices ) { } @ Override public void addExistingDatabaseTable ( final String symbolicName , final String dbTableName ) throws DataUnitException { checkForMultithreadAccess ( ) ; <START_BUG> if ( checkTableExists ( dbTableName ) ) { <END_BUG> throw new DataUnitException ( ( ( "Database<seq2seq4repair_space>table<seq2seq4repair_space>" + dbTableName ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist!" ) ) ; } saveTableInRepository ( symbolicName , dbTableName ) ; this . databaseTables . add ( dbTableName ) ; } @ Override public String addNewDatabaseTable ( String symbolicName ) throws DataUnitException { } private void saveTableInRepository ( final String symbolicName , final String dbTableName ) throws DataUnitException { } private boolean checkTableExists ( String dbTableName ) throws DataUnitException { } @ Override public void updateExistingTableName ( String symbolicName , String newDbTableName ) throws DataUnitException { } @ Override public Iteration getIteration ( ) throws DataUnitException { } @ Override public Connection getDatabaseConnection ( ) throws DataUnitException { } @ Override public Type getType ( ) { } @ Override public boolean isType ( Type dataUnitType ) { } private String generateTableName ( String symbolicName ) throws DataUnitException { } @ Override public void clear ( ) throws DataUnitException { } private void dropAllDatabaseTables ( ) throws DataUnitException { } public void release ( ) { } }

Fix:
if ( ! ( checkTableExists ( dbTableName ) ) ) {
Buggy code:
public class GpuUploader { static final String TAG = "GpuUploader" ; static final int [ ] CUBE_MAP_SIDES = new int [ ] { GLES20 . GL_TEXTURE_CUBE_MAP_POSITIVE_X , GLES20 . GL_TEXTURE_CUBE_MAP_NEGATIVE_X , GLES20 . GL_TEXTURE_CUBE_MAP_POSITIVE_Z , GLES20 . GL_TEXTURE_CUBE_MAP_NEGATIVE_Z , GLES20 . GL_TEXTURE_CUBE_MAP_POSITIVE_Y , GLES20 . GL_TEXTURE_CUBE_MAP_NEGATIVE_Y } ; ResourceLoader resourceLoader ; HashMap < Geometry , GeometryBuffers > geometryBuffers = new HashMap < Geometry , GeometryBuffers > ( ) ; HashMap < Object3d , Integer > objectBuffers = new HashMap < Object3d , Integer > ( ) ; HashMap < Texture , Integer > textures = new HashMap < Texture , Integer > ( ) ; HashMap < CubeMapTexture , Integer > cubeMapTextures = new HashMap < CubeMapTexture , Integer > ( ) ; ArrayList < Program > shaderPrograms = new ArrayList < Program > ( ) ; public GpuUploader ( ResourceLoader resourceLoader ) { } public Program getProgram ( Scene scene , Material material ) { } public GeometryBuffers upload ( Geometry geometry3d ) { } public Integer uploadVertexColors ( Object3d object ) { } public void upload ( Renderer3d renderer3d , Texture texture , int activeTexture ) { } public void upload ( Renderer3d renderer3d , CubeMapTexture cubeMapTexture , int activeTexture ) { } public void unload ( Object o ) { if ( o instanceof Geometry ) { if ( geometryBuffers . containsKey ( o ) ) { ( ( Geometry ) ( o ) ) . status = 0 ; GeometryBuffers buffers = geometryBuffers . get ( o ) ; if ( ( buffers . vertexBufferId ) != null ) { GLES20 . glDeleteBuffers ( 1 , IntBuffer . wrap ( new int [ ] { buffers . vertexBufferId } ) ) ; } if ( ( buffers . normalsBufferId ) != null ) { GLES20 . glDeleteBuffers ( 1 , IntBuffer . wrap ( new int [ ] { buffers . normalsBufferId } ) ) ; } if ( ( buffers . uvsBufferId ) != null ) { GLES20 . glDeleteBuffers ( 1 , IntBuffer . wrap ( new int [ ] { buffers . uvsBufferId } ) ) ; } if ( ( buffers . facesBufferId ) != null ) { GLES20 . glDeleteBuffers ( 1 , IntBuffer . wrap ( new int [ ] { buffers . facesBufferId } ) ) ; } geometryBuffers . remove ( o ) ; } } else if ( o instanceof Texture ) { if ( textures . containsKey ( o ) ) { ( ( Texture ) ( o ) ) . status = 0 ; GLES20 . glDeleteTextures ( 1 , IntBuffer . wrap ( new int [ ] { textures . get ( o ) } ) ) ; textures . remove ( o ) ; } } else if ( o instanceof CubeMapTexture ) { if ( cubeMapTextures . containsKey ( o ) ) { ( ( Texture ) ( o ) ) . status = 0 ; GLES20 . glDeleteTextures ( 1 , IntBuffer . wrap ( new int [ ] { cubeMapTextures . get ( o ) } ) ) ; <START_BUG> textures . remove ( o ) ; <END_BUG> } } else if ( o instanceof Object3d ) { Integer bufferId = objectBuffers . remove ( o ) ; if ( bufferId != null ) { GLES20 . glDeleteBuffers ( 1 , IntBuffer . wrap ( new int [ ] { bufferId } ) ) ; } } } public void reset ( ) { } No newline ; at end ; of file ; }

Fix:
cubeMapTextures . remove ( o ) ;
Buggy code:
public class Game { ArrayList players = new ArrayList ( ) ; int [ ] places = new int [ 6 ] ; int [ ] purses = new int [ 6 ] ; boolean [ ] inPenaltyBox = new boolean [ 6 ] ; LinkedList popQuestions = new LinkedList ( ) ; LinkedList scienceQuestions = new LinkedList ( ) ; LinkedList sportsQuestions = new LinkedList ( ) ; LinkedList rockQuestions = new LinkedList ( ) ; int currentPlayer = 0 ; boolean isGettingOutOfPenaltyBox ; public Game ( ) { } public String createRockQuestion ( int index ) { } public boolean isPlayable ( ) { } public boolean add ( String playerName ) { players . add ( playerName ) ; places [ howManyPlayers ( ) ] = 0 ; purses [ howManyPlayers ( ) ] = 0 ; inPenaltyBox [ howManyPlayers ( ) ] = false ; <START_BUG> System . out . println ( ( playerName + "<seq2seq4repair_space>was<seq2seq4repair_space>added!" ) ) ; <END_BUG> System . out . println ( ( "They<seq2seq4repair_space>are<seq2seq4repair_space>player<seq2seq4repair_space>number<seq2seq4repair_space>" + ( players . size ( ) ) ) ) ; return true ; } public int howManyPlayers ( ) { } public void roll ( int roll ) { } private void askQuestion ( ) { } private String currentCategory ( ) { } public boolean wasCorrectlyAnswered ( ) { } public boolean wrongAnswer ( ) { } private boolean didPlayerWin ( ) { } }

Fix:
System . out . println ( ( playerName + "<seq2seq4repair_space>was<seq2seq4repair_space>added" ) ) ;
Buggy code:
public class BayesClassifierTest extends TestCase { protected Model model ; public BayesClassifierTest ( String s ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test ( ) { BayesClassifier classifier = new BayesClassifier ( ) ; ClassifierResult result ; String [ ] document = new String [ ] { "aa" , "ff" } ; result = classifier . classify ( model , document , "unknown" ) ; assertTrue ( "category<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( result != null ) ) ; assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "e" ) , result . getLabel ( ) . equals ( "e" ) ) ; document = new String [ ] { "ff" } ; result = classifier . classify ( model , document , "unknown" ) ; assertTrue ( "category<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( result != null ) ) ; <START_BUG> assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "unknown" ) , result . getLabel ( ) . equals ( "unknown" ) ) ; <END_BUG> document = new String [ ] { "cc" } ; result = classifier . classify ( model , document , "unknown" ) ; assertTrue ( "category<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( result != null ) ) ; assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "d" ) , result . getLabel ( ) . equals ( "d" ) ) ; } public void testResults ( ) throws Exception { } }

Fix:
assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "d" ) , result . getLabel ( ) . equals ( "d" ) ) ;
Buggy code:
public class RAttributeAttributeGroup extends org . tigris . scarab . om . BaseRAttributeAttributeGroup implements Persistent { <START_BUG> public void delete ( ScarabUser user ) throws Exception { <END_BUG> Criteria c = new Criteria ( ) . add ( GROUP_ID , getGroupId ( ) ) . add ( ATTRIBUTE_ID , getAttributeId ( ) ) ; RAttributeAttributeGroupPeer . doDelete ( c ) ; } }

Fix:
public void delete ( ) throws Exception {
Buggy code:
@ ManagedBean @ RequestScoped public class InputSearchBacking { private static final Logger logger = LoggerFactory . getLogger ( InputSearchBacking . class ) ; private String searchText ; public void searchActionListener ( ActionEvent actionEvent ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; PhaseId phaseId = facesContext . getCurrentPhaseId ( ) ; InputSearchBacking . logger . debug ( "searchActionListener:<seq2seq4repair_space>phaseId=[{0}]" , phaseId . toString ( ) ) ; <START_BUG> String phaseName = phaseId . getName ( ) ; <END_BUG> FacesMessage facesMessage = new FacesMessage ( ( ( "The<seq2seq4repair_space>searchActionListener<seq2seq4repair_space>method<seq2seq4repair_space>was<seq2seq4repair_space>called<seq2seq4repair_space>during<seq2seq4repair_space>the<seq2seq4repair_space>" + phaseName ) + "<seq2seq4repair_space>phase<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>JSF<seq2seq4repair_space>lifecycle." ) ) ; facesContext . addMessage ( null , facesMessage ) ; } public String getSearchText ( ) { } public void setSearchText ( String searchText ) { } }

Fix:
String phaseName = phaseId . toString ( ) ;
Buggy code:
public class TestConcurrentMergeScheduler extends LuceneTestCase { private class FailOnlyOnFlush extends MockDirectoryWrapper . Failure { boolean doFail ; boolean hitExc ; @ Override public void setDoFail ( ) { } @ Override public void clearDoFail ( ) { } @ Override public void eval ( MockDirectoryWrapper dir ) throws IOException { } } public void testFlushExceptions ( ) throws IOException { } public void testDeleteMerging ( ) throws IOException { } public void testNoExtraFiles ( ) throws IOException { } public void testNoWaitClose ( ) throws IOException { } public void testMaxMergeCount ( ) throws Exception { } private static class TrackingCMS extends ConcurrentMergeScheduler { long totMergedBytes ; public TrackingCMS ( ) { } @ Override public void doMerge ( MergePolicy . OneMerge merge ) throws IOException { } } public void testTotalBytesSize ( ) throws Exception { Directory d = newDirectory ( ) ; if ( d instanceof MockDirectoryWrapper ) { ( ( MockDirectoryWrapper ) ( d ) ) . setThrottling ( NEVER ) ; } IndexWriterConfig iwc = newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ; iwc . setMaxBufferedDocs ( 5 ) ; iwc . setMergeScheduler ( new TestConcurrentMergeScheduler . TrackingCMS ( ) ) ; if ( _TestUtil . getPostingsFormat ( "id" ) . equals ( "SimpleText" ) ) { iwc . setCodec ( _TestUtil . alwaysPostingsFormat ( new Lucene41PostingsFormat ( ) ) ) ; } RandomIndexWriter w = new RandomIndexWriter ( random ( ) , d , iwc ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . StringField ( "id" , ( "" + i ) , Store . NO ) ) ; w . addDocument ( doc ) ; if ( random ( ) . nextBoolean ( ) ) { w . deleteDocuments ( new Term ( "id" , ( "" + ( random ( ) . nextInt ( ( i + 1 ) ) ) ) ) ) ; } } <START_BUG> assertTrue ( ( ( ( ( TestConcurrentMergeScheduler . TrackingCMS ) ( iwc . getMergeScheduler ( ) ) ) . totMergedBytes ) != 0 ) ) ; <END_BUG> w . close ( ) ; d . close ( ) ; } }

Fix:
assertTrue ( ( ( ( ( TestConcurrentMergeScheduler . TrackingCMS ) ( w . w . getConfig ( ) . getMergeScheduler ( ) ) ) . totMergedBytes ) != 0 ) ) ;
Buggy code:
public class GameScreen implements Screen { public static float PIXEL_PER_METER = 100 ; protected Game game ; protected SpriteBatch batch ; protected Stage stage ; protected World world ; protected Box2DDebugRenderer debugRenderer ; private Player player ; public GameScreen ( Game game ) { } @ Override public void show ( ) { <START_BUG> world = new World ( new Vector2 ( 0 , ( - 9.81F ) ) , false ) ; <END_BUG> stage = new Stage ( new ExtendViewport ( ( 1280.0F // ( GameScreen . PIXEL_PER_METER ) ) , ( 720.0F // ( GameScreen . PIXEL_PER_METER ) ) ) ) ; input . setInputProcessor ( stage ) ; player = new Player ( world , 4 , 7 ) ; stage . addListener ( new InputListener ( ) { public boolean touchDown ( InputEvent event , float x , float y , int pointer , int button ) { player . jump ( ) ; Log . d ( "GameSreen" , "touchDown" ) ; return true ; } } ) ; stage . addActor ( player ) ; stage . addActor ( new com . lappard . android . actors . Floor ( world , 0 , 0 ) ) ; stage . addActor ( new com . lappard . android . actors . Floor ( world , ( 1.28F * 1 ) , 0 ) ) ; stage . addActor ( new com . lappard . android . actors . Floor ( world , ( 1.28F * 2 ) , 0 ) ) ; stage . addActor ( new com . lappard . android . actors . Floor ( world , ( 1.28F * 3 ) , 0 ) ) ; stage . addActor ( new com . lappard . android . actors . Floor ( world , ( 1.28F * 4 ) , 0 ) ) ; stage . addActor ( new com . lappard . android . actors . Floor ( world , ( 1.28F * 5 ) , 0 ) ) ; } @ Override public void render ( float delta ) { } @ Override public void resize ( int width , int height ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } @ Override public void hide ( ) { } @ Override public void dispose ( ) { } }

Fix:
world = new World ( new Vector2 ( 0 , ( ( - 9.81F ) * 2 ) ) , false ) ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ SpringApplicationConfiguration ( classes = BubblesApplication . class ) @ WebAppConfiguration @ Transactional @ Sql ( { "//test-schema.sql" , "//test-user-data.sql" } ) public class UserControllerTest { @ Autowired private WebApplicationContext wac ; private MockMvc mockMvc ; @ Rule public ExpectedException thrown = ExpectedException . none ( ) ; @ Before public void setup ( ) { } @ Test public void testGetUserById ( ) throws Exception { } @ Test public void testGetUserByDeviceId ( ) throws Exception { } @ Test public void testGetUserByAndroidId ( ) throws Exception { } @ Test public void testGetUserStatsById ( ) throws Exception { } @ Test public void testUpdateScore ( ) throws Exception { } @ Test public void testAddScore ( ) throws Exception { } @ Test public void testUpdateNickname ( ) throws Exception { } @ Test public void testUpdateGender ( ) throws Exception { } @ Test public void testSaveUser ( ) throws Exception { } @ Test public void testGetBubblesByUserId ( ) throws Exception { } @ Test public void testGetParticipatedBubblesByUserId ( ) throws Exception { } @ Test public void testSaveBubble ( ) throws Exception { } @ Test public void testSaveReply ( ) throws Exception { this . mockMvc . perform ( post ( "//users//0//replies" ) . contentType ( APPLICATION_JSON ) . content ( "{\"content\":\"hello<seq2seq4repair_space>world\"}" ) . accept ( APPLICATION_JSON ) ) . andExpect ( status ( ) . isNotFound ( ) ) . andExpect ( content ( ) . contentType ( APPLICATION_JSON ) ) ; this . mockMvc . perform ( post ( "//users//10000//replies" ) . contentType ( APPLICATION_JSON ) . content ( "{\"content\":\"hello<seq2seq4repair_space>world\",<seq2seq4repair_space>\"latitude\":39.1,<seq2seq4repair_space>\"longitude\":115.5,<seq2seq4repair_space>\"distance\":2000}" ) . accept ( APPLICATION_JSON ) ) . andExpect ( status ( ) . isUnprocessableEntity ( ) ) . andExpect ( content ( ) . contentType ( APPLICATION_JSON ) ) ; <START_BUG> this . mockMvc . perform ( post ( "//users//10000//bubbles" ) . contentType ( APPLICATION_JSON ) . content ( "{\"content\":\"hello<seq2seq4repair_space>world\",<seq2seq4repair_space>\"latitude\":39.1,<seq2seq4repair_space>\"longitude\":115.5,<seq2seq4repair_space>\"distance\":2000,<seq2seq4repair_space>\"parentId\":10000,<seq2seq4repair_space>\"parentBubbleId\":10000}" ) . accept ( APPLICATION_JSON ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( content ( ) . contentType ( APPLICATION_JSON_UTF8 ) ) ; <END_BUG> } }

Fix:
this . mockMvc . perform ( post ( "//users//10000//replies" ) . contentType ( APPLICATION_JSON ) . content ( "{\"content\":\"hello<seq2seq4repair_space>world\",<seq2seq4repair_space>\"latitude\":39.1,<seq2seq4repair_space>\"longitude\":115.5,<seq2seq4repair_space>\"distance\":2000,<seq2seq4repair_space>\"parentId\":10000,<seq2seq4repair_space>\"parentBubbleId\":10000}" ) . accept ( APPLICATION_JSON ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( content ( ) . contentType ( APPLICATION_JSON_UTF8 ) ) ;
Buggy code:
public class CoNLL2TTL { public static void main ( String [ ] args ) { } SemLink semlink ; private CoNLL2TTL ( String filename ) { } private void process ( String filename ) { AbstractCoNLL09Reader reader = new AllCoNLL09Reader ( new File ( filename ) ) ; int snum = 1 ; RDF rdf = new RDF ( ) ; for ( Sentence sen : reader . readAll ( ) ) { <START_BUG> SentenceRDF rdfs = new SentenceRDF ( rdf , semlink , sen , snum ) ; <END_BUG> snum ++ ; break ; } rdf . write ( ) ; } }

Fix:
SentenceRDF rdfs = new SentenceRDF ( rdf , semlink , sen , new Integer ( snum ) . toString ( ) ) ;
Buggy code:
public class Wildcard extends SingleTypeReference { public static final int UNBOUND = 0 ; public static final int EXTENDS = 1 ; public static final int SUPER = 2 ; public TypeReference bound ; public int kind ; public Wildcard ( int kind ) { } public char [ ] [ ] getParameterizedTypeName ( ) { } public char [ ] [ ] getTypeName ( ) { } private TypeBinding internalResolveType ( Scope scope , ReferenceBinding genericType , int rank ) { TypeBinding boundType = null ; if ( ( this . bound ) != null ) { boundType = ( ( scope . kind ) == ( Scope . CLASS_SCOPE ) ) ? this . bound . resolveType ( ( ( ClassScope ) ( scope ) ) ) : this . bound . resolveType ( ( ( BlockScope ) ( scope ) ) , true ) ; if ( boundType == null ) { return null ; } } <START_BUG> WildcardBinding wildcard = scope . environment ( ) . createWildcard ( genericType , rank , boundType , this . kind ) ; <END_BUG> return this . resolvedType = wildcard ; } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveTypeArgument ( BlockScope blockScope , ReferenceBinding genericType , int rank ) { } public TypeBinding resolveTypeArgument ( ClassScope classScope , ReferenceBinding genericType , int rank ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
WildcardBinding wildcard = scope . environment ( ) . createWildcard ( genericType , rank , boundType , null , this . kind ) ;
Buggy code:
public class NewDecryptionCommand extends AbstractHandler { private ExecutionEvent event ; private IFile file = null ; public Object execute ( ExecutionEvent event ) throws ExecutionException { } private void createDecryption ( ) { try { NewDecryptionWizard wizard = new NewDecryptionWizard ( ) ; IDocument document = null ; if ( ( HandlerUtil . getActivePart ( event ) ) instanceof IEditorPart ) { final IEditorPart editorPart = ( ( IEditorPart ) ( HandlerUtil . getActivePart ( event ) ) ) ; if ( editorPart . isDirty ( ) ) { if ( ( null != ( editorPart . getTitle ( ) ) ) && ( ( editorPart . getTitle ( ) . length ( ) ) > 0 ) ) { IRunnableWithProgress op = new IRunnableWithProgress ( ) { public void run ( final IProgressMonitor monitor ) { editorPart . doSave ( monitor ) ; } } ; try { PlatformUI . getWorkbench ( ) . getProgressService ( ) . runInUI ( XSTUIPlugin . getActiveWorkbenchWindow ( ) , op , ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ) ; } catch ( InvocationTargetException ite ) { Utils . log ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>saving<seq2seq4repair_space>editor<seq2seq4repair_space>content" , ite ) ; } catch ( InterruptedException ie ) { Utils . log ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>saving<seq2seq4repair_space>editor<seq2seq4repair_space>content" , ie ) ; } } else { editorPart . doSaveAs ( ) ; } } file = ( ( IFile ) ( editorPart . getEditorInput ( ) . getAdapter ( IFile . class ) ) ) ; document = ( ( IDocument ) ( editorPart . getAdapter ( IDocument . class ) ) ) ; } else { ISelection selection = HandlerUtil . getCurrentSelection ( event ) ; if ( selection instanceof IStructuredSelection ) { file = ( ( IFile ) ( ( ( IStructuredSelection ) ( selection ) ) . getFirstElement ( ) ) ) ; } } if ( ( ( file ) != null ) && ( file . isAccessible ( ) ) ) { wizard . init ( file ) ; CreateDecryption decryption = new CreateDecryption ( ) ; String fileLocation = "" ; if ( document == null ) { fileLocation = file . getLocation ( ) . toString ( ) ; } decryptData ( decryption , wizard , document , fileLocation ) ; } else { <START_BUG> MessageDialog . openInformation ( HandlerUtil . getActiveShell ( event ) , NewDecryptionCommand_0 , NLS . bind ( RemoveReadOnlyFlag , "decrypt" ) ) ; <END_BUG> } } catch ( Exception ex ) { Utils . showErrorDialog ( HandlerUtil . getActiveShell ( event ) , NewDecryptionCommand_0 , NewDecryptionCommand_1 , ex ) ; Utils . log ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occured<seq2seq4repair_space>during<seq2seq4repair_space>decrypting" , ex ) ; } } private void decryptData ( final CreateDecryption data , final NewDecryptionWizard wizard , final IDocument document , final String filename ) throws Exception { } }

Fix:
MessageDialog . openInformation ( HandlerUtil . getActiveShell ( event ) , NewDecryptionCommand_0 , NLS . bind ( RemoveReadOnlyFlag , NewDecryptionCommand_3 ) ) ;
Buggy code:
public class ProgressBar extends Control { public ProgressBar ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { NSProgressIndicator widget = ( ( NSProgressIndicator ) ( new SWTProgressIndicator ( ) . alloc ( ) ) ) ; <START_BUG> widget . initWithFrame ( new NSRect ( ) ) ; <END_BUG> widget . setUsesThreadedAnimation ( false ) ; widget . setIndeterminate ( ( ( ( style ) & ( SWT . INDETERMINATE ) ) != 0 ) ) ; if ( ( ( style ) & ( SWT . INDETERMINATE ) ) != 0 ) widget . startAnimation ( null ) ; view = widget ; } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getSelection ( ) { } public int getState ( ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setSelection ( int value ) { } public void setState ( int state ) { } }

Fix:
widget . init ( ) ;
Buggy code:
public class PopupSettings implements IClusterable { private static final Logger log = LoggerFactory . getLogger ( PopupSettings . class ) ; private static final long serialVersionUID = 1L ; public static final int LOCATION_BAR = 1 ; public static final int MENU_BAR = 2 ; public static final int RESIZABLE = 4 ; public static final int SCROLLBARS = 8 ; public static final int STATUS_BAR = 16 ; public static final int TOOL_BAR = 32 ; private int displayFlags ; private int height = - 1 ; private int left = - 1 ; private String target = "href" ; private int top = - 1 ; private int width = - 1 ; private String windowName = null ; public PopupSettings ( ) { } public PopupSettings ( final int displayFlags ) { } public PopupSettings ( String windowName ) { } public PopupSettings ( String windowName , final int displayFlags ) { } public String getPopupJavaScript ( ) { String windowTitle = windowName ; if ( windowTitle == null ) { windowTitle = "" ; } else { windowTitle = windowTitle . replaceAll ( "\\W" , "_" ) ; } <START_BUG> StringBuffer script = new StringBuffer ( ( ( "var<seq2seq4repair_space>w<seq2seq4repair_space>=<seq2seq4repair_space>window.open(" + ( target ) ) + ",<seq2seq4repair_space>'" ) ) . append ( windowTitle ) . append ( "',<seq2seq4repair_space>'" ) ; <END_BUG> script . append ( "scrollbars=" ) . append ( flagToString ( PopupSettings . SCROLLBARS ) ) ; script . append ( ",location=" ) . append ( flagToString ( PopupSettings . LOCATION_BAR ) ) ; script . append ( ",menuBar=" ) . append ( flagToString ( PopupSettings . MENU_BAR ) ) ; script . append ( ",resizable=" ) . append ( flagToString ( PopupSettings . RESIZABLE ) ) ; script . append ( ",status=" ) . append ( flagToString ( PopupSettings . STATUS_BAR ) ) ; script . append ( ",toolbar=" ) . append ( flagToString ( PopupSettings . TOOL_BAR ) ) ; if ( ( width ) != ( - 1 ) ) { script . append ( ",width=" ) . append ( width ) ; } if ( ( height ) != ( - 1 ) ) { script . append ( ",height=" ) . append ( height ) ; } if ( ( left ) != ( - 1 ) ) { script . append ( ",left=" ) . append ( left ) ; } if ( ( top ) != ( - 1 ) ) { script . append ( ",top=" ) . append ( top ) ; } script . append ( "');<seq2seq4repair_space>if(w.blur)<seq2seq4repair_space>w.focus();" ) . append ( "<seq2seq4repair_space>return<seq2seq4repair_space>false;" ) ; return script . toString ( ) ; } public PopupSettings setHeight ( int popupHeight ) { } public PopupSettings setLeft ( int popupPositionLeft ) { } public void setTarget ( String target ) { } public PopupSettings setTop ( int popupPositionTop ) { } public PopupSettings setWidth ( int popupWidth ) { } public PopupSettings setWindowName ( String popupWindowName ) { } private String flagToString ( final int flag ) { } }

Fix:
StringBuilder script = new StringBuilder ( ( ( "var<seq2seq4repair_space>w<seq2seq4repair_space>=<seq2seq4repair_space>window.open(" + ( target ) ) + ",<seq2seq4repair_space>'" ) ) . append ( windowTitle ) . append ( "',<seq2seq4repair_space>'" ) ;
Buggy code:
public class FileRW { private static Scanner scanner ; public static void processTheFile ( ) { } public static String read ( ) { } <START_BUG> public static void printResults ( long [ ] cases ) { <END_BUG> try { PrintWriter writer = new PrintWriter ( "Output.txt" , "UTF-8" ) ; for ( int j = 0 ; j < ( cases . length ) ; j ++ ) { writer . println ( ( ( ( "Case<seq2seq4repair_space>#" + ( j + 1 ) ) + ":<seq2seq4repair_space>" ) + ( cases [ j ] ) ) ) ; } writer . close ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } System . out . println ( "Printing<seq2seq4repair_space>OK!" ) ; } }

Fix:
public static void printResults ( String [ ] cases ) {