nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CompletionTask implements Callable < Void > { private static final Logger LOGGER = LoggerFactory . getLogger ( CompletionTask . class ) ; private String pid ; private Path bagDir ; private StorageProvider storageProvider ; private TagFilesService tagFilesSvc ; private StorageEventListener eventListener ; private ThreadPoolService threadPoolSvc ; private DcStorage dcStorage ; List < Class < ? extends AbstractKeyValueFile > > classes ; private boolean dryRun = false ; public CompletionTask ( String pid , StorageProvider storageProvider , TagFilesService tagFilesSvc , StorageEventListener eventListener , ThreadPoolService threadPoolSvc , DcStorage dcStorage ) { } private void initTagFileClasses ( ) { } public void setDryRun ( boolean dryRun ) { } @ Override public Void call ( ) throws Exception { } private void checkArtifacts ( Set < Path > plFiles ) throws IOException { } private void verifyMessageDigests ( Set < Path > plFiles ) throws IOException { } private Map < Path , Future < String > > calcMessageDigests ( Set < Path > plFiles ) { } private void compareMessageDigests ( Map < Path , Future < String > > calcMd ) throws IOException { } private void verifyTagFiles ( Set < Path > plFiles ) throws IOException { } private AbstractTagFileTask createTask ( Class < ? extends AbstractKeyValueFile > clazz , String relPath ) { AbstractTagFileTask task = null ; if ( clazz == ( FileMetadataTagFile . class ) ) { task = new au . edu . anu . datacommons . storage . event . tasks . MetadataTask ( pid , storageProvider , relPath , tagFilesSvc ) ; } else if ( clazz == ( PronomFormatsTagFile . class ) ) { task = new au . edu . anu . datacommons . storage . event . tasks . PronomTask ( pid , storageProvider , relPath , tagFilesSvc ) ; } else if ( clazz == ( TimestampsTagFile . class ) ) { task = new au . edu . anu . datacommons . storage . event . tasks . TimestampTask ( pid , storageProvider , relPath , tagFilesSvc ) ; } else if ( clazz == ( VirusScanTagFile . class ) ) { task = new au . edu . anu . datacommons . storage . event . tasks . VirusScanTask ( pid , storageProvider , relPath , tagFilesSvc ) ; } else if ( clazz == ( PreservationMapTagFile . class ) ) { <START_BUG> task = new au . edu . anu . datacommons . storage . event . tasks . PreservationTask ( pid , storageProvider , relPath , tagFilesSvc ) ; <END_BUG> } else { throw new IllegalArgumentException ( clazz . getSimpleName ( ) ) ; } return task ; } private void removeExtraKeys ( Set < Path > plFiles , Class < ? extends AbstractKeyValueFile > clazz ) throws IOException { } private String getDataRelPath ( Path file ) { } private Set < Path > listFilesInDir ( Path dir ) throws IOException { } private Path getPayloadDir ( ) { } }

