nus-yam/ex-repair huggingface dataset:
Buggy code:
public class OscSerial { final int END = 192 ; final int ESC = 219 ; final int ESC_END = 220 ; final int ESC_ESC = 221 ; protected ArrayList serialBuffer ; protected int count = 0 ; protected Serial serial ; protected HashMap < String , ArrayList < OscPlug > > _myOscPlugMap = new HashMap < String , ArrayList < OscPlug > > ( ) ; protected final Vector < OscEventListener > listeners ; private Class < ? > _myParentClass ; private Method _myEventMethod ; private Class < ? > _myEventClass = OscMessage . class ; private boolean isEventMethod ; protected final Object parent ; public OscSerial ( PApplet parent , Serial serial ) { } public void pre ( ) { } protected void listen ( ) { } public void send ( OscMessage msg ) { } protected void oscPacketReady ( ) { } protected int byteArrayToInt ( int [ ] b , int offset ) { } protected float arr2float ( byte [ ] buf , int pos ) { } protected void sendSLIP ( byte [ ] packet ) { int len = packet . length ; serial . write ( END ) ; for ( int i = 0 ; i < ( packet . length ) ; i ++ ) { switch ( packet [ i ] ) { case ( ( byte ) ( END ) ) : serial . write ( ESC ) ; serial . write ( ESC_END ) ; break ; case ( ( byte ) ( ESC ) ) : serial . write ( ESC ) ; <START_BUG> serial . write ( ESC_END ) ; <END_BUG> break ; default : serial . write ( packet [ i ] ) ; } } serial . write ( END ) ; } public void addListener ( OscEventListener theListener ) { } public void removeListener ( OscEventListener theListener ) { } public Vector < OscEventListener > listeners ( ) { } public void plug ( final Object theObject , final String theMethodName , final String theAddrPattern , final String theTypeTag ) { } public void plug ( final Object theObject , final String theMethodName , final String theAddrPattern ) { } private void callMethod ( final OscMessage theOscMessage ) { } private void invoke ( final Object theObject , final Method theMethod , final Object [ ] theArgs ) { } private boolean checkEventMethod ( ) { } }

Fix:
serial . write ( ESC_ESC ) ;
Buggy code:
public class ChunkInputStream < T > extends InputStream { private T key ; private byte [ ] chunk ; private Keyspace keyspace ; private String cf ; private long chunkPos = 0 ; private int pos ; private Serializer < T > rowKeySerializer ; public ChunkInputStream ( Keyspace keyspace , String cf , T key , Serializer < T > rowKeySerializer ) { } public int read ( ) throws IOException { if ( ( ( chunk ) == null ) || ( ( ( pos ) + 1 ) == ( chunk . length ) ) ) { if ( ! ( fetchChunk ( ) ) ) { return - 1 ; } } <START_BUG> return chunk [ ( ( pos ) ++ ) ] ; <END_BUG> } private boolean fetchChunk ( ) throws IOException { } public boolean markSupported ( ) { } }

Fix:
return ( chunk [ ( ( pos ) ++ ) ] ) & 255 ;
Buggy code:
public class CasLatencyTest extends OnesidedTestBase { private int i ; int disp ; double tStart ; double tEnd ; private Win win ; private long [ ] sbuf = new long [ MAX_SIZE ] ; private long [ ] cbuf = new long [ MAX_SIZE ] ; private long [ ] tbuf = new long [ MAX_SIZE ] ; @ Override protected void initialize ( String [ ] args ) { super . initialize ( args ) ; <START_BUG> getReporter ( ) . setColumnNames ( new String [ ] { "Latency<seq2seq4repair_space>(µs)" } ) ; <END_BUG> } private double collectResult ( double tStart , double tEnd ) { } private double collectResult ( double tStart , double tEnd , double multiplier ) { } @ Override protected void runTestWithFlush ( ) { } @ Override protected void runTestWithFlushLocal ( ) { } @ Override protected void runTestWithLockAll ( ) { } @ Override protected void runTestWithFence ( ) { } @ Override protected void runTestWithPscw ( ) { } @ Override protected void runTestWithLock ( ) { } }

Fix:
getReporter ( ) . setColumnNames ( new String [ ] { "Latency<seq2seq4repair_space>(us)" } ) ;
Buggy code:
public class IntegerProperty extends NumberProperty { private static final long serialVersionUID = 240L ; private int value ; private int savedValue ; public IntegerProperty ( String name , int value ) { } @ Override public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } public IntegerProperty ( String name ) { } public IntegerProperty ( ) { } public void setValue ( int value ) { } @ Override protected void setNumberValue ( Number n ) { } @ Override protected void setNumberValue ( String n ) throws NumberFormatException { } public String getStringValue ( ) { } public Object getObjectValue ( ) { } @ Override <START_BUG> public Object clone ( ) { <END_BUG> IntegerProperty prop = ( ( IntegerProperty ) ( super . clone ( ) ) ) ; prop . value = value ; return prop ; } @ Override public boolean getBooleanValue ( ) { } @ Override public double getDoubleValue ( ) { } @ Override public float getFloatValue ( ) { } @ Override public int getIntValue ( ) { } @ Override public long getLongValue ( ) { } }

