nus-yam/ex-repair huggingface dataset:
Buggy code:
public class NoiseIntentService extends IntentService { private static final String TAG = "AudioRecord" ; static final int SAMPLE_RATE_IN_HZ = 8000 ; static final int BUFFER_SIZE = AudioRecord . getMinBufferSize ( NoiseIntentService . SAMPLE_RATE_IN_HZ , CHANNEL_IN_DEFAULT , ENCODING_PCM_16BIT ) ; AudioRecord mAudioRecord ; Object mLock ; public NoiseIntentService ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { mAudioRecord . startRecording ( ) ; short [ ] buffer = new short [ NoiseIntentService . BUFFER_SIZE ] ; List < String [ ] > listStr = new ArrayList < String [ ] > ( ) ; long startTime = System . currentTimeMillis ( ) ; while ( ( ( System . currentTimeMillis ( ) ) - startTime ) < 10000 ) { int r = mAudioRecord . read ( buffer , 0 , NoiseIntentService . BUFFER_SIZE ) ; long v = 0 ; <START_BUG> for ( int i = 0 ; i < ( buffer . length ) ; i ++ ) { <END_BUG> String [ ] strings = new String [ ] { Double . toString ( buffer [ i ] ) } ; listStr . add ( strings ) ; v += ( buffer [ i ] ) * ( buffer [ i ] ) ; } double mean = v // ( ( double ) ( r ) ) ; double volume = 10 * ( Math . log10 ( mean ) ) ; if ( volume > 60 ) { Intent localIntent = new Intent ( Constants . NOISE_ALERT ) ; LocalBroadcastManager . getInstance ( this ) . sendBroadcast ( localIntent ) ; } Log . d ( NoiseIntentService . TAG , ( "Db:" + volume ) ) ; synchronized ( mLock ) { try { mLock . wait ( 100 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } mAudioRecord . stop ( ) ; mAudioRecord . release ( ) ; mAudioRecord = null ; try { exportToCSV ( listStr ) ; } catch ( IOException e ) { Log . d ( "exportToCSV" , "fail" ) ; } } public void exportToCSV ( final List < String [ ] > lst ) throws IOException { } }

Fix:
for ( int i = 0 ; i < r ; i ++ ) {
Buggy code:
public class Sentinel2L2AProductReaderPlugIn implements ProductReaderPlugIn { @ Override public DecodeQualification getDecodeQualification ( Object input ) { BeamLogManager . getSystemLogger ( ) . fine ( "Getting<seq2seq4repair_space>decoders..." ) ; File file = new File ( input . toString ( ) ) ; DecodeQualification deco = ( S2L2aProductFilename . isProductFilename ( file . getName ( ) ) ) ? DecodeQualification . SUITABLE : DecodeQualification . UNABLE ; if ( deco . equals ( SUITABLE ) ) { <START_BUG> if ( S2L2aProductFilename . create ( file . getName ( ) ) . fileCategory . contains ( "L2A" ) ) { <END_BUG> deco = DecodeQualification . INTENDED ; } } return deco ; } @ Override public Class [ ] getInputTypes ( ) { } @ Override public ProductReader createReaderInstance ( ) { } @ Override public String [ ] getFormatNames ( ) { } @ Override public String [ ] getDefaultFileExtensions ( ) { } @ Override public String getDescription ( Locale locale ) { } @ Override public BeamFileFilter getProductFileFilter ( ) { } }

Fix:
if ( S2L2aProductFilename . create ( file . getName ( ) ) . fileSemantic . contains ( "L2A" ) ) {
Buggy code:
public class ItemMagicBeans extends ItemSeedFoodMagicBeans { public ItemMagicBeans ( ) { } @ Override public String getItemStackDisplayName ( ItemStack parItemStack ) { <START_BUG> return MagicBeansUtilities . stringToRainbow ( StatCollector . translateToLocal ( ( ( getUnlocalizedNameInefficiently ( new ItemStack ( this ) ) ) + ".name" ) ) ) . trim ( ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return MagicBeansUtilities . stringToRainbow ( StatCollector . translateToLocal ( ( ( getUnlocalizedNameInefficiently ( parItemStack ) ) + ".name" ) ) ) . trim ( ) ;
Buggy code:
class MethodBinding implements IMethodBinding { private static final ITypeBinding [ ] NO_TYPE_BINDINGS = new ITypeBinding [ 0 ] ; private org . eclipse . jdt . internal . compiler . lookup . MethodBinding binding ; private BindingResolver resolver ; private ITypeBinding [ ] parameterTypes ; private ITypeBinding [ ] exceptionTypes ; private String name ; private ITypeBinding declaringClass ; private ITypeBinding returnType ; private String key ; private ITypeBinding [ ] typeParameters ; private ITypeBinding [ ] typeArguments ; MethodBinding ( BindingResolver resolver , org . eclipse . jdt . internal . compiler . lookup . MethodBinding binding ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public String getName ( ) { } public ITypeBinding getDeclaringClass ( ) { } public ITypeBinding [ ] getParameterTypes ( ) { } public ITypeBinding getReturnType ( ) { } private String getSignature ( Type type ) { } private void getFullyQualifiedName ( Type type , StringBuffer buffer ) { } public ITypeBinding [ ] getExceptionTypes ( ) { } public IJavaElement getJavaElement ( ) { IType declaringType = ( ( IType ) ( getDeclaringClass ( ) . getJavaElement ( ) ) ) ; if ( declaringType == null ) return null ; if ( ! ( ( this . resolver ) instanceof DefaultBindingResolver ) ) return null ; <START_BUG> MethodDeclaration method = ( ( MethodDeclaration ) ( ( ( DefaultBindingResolver ) ( this . resolver ) ) . bindingsToAstNodes . get ( this ) ) ) ; <END_BUG> if ( method == null ) return null ; ArrayList parameterSignatures = new ArrayList ( ) ; Iterator iterator = method . parameters ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { SingleVariableDeclaration parameter = ( ( SingleVariableDeclaration ) ( iterator . next ( ) ) ) ; Type type = parameter . getType ( ) ; parameterSignatures . add ( getSignature ( type ) ) ; } int parameterCount = parameterSignatures . size ( ) ; String [ ] parameters = new String [ parameterCount ] ; parameterSignatures . toArray ( parameters ) ; return declaringType . getMethod ( getName ( ) , parameters ) ; } public int getKind ( ) { } public int getModifiers ( ) { } public boolean isDeprecated ( ) { } public boolean isSynthetic ( ) { } public String getKey ( ) { } public boolean isEqualTo ( IBinding other ) { } public ITypeBinding [ ] getTypeParameters ( ) { } public ITypeBinding [ ] getTypeArguments ( ) { } public boolean isParameterizedMethod ( ) { } public boolean isRawMethod ( ) { } public IMethodBinding getErasure ( ) { } public String toString ( ) { } }

Fix:
MethodDeclaration method = ( ( MethodDeclaration ) ( ( ( DefaultBindingResolver ) ( this . resolver ) ) . bindingTables . bindingsToAstNodes . get ( this ) ) ) ;
Buggy code:
public class DriverServlet extends HttpServlet { private static Logger logger = Logger . getLogger ( DriverServlet . class ) ; @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { HttpSession httpSession = req . getSession ( ) ; int id = ( ( int ) ( httpSession . getAttribute ( "id" ) ) ) ; DriverService driverService = null ; OrderService orderService = null ; driverService = BusinessFactory . getInstance ( ) . getDriverLogic ( ) ; orderService = BusinessFactory . getInstance ( ) . getOrderLogic ( ) ; Driver driver = driverService . getById ( id ) ; if ( driver == null ) { resp . sendRedirect ( "//error.jsp" ) ; } Integer orderId = driver . getOrderRoute ( ) ; if ( orderId != null ) { List < Driver > friends = new ArrayList < > ( ) ; friends . addAll ( driverService . getFriends ( id ) ) ; friends . remove ( driver ) ; <START_BUG> List < OrderView > route = orderService . getOrderView ( id ) ; <END_BUG> req . setAttribute ( "friends" , friends ) ; req . setAttribute ( "route" , route ) ; String truckId = orderService . getTruckIdByOrder ( orderId ) ; req . setAttribute ( "orderId" , orderId ) ; req . setAttribute ( "truckId" , truckId ) ; } else { req . setAttribute ( "route" , null ) ; } req . setAttribute ( "driver" , driver ) ; RequestDispatcher rd = req . getRequestDispatcher ( "driver.jsp" ) ; rd . forward ( req , resp ) ; } @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } }

Fix:
List < OrderView > route = orderService . getOrderView ( orderId ) ;
Buggy code:
@ RunWith ( CmpTestRunner . class ) public class OrderByQueryTestCase extends AbstractCmpTest { @ Deployment public static Archive < ? > deploy ( ) { JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , "cmp-commerce.jar" ) ; jar . addPackage ( OrderByQueryTestCase . class . getPackage ( ) ) ; jar . addAsManifestResource ( OrderByQueryTestCase . class . getPackage ( ) , "ejb-jar.xml" , "ejb-jar.xml" ) ; <START_BUG> jar . addAsManifestResource ( OrderByQueryTestCase . class . getPackage ( ) , "jbosscmp-jdbc.xml" , "jbosscmp-jdbc.xml" ) ; <END_BUG> AbstractCmpTest . addDeploymentAssets ( jar ) ; return jar ; } private OrderHome getOrderHome ( ) { } @ Test @ SuppressWarnings ( "unchecked" ) public void testSortedCollectionFinderMethod ( ) { } @ Test @ SuppressWarnings ( "unchecked" ) public void testSortedEnumerationFinderMethod ( ) { } public void setUpEjb ( ) throws Exception { } public void tearDownEjb ( ) throws Exception { } public void deleteAllOrders ( OrderHome orderHome ) throws Exception { } }

Fix:
jar . addAsManifestResource ( OrderByQueryTestCase . class . getPackage ( ) , ( ( "jbosscmp-jdbc-" + ( OrderByQueryTestCase . class . getSimpleName ( ) ) ) + ".xml" ) , "jbosscmp-jdbc.xml" ) ;
Buggy code:
public class TestLibService extends SingleEMFTestCase implements TransactionalEntityManagerFactory { private static EnumSet < AutoDetachType > txScope = EnumSet . allOf ( AutoDetachType . class ) ; private LibService service ; public EntityManager getTransactionalEntityManager ( ) { } public void setUp ( ) { } public void tearDown ( ) throws Exception { } public void testFindBookByTitle ( ) { String title = "Gone<seq2seq4repair_space>Sailing" ; String qTitle = ( "\"" + title ) + "\"" ; String bName = "Dick" ; try { Book book = service . findBookByTitle ( title ) ; assertNotNull ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>book<seq2seq4repair_space>" + qTitle ) , book ) ; assertEquals ( ( "the<seq2seq4repair_space>book<seq2seq4repair_space>found<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>the<seq2seq4repair_space>book<seq2seq4repair_space>" + qTitle ) , title , book . getTitle ( ) ) ; Borrower borrower = book . getBorrower ( ) ; assertNotNull ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>borrower<seq2seq4repair_space>" + bName ) , borrower ) ; assertEquals ( ( "the<seq2seq4repair_space>borrower<seq2seq4repair_space>found<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" + bName ) , bName , borrower . getName ( ) ) ; Volunteer volunteer = borrower . getVolunteer ( ) ; assertNotNull ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>" + bName ) + "'s<seq2seq4repair_space>volunteer<seq2seq4repair_space>status" ) , volunteer ) ; <START_BUG> assertNotNull ( ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>reference<seq2seq4repair_space>from<seq2seq4repair_space>" + bName ) + "'s<seq2seq4repair_space>volunteer<seq2seq4repair_space>status<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>" ) + bName ) , ( ( volunteer . getBorrower ( ) ) == borrower ) ) ; <END_BUG> List < Subject > subjects = book . getSubjects ( ) ; assertNotNull ( ( "no<seq2seq4repair_space>subjects<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>book<seq2seq4repair_space>" + qTitle ) , subjects ) ; assertEquals ( ( "unexpected<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>subjects<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>book<seq2seq4repair_space>" + qTitle ) , 2 , subjects . size ( ) ) ; } catch ( Exception e ) { fail ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>findBookByTitle" ) ; } } public void testFindBorrowerByName ( ) { } public void testBorrowBook ( ) { } public void testReturnBook ( ) { } }

Fix:
assertTrue ( ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>reference<seq2seq4repair_space>from<seq2seq4repair_space>" + bName ) + "'s<seq2seq4repair_space>volunteer<seq2seq4repair_space>status<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>" ) + bName ) , ( ( volunteer . getBorrower ( ) ) == borrower ) ) ;
Buggy code:
public class ThreadMXBeanResetPeakThreadCountHandler implements OperationStepHandler , DescriptionProvider { public static final ThreadMXBeanResetPeakThreadCountHandler INSTANCE = new ThreadMXBeanResetPeakThreadCountHandler ( ) ; private ThreadMXBeanResetPeakThreadCountHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { try { ManagementFactory . getThreadMXBean ( ) . resetPeakThreadCount ( ) ; } catch ( SecurityException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . toString ( ) ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class PaymentMethod implements Serializable { public enum Type { BANK_ACCOUNT ( "bank_account" ) , BANK_WIRE ( "bank_wire" ) , COINBASE_ACCOUNT ( "coinbase_account" ) , COINBASE_FIAT_ACCOUNT ( "coinbase_fiat_account" ) , CREDIT_CARD ( "credit_card" ) , FUTURE_MERCHANT_PAYOUT ( "future_merchant_payout" ) , SEPA_PAYMENT_METHOD ( "sepa_payment_method" ) ; private String _value ; private Type ( String value ) { } @ Override @ JsonValue public String toString ( ) { } @ JsonCreator public static PaymentMethod . Type create ( String val ) { } } private static final long serialVersionUID = - 3574818318535801143L ; private String _id ; private String _name ; private Boolean _canBuy ; private Boolean _canSell ; private String _accountId ; private String _currency ; private PaymentMethod . Type _type ; public String getId ( ) { } public void setId ( String id ) { } public String getName ( ) { } public void setName ( String name ) { } public Boolean canBuy ( ) { } public void setCanBuy ( Boolean canBuy ) { } public Boolean canSell ( ) { } public void setCanSell ( Boolean canSell ) { } public String getAccountId ( ) { } public void setAccountId ( String accountId ) { <START_BUG> this . _accountId = _accountId ; <END_BUG> } public String getCurrency ( ) { } public void setCurrency ( String currency ) { } public PaymentMethod . Type getType ( ) { } public void setType ( PaymentMethod . Type type ) { } }

Fix:
this . _accountId = accountId ;
Buggy code:
public final class AutoComponentResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; private final Map nestedComponents = new HashMap ( ) ; public final boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( tag instanceof WicketTag ) { final WicketTag wicketTag = ( ( WicketTag ) ( tag ) ) ; if ( wicketTag . isComponentTag ( ) ) { final Component component = createComponent ( container , wicketTag ) ; if ( component != null ) { nestedComponents . put ( component , null ) ; try { container . autoAdd ( component ) ; } finally { nestedComponents . remove ( component ) ; } return true ; } } } if ( ( ( tag . getId ( ) ) != null ) && ( nestedComponents . containsKey ( container ) ) ) { MarkupContainer parent = container . getParent ( ) ; while ( ( parent != null ) && ( nestedComponents . containsKey ( parent ) ) ) { parent = parent . getParent ( ) ; } if ( parent != null ) { final Component component = parent . get ( tag . getId ( ) ) ; if ( component != null ) { <START_BUG> component . render ( ) ; <END_BUG> return true ; } } } return false ; } private final Component createComponent ( final MarkupContainer container , final WicketTag tag ) { } }

Fix:
component . render ( markupStream ) ;
Buggy code:
public abstract class AbstractFilter implements Filter { private MailFrameMediator mediator ; private MessageController messageController ; public AbstractFilter ( MailFrameMediator mediator , MessageController messageController ) { } public IMailFolderCommandReference filter ( IMailbox folder , Object uid , IColumbaMessage message ) throws Exception { TempFolder tempFolder = FolderTreeModel . getInstance ( ) . getTempFolder ( ) ; uid = tempFolder . addMessage ( message ) ; MailFolderCommandReference local = new MailFolderCommandReference ( tempFolder , new Object [ ] { uid } ) ; TableSelectionHandler h1 = ( ( TableSelectionHandler ) ( mediator . getSelectionManager ( ) . getHandler ( "mail.table" ) ) ) ; h1 . setLocalReference ( local ) ; <START_BUG> messageController . getAttachmentsViewer ( ) . setLocalReference ( local ) ; <END_BUG> return local ; } public FrameMediator getMediator ( ) { } }

Fix:
messageController . setAttachmentSelectionReference ( local ) ;
Buggy code:
@ Description ( name = "union" , value = "_FUNC_(x)<seq2seq4repair_space>-<seq2seq4repair_space>Returns<seq2seq4repair_space>a<seq2seq4repair_space>map<seq2seq4repair_space>which<seq2seq4repair_space>contains<seq2seq4repair_space>the<seq2seq4repair_space>union<seq2seq4repair_space>of<seq2seq4repair_space>an<seq2seq4repair_space>aggregation<seq2seq4repair_space>of<seq2seq4repair_space>maps<seq2seq4repair_space>" ) public class UnionUDAF extends AbstractGenericUDAFResolver { @ Override public GenericUDAFEvaluator getEvaluator ( TypeInfo [ ] parameters ) throws SemanticException { } public static class MapUnionUDAFEvaluator extends GenericUDAFEvaluator { private MapObjectInspector inputMapOI ; private ObjectInspector inputKeyOI ; private ObjectInspector inputValOI ; private StandardMapObjectInspector moi ; private StandardMapObjectInspector internalMergeOI ; static class MapAggBuffer implements AggregationBuffer { HashMap < Object , Object > collectMap = new HashMap < Object , Object > ( ) ; } public ObjectInspector init ( Mode m , ObjectInspector [ ] parameters ) throws HiveException { super . init ( m , parameters ) ; <START_BUG> if ( m == ( Mode . PARTIAL1 ) ) { <END_BUG> inputMapOI = ( ( MapObjectInspector ) ( parameters [ 0 ] ) ) ; inputKeyOI = inputMapOI . getMapKeyObjectInspector ( ) ; inputValOI = inputMapOI . getMapValueObjectInspector ( ) ; return ObjectInspectorFactory . getStandardMapObjectInspector ( ObjectInspectorUtils . getStandardObjectInspector ( inputKeyOI ) , ObjectInspectorUtils . getStandardObjectInspector ( inputValOI ) ) ; } else { if ( ! ( ( parameters [ 0 ] ) instanceof StandardMapObjectInspector ) ) { inputKeyOI = ( ( PrimitiveObjectInspector ) ( ObjectInspectorUtils . getStandardObjectInspector ( parameters [ 0 ] ) ) ) ; inputValOI = ObjectInspectorUtils . getStandardObjectInspector ( parameters [ 0 ] ) ; return ( ( StandardMapObjectInspector ) ( ObjectInspectorFactory . getStandardMapObjectInspector ( inputKeyOI , inputValOI ) ) ) ; } else { internalMergeOI = ( ( StandardMapObjectInspector ) ( parameters [ 0 ] ) ) ; inputKeyOI = ( ( PrimitiveObjectInspector ) ( internalMergeOI . getMapKeyObjectInspector ( ) ) ) ; inputValOI = internalMergeOI . getMapValueObjectInspector ( ) ; moi = ( ( StandardMapObjectInspector ) ( ObjectInspectorUtils . getStandardObjectInspector ( internalMergeOI ) ) ) ; return moi ; } } } @ Override public AggregationBuffer getNewAggregationBuffer ( ) throws HiveException { } @ Override public void iterate ( AggregationBuffer agg , Object [ ] parameters ) throws HiveException { } @ Override public void merge ( AggregationBuffer agg , Object partial ) throws HiveException { } @ Override public void reset ( AggregationBuffer buff ) throws HiveException { } @ Override public Object terminate ( AggregationBuffer agg ) throws HiveException { } private void putIntoSet ( Object key , Object val , UnionUDAF . MapUnionUDAFEvaluator . MapAggBuffer myagg ) { } @ Override public Object terminatePartial ( AggregationBuffer agg ) throws HiveException { } } }

Fix:
if ( ( m == ( Mode . PARTIAL1 ) ) || ( m == ( Mode . COMPLETE ) ) ) {
Buggy code:
public interface Executor extends Component { String ROLE = "org.apache.myrmidon.components.executor.Executor" ; <START_BUG> void execute ( Configuration task , TaskContext context ) throws TaskException ; <END_BUG> }

Fix:
void execute ( Configuration task , ExecutionFrame frame ) throws TaskException ;
Buggy code:
public class Context { private Map < String , GenericValue < ? > > memory ; private Map < String , List < Expression > > IdDependencies ; private Map < Expression , List < QuestionComponent > > ifConditions ; private IdCollector references ; private Map < String , IdLiteral > declarations ; private ErrorCollector errors ; public Context ( ) { } public void putExp ( Expression key , QuestionComponent value ) { } public void putDependencie ( IdCollector keyCollection , Expression value ) { Iterator < IdLiteral > iterator = keyCollection . iterator ( ) ; while ( iterator . hasNext ( ) ) { IdLiteral key = iterator . next ( ) ; <START_BUG> List < Expression > tempList = this . IdDependencies . get ( key ) ; <END_BUG> if ( tempList != null ) { tempList . add ( value ) ; } else { tempList = new ArrayList < Expression > ( ) ; tempList . add ( value ) ; } this . IdDependencies . put ( key . name , tempList ) ; } } public void put ( String key , GenericValue < ? > value ) { } public String toString ( ) { } public List < QuestionComponent > getQcomponent ( Expression exp ) { } public Iterator < Expression > getExpressions ( String id ) { } public GenericValue < ? > getValue ( String s ) { } public void addId ( IdLiteral id ) { } public Boolean hasErrors ( ) { } public Type getIdType ( IdLiteral id ) { } public void addError ( Error e ) { } public String getErrors ( ) { } }

Fix:
List < Expression > tempList = this . IdDependencies . get ( key . name ) ;
Buggy code:
public class CDMahoutEvaluatorTest extends MahoutTestCase { public void testEvaluate ( ) throws Exception { int nbrules = 100 ; Random rng = RandomUtils . getRandom ( ) ; int target = 1 ; List < Rule > rules = new ArrayList < Rule > ( ) ; for ( int index = 0 ; index < nbrules ; index ++ ) { rules . add ( new RandomRule ( index , target , rng ) ) ; } <START_BUG> Path input = new Path ( "target//test-classes//wdbc" ) ; <END_BUG> CDMahoutEvaluator . initializeDataSet ( input ) ; List < CDFitness > results = new ArrayList < CDFitness > ( ) ; Path output = getTestTempDirPath ( "output" ) ; FileSystem fs = output . getFileSystem ( new Configuration ( ) ) ; fs . delete ( output , true ) ; CDMahoutEvaluator . evaluate ( rules , target , input , output , results ) ; for ( int index = 0 ; index < nbrules ; index ++ ) { assertEquals ( ( "rule<seq2seq4repair_space>" + index ) , RandomRuleResults . getResult ( index ) , results . get ( index ) ) ; } } }

Fix:
Path input = new Path ( this . getClass ( ) . getResource ( "//wdbc//" ) . getPath ( ) ) ;
Buggy code:
public final class MatrixToImageWriter { private static final int BLACK = - 16777216 ; private static final int WHITE = - 1 ; private MatrixToImageWriter ( ) { } public static BufferedImage toBufferedImage ( BitMatrix matrix ) { } public static BufferedImage toBufferedImage ( ByteMatrix matrix ) { int width = matrix . getWidth ( ) ; int height = matrix . getHeight ( ) ; BufferedImage image = new BufferedImage ( width , height , BufferedImage . TYPE_INT_ARGB ) ; for ( int x = 0 ; x < width ; x ++ ) { for ( int y = 0 ; y < height ; y ++ ) { <START_BUG> image . setRGB ( x , y , ( ( matrix . get ( x , y ) ) == 0 ? MatrixToImageWriter . WHITE : MatrixToImageWriter . BLACK ) ) ; <END_BUG> } } return image ; } public static void writeToFile ( BitMatrix matrix , String format , File file ) throws IOException { } public static void writeToFile ( ByteMatrix matrix , String format , File file ) throws IOException { } public static void writeToStream ( BitMatrix matrix , String format , OutputStream stream ) throws IOException { } public static void writeToStream ( ByteMatrix matrix , String format , OutputStream stream ) throws IOException { } }

Fix:
image . setRGB ( x , y , ( ( matrix . get ( x , y ) ) == 0 ? MatrixToImageWriter . BLACK : MatrixToImageWriter . WHITE ) ) ;
Buggy code:
public class UserSQLGenerator implements SQLGenerator { @ Override public String getSQL ( Object object ) { User user = ( ( User ) ( object ) ) ; List < String > criteria = new ArrayList < String > ( ) ; String hql = "FROM<seq2seq4repair_space>User<seq2seq4repair_space>u" ; if ( ( ( user . getFirstname ( ) ) != null ) && ( ! ( user . getFirstname ( ) . isEmpty ( ) ) ) ) { criteria . add ( ( ( ( "<seq2seq4repair_space>u.firstname=" + "'" ) + ( user . getFirstname ( ) ) ) + "'" ) ) ; } if ( ( ( user . getSurname ( ) ) != null ) && ( ! ( user . getSurname ( ) . isEmpty ( ) ) ) ) { criteria . add ( ( ( ( "<seq2seq4repair_space>u.surname=" + "'" ) + ( user . getSurname ( ) ) ) + "'" ) ) ; } <START_BUG> if ( ( ( user . getUsername ( ) ) != null ) && ( ! ( user . getSurname ( ) . isEmpty ( ) ) ) ) { <END_BUG> criteria . add ( ( ( ( "<seq2seq4repair_space>u.username=" + "'" ) + ( user . getUsername ( ) ) ) + "'" ) ) ; } if ( ( ( user . getPassword ( ) ) != null ) && ( ! ( user . getPassword ( ) . isEmpty ( ) ) ) ) { criteria . add ( ( ( ( "<seq2seq4repair_space>u.password=" + "'" ) + ( user . getPassword ( ) ) ) + "'" ) ) ; } if ( ! ( criteria . isEmpty ( ) ) ) { hql = hql + "<seq2seq4repair_space>WHERE" ; hql = hql + ( criteria . get ( 0 ) ) ; for ( int i = 1 ; i < ( criteria . size ( ) ) ; i ++ ) { hql = ( hql + "<seq2seq4repair_space>AND" ) + ( criteria . get ( i ) ) ; } } return hql ; } }

Fix:
if ( ( ( user . getUsername ( ) ) != null ) && ( ! ( user . getUsername ( ) . isEmpty ( ) ) ) ) {
Buggy code:
public class CountMinSketch < K extends Divisible > { private ArrayList < long [ ] > sketch ; public CountMinSketch ( @ Nonnegative int numRows , @ Nonnegative int numCols ) { } public void addHashed ( @ Nonnull K ... hashes ) { } public void addHashed ( long count , @ Nonnull K ... hashes ) { Preconditions . checkArgument ( ( ( hashes . length ) == ( this . getNumRows ( ) ) ) , "The<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>hashes<seq2seq4repair_space>has<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>size<seq2seq4repair_space>than<seq2seq4repair_space>the<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>columns<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>sketch" ) ; int numRows = getNumRows ( ) ; int numCols = getNumCols ( ) ; for ( int i = 0 ; i < numRows ; i ++ ) { K hash = hashes [ i ] ; Number j = hash . mod ( numCols ) ; long localCount = this . getSketch ( ) . get ( i ) [ j . intValue ( ) ] ; <START_BUG> localCount += localCount ; <END_BUG> this . getSketch ( ) . get ( i ) [ j . intValue ( ) ] = localCount ; } } public long estimatePointQuery ( @ Nonnull K ... hashes ) { } protected int getNumRows ( ) { } protected void setNumRows ( int numRows ) { } protected int getNumCols ( ) { } protected void setNumCols ( int numCols ) { } protected ArrayList < long [ ] > getSketch ( ) { } protected void setSketch ( ArrayList < long [ ] > sketch ) { } }

Fix:
localCount += count ;
Buggy code:
public class IntervalMenu extends Menu { protected Menu add ; protected Menu remove ; protected Menu delete = new Menu ( IntervalMenuConstants . IMC_DELETE_MENU_NAME ) ; private Sender sender ; public IntervalMenu ( ) { } public List < EntrainerProgramInterval > getLoadedIntervals ( ) { } public List < EntrainerProgramInterval > getCustomIntervals ( ) { } public void loadCustomIntervals ( ) { } private List < EntrainerProgramInterval > getCustom ( ) { } public List < String > removeAllIntervals ( ) { List < String > loaded = new ArrayList < String > ( ) ; <START_BUG> List < MenuItem > comps = remove . getItems ( ) ; <END_BUG> for ( MenuItem jmi : comps ) { removeInterval ( jmi ) ; loaded . add ( jmi . getText ( ) ) ; } return loaded ; } public void loadIntervals ( List < String > toLoad ) { } private void init ( ) { } protected void initImpl ( ) { } public void clearMediatorObjects ( ) { } private MenuItem getCustomMenu ( ) { } private void showCustomDialog ( ) { } protected boolean containsInterval ( String displayString ) { } protected boolean containsInterval ( Menu menu , String displayString ) { } protected MenuItem getInterval ( Menu menu , String displayString ) { } private boolean areEquivalentFractions ( String s1 , String s2 ) { } public boolean isEquivalentFraction ( String s ) { } private boolean isEquivalentFraction ( Menu menu , String s ) { } private Menu getRemoveMenu ( ) { } private Menu getAddMenu ( ) { } protected MenuItem createMenuItem ( String interval ) { } protected MenuItem createDeleteItem ( String interval ) { } private void deleteItem ( MenuItem item ) { } private void deleteItem ( Menu menu , String s ) { } private boolean isItem ( Menu menu , MenuItem item ) { } private boolean isRemoveItem ( MenuItem item ) { } private boolean isAddItem ( MenuItem item ) { } protected synchronized void removeInterval ( MenuItem item ) { } protected synchronized void addInterval ( MenuItem item ) { } protected MenuItem getAddItem ( String s ) { } protected MenuItem getRemoveItem ( String s ) { } protected void itemAdded ( MenuItem item ) { } protected void itemRemoved ( MenuItem item ) { } private void fireIntervalEvent ( String interval , MediatorConstants parm ) { } private void addInOrder ( Menu menu , MenuItem item ) { } private boolean isGreaterThan ( String existing , String current ) { } private int getNumerator ( String s ) { } private void addOrRemove ( final MenuItem item ) { } }

Fix:
List < MenuItem > comps = new ArrayList < > ( remove . getItems ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ Run ( RunModeType . IN_CONTAINER ) public class MessagingTestCase { private static final String QUEUE_EXAMPLE_QUEUE = "queue.exampleQueue" ; static final Logger log = Logger . getLogger ( MessagingTestCase . class ) ; private static final String BODY = "msg.body" ; private ClientSessionFactory sf ; private ClientSession session ; private ClientConsumer consumer ; private final AtomicBoolean shutdown = new AtomicBoolean ( ) ; private final CountDownLatch latch = new CountDownLatch ( 1 ) ; private volatile String receivedMessage ; @ Deployment public static JavaArchive createDeployment ( ) throws Exception { } @ Before public void start ( ) throws Exception { System . out . println ( ( "CLASSLOADER<seq2seq4repair_space>" + ( this . getClass ( ) . getClassLoader ( ) ) ) ) ; if ( ! ( isInContainer ( ) ) ) { return ; } <START_BUG> sf = HornetQClient . createClientSessionFactory ( new TransportConfiguration ( InVMConnectorFactory . class . getName ( ) ) ) ; <END_BUG> ClientSession coreSession = sf . createSession ( false , true , true ) ; coreSession . createQueue ( MessagingTestCase . QUEUE_EXAMPLE_QUEUE , MessagingTestCase . QUEUE_EXAMPLE_QUEUE , true ) ; coreSession . close ( ) ; session = sf . createSession ( ) ; consumer = session . createConsumer ( MessagingTestCase . QUEUE_EXAMPLE_QUEUE ) ; session . start ( ) ; new Thread ( new Runnable ( ) { @ Override public void run ( ) { while ( ! ( shutdown . get ( ) ) ) { try { ClientMessage message = consumer . receive ( 500 ) ; if ( message == null ) { continue ; } String s = message . getStringProperty ( MessagingTestCase . BODY ) ; MessagingTestCase . log . info ( ( "-----><seq2seq4repair_space>Received:<seq2seq4repair_space>" + s ) ) ; receivedMessage = s ; latch . countDown ( ) ; } catch ( HornetQException e ) { MessagingTestCase . log . error ( "Exception,<seq2seq4repair_space>closing<seq2seq4repair_space>receiver" , e ) ; } } } } ) . start ( ) ; MessagingTestCase . log . info ( "-----><seq2seq4repair_space>Started<seq2seq4repair_space>queue<seq2seq4repair_space>and<seq2seq4repair_space>session" ) ; } @ After public void stop ( ) throws Exception { } @ Test public void testMessaging ( ) throws Exception { } private void sendMessage ( String txt ) throws Exception { } private boolean isInContainer ( ) { } }

Fix:
sf = HornetQClient . createServerLocatorWithoutHA ( new TransportConfiguration ( InVMConnectorFactory . class . getName ( ) ) ) . createSessionFactory ( ) ;
Buggy code:
public class BaseDataParser implements BaseDataParserInterface { private DataSource dataSource = null ; @ Override public void doParse ( Context context , String baseId , String data , boolean connectedStateChanged , boolean connected ) { } private void showNotification ( Context context , String baseId , String contentTitle , String contentText ) { NotificationCompat . Builder mBuilder = new NotificationCompat . Builder ( context ) ; <START_BUG> mBuilder . setSmallIcon ( ic_base_0 ) ; <END_BUG> mBuilder . setContentTitle ( contentTitle ) ; mBuilder . setContentText ( contentText ) ; String cTargetName = ( context . getPackageName ( ) ) + ".bases.b0.BaseActivity" ; Class < ? > cTarget = null ; try { cTarget = Class . forName ( cTargetName ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; } Intent resultIntent = new Intent ( context , cTarget ) ; resultIntent . putExtra ( "baseid" , baseId ) ; TaskStackBuilder stackBuilder = TaskStackBuilder . create ( context ) ; String cMainName = ( context . getPackageName ( ) ) + ".MainActivity" ; Class < ? > cMain = null ; try { cMain = Class . forName ( cMainName ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; } stackBuilder . addParentStack ( cMain ) ; stackBuilder . addNextIntent ( resultIntent ) ; PendingIntent resultPendingIntent = stackBuilder . getPendingIntent ( 0 , FLAG_UPDATE_CURRENT ) ; mBuilder . setContentIntent ( resultPendingIntent ) ; NotificationManager mNotificationManager = ( ( NotificationManager ) ( context . getSystemService ( NOTIFICATION_SERVICE ) ) ) ; mNotificationManager . notify ( baseId , CTRL_NOTIFICATION_ID , mBuilder . build ( ) ) ; } }

Fix:
mBuilder . setSmallIcon ( ic_stat_logo ) ;
Buggy code:
public class TestDirectory extends LuceneTestCase { public void testDetectClose ( ) throws Throwable { } public void testDirectInstantiation ( ) throws Exception { } public void testDontCreate ( ) throws Throwable { } public void testRAMDirectoryFilter ( ) throws IOException { } public void testFSDirectoryFilter ( ) throws IOException { <START_BUG> checkDirectoryFilter ( FSDirectory . open ( new File ( "test" ) ) ) ; <END_BUG> } private void checkDirectoryFilter ( Directory dir ) throws IOException { } public void testCopySubdir ( ) throws Throwable { } public void testNotDirectory ( ) throws Throwable { } }

Fix:
checkDirectoryFilter ( FSDirectory . open ( new File ( System . getProperty ( "tempDir" ) , "test" ) ) ) ;
Buggy code:
public final class AboutSystemDialog extends ProductInfoDialog { private Text text ; private static final int BROWSE_ERROR_LOG_BUTTON = IDialogConstants . CLIENT_ID ; private static final int COPY_TO_CLIPBOARD_BUTTON = ( IDialogConstants . CLIENT_ID ) + 1 ; public AboutSystemDialog ( Shell parentShell ) { } protected void configureShell ( Shell newShell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } private String getSystemSummary ( ) { } private void appendExtensions ( PrintWriter writer ) { } private IConfigurationElement [ ] getSortedExtensions ( ) { } protected void buttonPressed ( int buttonId ) { } private void openErrorLogBrowser ( ) { String filename = Platform . getLogFileLocation ( ) . toOSString ( ) ; File log = new File ( filename ) ; if ( log . exists ( ) ) { <START_BUG> openLink ( filename ) ; <END_BUG> return ; } MessageDialog . openInformation ( getShell ( ) , AboutSystemDialog_noLogTitle , NLS . bind ( AboutSystemDialog_noLogMessage , filename ) ) ; } private void runCopyToClipboard ( ) { } }

Fix:
openLink ( ( "file://////" + filename ) ) ;
Buggy code:
class MessagingPathHandlers { static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { CommonAttributes . PATH , CommonAttributes . RELATIVE_TO } ; static final OperationStepHandler PATH_ADD = new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } } ; static final OperationStepHandler PATH_ATTR = new ServerWriteAttributeOperationHandler ( ) { @ Override protected void validateValue ( final String name , final ModelNode value ) throws OperationFailedException { } } ; static final OperationStepHandler PATH_REMOVE = new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } ; static void register ( final ManagementResourceRegistration registration ) { } static ModelNode createAddOperation ( final ModelNode address , final ModelNode subModel ) { final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( ADD ) ; operation . get ( OP_ADDR ) . set ( address ) ; operation . get ( RELATIVE_TO ) . set ( subModel . get ( RELATIVE_TO ) ) ; <START_BUG> operation . get ( PATH ) . set ( subModel . get ( PATH ) ) ; <END_BUG> return operation ; } static void reloadRequiredStep ( final OperationContext context ) { } }

Fix:
operation . get ( PATH ) . set ( subModel . require ( PATH ) ) ;
Buggy code:
public class BOMInputStream extends ProxyInputStream { private final boolean include ; private final List < ByteOrderMark > boms ; private ByteOrderMark byteOrderMark ; private int [ ] firstBytes ; private int fbLength ; private int fbIndex ; private int markFbIndex ; private boolean markedAtStart ; public BOMInputStream ( InputStream delegate ) { } public BOMInputStream ( InputStream delegate , boolean include ) { } public BOMInputStream ( InputStream delegate , ByteOrderMark ... boms ) { } public BOMInputStream ( InputStream delegate , boolean include , ByteOrderMark ... boms ) { } public boolean hasBOM ( ) throws IOException { } public boolean hasBOM ( ByteOrderMark bom ) throws IOException { } public ByteOrderMark getBOM ( ) throws IOException { } public String getBOMCharsetName ( ) throws IOException { } private int readFirstBytes ( ) throws IOException { } private ByteOrderMark find ( ) { } private boolean matches ( ByteOrderMark bom ) { } @ Override public int read ( ) throws IOException { } @ Override public int read ( byte [ ] buf , int off , int len ) throws IOException { int firstCount = 0 ; int b = 0 ; while ( ( len > 0 ) && ( b >= 0 ) ) { b = readFirstBytes ( ) ; if ( b >= 0 ) { buf [ ( off ++ ) ] = ( ( byte ) ( b & 255 ) ) ; len -- ; firstCount ++ ; } } int secondCount = in . read ( buf , off , len ) ; <START_BUG> return secondCount < 0 ? firstCount : firstCount + secondCount ; <END_BUG> } @ Override public int read ( byte [ ] buf ) throws IOException { } @ Override public synchronized void mark ( int readlimit ) { } @ Override public synchronized void reset ( ) throws IOException { } @ Override public long skip ( long n ) throws IOException { } }

Fix:
return secondCount < 0 ? firstCount > 0 ? firstCount : - 1 : firstCount + secondCount ;
Buggy code:
@ Service ( doc = JDG63EmbeddedService . SERVICE_DESCRIPTION ) public class JDG63EmbeddedService extends Infinispan60EmbeddedService { protected static final String SERVICE_DESCRIPTION = "Service<seq2seq4repair_space>hosting<seq2seq4repair_space>JDG<seq2seq4repair_space>in<seq2seq4repair_space>embedded<seq2seq4repair_space>(library)<seq2seq4repair_space>mode." ; @ Override @ ProvidesTrait public Infinispan70MapReduce createMapReduce ( ) { } @ Override protected ConfigurationBuilderHolder createConfiguration ( String configFile ) throws FileNotFoundException { } @ Override @ ProvidesTrait public InfinispanEmbeddedQueryable createQueryable ( ) { } @ ProvidesTrait public InfinispanIterable createIterable ( ) { <START_BUG> return new InfinispanIterable ( this ) ; <END_BUG> } }

Fix:
return new JDG63Iterable ( this ) ;
Buggy code:
public class MongoDBVariantStorageManager extends VariantStorageManager { public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_HOST = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.HOST" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_PORT = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.PORT" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_NAME = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.NAME" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_USER = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.USER" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_PASS = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.PASS" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_COLLECTION_VARIANTS = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.COLLECTION.VARIANTS" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DB_COLLECTION_FILES = "OPENCGA.STORAGE.MONGODB.VARIANT.DB.COLLECTION.FILES" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_LOAD_BATCH_SIZE = "OPENCGA.STORAGE.MONGODB.VARIANT.LOAD.BATCH_SIZE" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_LOAD_BULK_SIZE = "OPENCGA.STORAGE.MONGODB.VARIANT.LOAD.BULK_SIZE" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_DEFAULT_GENOTYPE = "OPENCGA.STORAGE.MONGODB.VARIANT.LOAD.DEFAULT_GENOTYPE" ; public static final String OPENCGA_STORAGE_MONGODB_VARIANT_COMPRESS_GENEOTYPES = "OPENCGA.STORAGE.MONGODB.VARIANT.LOAD.COMPRESS_GENOTYPES" ; public static final String BULK_SIZE = "bulkSize" ; public static final String INCLUDE_SRC = "includeSrc" ; public static final String DEFAULT_GENOTYPE = "defaultGenotype" ; protected static Logger logger = LoggerFactory . getLogger ( MongoDBVariantStorageManager . class ) ; @ Override public VariantMongoDBWriter getDBWriter ( String dbName , ObjectMap params ) { } @ Override public VariantMongoDBAdaptor getDBAdaptor ( String dbName , ObjectMap params ) { } MongoCredentials getMongoCredentials ( ) { } MongoCredentials getMongoCredentials ( String dbName ) { } @ Override public URI preLoad ( URI input , URI output , ObjectMap params ) throws IOException { <START_BUG> return input ; <END_BUG> } @ Override public URI load ( URI inputUri , ObjectMap params ) throws IOException { } @ Override public URI postLoad ( URI input , URI output , ObjectMap params ) throws IOException { } }

Fix:
return super . preLoad ( input , output , params ) ;
Buggy code:
public final class TextElement extends ASTNode implements IDocElement { public static final SimplePropertyDescriptor TEXT_PROPERTY = new SimplePropertyDescriptor ( TextElement . class , "text" , String . class , ASTNode . MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private String text = Util . EMPTY_STRING ; TextElement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { TextElement result = new TextElement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setText ( getText ( ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getText ( ) { } public void setText ( String text ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public final class ProcessManagerSlave { private final InputStream input ; private final OutputStream output ; private final ProcessManagerSlave . Handler handler ; private final Runnable controller = new ProcessManagerSlave . Controller ( ) ; public ProcessManagerSlave ( InputStream input , OutputStream output , ProcessManagerSlave . Handler handler ) { } public Runnable getController ( ) { } public void addProcess ( final String processName , final List < String > command , final Map < String , String > env , final String workingDirectory ) throws IOException { } public void startProcess ( final String processName ) throws IOException { } public void stopProcess ( final String processName ) throws IOException { } public void removeProcess ( final String processName ) throws IOException { } public void sendMessage ( final String processName , final List < String > message ) throws IOException { } public void sendMessage ( final String processName , final byte [ ] message , final long checksum ) throws IOException { if ( processName == null ) { throw new IllegalArgumentException ( "processName<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } final StringBuilder b = new StringBuilder ( ) ; b . append ( SEND_BYTES ) . append ( '' ) ; <START_BUG> b . append ( processName ) . append ( 0 ) ; <END_BUG> StreamUtils . writeString ( output , b ) ; output . write ( message . length ) ; output . write ( message ) ; StreamUtils . writeLong ( output , checksum ) ; StreamUtils . writeChar ( output , '\n' ) ; output . flush ( ) ; } public void broadcastMessage ( final List < String > message ) throws IOException { } public void broadcastMessage ( final byte [ ] message , final long checksum ) throws IOException { } private final class Controller implements Runnable { private final AtomicBoolean shutdown = new AtomicBoolean ( false ) ; public void run ( ) { } private void shutdown ( ) { } } public interface Handler { void handleMessage ( String sourceProcessName , byte [ ] message ) { } void handleMessage ( String sourceProcessName , List < String > message ) { } void shutdown ( ) { } } }

Fix:
b . append ( processName ) . append ( '' ) ;
Buggy code:
public class LogglyAppenderManualTest { public static void main ( String [ ] args ) throws InterruptedException { final String apiKey = args [ 0 ] ; if ( ( apiKey == null ) || ( apiKey == "" ) ) { System . out . println ( "You<seq2seq4repair_space>must<seq2seq4repair_space>specify<seq2seq4repair_space>your<seq2seq4repair_space>loggly<seq2seq4repair_space>api<seq2seq4repair_space>key<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>this<seq2seq4repair_space>code" ) ; System . exit ( ( - 1 ) ) ; } <START_BUG> TestConfigHelper . configureLoggingToConsole ( apiKey ) ; <END_BUG> Logger logger = Logger . getLogger ( LOGGER_NAME ) ; long time = System . currentTimeMillis ( ) ; String execId = "<seq2seq4repair_space>Execution<seq2seq4repair_space>Id:<seq2seq4repair_space>" + time ; logger . trace ( ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>trace<seq2seq4repair_space>line." + execId ) ) ; logger . debug ( ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>debug<seq2seq4repair_space>line." + execId ) ) ; logger . warn ( ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>warning<seq2seq4repair_space>message." + execId ) ) ; logger . fatal ( ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>fatal<seq2seq4repair_space>error!" + execId ) ) ; LogManager . shutdown ( ) ; } }

Fix:
TestConfigHelper . setupLogging ( apiKey ) ;
Buggy code:
public class ComponentReferenceApplication extends WicketExampleApplication { private static final List personsDB ; public static final List getPersons ( ) { } public ComponentReferenceApplication ( ) { } protected void init ( ) { <START_BUG> getExceptionSettings ( ) . setThrowExceptionOnMissingResource ( false ) ; <END_BUG> } public Class getHomePage ( ) { } }

Fix:
getResourceSettings ( ) . setThrowExceptionOnMissingResource ( false ) ;