Fix:
task = new au . edu . anu . datacommons . storage . event . tasks . PreservationTask ( pid , storageProvider , relPath , tagFilesSvc , null ) ;
Buggy code:
public class QuotedPrintableCodecTest { static final int [ ] SWISS_GERMAN_STUFF_UNICODE = new int [ ] { 71 , 114 , 252 , 101 , 122 , 105 , 95 , 122 , 228 , 109 , 228 } ; static final int [ ] RUSSIAN_STUFF_UNICODE = new int [ ] { 1042 , 1089 , 1077 , 1084 , 95 , 1087 , 1088 , 1080 , 1074 , 1077 , 1090 } ; private String constructString ( int [ ] unicodeChars ) { <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> if ( unicodeChars != null ) { for ( int unicodeChar : unicodeChars ) { buffer . append ( ( ( char ) ( unicodeChar ) ) ) ; } } return buffer . toString ( ) ; } @ Test public void testUTF8RoundTrip ( ) throws Exception { } @ Test public void testBasicEncodeDecode ( ) throws Exception { } @ Test public void testSafeCharEncodeDecode ( ) throws Exception { } @ Test public void testUnsafeEncodeDecode ( ) throws Exception { } @ Test public void testEncodeDecodeNull ( ) throws Exception { } @ Test public void testDecodeInvalid ( ) throws Exception { } @ Test public void testEncodeNull ( ) throws Exception { } @ Test public void testEncodeUrlWithNullBitSet ( ) throws Exception { } @ Test public void testDecodeWithNullArray ( ) throws Exception { } @ Test public void testEncodeStringWithNull ( ) throws Exception { } @ Test public void testDecodeStringWithNull ( ) throws Exception { } @ Test public void testEncodeObjects ( ) throws Exception { } @ Test ( expected = UnsupportedCharsetException . class ) public void testInvalidEncoding ( ) { } @ Test public void testDecodeObjects ( ) throws Exception { } @ Test public void testDefaultEncoding ( ) throws Exception { } @ Test @ Ignore public void testSoftLineBreakDecode ( ) throws Exception { } @ Test @ Ignore public void testSoftLineBreakEncode ( ) throws Exception { } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public class DefaultProjectListener extends AbstractProjectListener { private String m_prefix ; private String m_targetName ; public void targetStarted ( final String targetName ) { } public void taskStarted ( final String taskName ) { } public void taskFinished ( ) { } public void log ( String message ) { } public void log ( String message , Throwable throwable ) { } protected void output ( final String data ) { if ( null != ( m_targetName ) ) { <START_BUG> output ( ( ( m_targetName ) + ":\n" ) ) ; <END_BUG> m_targetName = null ; } if ( null != ( getPrefix ( ) ) ) System . out . println ( ( ( ( "\t[" + ( getPrefix ( ) ) ) + "]<seq2seq4repair_space>" ) + data ) ) ; else System . out . println ( data ) ; } protected final String getPrefix ( ) { } protected final void setPrefix ( final String prefix ) { } }

Fix:
System . out . println ( ( ( m_targetName ) + ":\n" ) ) ;
Buggy code:
public class MockWebApplicationTest extends TestCase { private MockWebApplication application ; public MockWebApplicationTest ( String name ) { } protected void setUp ( ) throws Exception { } public void testRenderHomePage ( ) throws Exception { } public void testClickLink ( ) throws Exception { } private boolean validateDocument ( String document , int expectedLinkClickCount ) { HtmlDocumentValidator validator = new HtmlDocumentValidator ( ) ; Tag html = new Tag ( "html" ) ; Tag head = new Tag ( "head" ) ; html . addExpectedChild ( head ) ; Tag title = new Tag ( "title" ) ; head . addExpectedChild ( title ) ; title . addExpectedChild ( new TextContent ( "Mock<seq2seq4repair_space>Page" ) ) ; Tag body = new Tag ( "body" ) ; html . addExpectedChild ( body ) ; Tag a = new Tag ( "a" ) ; <START_BUG> a . addExpectedAttribute ( "href" , "//MockWebApplication//MockWebApplication\\?component=[0-9]+.actionLink&amp;version=[0-9]+&amp;interface=ILinkListener" ) ; <END_BUG> a . addExpectedAttribute ( "wicket:id" , "actionLink" ) ; body . addExpectedChild ( a ) ; a . addExpectedChild ( new TextContent ( "Action<seq2seq4repair_space>link<seq2seq4repair_space>clicked<seq2seq4repair_space>" ) ) ; Tag span = new Tag ( "span" ) ; span . addExpectedChild ( new TextContent ( ( "" + expectedLinkClickCount ) ) ) ; a . addExpectedChild ( span ) ; a . addExpectedChild ( new TextContent ( "<seq2seq4repair_space>times" ) ) ; validator . addRootElement ( html ) ; return validator . isDocumentValid ( document ) ; } }

Fix:
a . addExpectedAttribute ( "href" , "//MockWebApplication//MockWebApplication\\?component=[0-9]+.actionLink(&amp;version=[0-9]+)?&amp;interface=ILinkListener" ) ;
Buggy code:
public class testBank { @ Test public void testBank1 ( ) { Bank bank = new KBBank ( ) ; String accountNumber = bank . openAccount ( "hanul" ) ; bank . deposit ( accountNumber , 100000 ) ; assertEquals ( 100000 , bank . getBalance ( accountNumber ) ) ; bank . withdraw ( accountNumber , 10000 ) ; assertEquals ( 90000 , bank . getBalance ( accountNumber ) ) ; bank . loan ( accountNumber , 5000 ) ; assertEquals ( 5000 , bank . getDebt ( accountNumber ) ) ; bank . repay ( accountNumber , 2000 ) ; assertEquals ( 3000 , bank . getDebt ( accountNumber ) ) ; bank . repayOnAccount ( accountNumber , 2000 ) ; assertEquals ( 1000 , bank . getDebt ( accountNumber ) ) ; assertEquals ( 88000 , bank . getBalance ( accountNumber ) ) ; String subAccountNumber = bank . openAccount ( "chae" ) ; bank . transfer ( accountNumber , subAccountNumber , 50000 ) ; assertEquals ( 50000 , bank . getBalance ( subAccountNumber ) ) ; assertEquals ( 38000 , bank . getBalance ( accountNumber ) ) ; bank . timeLeapYear ( ) ; <START_BUG> assertEquals ( ( ( int ) ( 50000 * 1.21 ) ) , bank . getBalance ( accountNumber ) ) ; <END_BUG> } }

Fix:
assertEquals ( ( ( int ) ( 38000 * 1.21 ) ) , bank . getBalance ( accountNumber ) ) ;
Buggy code:
public class HandlerCollectionTableFieldStrategy extends StoreCollectionFieldStrategy implements LRSCollectionFieldStrategy { private static final Localizer _loc = Localizer . forPackage ( HandlerCollectionTableFieldStrategy . class ) ; private Column [ ] _cols = null ; private ColumnIO _io = null ; private boolean _load = false ; private boolean _lob = false ; private boolean _embed = false ; public FieldMapping getFieldMapping ( ) { } public ClassMapping [ ] getIndependentElementMappings ( boolean traverse ) { } public Column [ ] getElementColumns ( ClassMapping elem ) { } public ForeignKey getJoinForeignKey ( ClassMapping elem ) { } public void selectElement ( Select sel , ClassMapping elem , JDBCStore store , JDBCFetchConfiguration fetch , int eagerMode , Joins joins ) { } public Object loadElement ( OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Result res , Joins joins ) throws SQLException { } protected Joins join ( Joins joins , ClassMapping elem ) { } public Joins joinElementRelation ( Joins joins , ClassMapping elem ) { } protected Proxy newLRSProxy ( ) { } public void map ( boolean adapt ) { } public void initialize ( ) { } public void insert ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } private void insert ( OpenJPAStateManager sm , JDBCStore store , RowManager rm , Object vals ) throws SQLException { Collection coll ; if ( ( field . getTypeCode ( ) ) == ( JavaTypes . ARRAY ) ) coll = JavaTypes . toList ( vals , field . getElement ( ) . getType ( ) , false ) ; else coll = ( ( Collection ) ( vals ) ) ; if ( ( coll == null ) || ( coll . isEmpty ( ) ) ) return ; Row row = rm . getSecondaryRow ( field . getTable ( ) , ACTION_INSERT ) ; row . setForeignKey ( field . getJoinForeignKey ( ) , field . getJoinColumnIO ( ) , sm ) ; ValueMapping elem = field . getElementMapping ( ) ; Column order = field . getOrderColumn ( ) ; boolean setOrder = field . getOrderColumnIO ( ) . isInsertable ( order , false ) ; <START_BUG> int idx = ( setOrder && ( order != null ) ) ? order . getBase ( ) : 0 ; <END_BUG> for ( Iterator itr = coll . iterator ( ) ; itr . hasNext ( ) ; idx ++ ) { HandlerStrategies . set ( elem , itr . next ( ) , store , row , _cols , _io , true ) ; if ( setOrder ) row . setInt ( order , idx ) ; rm . flushSecondaryRow ( row ) ; } } public void update ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public void delete ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public int supportsSelect ( Select sel , int type , OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch ) { } public Object toDataStoreValue ( Object val , JDBCStore store ) { } public Joins join ( Joins joins , boolean forceOuter ) { } public Joins joinRelation ( Joins joins , boolean forceOuter , boolean traverse ) { } }