Fix:
public IntegerProperty clone ( ) {
Buggy code:
@ SuppressWarnings ( "unused" ) public class Message implements Serializable , Comparable < Message > { private static final long serialVersionUID = - 8905875007093416665L ; private Set < String > receivedby = null ; private Date msg_Date ; private long creationtime ; private boolean disconnect = false ; private String owner ; private String text ; private String timestamp ; private String date ; private String ip ; private String port ; private String pcname ; private String delay ; private String network ; private String type ; private String servresponse ; private String aux1 ; private String aux2 ; private String aux3 ; private String aux4 ; public Set < String > getSeen ( ) { } public void addSeen ( String name ) { } public String getOwner ( ) { } public void setOwner ( String owner ) { } public String getText ( ) { } public void setText ( String text ) { } public String getTimestamp ( ) { } public void setTimestamp ( ) { } public String getDate ( ) { } public void setDate ( ) { } public String getIp ( ) { } public void setIp ( String ip ) { } public String getPort ( ) { } public void setPort ( String port ) { } public String getPcname ( ) { } public void setPcname ( String pcname ) { } public String getDelay ( ) { } public boolean isDisconnect ( ) { } public void setDisconnect ( boolean disconnect ) { } public void setDelay ( String delay ) { } public String getNetwork ( ) { } public void setNetwork ( int i ) { } public String getType ( ) { } public void setType ( String type ) { } public String getServresponse ( ) { } public void setServresponse ( String servresponse ) { } public long getCreationtime ( ) { } public void setCreationtime ( long creationtime ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int compareTo ( Message m ) { } public Message ( ) { } public Date getMsg_Date ( ) { } public void setMsg_Date ( Date msg_Date ) { } public Message buildDisconnectMessage ( ) { } public Message buildConnectMessage ( ) { this . setOwner ( getOwner ( ) ) ; this . setCreationtime ( Calendar . getInstance ( ) . getTimeInMillis ( ) ) ; <START_BUG> this . setType ( "connect" ) ; <END_BUG> this . setPcname ( getPcname ( ) ) ; this . setTimestamp ( ) ; this . setDate ( ) ; return this ; } public Message ( String owner , String ip , String Message ) { } public Message ( String owner , String Message ) { } public Message ( String Message ) { } No newline ; at end ; of file ; }

Fix:
this . setType ( "connectreq" ) ;
Buggy code:
public class RequestCycle extends RequestHandlerStack implements IEventSink , IRequestCycle { private static final Logger log = LoggerFactory . getLogger ( RequestCycle . class ) ; private boolean cleanupFeedbackMessagesOnDetach = true ; public interface DetachCallback { public void onDetach ( RequestCycle requestCycle ) { } } public static RequestCycle get ( ) { } private static void set ( RequestCycle requestCycle ) { } private Request request ; private final Response originalResponse ; private final IRequestMapper requestMapper ; private final IExceptionMapper exceptionMapper ; private final List < RequestCycle . DetachCallback > detachCallbacks = new ArrayList < RequestCycle . DetachCallback > ( ) ; private UrlRenderer urlRenderer ; private MetaDataEntry < ? > [ ] metaData ; private final long startTime = System . currentTimeMillis ( ) ; public RequestCycle ( RequestCycleContext context ) { } protected UrlRenderer newUrlRenderer ( ) { <START_BUG> return new UrlRenderer ( getRequest ( ) . getBaseUrl ( ) ) ; <END_BUG> } public Response getOriginalResponse ( ) { } public final UrlRenderer getUrlRenderer ( ) { } protected IRequestHandler resolveRequestHandler ( ) { } protected int getExceptionRetryCount ( ) { } public boolean processRequest ( ) { } public boolean processRequestAndDetach ( ) { } private void executeExceptionRequestHandler ( final IRequestHandler handler , final int retryCount ) { } protected IRequestHandler handleException ( final Exception e ) { } public Request getRequest ( ) { } public void setRequest ( Request request ) { } @ Override protected RequestCycle getRequestCycle ( ) { } public final < T > void setMetaData ( final MetaDataKey < T > key , final T object ) { } public final < T > T getMetaData ( final MetaDataKey < T > key ) { } public Url mapUrlFor ( IRequestHandler handler ) { } public Url mapUrlFor ( ResourceReference reference , PageParameters params ) { } public final < C extends Page > Url mapUrlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public final CharSequence urlFor ( ResourceReference reference , PageParameters params ) { } public final < C extends Page > CharSequence urlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public CharSequence urlFor ( IRequestHandler handler ) { } private String renderUrl ( Url url ) { } @ Override public void detach ( ) { } public void register ( RequestCycle . DetachCallback detachCallback ) { } public void setResponsePage ( IRequestablePage page ) { } public void setResponsePage ( Class < ? extends IRequestablePage > pageClass ) { } public void setResponsePage ( Class < ? extends IRequestablePage > pageClass , PageParameters parameters ) { } public boolean isCleanupFeedbackMessagesOnDetach ( ) { } public void setCleanupFeedbackMessagesOnDetach ( boolean cleanupFeedbackMessagesOnDetach ) { } public final long getStartTime ( ) { } public void onEvent ( IEvent < ? > event ) { } protected void onBeginRequest ( ) { } protected void onEndRequest ( ) { } }

Fix:
return new UrlRenderer ( getRequest ( ) . getClientUrl ( ) ) ;
Buggy code:
public class AsynchMDNSenderModule extends AbstractHttpSenderModule { private static final Logger s_aLogger = LoggerFactory . getLogger ( AsynchMDNSenderModule . class ) ; public AsynchMDNSenderModule ( ) { } public boolean canHandle ( @ Nonnull final String sAction , @ Nonnull final IMessage aMsg , @ Nullable final Map < String , Object > aOptions ) { } private void _sendViaHTTP ( @ Nonnull final AS2Message aMsg , @ Nonnull final DispositionType aDisposition ) throws OpenAS2Exception , HttpResponseException , IOException , MessagingException { } public void handle ( @ Nonnull final String sAction , @ Nonnull final IMessage aBaseMsg , @ Nullable final Map < String , Object > aOptions ) throws OpenAS2Exception { try { final AS2Message aMsg = ( ( AS2Message ) ( aBaseMsg ) ) ; AsynchMDNSenderModule . s_aLogger . info ( ( "Async<seq2seq4repair_space>MDN<seq2seq4repair_space>submitted" + ( aMsg . getLoggingText ( ) ) ) ) ; final DispositionType aDisposition = DispositionType . createSuccess ( ) ; <START_BUG> final int nRetries = getRetryCount ( aOptions ) ; <END_BUG> try { _sendViaHTTP ( aMsg , aDisposition ) ; } catch ( final HttpResponseException ex ) { AsynchMDNSenderModule . s_aLogger . error ( ( "Http<seq2seq4repair_space>Response<seq2seq4repair_space>Error<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; ex . terminate ( ) ; if ( ! ( doResend ( DO_SENDMDN , aMsg , ex , nRetries ) ) ) throw ex ; } catch ( final IOException ex ) { final OpenAS2Exception wioe = WrappedOpenAS2Exception . wrap ( ex ) ; wioe . addSource ( SOURCE_MESSAGE , aMsg ) ; wioe . terminate ( ) ; if ( ! ( doResend ( DO_SENDMDN , aMsg , wioe , nRetries ) ) ) throw wioe ; } catch ( final Exception ex ) { throw WrappedOpenAS2Exception . wrap ( ex ) ; } } finally { if ( AsynchMDNSenderModule . s_aLogger . isDebugEnabled ( ) ) AsynchMDNSenderModule . s_aLogger . debug ( "Async<seq2seq4repair_space>MDN<seq2seq4repair_space>message<seq2seq4repair_space>sent" ) ; } } }

Fix:
final int nRetries = getRetryCount ( aMsg . getPartnership ( ) , aOptions ) ;
Buggy code:
public class Database { public static String _dbURL = ( "jdbc:sqlite:" + ( System . getProperty ( "user.dir" ) ) ) + "\\src\\Lemon.s3db" ; static Connection _tempCon ; static Statement _tempState ; public static Statement MakeCon ( ) { } public static boolean CloseCon ( ) { } public static boolean ModifyEmp ( String tempSQLQuery ) { } public static void Select ( ) { } public static void getSpecificEmp ( int EmpID ) { } private static boolean Authenticate ( String enteredName , String enteredPass ) { } public static boolean Login ( String enteredName , String password ) { } public static boolean AddUser ( String userName , String userPass ) { } private static void Insert ( String userName , String userPass ) { } public static void getAllEmps ( ) { Employee temp = null ; try { ResultSet rs = Database . MakeCon ( ) . executeQuery ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>Employees" ) ; while ( rs . next ( ) ) { temp = new Employee ( rs . getString ( "EmployeeType" ) , rs . getDouble ( "Salary" ) , rs . getString ( "FirstName" ) , rs . getString ( "LastName" ) , rs . getInt ( "Grade" ) , rs . getInt ( "Age" ) , rs . getString ( "ContactNumber" ) , rs . getString ( "Address" ) , rs . getInt ( "EmployeeID" ) ) ; _employee . add ( temp ) ; } <START_BUG> if ( Database . CloseCon ( ) ) { <END_BUG> JOptionPane . showMessageDialog ( null , "Error:<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>close<seq2seq4repair_space>connection" ) ; } } catch ( Exception e ) { JOptionPane . showMessageDialog ( null , ( "Error:<seq2seq4repair_space>" + e ) ) ; } } public static List < String > DebugBox ( String enteredName , String enteredPass ) { } }

Fix:
if ( ! ( Database . CloseCon ( ) ) ) {
Buggy code:
public class SimpleSessionMetaData implements SessionMetaData { private final Date creationTime ; private volatile Date lastAccessedTime ; private volatile Time maxInactiveInterval ; public SimpleSessionMetaData ( ) { } public SimpleSessionMetaData ( Date creationTime , Date lastAccessedTime , Time maxInactiveInterval ) { } @ Override public boolean isExpired ( ) { long maxInactiveInterval = this . getMaxInactiveInterval ( TimeUnit . MILLISECONDS ) ; <START_BUG> return maxInactiveInterval > 0 ? ( ( System . currentTimeMillis ( ) ) - ( this . lastAccessedTime . getTime ( ) ) ) >= maxInactiveInterval : false ; <END_BUG> } @ Override public boolean isNew ( ) { } @ Override public Date getCreationTime ( ) { } @ Override public Date getLastAccessedTime ( ) { } @ Override public void setLastAccessedTime ( Date date ) { } @ Override public long getMaxInactiveInterval ( TimeUnit unit ) { } @ Override public void setMaxInactiveInterval ( long interval , TimeUnit unit ) { } }

Fix:
return maxInactiveInterval > 0 ? ( ( System . currentTimeMillis ( ) ) - ( this . lastAccessedTime . getTime ( ) ) ) > maxInactiveInterval : false ;
Buggy code:
public class XSImplementationImpl extends CoreDOMImplementationImpl implements XSImplementation { static XSImplementationImpl singleton = new XSImplementationImpl ( ) ; public static DOMImplementation getDOMImplementation ( ) { } public boolean hasFeature ( String feature , String version ) { } public XSLoader createXSLoader ( StringList versions ) throws XSException { } public StringList getRecognizedVersions ( ) { StringListImpl list = new StringListImpl ( new String [ ] { "1.0" } , 1 ) ; <START_BUG> return null ; <END_BUG> } }

Fix:
return list ;
Buggy code:
public class FinancialSystemTransactionalDocumentBase extends TransactionalDocumentBase implements FinancialSystemTransactionalDocument { private static final Logger LOG = Logger . getLogger ( FinancialSystemTransactionalDocumentBase . class ) ; protected static final String UPDATE_TOTAL_AMOUNT_IN_POST_PROCESSING_PARAMETER_NAME = "UPDATE_TOTAL_AMOUNT_IN_POST_PROCESSING_IND" ; private static transient BusinessObjectService businessObjectService ; private static transient FinancialSystemDocumentService financialSystemDocumentService ; private static transient ParameterService parameterService ; private transient Map < String , Boolean > canEditCache ; public FinancialSystemTransactionalDocumentBase ( ) { } @ Override public FinancialSystemDocumentHeader getFinancialSystemDocumentHeader ( ) { } @ Override public void setDocumentHeader ( DocumentHeader documentHeader ) { } @ Override public void prepareForSave ( ) { } protected void captureWorkflowHeaderInformation ( ) { } protected String getWorkflowDocumentStatusCode ( DocumentStatus status ) { } @ Override public void processAfterRetrieve ( ) { try { DocumentHeader correctingDocumentHeader = SpringContext . getBean ( FinancialSystemDocumentHeaderDao . class ) . getCorrectingDocumentHeader ( getFinancialSystemDocumentHeader ( ) . getDocumentNumber ( ) ) ; <START_BUG> if ( correctingDocumentHeader != null ) { <END_BUG> getFinancialSystemDocumentHeader ( ) . setCorrectedByDocumentId ( correctingDocumentHeader . getDocumentNumber ( ) ) ; } } catch ( Exception e ) { FinancialSystemTransactionalDocumentBase . LOG . error ( "Received<seq2seq4repair_space>WorkflowException<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>route<seq2seq4repair_space>header<seq2seq4repair_space>id<seq2seq4repair_space>from<seq2seq4repair_space>workflow<seq2seq4repair_space>document." , e ) ; throw new WorkflowRuntimeException ( e ) ; } super . processAfterRetrieve ( ) ; } @ Override public void doRouteStatusChange ( DocumentRouteStatusChange statusChangeEvent ) { } @ Override public void doRouteLevelChange ( DocumentRouteLevelChange levelChangeEvent ) { } public void toErrorCorrection ( ) throws IllegalStateException , WorkflowException { } @ Override public boolean answerSplitNodeQuestion ( String nodeName ) throws UnsupportedOperationException { } protected ParameterService getParameterService ( ) { } protected BusinessObjectService getBusinessObjectService ( ) { } protected FinancialSystemDocumentService getFinancialSystemDocumentService ( ) { } @ Override public void toCopy ( ) throws IllegalStateException , WorkflowException { } @ Override public void updateAndSaveAppDocStatus ( String applicationDocumentStatus ) throws WorkflowException { } @ Override public String getApplicationDocumentStatus ( ) { } @ Override public void setApplicationDocumentStatus ( String applicationDocumentStatus ) { } }

Fix:
if ( ( ( ObjectUtils . isNotNull ( correctingDocumentHeader ) ) && ( ! ( correctingDocumentHeader . getWorkflowDocument ( ) . isCanceled ( ) ) ) ) && ( ! ( correctingDocumentHeader . getWorkflowDocument ( ) . isDisapproved ( ) ) ) ) {
Buggy code:
public class TestBooleanPrefixQuery extends LuceneTestCase { public static void main ( String [ ] args ) { } public static Test suite ( ) { } public TestBooleanPrefixQuery ( String name ) { } private int getCount ( IndexReader r , Query q ) throws Exception { } public void testMethod ( ) throws Exception { RAMDirectory directory = new RAMDirectory ( ) ; String [ ] categories = new String [ ] { "food" , "foodanddrink" , "foodanddrinkandgoodtimes" , "food<seq2seq4repair_space>and<seq2seq4repair_space>drink" } ; Query rw1 = null ; Query rw2 = null ; IndexReader reader = null ; try { IndexWriter writer = new IndexWriter ( directory , new WhitespaceAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < ( categories . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "category" , categories [ i ] , Store . YES , Index . NOT_ANALYZED ) ) ; writer . addDocument ( doc ) ; } writer . close ( ) ; <START_BUG> reader = IndexReader . open ( directory ) ; <END_BUG> PrefixQuery query = new PrefixQuery ( new Term ( "category" , "foo" ) ) ; rw1 = query . rewrite ( reader ) ; BooleanQuery bq = new BooleanQuery ( ) ; bq . add ( query , MUST ) ; rw2 = bq . rewrite ( reader ) ; } catch ( IOException e ) { fail ( e . getMessage ( ) ) ; } assertEquals ( "Number<seq2seq4repair_space>of<seq2seq4repair_space>Clauses<seq2seq4repair_space>Mismatch" , getCount ( reader , rw1 ) , getCount ( reader , rw2 ) ) ; } }

Fix:
reader = IndexReader . open ( directory , true ) ;
Buggy code:
public class QuoteMapper { public static QuoteMapper INSTANCE = new QuoteMapper ( ) ; private QuoteMapper ( ) { } public Quote mapFromYahooQuote ( YahooQuote yQuote , Date created ) { if ( yQuote == null ) { return null ; } Quote mappedQuote = new Quote ( ) ; mappedQuote . setChange ( yQuote . getChange ( ) ) ; if ( ( yQuote . getPercentChange ( ) ) != null ) { mappedQuote . setChangePercent ( Float . parseFloat ( yQuote . getPercentChange ( ) . replace ( "%" , "" ) ) ) ; } mappedQuote . setChangePercentYTD ( null ) ; mappedQuote . setChangeYTD ( null ) ; mappedQuote . setHigh ( yQuote . getDaysHigh ( ) ) ; mappedQuote . setLastPrice ( yQuote . getLastTradePriceOnly ( ) ) ; mappedQuote . setLow ( yQuote . getDaysLow ( ) ) ; mappedQuote . setMarketCap ( null ) ; mappedQuote . setmSDate ( null ) ; mappedQuote . setName ( yQuote . getName ( ) ) ; mappedQuote . setOpen ( yQuote . getOpen ( ) ) ; <START_BUG> mappedQuote . setStatus ( "SUCESS" ) ; <END_BUG> mappedQuote . setSymbol ( yQuote . getSymbol ( ) ) ; mappedQuote . setTimestamp ( created ) ; mappedQuote . setVolume ( yQuote . getVolume ( ) ) ; return mappedQuote ; } }

Fix:
mappedQuote . setStatus ( "SUCCESS" ) ;
Buggy code:
public class WPBImporter { public WPBParameter buildParameter ( Map < Object , Object > properties ) { } public WPBUri buildUri ( Map < Object , Object > properties ) { } public WPBPage buildWebPage ( Map < Object , Object > properties ) { } public WPBFile buildFile ( Map < Object , Object > properties ) { WPBFile file = new WPBFile ( ) ; if ( ( properties . get ( "externalKey" ) ) != null ) file . setExternalKey ( properties . get ( "externalKey" ) . toString ( ) . trim ( ) ) ; else return null ; if ( ( properties . get ( "contentType" ) ) != null ) { file . setContentType ( properties . get ( "contentType" ) . toString ( ) . trim ( ) ) ; } if ( ( properties . get ( "adjustedContentType" ) ) != null ) { file . setAdjustedContentType ( properties . get ( "adjustedContentType" ) . toString ( ) . trim ( ) ) ; } if ( ( properties . get ( "fileName" ) ) != null ) { file . setFileName ( properties . get ( "fileName" ) . toString ( ) . trim ( ) ) ; } if ( ( properties . get ( "ownerExtKey" ) ) != null ) { <START_BUG> file . setOwnerExtKey ( properties . get ( "name" ) . toString ( ) . trim ( ) ) ; <END_BUG> } else { file . setOwnerExtKey ( "" ) ; } if ( ( properties . get ( "directoryFlag" ) ) != null ) { file . setDirectoryFlag ( ( properties . get ( "directoryFlag" ) . toString ( ) . trim ( ) . equals ( "1" ) ? 1 : 0 ) ) ; } else { file . setDirectoryFlag ( 0 ) ; } file . setSize ( 0L ) ; file . setBlobKey ( "" ) ; file . setHash ( 0L ) ; String lastModifiedStr = ( ( String ) ( properties . get ( "lastModified" ) ) ) ; Long lastModified = 0L ; try { lastModified = ( lastModifiedStr != null ) ? Long . valueOf ( lastModifiedStr ) : 0 ; } catch ( NumberFormatException e ) { } file . setLastModified ( new Date ( lastModified ) ) ; return file ; } public WPBPageModule buildWebPageModule ( Map < Object , Object > properties ) { } public WPBProject buildProject ( Map < Object , Object > properties ) { } public WPBArticle buildArticle ( Map < Object , Object > properties ) { } public WPBMessage buildMessage ( Map < Object , Object > properties ) { } }

Fix:
file . setOwnerExtKey ( properties . get ( "ownerExtKey" ) . toString ( ) . trim ( ) ) ;
Buggy code:
final class CompoundOptions extends AbstractOptions implements Serializable { private static final long serialVersionUID = 0L ; ImmutableList < Options > options ; CompoundOptions ( final Options primary , final Options secondary ) { } CompoundOptions ( final Iterable < ? extends Options > options ) { } public Map < String , Object > toMap ( ) { } @ Override public Object get ( final String key ) { <START_BUG> for ( Options options : this . options ) { <END_BUG> Object result = options . get ( key ) ; if ( result != null ) { return result ; } } return null ; } }

Fix:
for ( Options options : this . options . reverse ( ) ) {
Buggy code:
public class ValidatePasswordState extends AbstractValidationState { private final StateValues stateValues ; private final ConsoleWrapper theConsole ; public ValidatePasswordState ( ConsoleWrapper theConsole , final StateValues stateValues ) { } @ Override protected Collection < State > getValidationStates ( ) { } private State getRetryState ( ) { } private State getDetailedCheckState ( ) { return new State ( ) { @ Override public State execute ( ) { PasswordCheckResult result = stateValues . getOptions ( ) . getCheckUtil ( ) . check ( false , stateValues . getUserName ( ) , stateValues . getPassword ( ) ) ; final boolean warnResult = WARN . equals ( result . getResult ( ) ) ; final boolean rejectResult = REJECT . equals ( result . getResult ( ) ) ; switch ( stateValues . getOptions ( ) . getCheckUtil ( ) . getRestrictionLevel ( ) ) { case WARN : if ( ( warnResult || rejectResult ) && ( ! ( stateValues . isSilentOrNonInteractive ( ) ) ) ) { return confirmWeakPassword ( result ) ; } break ; case REJECT : if ( warnResult && ( ! ( stateValues . isSilentOrNonInteractive ( ) ) ) ) { return confirmWeakPassword ( result ) ; } if ( rejectResult ) { <START_BUG> return new ErrorState ( theConsole , result . getMessage ( ) , getRetryState ( ) , stateValues ) ; <END_BUG> } break ; default : break ; } return ValidatePasswordState . this ; } } ; } private State confirmWeakPassword ( PasswordCheckResult result ) { } @ Override protected State getSuccessState ( ) { } }

Fix:
return new ErrorState ( theConsole , result . getMessage ( ) , getRetryState ( ) ) ;
Buggy code:
public class X509CertificateLogger { private String folder ; FileOutputStream log ; public X509CertificateLogger ( String folder , String logFileName ) throws IOException { } private boolean store ( String fileName , X509Certificate cert ) throws IOException , NoSuchAlgorithmException , CertificateEncodingException { } synchronized void log ( String identifier , X509Certificate cert ) throws IOException , InterruptedException , NoSuchAlgorithmException , CertificateEncodingException { String fileName = "" ; MessageDigest sha = MessageDigest . getInstance ( "SHA" ) ; sha . digest ( cert . getEncoded ( ) ) ; <START_BUG> fileName = ( ( folder ) + ( sha . toString ( ) ) ) + ".ser" ; <END_BUG> String logMessage = ( ( identifier + ";" ) + fileName ) + "\r" ; log . write ( logMessage . getBytes ( ) ) ; File test = new File ( fileName ) ; System . out . println ( ( "Writing" + fileName ) ) ; if ( ! ( test . exists ( ) ) ) { this . store ( fileName , cert ) ; } } }

Fix:
fileName = ( ( folder ) + ( sha . digest ( ) . toString ( ) ) ) + ".ser" ;
Buggy code:
public class RollingCountBolt extends BaseRichBolt { private static final long serialVersionUID = 5537727428628598519L ; private static final Logger LOG = Logger . getLogger ( RollingCountBolt . class ) ; private static final int NUM_WINDOW_CHUNKS = 5 ; private static final int DEFAULT_SLIDING_WINDOW_IN_SECONDS = ( RollingCountBolt . NUM_WINDOW_CHUNKS ) * 60 ; private static final int DEFAULT_EMIT_FREQUENCY_IN_SECONDS = ( RollingCountBolt . DEFAULT_SLIDING_WINDOW_IN_SECONDS ) // ( RollingCountBolt . NUM_WINDOW_CHUNKS ) ; private static final String WINDOW_LENGTH_WARNING_TEMPLATE = "Actual<seq2seq4repair_space>window<seq2seq4repair_space>length<seq2seq4repair_space>is<seq2seq4repair_space>%d<seq2seq4repair_space>seconds<seq2seq4repair_space>when<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>%d<seq2seq4repair_space>seconds" + "<seq2seq4repair_space>(you<seq2seq4repair_space>can<seq2seq4repair_space>safely<seq2seq4repair_space>ignore<seq2seq4repair_space>this<seq2seq4repair_space>warning<seq2seq4repair_space>during<seq2seq4repair_space>the<seq2seq4repair_space>startup<seq2seq4repair_space>phase)" ; private final SlidingWindowCounter < Object > counter ; private final int windowLengthInSeconds ; private final int emitFrequencyInSeconds ; private OutputCollector collector ; private NthLastModifiedTimeTracker lastModifiedTracker ; public RollingCountBolt ( ) { } public RollingCountBolt ( int windowLengthInSeconds , int emitFrequencyInSeconds ) { } private int deriveNumWindowChunksFrom ( int windowLengthInSeconds , int windowUpdateFrequencyInSeconds ) { } @ SuppressWarnings ( "rawtypes" ) @ Override public void prepare ( Map stormConf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple tuple ) { if ( TupleHelpers . isTickTuple ( tuple ) ) { <START_BUG> RollingCountBolt . LOG . info ( "Received<seq2seq4repair_space>tick<seq2seq4repair_space>tuple,<seq2seq4repair_space>triggering<seq2seq4repair_space>emit<seq2seq4repair_space>of<seq2seq4repair_space>current<seq2seq4repair_space>window<seq2seq4repair_space>counts" ) ; <END_BUG> emitCurrentWindowCounts ( ) ; } else { countObjAndAck ( tuple ) ; } } private void emitCurrentWindowCounts ( ) { } private void emit ( Map < Object , Long > counts , int actualWindowLengthInSeconds ) { } private void countObjAndAck ( Tuple tuple ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } }

Fix:
RollingCountBolt . LOG . debug ( "Received<seq2seq4repair_space>tick<seq2seq4repair_space>tuple,<seq2seq4repair_space>triggering<seq2seq4repair_space>emit<seq2seq4repair_space>of<seq2seq4repair_space>current<seq2seq4repair_space>window<seq2seq4repair_space>counts" ) ;
Buggy code:
public class MasterEconomyUniqueAccount implements UniqueAccount { private Text displayName ; private UUID uuid ; public MasterEconomyUniqueAccount ( UUID uuid ) { } @ Override public Text getDisplayName ( ) { } @ Override public BigDecimal getDefaultBalance ( Currency currency ) { } @ Override public boolean hasBalance ( Currency currency , Set < Context > contexts ) { } @ Override public BigDecimal getBalance ( Currency currency , Set < Context > contexts ) { } @ Override public Map < Currency , BigDecimal > getBalances ( Set < Context > contexts ) { } @ Override public TransactionResult setBalance ( Currency currency , BigDecimal amount , Cause cause , Set < Context > contexts ) { } @ Override public TransactionResult resetBalances ( Cause cause , Set < Context > contexts ) { } @ Override public TransactionResult resetBalance ( Currency currency , Cause cause , Set < Context > contexts ) { <START_BUG> ConfigManager . setBalance ( this . getUUID ( ) , 0 ) ; <END_BUG> return null ; } @ Override public TransactionResult deposit ( Currency currency , BigDecimal amount , Cause cause , Set < Context > contexts ) { } @ Override public TransactionResult withdraw ( Currency currency , BigDecimal amount , Cause cause , Set < Context > contexts ) { } @ Override public TransferResult transfer ( Account to , Currency currency , BigDecimal amount , Cause cause , Set < Context > contexts ) { } @ Override public String getIdentifier ( ) { } @ Override public Set < Context > getActiveContexts ( ) { } @ Override public UUID getUUID ( ) { } }

Fix:
ConfigManager . setBalance ( this . getUUID ( ) , BigDecimal . valueOf ( 0 ) ) ;
Buggy code:
public class WhoAmIOperation implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = ModelDescriptionConstants . WHOAMI ; public static final WhoAmIOperation INSTANCE = new WhoAmIOperation ( ) ; private final ParametersValidator validator ; private WhoAmIOperation ( ) { } public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { validator . validate ( operation ) ; <START_BUG> Subject subject = SecurityContext . getSubject ( ) ; <END_BUG> if ( subject == null ) { throw new OperationFailedException ( new ModelNode ( ) . set ( DomainManagementMessages . MESSAGES . noSecurityContextEstablished ( ) ) ) ; } Set < RealmUser > realmUsers = subject . getPrincipals ( RealmUser . class ) ; if ( ( realmUsers . size ( ) ) != 1 ) { throw new OperationFailedException ( new ModelNode ( ) . set ( DomainManagementMessages . MESSAGES . unexpectedNumberOfRealmUsers ( realmUsers . size ( ) ) ) ) ; } RealmUser user = realmUsers . iterator ( ) . next ( ) ; ModelNode result = context . getResult ( ) ; ModelNode identity = result . get ( ModelDescriptionConstants . IDENTITY ) ; identity . get ( ModelDescriptionConstants . USERNAME ) . set ( user . getName ( ) ) ; identity . get ( ModelDescriptionConstants . REALM ) . set ( user . getRealm ( ) ) ; if ( ( operation . hasDefined ( ModelDescriptionConstants . VERBOSE ) ) && ( operation . require ( ModelDescriptionConstants . VERBOSE ) . asBoolean ( ) ) ) { ModelNode roles = result . get ( ModelDescriptionConstants . ROLES ) ; Set < RealmRole > roleSet = subject . getPrincipals ( RealmRole . class ) ; for ( RealmRole current : roleSet ) { roles . add ( current . getName ( ) ) ; } } context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
Subject subject = SecurityActions . getSecurityContextSubject ( ) ;
Buggy code:
public final class CSVParser implements Closeable , Iterable < CSVRecord > { public static CSVParser parse ( final File file , final Charset charset , final CSVFormat format ) throws IOException { } public static CSVParser parse ( final String string , final CSVFormat format ) throws IOException { } public static CSVParser parse ( final URL url , final Charset charset , final CSVFormat format ) throws IOException { } private final CSVFormat format ; private final Map < String , Integer > headerMap ; private final Lexer lexer ; private final List < String > record = new ArrayList < String > ( ) ; private long recordNumber ; private final Token reusableToken = new Token ( ) ; public CSVParser ( final Reader reader , final CSVFormat format ) throws IOException { } private void addRecordValue ( ) { } public void close ( ) throws IOException { } public long getCurrentLineNumber ( ) { } public Map < String , Integer > getHeaderMap ( ) { } public long getRecordNumber ( ) { } public List < CSVRecord > getRecords ( ) throws IOException { } public < T extends Collection < CSVRecord > > T getRecords ( final T records ) throws IOException { } private Map < String , Integer > initializeHeader ( ) throws IOException { Map < String , Integer > hdrMap = null ; final String [ ] formatHeader = this . format . getHeader ( ) ; if ( formatHeader != null ) { hdrMap = new LinkedHashMap < String , Integer > ( ) ; String [ ] headerRecord = null ; if ( ( formatHeader . length ) == 0 ) { final CSVRecord nextRecord = this . nextRecord ( ) ; if ( nextRecord != null ) { headerRecord = nextRecord . values ( ) ; } } else { if ( this . format . getSkipHeaderRecord ( ) ) { this . nextRecord ( ) ; } headerRecord = formatHeader ; } if ( headerRecord != null ) { for ( int i = 0 ; i < ( headerRecord . length ) ; i ++ ) { final String header = headerRecord [ i ] ; final boolean containsHeader = hdrMap . containsKey ( header ) ; <START_BUG> final boolean emptyHeader = header . trim ( ) . isEmpty ( ) ; <END_BUG> if ( containsHeader && ( ( ! emptyHeader ) || ( emptyHeader && ( ! ( this . format . getIgnoreEmptyHeaders ( ) ) ) ) ) ) { throw new IllegalArgumentException ( ( ( ( "The<seq2seq4repair_space>header<seq2seq4repair_space>contains<seq2seq4repair_space>a<seq2seq4repair_space>duplicate<seq2seq4repair_space>name:<seq2seq4repair_space>\"" + header ) + "\"<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( Arrays . toString ( headerRecord ) ) ) ) ; } hdrMap . put ( header , Integer . valueOf ( i ) ) ; } } } return hdrMap ; } public boolean isClosed ( ) { } public Iterator < CSVRecord > iterator ( ) { } CSVRecord nextRecord ( ) throws IOException { } }

Fix:
final boolean emptyHeader = ( header == null ) || ( header . trim ( ) . isEmpty ( ) ) ;
Buggy code:
public class SignInPanel extends Panel { private static final long serialVersionUID = 1L ; private boolean includeRememberMe = true ; private PasswordTextField password ; private boolean rememberMe = true ; private TextField username ; public final class SignInForm extends Form { private static final long serialVersionUID = 1L ; private final ValueMap properties = new ValueMap ( ) ; public SignInForm ( final String id ) { } public final void onSubmit ( ) { } } public SignInPanel ( final String id ) { } public SignInPanel ( final String id , final boolean includeRememberMe ) { } public final void forgetMe ( ) { } public String getPassword ( ) { <START_BUG> return password . getModelObjectAsString ( ) ; <END_BUG> } public boolean getRememberMe ( ) { } public String getUsername ( ) { } public void setPersistent ( final boolean enable ) { } public void setRememberMe ( final boolean rememberMe ) { } public boolean signIn ( String username , String password ) { } protected void onSignInFailed ( ) { } protected void onSignInSucceeded ( ) { } }

Fix:
return password . getInput ( ) ;
Buggy code:
@ Security . Authenticated ( LoggedStoremanOrAdmin . class ) public class Items extends Controller { public static Result list ( ) { } public static Result listTentItems ( ) { } public static Result listEventItems ( ) { } public static Result add ( ) { StoredItem item = Form . form ( StoredItem . class ) . bindFromRequest ( ) . get ( ) ; item . save ( ) ; <START_BUG> return Items . list ( ) ; <END_BUG> } public static Result update ( long id ) { } public static Result delete ( long id ) { } }

Fix:
return ok ( item . id . toString ( ) ) ;
Buggy code:
public class VariantContextCompatibilityCheckerXDominant extends AbstractCompatibilityChecker { public VariantContextCompatibilityCheckerXDominant ( Pedigree pedigree , List < VariantContext > list ) throws CompatibilityCheckerException { } public List < VariantContext > run ( ) throws CompatibilityCheckerException { } public void runSingleSampleCase ( ) throws CompatibilityCheckerException { if ( ( pedigree . getMembers ( ) . get ( 0 ) . getSex ( ) ) == ( Sex . FEMALE ) ) <START_BUG> new de . charite . compbio . jannovar . pedigree . compatibilitychecker . ad . VariantContextCompatibilityCheckerAutosomalDominant ( pedigree , list ) . run ( ) ; <END_BUG> else { for ( InheritanceVariantContext vc : list . getVcList ( ) ) if ( ( ( vc . getSingleSampleGenotype ( ) ) == ( Genotype . HETEROZYGOUS ) ) || ( ( vc . getSingleSampleGenotype ( ) ) == ( Genotype . HOMOZYGOUS_ALT ) ) ) vc . setMatchInheritance ( true ) ; } } public void runMultiSampleCase ( ) { } }

Fix:
new de . charite . compbio . jannovar . pedigree . compatibilitychecker . ad . VariantContextCompatibilityCheckerAutosomalDominant ( pedigree , list ) . runSingleSampleCase ( ) ;
Buggy code:
public class PersistenceCompleteInstallProcessor implements DeploymentUnitProcessor { private final Platform platform ; public PersistenceCompleteInstallProcessor ( Platform platform ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( DeploymentUnit context ) { } private static boolean deploymentHasPersistenceProvider ( DeploymentUnit deploymentUnit ) { deploymentUnit = DeploymentUtils . getTopDeploymentUnit ( deploymentUnit ) ; PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder = deploymentUnit . getAttachment ( DEPLOYED_PERSISTENCE_PROVIDER ) ; <START_BUG> return ( persistenceProviderDeploymentHolder != null ) && ( ( persistenceProviderDeploymentHolder . getProvider ( ) ) != null ) ? ( persistenceProviderDeploymentHolder . getProvider ( ) . size ( ) ) > 0 : false ; <END_BUG> } }

Fix:
return ( persistenceProviderDeploymentHolder != null ) && ( ( persistenceProviderDeploymentHolder . getProviders ( ) ) != null ) ? ( persistenceProviderDeploymentHolder . getProviders ( ) . size ( ) ) > 0 : false ;
Buggy code:
public class MyEventsActivity extends ToolbarControlBaseActivity < ObservableListView > implements AdapterView . OnItemClickListener { private ObservableListView mCardList ; private CardListViewAdapter mEventsCardAdapter ; private List < Event > events = new ArrayList < > ( ) ; private ArtmeAPI mApi ; private Context mContext ; private User user ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } private void getEvents ( ) { } @ Override protected int getSelfNavDrawerItem ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected View createContainer ( ) { <START_BUG> return mCardList ; <END_BUG> } @ Override protected ObservableListView createScrollable ( ) { } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } @ Override public void onRefresh ( ) { } @ Override public void onScrollChanged ( int i , boolean b , boolean b2 ) { } }

Fix:
return mSwipeRefreshLayout ;
Buggy code:
public class SatProblem { private ArrayList < ArrayList < Integer > > satProblem = new ArrayList < ArrayList < Integer > > ( ) ; private int numLiterals = 0 ; private int numClauses = 0 ; private ArrayList < String > readFile ( String filename ) { } public void createSatProblemFromFile ( String infile ) { ArrayList < ArrayList < Integer > > clauses = new ArrayList < ArrayList < Integer > > ( ) ; ArrayList < String > choppedCNF = readFile ( infile ) ; <START_BUG> for ( int i = 0 ; i < ( choppedCNF . size ( ) ) ; i ++ ) { <END_BUG> if ( ! ( choppedCNF . get ( i ) . startsWith ( "c" ) ) ) { if ( choppedCNF . get ( i ) . startsWith ( "p" ) ) { String [ ] values = choppedCNF . get ( i ) . split ( "<seq2seq4repair_space>" ) ; this . numLiterals = Integer . parseInt ( values [ 2 ] ) ; this . numClauses = Integer . parseInt ( values [ 3 ] ) ; } else { ArrayList < Integer > clause = new ArrayList < Integer > ( ) ; String [ ] literalsInAClause = choppedCNF . get ( i ) . split ( "<seq2seq4repair_space>" ) ; for ( int j = 0 ; j < ( ( literalsInAClause . length ) - 1 ) ; j ++ ) { clause . add ( Integer . parseInt ( literalsInAClause [ j ] ) ) ; } clauses . add ( clause ) ; } } } this . satProblem = clauses ; } public ArrayList < ArrayList < Integer > > getProblem ( ) { } public int getNumLiterals ( ) { } public int getNumClauses ( ) { } }

Fix:
for ( int i = 0 ; i < ( ( choppedCNF . size ( ) ) - 1 ) ; i ++ ) {
Buggy code:
public class GlusterSnapshotScheduleJob implements Serializable { private static final long serialVersionUID = 2355384696827317365L ; private static final Logger log = LoggerFactory . getLogger ( GlusterSnapshotScheduleJob . class ) ; private GlusterAuditLogUtil logUtil = getLogUtil ( ) ; public GlusterSnapshotScheduleJob ( ) { } @ OnTimerMethodAnnotation ( "onTimer" ) public void onTimer ( String serverId , String volumeId , String snapshotNamePrefix , String description , boolean force ) { final GlusterVolumeEntity volume = getGlusterVolumeDao ( ) . getById ( new Guid ( volumeId ) ) ; if ( volume == null ) { GlusterSnapshotScheduleJob . log . error ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>volume<seq2seq4repair_space>snapshot.<seq2seq4repair_space>Volume<seq2seq4repair_space>is<seq2seq4repair_space>null." ) ; return ; } final GlusterVolumeSnapshotEntity snapshot = new GlusterVolumeSnapshotEntity ( ) ; snapshot . setClusterId ( volume . getClusterId ( ) ) ; snapshot . setVolumeId ( volume . getId ( ) ) ; snapshot . setSnapshotName ( snapshotNamePrefix ) ; snapshot . setDescription ( description ) ; VdcReturnValueBase returnValue = getBackend ( ) . runInternalAction ( CreateGlusterVolumeSnapshot , new org . ovirt . engine . core . common . action . gluster . CreateGlusterVolumeSnapshotParameters ( snapshot , force ) ) ; if ( ! ( returnValue . getSucceeded ( ) ) ) { GlusterSnapshotScheduleJob . log . error ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>snapshot<seq2seq4repair_space>for<seq2seq4repair_space>volume<seq2seq4repair_space>'{}':<seq2seq4repair_space>{}" , volume . getName ( ) , returnValue . getExecuteFailedMessages ( ) . toString ( ) ) ; logUtil . logAuditMessage ( volume . getClusterId ( ) , volume , null , GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED , new HashMap < String , String > ( ) { } ) ; } GlusterVolumeSnapshotSchedule schedule = getGlusterVolumeSnapshotScheduleDao ( ) . getByVolumeId ( volume . getId ( ) ) ; Date endDate = GlusterUtil . getInstance ( ) . convertDate ( schedule . getEndByDate ( ) , schedule . getTimeZone ( ) ) ; <START_BUG> if ( endDate . before ( new Date ( ) ) ) { <END_BUG> getGlusterVolumeSnapshotScheduleDao ( ) . removeByVolumeId ( volume . getId ( ) ) ; logUtil . logAuditMessage ( volume . getClusterId ( ) , volume , null , GLUSTER_VOLUME_SNAPSHOT_SCHEDULE_DELETED , new HashMap < String , String > ( ) { } ) ; } } protected GlusterVolumeSnapshotScheduleDao getGlusterVolumeSnapshotScheduleDao ( ) { } protected GlusterVolumeDao getGlusterVolumeDao ( ) { } protected BackendInternal getBackend ( ) { } protected GlusterAuditLogUtil getLogUtil ( ) { } }

Fix:
if ( ( endDate != null ) && ( endDate . before ( new Date ( ) ) ) ) {
Buggy code:
public class UnivariateRealSolverUtilsTest extends TestCase { protected UnivariateRealFunction sin = new SinFunction ( ) ; public void testSolveNull ( ) throws MathException { } public void testSolveBadEndpoints ( ) throws MathException { try { <START_BUG> UnivariateRealSolverUtils . solve ( sin , 0.0 , 4.0 , 4.0 ) ; <END_BUG> fail ( "Expecting<seq2seq4repair_space>IllegalArgumentException" ) ; } catch ( IllegalArgumentException ex ) { } } public void testSolveBadAccuracy ( ) throws MathException { } public void testSolveSin ( ) throws MathException { } public void testSolveAccuracyNull ( ) throws MathException { } public void testSolveAccuracySin ( ) throws MathException { } public void testSolveNoRoot ( ) throws MathException { } public void testBracketSin ( ) throws MathException { } public void testBracketEndpointRoot ( ) throws MathException { } public void testNullFunction ( ) throws MathException { } public void testBadInitial ( ) throws MathException { } public void testBadEndpoints ( ) throws MathException { } public void testBadMaximumIterations ( ) throws MathException { } }

Fix:
UnivariateRealSolverUtils . solve ( sin , ( - 0.1 ) , 4.0 , 4.0 ) ;