Fix:
int idx = 0 ;
Buggy code:
public class BlobStoredProcedureTest extends BaseJDBCTestCase { final String testStr = "I<seq2seq4repair_space>am<seq2seq4repair_space>a<seq2seq4repair_space>simple<seq2seq4repair_space>derby<seq2seq4repair_space>test<seq2seq4repair_space>case" ; final byte [ ] strBytes = testStr . getBytes ( ) ; final long testStrLength = testStr . length ( ) ; public BlobStoredProcedureTest ( String name ) { } public static Test suite ( ) { } protected void setUp ( ) throws SQLException { } protected void tearDown ( ) throws Exception { } public void testBlobGetBytesSP ( ) throws SQLException { } public void testBlobCreateLocatorSP ( ) throws SQLException { int locator = - 1 ; CallableStatement cs = prepareCall ( "?<seq2seq4repair_space>=<seq2seq4repair_space>CALL<seq2seq4repair_space>SYSIBM.BLOBCREATELOCATOR()" ) ; cs . registerOutParameter ( 1 , Types . INTEGER ) ; cs . executeUpdate ( ) ; locator = cs . getInt ( 1 ) ; <START_BUG> assertEquals ( ( "The<seq2seq4repair_space>locator<seq2seq4repair_space>values<seq2seq4repair_space>returned<seq2seq4repair_space>by<seq2seq4repair_space>" + "SYSIBM.BLOBCREATELOCATOR()<seq2seq4repair_space>are<seq2seq4repair_space>incorrect" ) , 4 , locator ) ; <END_BUG> cs . close ( ) ; } public void testBlobReleaseLocatorSP ( ) throws SQLException { } public void testBlobGetLengthSP ( ) throws SQLException { } public void testBlobGetPositionFromBytesSP ( ) throws Exception { } public void testBlobSetBytes ( ) throws SQLException { } public void testBlobTruncateSP ( ) throws SQLException { } public void testBlobGetPositionFromLocatorSP ( ) throws SQLException { } }

Fix:
assertEquals ( ( "The<seq2seq4repair_space>locator<seq2seq4repair_space>values<seq2seq4repair_space>returned<seq2seq4repair_space>by<seq2seq4repair_space>" + "SYSIBM.BLOBCREATELOCATOR()<seq2seq4repair_space>are<seq2seq4repair_space>incorrect" ) , 2 , locator ) ;
Buggy code:
public class FixedPrescriptionDose extends PrescriptionDose implements PrescriptionElement { public FixedPrescriptionDose ( int amount , DoseUnit unit ) { } public FixedPrescriptionDose ( ) { } @ Override public Element toGrooveXML ( Document doc , Element rootNode , int rxNumber ) { <START_BUG> Element newNode = ( ( Element ) ( GrooveXMLGeneratorUtils . addNode ( doc , rootNode , "prescriptionDose" ) ) ) ; <END_BUG> GrooveXMLGeneratorUtils . addValueToNode ( doc , rootNode , newNode , "type:FixedDosing" ) ; Element doseNode = null ; int count = 0 ; for ( Dose d : this . doses ) { doseNode = ( ( Element ) ( GrooveXMLGeneratorUtils . addNode ( doc , rootNode , ( ( ( "dose" + rxNumber ) + "_" ) + count ) ) ) ) ; GrooveXMLGeneratorUtils . addValueToNode ( doc , rootNode , doseNode , "type:Dose" ) ; GrooveXMLGeneratorUtils . addValueToNode ( doc , rootNode , doseNode , ( "let:amount=" + ( d . getAmount ( ) ) ) ) ; GrooveXMLGeneratorUtils . addValueToNode ( doc , rootNode , doseNode , ( ( "let:unit=\"" + ( d . getUnit ( ) ) ) + "\"" ) ) ; GrooveXMLGeneratorUtils . addValueToNode ( doc , rootNode , doseNode , ( "let:n=" + count ) ) ; GrooveXMLGeneratorUtils . addEdgeNode ( doc , rootNode , newNode . getAttribute ( "id" ) , doseNode . getAttribute ( "id" ) , "dose" ) ; count ++ ; } return newNode ; } @ Override public Boolean sanityCheck ( ) { } }

Fix:
Element newNode = ( ( Element ) ( GrooveXMLGeneratorUtils . addNode ( doc , rootNode , ( "prescriptionDose" + rxNumber ) ) ) ) ;
Buggy code:
public class HostControllerConnectionService implements Service < ManagementChannel > { public static final ServiceName SERVICE_NAME = JBOSS . append ( "host" , "controller" , "channel" ) ; private final InjectedValue < InetSocketAddress > hcAddressInjector = new InjectedValue < InetSocketAddress > ( ) ; private final InjectedValue < Endpoint > endpointInjector = new InjectedValue < Endpoint > ( ) ; private volatile ManagementChannel channel ; private volatile ProtocolChannelClient < ManagementChannel > client ; private HostControllerConnectionService ( ) { } public static void install ( ServiceTarget serviceTarget , final InetSocketAddress managementSocket ) { } public synchronized void start ( StartContext context ) throws StartException { ProtocolChannelClient < ManagementChannel > client ; try { ProtocolChannelClient . Configuration < ManagementChannel > configuration = new ProtocolChannelClient . Configuration < ManagementChannel > ( ) ; configuration . setEndpoint ( endpointInjector . getValue ( ) ) ; configuration . setUri ( new URI ( ( ( ( "remote:////" + ( hcAddressInjector . getValue ( ) . getHostName ( ) ) ) + ":" ) + ( hcAddressInjector . getValue ( ) . getPort ( ) ) ) ) ) ; configuration . setChannelFactory ( new ManagementChannelFactory ( ) ) ; client = ProtocolChannelClient . create ( configuration ) ; } catch ( Exception e ) { throw new StartException ( e ) ; } try { <START_BUG> client . connect ( ) ; <END_BUG> channel = client . openChannel ( SERVER_CHANNEL ) ; channel . startReceiving ( ) ; } catch ( IOException e ) { throw new StartException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>remote<seq2seq4repair_space>Host<seq2seq4repair_space>Controller<seq2seq4repair_space>connection" , e ) ; } } public synchronized void stop ( StopContext context ) { } public synchronized ManagementChannel getValue ( ) throws IllegalStateException { } }

Fix:
client . connect ( null ) ;
Buggy code:
public class TFIDFPartialVectorReducer extends Reducer < WritableComparable < ? > , VectorWritable , WritableComparable < ? > , VectorWritable > { private final OpenIntLongHashMap dictionary = new OpenIntLongHashMap ( ) ; private final TFIDF tfidf = new TFIDF ( ) ; private int minDf = 1 ; private int maxDfPercent = 99 ; private long vectorCount = 1 ; private long featureCount ; private boolean sequentialAccess ; private boolean namedVector ; @ Override protected void reduce ( WritableComparable < ? > key , Iterable < VectorWritable > values , Context context ) throws IOException , InterruptedException { Iterator < VectorWritable > it = values . iterator ( ) ; if ( ! ( it . hasNext ( ) ) ) { return ; } Vector value = it . next ( ) . get ( ) ; Iterator < Vector . Element > it1 = value . iterateNonZero ( ) ; Vector vector = new org . apache . mahout . math . RandomAccessSparseVector ( ( ( int ) ( featureCount ) ) , value . getNumNondefaultElements ( ) ) ; while ( it1 . hasNext ( ) ) { Vector . Element e = it1 . next ( ) ; if ( ! ( dictionary . containsKey ( e . index ( ) ) ) ) { continue ; } long df = dictionary . get ( e . index ( ) ) ; <START_BUG> if ( ( df // ( vectorCount ) ) > ( maxDfPercent ) ) { <END_BUG> continue ; } if ( df < ( minDf ) ) { df = minDf ; } vector . setQuick ( e . index ( ) , tfidf . calculate ( ( ( int ) ( e . get ( ) ) ) , ( ( int ) ( df ) ) , ( ( int ) ( featureCount ) ) , ( ( int ) ( vectorCount ) ) ) ) ; } if ( sequentialAccess ) { vector = new org . apache . mahout . math . SequentialAccessSparseVector ( vector ) ; } if ( namedVector ) { vector = new org . apache . mahout . math . NamedVector ( vector , key . toString ( ) ) ; } VectorWritable vectorWritable = new VectorWritable ( vector ) ; context . write ( key , vectorWritable ) ; } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { } }

Fix:
if ( ( ( df * 100.0 ) // ( vectorCount ) ) > ( maxDfPercent ) ) {
Buggy code:
public class IndictmentSet { protected HashtableOfObject fTypesTable ; protected HashtableOfObject fMethodsTable ; protected HashtableOfObject fFieldsTable ; protected IType [ ] fMethodOwnersArray ; protected Hashtable fAbstractMethodTable ; protected Hashtable fMethodOwners ; protected boolean fHasConstructorIndictments ; private boolean fHierarchyChange = false ; public void add ( Indictment i ) { if ( i != null ) { switch ( i . getKind ( ) ) { case Indictment . K_HIERARCHY : fHierarchyChange = true ; break ; case Indictment . K_TYPE : if ( ( fTypesTable ) == null ) fTypesTable = new HashtableOfObject ( 11 ) ; fTypesTable . put ( i . getKey ( ) , i ) ; break ; case Indictment . K_METHOD : if ( ( fMethodsTable ) == null ) fMethodsTable = new HashtableOfObject ( 11 ) ; fMethodsTable . put ( i . getKey ( ) , i ) ; IType owner = ( ( MethodCollaboratorIndictment ) ( i ) ) . getOwner ( ) ; if ( ( fMethodOwners ) == null ) fMethodOwners = new Hashtable ( 11 ) ; fMethodOwners . put ( owner , owner ) ; fMethodOwnersArray = null ; if ( i . getName ( ) . startsWith ( "<" ) ) { fHasConstructorIndictments = true ; } break ; case Indictment . K_FIELD : if ( ( fFieldsTable ) == null ) fFieldsTable = new HashtableOfObject ( 11 ) ; fFieldsTable . put ( i . getKey ( ) , i ) ; break ; case Indictment . K_ABSTRACT_METHOD : if ( ( fAbstractMethodTable ) == null ) fAbstractMethodTable = new Hashtable ( 11 ) ; fAbstractMethodTable . put ( i . getKey ( ) , i ) ; break ; default : <START_BUG> Assert . isTrue ( false , org . eclipse . jdt . internal . compiler . util . Util . bind ( "build.unknownIndictment" ) ) ; <END_BUG> break ; } } } public void convictAll ( ) { } public IType [ ] getAbstractMethodOriginators ( ) { } public IType [ ] getMethodIndictmentOwners ( ) { } public boolean hasConstructorIndictments ( ) { } public boolean hasHierarchyIndictment ( ) { } public boolean isEmpty ( ) { } public void reset ( ) { } public String toString ( ) { } public boolean tryAllEvidence ( ReferenceInfo references ) { } public boolean tryAmbiguousEvidence ( char [ ] name ) { } public boolean tryFieldEvidence ( char [ ] name ) { } public boolean tryMethodDeclaration ( IBinaryMethod method ) { } public boolean tryMethodEvidence ( char [ ] name ) { } public boolean tryTypeEvidence ( char [ ] name ) { } }

Fix:
Assert . isTrue ( false , "Internal<seq2seq4repair_space>Error<seq2seq4repair_space>-<seq2seq4repair_space>Unexpected<seq2seq4repair_space>kind<seq2seq4repair_space>of<seq2seq4repair_space>indictment" ) ;
Buggy code:
@ Aspect public class Test019 { @ AfterReturning ( value = "call(*<seq2seq4repair_space>*..*(..))" , returning = "f" ) <START_BUG> public void itsAFoo ( Object f , int x ) { <END_BUG> } }

Fix:
public void itsAFoo ( int x , Object f ) {
Buggy code:
public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor { private final Logger log = LoggerFactory . getLogger ( UIMAUpdateRequestProcessor . class ) ; SolrUIMAConfiguration solrUIMAConfiguration ; private AEProvider aeProvider ; private SolrCore solrCore ; public UIMAUpdateRequestProcessor ( UpdateRequestProcessor next , SolrCore solrCore , SolrUIMAConfiguration config ) { } private void initialize ( SolrCore solrCore , SolrUIMAConfiguration config ) { } @ Override public void processAdd ( AddUpdateCommand cmd ) throws IOException { } private String [ ] getTextsToAnalyze ( SolrInputDocument solrInputDocument ) { } private JCas processText ( String textFieldValue ) throws AnalysisEngineProcessException , ResourceInitializationException { <START_BUG> log . info ( new StringBuffer ( "Analazying<seq2seq4repair_space>text" ) . toString ( ) ) ; <END_BUG> AnalysisEngine ae = aeProvider . getAE ( ) ; JCas jcas = ae . newJCas ( ) ; jcas . setDocumentText ( textFieldValue ) ; ae . process ( jcas ) ; log . info ( new StringBuilder ( "Text<seq2seq4repair_space>processing<seq2seq4repair_space>completed" ) . toString ( ) ) ; return jcas ; } }

Fix:
log . info ( new StringBuffer ( "Analyzing<seq2seq4repair_space>text" ) . toString ( ) ) ;
Buggy code:
public class EditInventoryItemActivityFragment extends Fragment implements LoaderManager . LoaderCallbacks < Cursor > { public static final String LOG_TAG = EditInventoryItemActivityFragment . class . getSimpleName ( ) ; private static final String [ ] COLUMNS = new String [ ] { InventoryEntry . _ID , InventoryEntry . COLUMN_NAME , InventoryEntry . COLUMN_QUANTITY , InventoryEntry . COLUMN_EXPIRATION_DATE } ; static final int COL_ID = 0 ; static final int COL_NAME = 1 ; static final int COL_QTY = 2 ; static final int COL_EXP_DATE = 3 ; private static int LOADER_ID = 1 ; private static long mEnteredDate = 0 ; private static EditText mDateText ; private AutoCompleteTextView mNameTxt ; private EditText mQtyTxt ; private long itemId ; public EditInventoryItemActivityFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor data ) { if ( ! ( data . moveToFirst ( ) ) ) { return ; } View rootView = getView ( ) ; mNameTxt = ( ( AutoCompleteTextView ) ( rootView . findViewById ( text_inventory_item_name ) ) ) ; mQtyTxt = ( ( EditText ) ( rootView . findViewById ( text_inventory_item_qty ) ) ) ; mNameTxt . setText ( data . getString ( EditInventoryItemActivityFragment . COL_NAME ) ) ; mQtyTxt . setText ( Integer . toString ( data . getInt ( EditInventoryItemActivityFragment . COL_QTY ) ) ) ; long date = data . getLong ( EditInventoryItemActivityFragment . COL_EXP_DATE ) ; <START_BUG> if ( date != 0 ) { <END_BUG> EditInventoryItemActivityFragment . mDateText . setText ( Utility . getFormattedDate ( date ) ) ; } EditInventoryItemActivityFragment . mEnteredDate = date ; itemId = data . getLong ( EditInventoryItemActivityFragment . COL_ID ) ; mNameTxt . setAdapter ( Utility . createItemNamesAdapter ( getActivity ( ) ) ) ; } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } public static class DatePickerFragment extends DialogFragment implements DatePickerDialog . OnDateSetListener { @ Override public Dialog onCreateDialog ( Bundle savedInstanceState ) { } public void onDateSet ( DatePicker view , int year , int month , int day ) { } } public void showDatePickerDialog ( ) { } long getIdPassedToFragment ( ) { } private void updateInventoryItem ( ) { } private void deleteInventoryItem ( ) { } }

Fix:
if ( date > 0 ) {
Buggy code:
public class EnclosureContainer extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private final Component child ; public EnclosureContainer ( final String id , final Component child ) { } @ Override public boolean isVisible ( ) { child . configure ( ) ; <START_BUG> return child . isVisible ( ) ; <END_BUG> } }

Fix:
return child . determineVisibility ( ) ;
Buggy code:
public class DeferredResultTests { @ Test public void setResult ( ) { } @ Test public void setResultTwice ( ) { } @ Test public void setResultWithException ( ) { } @ Test public void isSetOrExpired ( ) { } @ Test public void setExpired ( ) { DeferredResult < String > result = new DeferredResult < String > ( ) ; assertFalse ( result . isSetOrExpired ( ) ) ; <START_BUG> result . getAndSetExpired ( ) ; <END_BUG> assertTrue ( result . isSetOrExpired ( ) ) ; assertFalse ( result . setResult ( "hello" ) ) ; } @ Test public void hasTimeout ( ) { } @ Test public void applyTimeoutResult ( ) { } }

Fix:
result . expire ( ) ;
Buggy code:
public abstract class AbstractMapBag < E > implements Bag < E > { private transient Map < E , AbstractMapBag . MutableInteger > map ; private int size ; private transient int modCount ; private transient Set < E > uniqueSet ; protected AbstractMapBag ( ) { } protected AbstractMapBag ( Map < E , AbstractMapBag . MutableInteger > map ) { } protected Map < E , AbstractMapBag . MutableInteger > getMap ( ) { } public int size ( ) { } public boolean isEmpty ( ) { } public int getCount ( Object object ) { } public boolean contains ( Object object ) { } @ SuppressWarnings ( "unchecked" ) public boolean containsAll ( Collection < ? > coll ) { } boolean containsAll ( Bag < ? > other ) { } public Iterator < E > iterator ( ) { } static class BagIterator < E > implements Iterator < E > { private final AbstractMapBag < E > parent ; private final Iterator < Map . Entry < E , AbstractMapBag . MutableInteger > > entryIterator ; private Map . Entry < E , AbstractMapBag . MutableInteger > current ; private int itemCount ; private final int mods ; private boolean canRemove ; public BagIterator ( AbstractMapBag < E > parent ) { } public boolean hasNext ( ) { } public E next ( ) { } public void remove ( ) { } } public boolean add ( E object ) { } public boolean add ( E object , int nCopies ) { } public boolean addAll ( Collection < ? extends E > coll ) { } public void clear ( ) { } public boolean remove ( Object object ) { } public boolean remove ( Object object , int nCopies ) { } public boolean removeAll ( Collection < ? > coll ) { } @ SuppressWarnings ( "unchecked" ) public boolean retainAll ( Collection < ? > coll ) { } boolean retainAll ( Bag < ? > other ) { } protected static class MutableInteger { protected int value ; MutableInteger ( int value ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } } public Object [ ] toArray ( ) { } @ SuppressWarnings ( "unchecked" ) public < T > T [ ] toArray ( T [ ] array ) { } public Set < E > uniqueSet ( ) { } protected void doWriteObject ( ObjectOutputStream out ) throws IOException { } @ SuppressWarnings ( "unchecked" ) protected void doReadObject ( Map map , ObjectInputStream in ) throws IOException , ClassNotFoundException { } public boolean equals ( Object object ) { } public int hashCode ( ) { } public String toString ( ) { if ( ( size ( ) ) == 0 ) { return "[]" ; } <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> buf . append ( '[' ) ; Iterator < E > it = uniqueSet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Object current = it . next ( ) ; int count = getCount ( current ) ; buf . append ( count ) ; buf . append ( ':' ) ; buf . append ( current ) ; if ( it . hasNext ( ) ) { buf . append ( ',' ) ; } } buf . append ( ']' ) ; return buf . toString ( ) ; } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public class OpenSharedEditorAction extends ActionDelegate implements IObjectActionDelegate { IFile file ; public OpenSharedEditorAction ( ) { } protected IProject getProjectForResource ( IResource res ) { } protected void setFileForSelection ( IAction action , ISelection s ) { } public void setActivePart ( IAction action , IWorkbenchPart targetPart ) { } protected IWorkbench getWorkbench ( ) { } protected ClientEntry isConnected ( IResource res ) { } public void run ( IAction action ) { if ( ( file ) == null ) { return ; } IProject project = getProjectForResource ( file ) ; ClientEntry entry = isConnected ( project ) ; if ( entry == null ) { <START_BUG> MessageDialog . openInformation ( getWorkbench ( ) . getDisplay ( ) . getActiveShell ( ) , "Project<seq2seq4repair_space>Not<seq2seq4repair_space>Connected<seq2seq4repair_space>to<seq2seq4repair_space>Collaboration<seq2seq4repair_space>Group" , ( ( "Project<seq2seq4repair_space>'" + ( project . getName ( ) ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>any<seq2seq4repair_space>collaboration<seq2seq4repair_space>group.<seq2seq4repair_space>To<seq2seq4repair_space>connect,<seq2seq4repair_space>open<seq2seq4repair_space>context<seq2seq4repair_space>menu<seq2seq4repair_space>for<seq2seq4repair_space>project<seq2seq4repair_space>and<seq2seq4repair_space>choose<seq2seq4repair_space>ECF->Join<seq2seq4repair_space>ECF<seq2seq4repair_space>Collaboration..." ) ) ; <END_BUG> return ; } EclipseCollabSharedObject collabsharedobject = entry . getObject ( ) ; if ( collabsharedobject != null ) { collabsharedobject . sendLaunchEditorForFile ( null , file . getProjectRelativePath ( ) . toString ( ) ) ; } } }

Fix:
MessageDialog . openInformation ( getWorkbench ( ) . getDisplay ( ) . getActiveShell ( ) , "Project<seq2seq4repair_space>Not<seq2seq4repair_space>Connected<seq2seq4repair_space>to<seq2seq4repair_space>Collaboration<seq2seq4repair_space>Group" , ( ( "Project<seq2seq4repair_space>'" + ( project . getName ( ) ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>any<seq2seq4repair_space>collaboration<seq2seq4repair_space>group.<seq2seq4repair_space>To<seq2seq4repair_space>connect,<seq2seq4repair_space>open<seq2seq4repair_space>context<seq2seq4repair_space>menu<seq2seq4repair_space>for<seq2seq4repair_space>resource<seq2seq4repair_space>and<seq2seq4repair_space>choose<seq2seq4repair_space>ECF->Join<seq2seq4repair_space>ECF<seq2seq4repair_space>Collaboration..." ) ) ;
Buggy code:
public class BenchmarkP { public BenchmarkP ( ) { } public static void main ( String [ ] args ) { <START_BUG> if ( ( args != null ) & ( ( args . length ) > 0 ) ) { <END_BUG> String strurl = args [ 0 ] ; boolean addLink = true ; if ( ( args . length ) == 2 ) { if ( args [ 1 ] . equals ( "f" ) ) { addLink = false ; } } if ( ( strurl . indexOf ( "http" ) ) < 0 ) { File input = new File ( strurl ) ; try { strurl = input . toURL ( ) . toString ( ) ; System . out . println ( ( "file<seq2seq4repair_space>converted<seq2seq4repair_space>to<seq2seq4repair_space>URL:<seq2seq4repair_space>" + ( args [ 0 ] ) ) ) ; } catch ( MalformedURLException e ) { e . printStackTrace ( ) ; } } try { Parser parser = new Parser ( strurl , new DefaultParserFeedback ( ) ) ; LinkScanner linkScanner = new LinkScanner ( LinkTag . LINK_TAG_FILTER ) ; if ( addLink ) { parser . addScanner ( linkScanner ) ; } parser . addScanner ( linkScanner . createImageScanner ( IMAGE_TAG_FILTER ) ) ; parser . addScanner ( new BodyScanner ( ) ) ; long start = System . currentTimeMillis ( ) ; for ( NodeIterator e = parser . elements ( ) ; e . hasMoreNodes ( ) ; ) { Node node = e . nextNode ( ) ; if ( node instanceof BodyTag ) { BodyTag btag = ( ( BodyTag ) ( node ) ) ; System . out . println ( ( "body<seq2seq4repair_space>url:<seq2seq4repair_space>" + ( btag . getAttribute ( "background" ) ) ) ) ; for ( NodeIterator ee = btag . elements ( ) ; ee . hasMoreNodes ( ) ; ) { Node cnode = ee . nextNode ( ) ; if ( cnode instanceof ImageTag ) { ImageTag iTag = ( ( ImageTag ) ( cnode ) ) ; System . out . println ( ( "image<seq2seq4repair_space>url:<seq2seq4repair_space>" + ( iTag . getImageURL ( ) ) ) ) ; } } } } System . out . println ( ( "Elapsed<seq2seq4repair_space>Time<seq2seq4repair_space>ms:<seq2seq4repair_space>" + ( ( System . currentTimeMillis ( ) ) - start ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } }

Fix:
if ( ( args != null ) && ( ( args . length ) > 0 ) ) {
Buggy code:
public class ViewMessageSourceCommand extends FolderCommand { String source ; public ViewMessageSourceCommand ( FrameController frameController , DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { MailFrameController mailFrameController = ( ( MailFrameController ) ( frameController ) ) ; FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( ) ) ) ; <START_BUG> Object [ ] uids = MessageNode . toUidArray ( ( ( MessageNode [ ] ) ( r [ 0 ] . getUids ( ) ) ) ) ; <END_BUG> Folder folder = ( ( Folder ) ( r [ 0 ] . getFolder ( ) ) ) ; Object [ ] destUids = new Object [ uids . length ] ; Object uid = uids [ 0 ] ; source = folder . getMessageSource ( uid , worker ) ; } }

Fix:
Object [ ] uids = r [ 0 ] . getUids ( ) ;
Buggy code:
public class XMLResultAggregator extends Task implements XMLConstants { public static final String DEFAULT_DIR = "." ; public static final String DEFAULT_FILENAME = "TESTS-TestSuites.xml" ; protected ArrayList filesets = new ArrayList ( ) ; protected ArrayList transformers = new ArrayList ( ) ; protected File toDir ; protected String toFile ; private static DocumentBuilder getDocumentBuilder ( ) { } public void setTodir ( File value ) { } public void setTofile ( String value ) { } public void addFileSet ( FileSet fs ) { } public AggregateTransformer createReport ( ) { } public void execute ( ) throws TaskException { } protected File getDestinationFile ( ) { } protected File [ ] getFiles ( ) { ArrayList v = new ArrayList ( ) ; final int size = filesets . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { FileSet fs = ( ( FileSet ) ( filesets . get ( i ) ) ) ; <START_BUG> DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ; <END_BUG> ds . scan ( ) ; String [ ] f = ds . getIncludedFiles ( ) ; for ( int j = 0 ; j < ( f . length ) ; j ++ ) { String pathname = f [ j ] ; if ( pathname . endsWith ( ".xml" ) ) { File file = new File ( ds . getBasedir ( ) , pathname ) ; file = FileUtil . resolveFile ( getBaseDirectory ( ) , file . getPath ( ) ) ; v . add ( file ) ; } } } return ( ( File [ ] ) ( v . toArray ( new File [ v . size ( ) ] ) ) ) ; } protected void addTestSuite ( Element root , Element testsuite ) { } protected Element createDocument ( ) { } protected void writeDOMTree ( Document doc , File file ) throws IOException { } }

Fix:
DirectoryScanner ds = fs . getDirectoryScanner ( ) ;
Buggy code:
public class ServerGroupScopedRolesTestCase extends AbstractCoreModelTest { private static final String FOO = "foo" ; private static final String MONITOR = "Monitor" ; private static final String OPERATOR = "Operator" ; private static final String SOME_SERVER_GROUP = "some-server-group" ; private static final String ANOTHER_SERVER_GROUP = "another-server-group" ; private KernelServices kernelServices ; @ Before public void setUp ( ) throws Exception { new org . jboss . as . controller . access . management . SensitiveTargetAccessConstraintDefinition ( new SensitivityClassification ( "play" , "security-realm" , true , true , true ) ) ; new org . jboss . as . controller . access . management . ApplicationTypeAccessConstraintDefinition ( new ApplicationTypeConfig ( "play" , "deployment" , false ) ) ; kernelServices = createKernelServicesBuilder ( DOMAIN ) . setXmlResource ( "domain-all.xml" ) . validateDescription ( ) . setModelInitializer ( new ModelInitializer ( ) { @ Override public void populateModel ( Resource rootResource ) { Resource management = Factory . create ( ) ; rootResource . registerChild ( PathElement . pathElement ( CORE_SERVICE , MANAGEMENT ) , management ) ; <START_BUG> management . registerChild ( PathElement . pathElement ( ACCESS , AUTHORIZATION ) , RESOURCE ) ; <END_BUG> } } , null ) . build ( ) ; } @ Test public void testReadServerGroupScopedRole ( ) { } @ Test public void testAddServerGroupScopedRole ( ) { } @ Test public void testAddServerGroupScopedRoleWithoutServerGroups ( ) { } @ Test public void testModifyBaseRoleOfServerGroupScopedRole ( ) { } @ Test public void testModifyServerGroupsOfServerGroupScopedRole ( ) { } @ Test public void testRemoveServerGroupsOfServerGroupScopedRole ( ) { } @ Test public void testRemoveServerGroupScopedRole ( ) { } private ModelNode execute ( ModelNode operation ) { } }

Fix:
management . registerChild ( PathElement . pathElement ( ACCESS , AUTHORIZATION ) , AccessAuthorizationResourceDefinition . createResource ( null ) ) ;
Buggy code:
public class Fast { public static void main ( String [ ] args ) { HashSet < String > hashSet = new HashSet < String > ( ) ; StdDraw . setXscale ( 0 , 32768 ) ; StdDraw . setYscale ( 0 , 32768 ) ; In in = new In ( args [ 0 ] ) ; Point [ ] pointList = new Point [ in . readInt ( ) ] ; Point [ ] pointListNotSorted = new Point [ pointList . length ] ; int x ; int y ; for ( int i = 0 ; i < ( pointList . length ) ; i ++ ) { x = in . readInt ( ) ; y = in . readInt ( ) ; pointList [ i ] = new Point ( x , y ) ; pointListNotSorted [ i ] = new Point ( x , y ) ; pointList [ i ] . draw ( ) ; } for ( int i = 0 ; i < ( pointListNotSorted . length ) ; i ++ ) { if ( hashSet . contains ( pointListNotSorted [ i ] . toString ( ) ) ) { continue ; } Arrays . sort ( pointList , pointListNotSorted [ i ] . SLOPE_ORDER ) ; int index = 0 ; int count = 1 ; for ( int j = 1 ; j < ( pointList . length ) ; j ++ ) { if ( ( pointListNotSorted [ i ] . SLOPE_ORDER . compare ( pointList [ index ] , pointList [ j ] ) ) == 0 ) { count ++ ; } else { if ( count >= 3 ) { StringBuilder stringBuilder = new StringBuilder ( ) ; stringBuilder . append ( pointListNotSorted [ i ] . toString ( ) ) ; hashSet . add ( pointListNotSorted [ i ] . toString ( ) ) ; <START_BUG> for ( int k = index ; k > ( index + count ) ; k ++ ) { <END_BUG> stringBuilder . append ( ( "<seq2seq4repair_space>-><seq2seq4repair_space>" + ( pointList [ k ] . toString ( ) ) ) ) ; hashSet . add ( pointList [ k ] . toString ( ) ) ; } StdOut . println ( stringBuilder . toString ( ) ) ; pointListNotSorted [ i ] . drawTo ( pointList [ ( ( index + count ) - 1 ) ] ) ; } count = 1 ; index = j ; } } } } }

Fix:
for ( int k = index ; k < ( index + count ) ; k ++ ) {
Buggy code:
public class ParseTreeConverter extends KLQBaseVisitor < ANode > { @ Override public ANode visitQuestionnaire ( KLQParser . QuestionnaireContext ctx ) { } @ Override public ANode visitUncondQuestion ( KLQParser . UncondQuestionContext ctx ) { QuestionNode questionNode ; <START_BUG> if ( ( ctx . expr ( ) ) != null ) { <END_BUG> questionNode = new QuestionNode ( ctx . id . getText ( ) , ctx . type . getText ( ) , stripQuotes ( ctx . text . getText ( ) ) , formatLocation ( ctx ) ) ; } else { AExpression computedAnswer = ( ( AExpression ) ( visit ( ctx . expr ( ) ) ) ) ; questionNode = new com . klq . ast . impl . ComputedQuestionNode ( ctx . id . getText ( ) , ctx . type . getText ( ) , stripQuotes ( ctx . text . getText ( ) ) , computedAnswer , formatLocation ( ctx ) ) ; } return questionNode ; } @ Override public ANode visitCondQuestion ( KLQParser . CondQuestionContext ctx ) { } @ Override public ANode visitDate ( KLQParser . DateContext ctx ) { } @ Override public ANode visitNumber ( KLQParser . NumberContext ctx ) { } @ Override public ANode visitString ( KLQParser . StringContext ctx ) { } @ Override public ANode visitId ( KLQParser . IdContext ctx ) { } @ Override public ANode visitAddSub ( KLQParser . AddSubContext ctx ) { } @ Override public ANode visitMulDiv ( KLQParser . MulDivContext ctx ) { } @ Override public ANode visitComparators ( KLQParser . ComparatorsContext ctx ) { } @ Override public ANode visitOr ( KLQParser . OrContext ctx ) { } @ Override public ANode visitAnd ( KLQParser . AndContext ctx ) { } @ Override public ANode visitParens ( KLQParser . ParensContext ctx ) { } private String stripQuotes ( String s ) { } private Location formatLocation ( ParserRuleContext ctx ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ctx . expr ( ) ) == null ) {
Buggy code:
public enum Rankings { INSTANCE ; public static final int TABLE_SIZE = 6 ; public static final String RANKINGS_FILE = "rankings.dat" ; public static final String DETAILS_FILE = "game_%d.dat" ; public ArrayList < Rankings . Record > records ; public int lastRecord ; public int totalNumber ; public int wonNumber ; public int happyWonNumber ; public enum gameOver { LOSE , WIN_AMULET , WIN_HAPPY ; } public void submit ( Rankings . gameOver winLevel ) { load ( ) ; Rankings . Record rec = new Rankings . Record ( ) ; rec . info = Dungeon . resultDescription ; rec . win = winLevel != ( Rankings . gameOver . LOSE ) ; rec . heroClass = hero . heroClass ; rec . armorTier = hero . tier ( ) ; rec . score = score ( ( winLevel != ( Rankings . gameOver . LOSE ) ) ) ; String gameFile = Utils . format ( Rankings . DETAILS_FILE , now ) ; try { <START_BUG> Dungeon . saveGame ( gameFile ) ; <END_BUG> rec . gameFile = gameFile ; } catch ( IOException e ) { rec . gameFile = "" ; } records . add ( rec ) ; Collections . sort ( records , Rankings . scoreComparator ) ; lastRecord = records . indexOf ( rec ) ; int size = records . size ( ) ; if ( size > ( Rankings . TABLE_SIZE ) ) { Rankings . Record removedGame ; if ( ( lastRecord ) == ( size - 1 ) ) { removedGame = records . remove ( ( size - 2 ) ) ; ( lastRecord ) -- ; } else { removedGame = records . remove ( ( size - 1 ) ) ; } if ( ( removedGame . gameFile . length ( ) ) > 0 ) { Game . instance ( ) . deleteFile ( removedGame . gameFile ) ; } } ( totalNumber ) ++ ; if ( winLevel != ( Rankings . gameOver . LOSE ) ) { ( wonNumber ) ++ ; } if ( winLevel == ( Rankings . gameOver . WIN_HAPPY ) ) { ( happyWonNumber ) ++ ; } Badges . validateGamesPlayed ( ) ; save ( ) ; } private int score ( boolean win ) { } private static final String RECORDS = "records" ; private static final String LATEST = "latest" ; private static final String TOTAL = "total" ; private static final String WON = "won" ; private static final String HAPPY = "happy" ; public void save ( ) { } public void load ( ) { } public static class Record implements Bundlable { private static final String REASON = "reason" ; private static final String WIN = "win" ; private static final String SCORE = "score" ; private static final String TIER = "tier" ; private static final String GAME = "gameFile" ; public String info ; public boolean win ; public HeroClass heroClass ; public int armorTier ; public int score ; public String gameFile ; @ Override public void restoreFromBundle ( Bundle bundle ) { } @ Override public void storeInBundle ( Bundle bundle ) { } } private static final Comparator < Rankings . Record > scoreComparator = new Comparator < Rankings . Record > ( ) { @ Override public int compare ( Rankings . Record lhs , Rankings . Record rhs ) { } } ; }

Fix:
Dungeon . saveGame ( gameFile , true ) ;
Buggy code:
public class NullLiteral extends MagicLiteral { static final char [ ] source = new char [ ] { 'n' , 'u' , 'l' , 'l' } ; public NullLiteral ( int s , int e ) { } public void computeConstant ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public TypeBinding literalType ( BlockScope scope ) { <START_BUG> return NullBinding ; <END_BUG> } public int nullStatus ( FlowInfo flowInfo ) { } public char [ ] source ( ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
return TypeBinding . NULL ;
Buggy code:
public class HttpManagementWriteAttributeHandler extends AbstractWriteAttributeHandler < Void > { public static final OperationStepHandler INSTANCE = new HttpManagementWriteAttributeHandler ( ) ; private HttpManagementWriteAttributeHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override protected boolean requiresRuntime ( OperationContext context ) { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode resolvedValue , ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode valueToRestore , final ModelNode valueToRevert , final Void handback ) throws OperationFailedException { } static void updateHttpManagementService ( final OperationContext context , final ModelNode subModel , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { HttpManagementRemoveHandler . removeHttpManagementService ( context ) ; <START_BUG> HttpManagementAddHandler . installHttpManagementConnector ( context , subModel , context . getServiceTarget ( ) , verificationHandler , null ) ; <END_BUG> } }

Fix:
HttpManagementAddHandler . installHttpManagementConnector ( context , subModel , context . getServiceTarget ( ) , verificationHandler , null , false ) ;
Buggy code:
public class PageRequestTarget implements IPageRequestTarget { private final Page page ; public PageRequestTarget ( Page page ) { } public void respond ( RequestCycle requestCycle ) { } public final Page getPage ( ) { } public void cleanUp ( RequestCycle requestCycle ) { } public Object getLock ( RequestCycle requestCycle ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( ( ( "PageRequestTarget@" + ( hashCode ( ) ) ) + "{page=" ) + ( page ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( "[PageRequestTarget@" + ( hashCode ( ) ) ) + "<seq2seq4repair_space>page=" ) + ( page ) ) + "]" ;
Buggy code:
public class AccountRequest extends AbstractRequest { private String userName ; private String account ; private String facility ; public AccountRequest ( RequestType type , String userName , String account , String facility ) { } public String unparse ( ) { <START_BUG> return ( ( ( ( ( ( generateHeader ( ) ) + ( userName ) ) + ( DELIMITER ) ) + ( ACCOUNT_DELIMITER ) ) + ( account ) ) + ( DELIMITER ) ) + ( ( getType ( ) ) == ( RequestType . LOGOUT ) ? "" : ( ( FACILITY_DELIMITER ) + ( facility ) ) + ( DELIMITER ) ) ; <END_BUG> } public String getUserName ( ) { } public String getAccount ( ) { } public String getFacility ( ) { } }

Fix:
return ( ( ( ( ( ( generateHeader ( ) ) + ( userName ) ) + ( DELIMITER ) ) + ( ACCOUNT_DELIMITER ) ) + ( account ) ) + ( DELIMITER ) ) + ( ( getType ( ) ) == ( RequestType . ACCOUNT ) ? "" : ( ( FACILITY_DELIMITER ) + ( facility ) ) + ( DELIMITER ) ) ;