nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FuzzyLikeThisQueryTest extends LuceneTestCase { private Directory directory ; private IndexSearcher searcher ; private IndexReader reader ; private Analyzer analyzer ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; analyzer = new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ; directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; addDoc ( writer , "jonathon<seq2seq4repair_space>smythe" , "1" ) ; addDoc ( writer , "jonathan<seq2seq4repair_space>smith" , "2" ) ; addDoc ( writer , "johnathon<seq2seq4repair_space>smyth" , "3" ) ; addDoc ( writer , "johnny<seq2seq4repair_space>smith" , "4" ) ; addDoc ( writer , "jonny<seq2seq4repair_space>smith" , "5" ) ; addDoc ( writer , "johnathon<seq2seq4repair_space>smythe" , "6" ) ; reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> searcher = newSearcher ( reader ) ; } @ Override public void tearDown ( ) throws Exception { } private void addDoc ( RandomIndexWriter writer , String name , String id ) throws IOException { } public void testClosestEditDistanceMatchComesFirst ( ) throws Throwable { } public void testMultiWord ( ) throws Throwable { } public void testNonExistingField ( ) throws Throwable { } public void testNoMatchFirstWordBug ( ) throws Throwable { } public void testFuzzyLikeThisQueryEquals ( ) { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class MapsActivity extends FragmentActivity implements AsyncTaskCompletedListener < JSONArray > , FragmentBusSchedule . OnFragmentInteractionListener { private GoogleMap mMap ; private GoogleApiClient mGoogleApiClient ; private MarkerOptions marker ; private EditText addressText ; private Geocoder geocode ; private Map map ; private FragmentTransaction fragmentTransaction ; private FragmentManager fragmentManager ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } private void addMapListeners ( ) { } private void showStops ( LatLng latLng ) { } private void getStopInfo ( int stopNo ) { <START_BUG> String url = "http:////api.translink.ca//rttiapi//v1//stops//60980//estimates?apikey=uqHksMgJHyOOpCRjXNKM" ; <END_BUG> Log . w ( "URL" , url ) ; new Translink ( this , Translink . TaskType . STOP_DETAILS ) . execute ( url ) ; } @ Override public void onTaskComplete ( JSONArray result , Translink . TaskType type ) { } private void showBuses ( ) { } public void showSchedule ( View view ) { } private void addTextListener ( final EditText text ) { } private LatLng getLocation ( String address ) { } @ Override public void onFragmentInteraction ( String id ) { } @ Override public void onBackPressed ( ) { } public void setGeofence ( View view ) { } }

Fix:
String url = ( "http:////api.translink.ca//rttiapi//v1//stops//" + stopNo ) + "//estimates?apikey=uqHksMgJHyOOpCRjXNKM" ;
Buggy code:
public class BufferingStompDecoder extends StompDecoder { private final int bufferSizeLimit ; private final Queue < ByteBuffer > chunks = new LinkedBlockingQueue < ByteBuffer > ( ) ; private volatile Integer expectedContentLength ; public BufferingStompDecoder ( int bufferSizeLimit ) { } public int getBufferSizeLimit ( ) { } public int getBufferSize ( ) { } public Integer getExpectedContentLength ( ) { } @ Override public List < Message < byte [ ] > > decode ( ByteBuffer newBuffer ) { this . chunks . add ( newBuffer ) ; checkBufferLimits ( ) ; if ( ( ( getExpectedContentLength ( ) ) != null ) && ( ( getBufferSize ( ) ) < ( this . expectedContentLength ) ) ) { return Collections . < Message < byte [ ] > > emptyList ( ) ; } ByteBuffer bufferToDecode = assembleChunksAndReset ( ) ; MultiValueMap < String , String > headers = new org . springframework . util . LinkedMultiValueMap < String , String > ( ) ; List < Message < byte [ ] > > messages = decode ( bufferToDecode , headers ) ; if ( bufferToDecode . hasRemaining ( ) ) { this . chunks . add ( bufferToDecode ) ; <START_BUG> this . expectedContentLength = getContentLength ( headers ) ; <END_BUG> } return messages ; } private void checkBufferLimits ( ) { } private ByteBuffer assembleChunksAndReset ( ) { } }

Fix:
this . expectedContentLength = StompHeaderAccessor . getContentLength ( headers ) ;
Buggy code:
final class BalancedDTDGrammar extends DTDGrammar { private boolean fMixed ; private int fDepth = 0 ; private short [ ] fOpStack = null ; private int [ ] [ ] fGroupIndexStack ; private int [ ] fGroupIndexStackSizes ; public BalancedDTDGrammar ( SymbolTable symbolTable , XMLDTDDescription desc ) { } public final void startContentModel ( String elementName , Augmentations augs ) throws XNIException { } public final void startGroup ( Augmentations augs ) throws XNIException { } public final void pcdata ( Augmentations augs ) throws XNIException { } public final void element ( String elementName , Augmentations augs ) throws XNIException { } public final void separator ( short separator , Augmentations augs ) throws XNIException { } public final void occurrence ( short occurrence , Augmentations augs ) throws XNIException { } public final void endGroup ( Augmentations augs ) throws XNIException { } public final void endDTD ( Augmentations augs ) throws XNIException { } protected final void addContentSpecToElement ( XMLElementDecl elementDecl ) { } private int addContentSpecNodes ( int begin , int end ) { if ( begin == end ) { return fGroupIndexStack [ fDepth ] [ begin ] ; } <START_BUG> int middle = ( begin + end ) // 2 ; <END_BUG> return addContentSpecNode ( fOpStack [ fDepth ] , addContentSpecNodes ( begin , middle ) , addContentSpecNodes ( ( middle + 1 ) , end ) ) ; } private void initializeContentModelStacks ( ) { } private void addToCurrentGroup ( int contentSpec ) { } }

Fix:
final int middle = ( begin + end ) > > > 1 ;
Buggy code:
class PreFlexRWPostingsFormat extends Lucene3xPostingsFormat { public PreFlexRWPostingsFormat ( ) { } @ Override public FieldsConsumer fieldsConsumer ( SegmentWriteState state ) throws IOException { } @ Override public FieldsProducer fieldsProducer ( SegmentReadState state ) throws IOException { <START_BUG> return new Lucene3xFields ( state . dir , state . fieldInfos , state . segmentInfo , state . context , state . termsIndexDivisor ) { <END_BUG> @ Override protected boolean sortTermsByUnicode ( ) { boolean unicodeSortOrder = true ; StackTraceElement [ ] trace = new Exception ( ) . getStackTrace ( ) ; for ( int i = 0 ; i < ( trace . length ) ; i ++ ) { if ( "merge" . equals ( trace [ i ] . getMethodName ( ) ) ) { unicodeSortOrder = false ; if ( LuceneTestCase . VERBOSE ) { System . out . println ( "NOTE:<seq2seq4repair_space>PreFlexRW<seq2seq4repair_space>codec:<seq2seq4repair_space>forcing<seq2seq4repair_space>legacy<seq2seq4repair_space>UTF16<seq2seq4repair_space>term<seq2seq4repair_space>sort<seq2seq4repair_space>order" ) ; } break ; } } return unicodeSortOrder ; } } ; } }

Fix:
return new Lucene3xFields ( state . directory , state . fieldInfos , state . segmentInfo , state . context , state . termsIndexDivisor ) {
Buggy code:
public class Canvas extends Composite { Caret caret ; IME ime ; Canvas ( ) { } int attributedSubstringFromRange ( int id , int sel , int range ) { } void sendFocusEvent ( int type , boolean post ) { } public Canvas ( Composite parent , int style ) { } int characterIndexForPoint ( int id , int sel , int point ) { } public void drawBackground ( GC gc , int x , int y , int width , int height ) { checkWidget ( ) ; if ( gc == null ) error ( ERROR_NULL_ARGUMENT ) ; if ( gc . isDisposed ( ) ) error ( ERROR_INVALID_ARGUMENT ) ; Control control = findBackgroundControl ( ) ; if ( control != null ) { NSRect rect = new NSRect ( ) ; rect . x = x ; rect . y = y ; rect . width = width ; rect . height = height ; int imgHeight = - 1 ; GCData data = gc . getGCData ( ) ; if ( ( data . image ) != null ) imgHeight = data . image . getBounds ( ) . height ; NSGraphicsContext context = gc . handle ; if ( ( data . flippedContext ) != null ) { NSGraphicsContext . static_saveGraphicsState ( ) ; NSGraphicsContext . setCurrentContext ( context ) ; } <START_BUG> control . fillBackground ( view , gc . handle , rect , imgHeight ) ; <END_BUG> if ( ( data . flippedContext ) != null ) { NSGraphicsContext . static_restoreGraphicsState ( ) ; } } else { gc . fillRectangle ( x , y , width , height ) ; } } void drawWidget ( int id , NSGraphicsContext context , NSRect rect , boolean sendPaint ) { } NSRect firstRectForCharacterRange ( int id , int sel , int range ) { } public Caret getCaret ( ) { } public IME getIME ( ) { } boolean hasMarkedText ( int id , int sel ) { } boolean insertText ( int id , int sel , int string ) { } NSRange markedRange ( int id , int sel ) { } void releaseChildren ( boolean destroy ) { } public void scroll ( int destX , int destY , int x , int y , int width , int height , boolean all ) { } NSRange selectedRange ( int id , int sel ) { } boolean sendKeyEvent ( NSEvent nsEvent , int type ) { } public void setCaret ( Caret caret ) { } public void setFont ( Font font ) { } public void setIME ( IME ime ) { } boolean setMarkedText_selectedRange ( int id , int sel , int string , int range ) { } int validAttributesForMarkedText ( int id , int sel ) { } }

Fix:
control . fillBackground ( view , context , rect , imgHeight ) ;
Buggy code:
public class StartExamples { public static void main ( String [ ] args ) { Server server = new Server ( ) ; SelectChannelConnector connector = new SelectChannelConnector ( ) ; connector . setPort ( 8080 ) ; server . setConnectors ( new Connector [ ] { connector } ) ; WebAppContext web = new WebAppContext ( ) ; <START_BUG> web . setContextPath ( "//wicket-examples" ) ; <END_BUG> web . setWar ( "src//main//webapp" ) ; server . addHandler ( web ) ; try { server . start ( ) ; server . join ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 100 ) ; } } StartExamples ( ) { } }

Fix:
web . setContextPath ( "//wicket-auth-roles-examples" ) ;
Buggy code:
public class PortletRequestUtilsTests extends TestCase { public void testIntParameter ( ) throws PortletRequestBindingException { } public void testIntParameters ( ) throws PortletRequestBindingException { } public void testLongParameter ( ) throws PortletRequestBindingException { } public void testLongParameters ( ) throws PortletRequestBindingException { } public void testFloatParameter ( ) throws PortletRequestBindingException { } public void testFloatParameters ( ) throws PortletRequestBindingException { } public void testDoubleParameter ( ) throws PortletRequestBindingException { } public void testDoubleParameters ( ) throws PortletRequestBindingException { } public void testBooleanParameter ( ) throws PortletRequestBindingException { } public void testBooleanParameters ( ) throws PortletRequestBindingException { } public void testStringParameter ( ) throws PortletRequestBindingException { } public void testGetIntParameterWithDefaultValueHandlingIsFastEnough ( ) { } public void testGetLongParameterWithDefaultValueHandlingIsFastEnough ( ) { } public void testGetFloatParameterWithDefaultValueHandlingIsFastEnough ( ) { MockPortletRequest request = new MockPortletRequest ( ) ; StopWatch sw = new StopWatch ( ) ; sw . start ( ) ; for ( int i = 0 ; i < 1000000 ; i ++ ) { PortletRequestUtils . getFloatParameter ( request , "nonExistingParam" , 0.0F ) ; } sw . stop ( ) ; <START_BUG> assertThat ( sw . getTotalTimeMillis ( ) , lessThan ( 250L ) ) ; <END_BUG> } public void testGetDoubleParameterWithDefaultValueHandlingIsFastEnough ( ) { } public void testGetBooleanParameterWithDefaultValueHandlingIsFastEnough ( ) { } public void testGetStringParameterWithDefaultValueHandlingIsFastEnough ( ) { } }

Fix:
assertThat ( sw . getTotalTimeMillis ( ) , lessThan ( 350L ) ) ;
Buggy code:
public class FacultySheetHandler extends DefaultHandler { private String cellContents = "" ; private String rowContents = "" ; private String cellID = "" ; private IncitesParser incitesParser = null ; private SharedStringsTable sst = null ; public FacultySheetHandler ( SharedStringsTable sst , IncitesParser incitesParser ) { } public void startElement ( String uri , String localName , String name , Attributes attributes ) throws SAXException { } public void characters ( char [ ] ch , int start , int length ) throws SAXException { } public void endElement ( String uri , String localName , String name ) throws SAXException { if ( name . equals ( "v" ) ) { cellContents = new org . apache . poi . xssf . usermodel . XSSFRichTextString ( sst . getEntryAt ( Integer . parseInt ( cellID ) ) ) . toString ( ) ; rowContents += ( incitesParser . parseFacultyName ( cellContents . trim ( ) . toLowerCase ( ) ) ) + ";" ; } if ( name . equals ( "row" ) ) { if ( ( ! ( rowContents . trim ( ) . isEmpty ( ) ) ) && ( ! ( rowContents . contains ( "department" ) ) ) ) { incitesParser . getFacultySet ( ) . add ( new main . java . org . baderlab . csapps . socialnetwork . model . academia . Author ( rowContents , Category . FACULTY ) ) ; <START_BUG> incitesParser . setFacultyName ( cellContents ) ; <END_BUG> } } } }

Fix:
incitesParser . setDepartmentName ( cellContents ) ;
Buggy code:
public abstract class AbstractBehavior implements IBehavior , IHeaderContributor { public AbstractBehavior ( ) { } public void beforeRender ( Component component ) { } public void bind ( final Component component ) { } public void cleanup ( ) { } public void detach ( Component component ) { } public final void exception ( Component component , RuntimeException exception ) { } public boolean getStatelessHint ( Component component ) { } public void onComponentTag ( final Component component , final ComponentTag tag ) { } public void onException ( Component component , RuntimeException exception ) { } public void onRendered ( Component component ) { } public final void afterRender ( final Component component ) { } public void renderHead ( IHeaderResponse response ) { } public boolean isEnabled ( Component component ) { <START_BUG> return component . isEnabled ( ) ; <END_BUG> } public boolean isTemporary ( ) { } public final void detachModel ( Component component ) { } public final void rendered ( Component component ) { } }

Fix:
return true ;
Buggy code:
public class ReceiveMessagesAction extends FrameAction { public ReceiveMessagesAction ( AbstractFrameController controller ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] refs = new FolderCommandReference [ 1 ] ; refs [ 0 ] = new FolderCommandReference ( treeModel . getFolder ( 101 ) ) ; getFrameController ( ) . getSelectionManager ( ) . setSelection ( "mail.tree" , refs ) ; ListIterator iterator = popServerCollection . getServerIterator ( ) ; while ( iterator . hasNext ( ) ) { POP3ServerController controller = ( ( POP3ServerController ) ( iterator . next ( ) ) ) ; boolean excludeFromCheckAll = controller . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "exclude_from_checkall" , false ) ; if ( excludeFromCheckAll == true ) continue ; POP3CommandReference [ ] r = new POP3CommandReference [ 1 ] ; <START_BUG> r [ 0 ] = new POP3CommandReference ( controller . getServer ( ) ) ; <END_BUG> FetchNewMessagesCommand c = new FetchNewMessagesCommand ( r ) ; processor . addOp ( c ) ; } } }

Fix:
r [ 0 ] = new POP3CommandReference ( controller ) ;
Buggy code:
public class AssetFileLibraryLicenseDataCollector { private static final String TAG = "AssetLibLicenseCollect" ; private Context mContext ; private String mBaseAssetDir ; public static class LibraryInfo { public String mLibraryName ; public String mLicenseText ; public String mNoticeText ; public Uri mLink ; } public AssetFileLibraryLicenseDataCollector ( Context context , String baseAssetDir ) { } public List < AssetFileLibraryLicenseDataCollector . LibraryInfo > collect ( ) { } private AssetFileLibraryLicenseDataCollector . LibraryInfo loadLicenseInfo ( AssetManager assets , String dirname ) { } private static Uri safeParseLinkUri ( String s ) { } private static String loadTextFile ( AssetManager assets , String path ) { InputStream stream = null ; try { StringBuilder builder = new StringBuilder ( ) ; stream = assets . open ( path , ACCESS_STREAMING ) ; Scanner s = new Scanner ( stream ) . useDelimiter ( "\\A" ) ; return s . hasNext ( ) ? s . next ( ) . trim ( ) : "" ; } catch ( IOException e ) { } finally { if ( stream != null ) { try { stream . close ( ) ; <START_BUG> } catch ( IOException e ) { <END_BUG> } } } return null ; } }

Fix:
} catch ( IOException ignored ) {
Buggy code:
public class MessageComposer { private ComposerModel model ; private ComposerController controller ; private int accountUid ; public MessageComposer ( ComposerController controller ) { } protected SendableHeader initHeader ( ) { SendableHeader header = new SendableHeader ( ) ; EncodedWordEncoder encoder = new EncodedWordEncoder ( ) ; if ( ( model . getToList ( ) . size ( ) ) > 0 ) header . set ( "To" , ListParser . parse ( model . getToList ( ) ) ) ; if ( ( model . getCcList ( ) . size ( ) ) > 0 ) header . set ( "Cc" , ListParser . parse ( model . getCcList ( ) ) ) ; if ( ( model . getBccList ( ) . size ( ) ) > 0 ) header . set ( "Bcc" , ListParser . parse ( model . getBccList ( ) ) ) ; try { header . set ( "Subject" , encoder . encode ( model . getSubject ( ) , model . getCharsetName ( ) ) ) ; } catch ( UnsupportedEncodingException e ) { } AccountItem item = model . getAccountItem ( ) ; IdentityItem identity = item . getIdentityItem ( ) ; header . set ( "From" , identity . get ( "address" ) ) ; header . set ( "X-Priority" , model . getPriority ( ) ) ; header . set ( "Mime-Version" , "1.0" ) ; String organisation = identity . get ( "organisation" ) ; if ( ( organisation . length ( ) ) > 0 ) header . set ( "Organisation" , organisation ) ; String replyAddress = identity . get ( "reply_address" ) ; if ( ( replyAddress . length ( ) ) > 0 ) header . set ( "Reply-To" , replyAddress ) ; String messageID = MessageIDGenerator . generate ( ) ; <START_BUG> header . set ( "Message-Id" , messageID ) ; <END_BUG> String inreply = model . getHeaderField ( "In-Reply-To" ) ; if ( inreply != null ) header . set ( "In-Reply-To" , inreply ) ; String references = model . getHeaderField ( "References" ) ; if ( references != null ) header . set ( "References" , references ) ; header . set ( "X-Mailer" , ( "Columba<seq2seq4repair_space>v" + ( MainInterface . version ) ) ) ; String shortFrom = model . getHeaderField ( "From" ) ; if ( shortFrom != null ) { if ( ( shortFrom . indexOf ( "<" ) ) != ( - 1 ) ) { shortFrom = shortFrom . substring ( 0 , shortFrom . indexOf ( "<" ) ) ; if ( ( shortFrom . length ( ) ) > 0 ) { if ( shortFrom . startsWith ( "\"" ) ) shortFrom = shortFrom . substring ( 1 , ( ( shortFrom . length ( ) ) - 1 ) ) ; if ( shortFrom . endsWith ( "\"" ) ) shortFrom = shortFrom . substring ( 0 , ( ( shortFrom . length ( ) ) - 1 ) ) ; } } header . set ( "columba.from" , shortFrom ) ; } else { header . set ( "columba.from" , new String ( "" ) ) ; } Date date = new Date ( ) ; header . set ( "columba.date" , date ) ; header . set ( "Date" , RFC822Date . toRFC822String ( date ) ) ; return header ; } private boolean needQPEncoding ( String input ) { } protected String getSignature ( IdentityItem item ) { } private MimePart composeTextMimePart ( ) { } public SendableMessage compose ( WorkerStatusController workerStatusController ) { } }

Fix:
header . set ( "Message-ID" , messageID ) ;
Buggy code:
public class BankServerProtocol { private int PROTOCOL_VERSION = 1 ; private static final int CREATE = 16 ; private static final int DEPOSIT = 32 ; private static final int WITHDRAW = 48 ; private static final int GETBALANCE = 64 ; private static final int CLOSE = 80 ; private static final int MAX_ACCOUNTS = 1024 ; private int [ ] balance ; private boolean [ ] accountState ; private static int numAccounts ; public BankServerProtocol ( ) { } public BankMessage processInput ( BankMessage inputMessage ) { } private BankMessage buildMessage ( int opcode ) { <START_BUG> int [ ] parameters = null ; <END_BUG> return new BankMessage ( PROTOCOL_VERSION , opcode , 404 , parameters ) ; } private BankMessage buildMessage ( int opcode , int parameter ) { } }

Fix:
int [ ] parameters = new int [ 1 ] ;
Buggy code:
public class DownloadServiceHandler implements ServiceHandler { public static final String ID = "com.hangum.db.browser.rap.core.editors.main.internals.DownloadServiceHandler" ; private static final Logger logger = Logger . getLogger ( DownloadServiceHandler . class ) ; private String name ; private String contentType = "" ; private byte [ ] byteContent ; @ Override public void service ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private void makeHtmlFile ( HttpServletResponse resp ) { OutputStream os = null ; try { <START_BUG> String contentType = ( getContentType ( ) . equals ( "" ) ) ? "text//html" : getContentType ( ) ; <END_BUG> resp . setContentType ( contentType ) ; resp . setContentLength ( getByteContent ( ) . length ) ; resp . setHeader ( "Content-Disposition" , ( ( ( ( "attachment;<seq2seq4repair_space>filename=" + "\"" ) + ( getName ( ) ) ) + "\"" ) + ( PublicTadpoleDefine . SQL_DELIMITER ) ) ) ; resp . flushBuffer ( ) ; os = resp . getOutputStream ( ) ; os . write ( getByteContent ( ) ) ; os . flush ( ) ; } catch ( Exception e ) { DownloadServiceHandler . logger . error ( "download<seq2seq4repair_space>make<seq2seq4repair_space>exception" , e ) ; throw new IllegalArgumentException ( ( "Download<seq2seq4repair_space>failed.<seq2seq4repair_space>Exception:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; } finally { try { if ( os != null ) { os . close ( ) ; } } catch ( IOException e ) { } } } public String getId ( ) { } public byte [ ] getByteContent ( ) { } public void setByteContent ( byte [ ] byteContent ) { } public void setName ( String name ) { } public String getName ( ) { } public String getContentType ( ) { } public void setContentType ( String contentType ) { } }

Fix:
String contentType = ( getContentType ( ) . equals ( "" ) ) ? "text//plain" : getContentType ( ) ;
Buggy code:
public class ErrorDialog { private static DialogBox _dialog ; public static void show ( String msg , String detail ) { if ( ( ErrorDialog . _dialog ) != null ) ErrorDialog . _dialog . hide ( ) ; ErrorDialog . _dialog = new DialogBox ( ) ; ErrorDialog . _dialog . setGlassEnabled ( true ) ; ErrorDialog . _dialog . setText ( msg ) ; VerticalPanel innerContainer = new VerticalPanel ( ) ; innerContainer . setWidth ( "100%" ) ; if ( ( detail != null ) && ( ! ( detail . isEmpty ( ) ) ) ) { HTML detailHTML = new HTML ( ) ; detailHTML . setHTML ( detail ) ; detailHTML . setStyleName ( "errorBox" ) ; innerContainer . add ( detailHTML ) ; } <START_BUG> Button dismissButton = new Button ( "OK" ) ; <END_BUG> dismissButton . addClickHandler ( new ClickHandler ( ) { @ Override public void onClick ( ClickEvent event ) { ErrorDialog . _dialog . hide ( ) ; } } ) ; HTMLPanel dialogFooter = new HTMLPanel ( "<div<seq2seq4repair_space>id='buttonDiv'<seq2seq4repair_space>class='errorDialogButtonDiv'><//div>" ) ; dialogFooter . add ( dismissButton , "buttonDiv" ) ; dialogFooter . addStyleName ( "buttonDiv" ) ; innerContainer . add ( dialogFooter ) ; ErrorDialog . _dialog . add ( innerContainer ) ; ErrorDialog . _dialog . center ( ) ; dismissButton . setFocus ( true ) ; } public static void show ( String msg ) { } public static void showErrorsByCode ( String msg , Map < String , String > errorCodeToDescriptionMap ) { } public static void showErrorList ( String msg , List < String > errorMessages ) { } }

Fix:
Button dismissButton = new Button ( "Close" ) ;
Buggy code:
public class WeldExtension implements Extension { public static final String SUBSYSTEM_NAME = "weld" ; static final PathElement PATH_SUBSYSTEM = PathElement . pathElement ( SUBSYSTEM , WeldExtension . SUBSYSTEM_NAME ) ; private static final String RESOURCE_NAME = ( WeldExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 2 ; private static final int MANAGEMENT_API_MINOR_VERSION = 0 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String ... keyPrefix ) { } @ Override public void initialize ( final ExtensionContext context ) { ROOT_LOGGER . debug ( "Activating<seq2seq4repair_space>Weld<seq2seq4repair_space>Extension" ) ; final SubsystemRegistration subsystem = context . registerSubsystem ( WeldExtension . SUBSYSTEM_NAME , WeldExtension . MANAGEMENT_API_MAJOR_VERSION , WeldExtension . MANAGEMENT_API_MINOR_VERSION , WeldExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( INSTANCE ) ; registration . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ; <START_BUG> subsystem . registerXMLElementWriter ( WeldSubsystemPersister . INSTANCE ) ; <END_BUG> if ( context . isRegisterTransformers ( ) ) { registerTransformers ( subsystem ) ; } } @ Override public void initializeParsers ( final ExtensionParsingContext context ) { } private void registerTransformers ( SubsystemRegistration subsystem ) { } }

Fix:
subsystem . registerXMLElementWriter ( WeldSubsystem20Parser . INSTANCE ) ;
Buggy code:
public class HeaderUtils { private static final Logger LOGGER = Logger . getLogger ( HeaderUtils . class ) ; public static final String REQUEST_DATE_FORMAT = "yyyy-MM-dd" ; public static final String X_OCCI_LOCATION_PREFIX = "X-OCCI-Location:<seq2seq4repair_space>" ; public static final String WWW_AUTHENTICATE = "WWW-Authenticate" ; private static final String AUTHORIZATION = "Authorization" ; public static void checkOCCIContentType ( Series < Header > headers ) { } public static void checkJsonContentType ( Series < Header > headers ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static String getFederationAuthToken ( Series < Header > headers , Response response , String authenticationURI ) { String token = headers . getValues ( X_FEDERATION_AUTH_TOKEN ) ; <START_BUG> HeaderUtils . LOGGER . debug ( ( "auth-token=" + token ) ) ; <END_BUG> if ( ( token == null ) || ( token . equals ( "" ) ) ) { if ( authenticationURI != null ) { if ( response != null ) { Series < Header > responseHeaders = ( ( Series < Header > ) ( response . getAttributes ( ) . get ( "org.restlet.http.headers" ) ) ) ; if ( responseHeaders == null ) { responseHeaders = new Series ( Header . class ) ; response . getAttributes ( ) . put ( "org.restlet.http.headers" , responseHeaders ) ; } responseHeaders . add ( new Header ( HeaderUtils . WWW_AUTHENTICATE , authenticationURI ) ) ; MediaType textPlainType = new MediaType ( "text//plain" ) ; response . setEntity ( UNAUTHORIZED , textPlainType ) ; } throw new OCCIException ( ErrorType . UNAUTHORIZED , ResponseConstants . UNAUTHORIZED ) ; } else { String authorizationHeader = headers . getValues ( HeaderUtils . AUTHORIZATION ) ; HeaderUtils . LOGGER . debug ( ( "authorization-header=" + authorizationHeader ) ) ; if ( authorizationHeader == null ) { throw new OCCIException ( ErrorType . UNAUTHORIZED , ResponseConstants . UNAUTHORIZED ) ; } token = authorizationHeader ; } } return token ; } public static String getLocalAuthToken ( Series < Header > headers ) { } public static String getLink ( Series < Header > headers ) { } public static Map < String , String > getXOCCIAtributes ( Series < Header > headers ) { } public static List < Category > getCategories ( Series < Header > headers ) { } public static String normalize ( String headerName ) { } public static void checkCategories ( List < Category > categories , String mandatoryTerm ) { } public static void checkDateValue ( String dataString ) { } public static void checkIntegerValue ( String intString ) { } public static List < String > getAccept ( Series < Header > headers ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static void setResponseHeader ( Response response , String header , String value ) { } public static List < String > getValueHeaderPerName ( String nameHeader , Series < Header > headers ) { } public static String normalizeValueAttributeFilter ( String value ) { } }

Fix:
HeaderUtils . LOGGER . debug ( ( "federation-auth-token=" + token ) ) ;
Buggy code:
public class Transaction extends BaseTransaction implements Persistent { private Attachment aAttachment = null ; public void create ( NumberKey typeId , ScarabUser user , Attachment attachment ) throws Exception { } public Attachment getAttachment ( ) throws Exception { } public void setAttachment ( Attachment v ) throws Exception { } public List getActivityList ( ) throws Exception { } public void sendEmail ( TemplateContext context , Issue issue , String subject , String template ) throws Exception { TemplateEmail te = new TemplateEmail ( ) ; if ( context == null ) { context = new DefaultTemplateContext ( ) ; } context . put ( "issue" , issue ) ; context . put ( "attachment" , aAttachment ) ; context . put ( "activityList" , getActivityList ( ) ) ; te . setContext ( context ) ; te . setFrom ( Turbine . getConfiguration ( ) . getString ( "scarab.email.modifyissue.fromName" , "Scarab<seq2seq4repair_space>System" ) , Turbine . getConfiguration ( ) . getString ( "scarab.email.modifyissue.fromAddress" , "help@scarab.tigris.org" ) ) ; if ( subject == null ) { <START_BUG> te . setSubject ( ( ( ( ( "[" + ( issue . getScarabModule ( ) . getName ( ) . toUpperCase ( ) ) ) + "]<seq2seq4repair_space>Issue<seq2seq4repair_space>#" ) + ( issue . getUniqueId ( ) ) ) + "<seq2seq4repair_space>modified" ) ) ; <END_BUG> } else { te . setSubject ( subject ) ; } if ( template == null ) { te . setTemplate ( Turbine . getConfiguration ( ) . getString ( "scarab.email.modifyissue.template" , "email//ModifyIssue.vm" ) ) ; } else { te . setTemplate ( template ) ; } List associatedUsers = issue . getAssociatedUsers ( ) ; Iterator iter = associatedUsers . iterator ( ) ; while ( iter . hasNext ( ) ) { ScarabUser toUser = ( ( ScarabUser ) ( iter . next ( ) ) ) ; te . setTo ( ( ( ( toUser . getFirstName ( ) ) + "<seq2seq4repair_space>" ) + ( toUser . getLastName ( ) ) ) , toUser . getUserName ( ) ) ; te . send ( ) ; } } public void sendEmail ( TemplateContext context , Issue issue ) throws Exception { } public void sendEmail ( Issue issue ) throws Exception { } public void sendEmail ( Issue issue , String subject , String template ) throws Exception { } }

Fix:
te . setSubject ( ( ( ( ( "[" + ( issue . getScarabModule ( ) . getRealName ( ) . toUpperCase ( ) ) ) + "]<seq2seq4repair_space>Issue<seq2seq4repair_space>#" ) + ( issue . getUniqueId ( ) ) ) + "<seq2seq4repair_space>modified" ) ) ;
Buggy code:
public class SimpleTableTest extends TestCase { public SimpleTableTest ( ) { } public SimpleTableTest ( String arg0 ) { } public void testSimpleTable ( ) throws Exception { MockWebApplication application = new MockWebApplication ( null ) ; <START_BUG> application . getPages ( ) . setHomePage ( SimpleTablePage . class ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; SimpleTablePage page = ( ( SimpleTablePage ) ( application . getLastRenderedPage ( ) ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validateDocument ( document ) ) ; ListView view = ( ( ListView ) ( application . getLastRenderedPage ( ) . get ( "table" ) ) ) ; assertNotNull ( view ) ; application . rerender ( view ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertNotNull ( document ) ; assertFalse ( "" . equals ( document ) ) ; assertEquals ( "<li<seq2seq4repair_space>wicket:id=\"table\"><span<seq2seq4repair_space>wicket:id=\"txt\">one<//span><//li><li<seq2seq4repair_space>wicket:id=\"table\"><span<seq2seq4repair_space>wicket:id=\"txt\">two<//span><//li><li<seq2seq4repair_space>wicket:id=\"table\"><span<seq2seq4repair_space>wicket:id=\"txt\">three<//span><//li>" , document ) ; } private boolean validateDocument ( String document ) { } }

Fix:
application . getRequiredPageSettings ( ) . setHomePage ( SimpleTablePage . class ) ;
Buggy code:
public class AbstractProjectTest extends AbstractMyrmidonTest { private DefaultEmbeddor m_embeddor ; public AbstractProjectTest ( final String name ) { } protected void tearDown ( ) throws Exception { } protected Embeddor getEmbeddor ( ) throws Exception { if ( ( m_embeddor ) == null ) { Thread . currentThread ( ) . setContextClassLoader ( getClass ( ) . getClassLoader ( ) ) ; final Logger logger = getLogger ( ) ; m_embeddor = new DefaultEmbeddor ( ) ; m_embeddor . enableLogging ( logger ) ; final Parameters params = new Parameters ( ) ; <START_BUG> final File instDir = getHomeDirectory ( ) ; <END_BUG> params . setParameter ( "myrmidon.home" , instDir . getAbsolutePath ( ) ) ; m_embeddor . parameterize ( params ) ; m_embeddor . initialize ( ) ; m_embeddor . start ( ) ; } return m_embeddor ; } protected void executeTargetExpectError ( final File projectFile , final String targetName , final String message ) { } protected void executeTargetExpectError ( final File projectFile , final String targetName , final String [ ] messages ) { } protected void executeTarget ( final File projectFile , final String targetName ) throws Exception { } protected void executeTarget ( final File projectFile , final String targetName , final ProjectListener listener ) throws Exception { } }

Fix:
final File instDir = getInstallDirectory ( ) ;
Buggy code:
class SliderTab extends RangeTab { Scale scale1 ; Slider slider1 ; Group sliderGroup ; Group scaleGroup ; Scale incrementScale ; Scale pageIncrementScale ; Scale thumbScale ; SliderTab ( ControlExample instance ) { } void createControlWidgets ( ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createIncrementGroup ( ) { } void createPageIncrementGroup ( ) { } void createThumbGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String getTabText ( ) { <START_BUG> if ( PLATFORM . equals ( "carbon" ) ) <END_BUG> return "S//S" ; return "Slider//Scale" ; } void setExampleWidgetState ( ) { } void setWidgetIncrement ( ) { } void setWidgetMaximum ( ) { } void setWidgetMinimum ( ) { } void setWidgetPageIncrement ( ) { } void setWidgetSelection ( ) { } void setWidgetThumb ( ) { } }

Fix:
if ( SWT . getPlatform ( ) . equals ( "carbon" ) )
Buggy code:
public class ProgressRegion { ProgressViewer viewer ; AnimationItem item ; Composite region ; WorkbenchWindow workbenchWindow ; public ProgressRegion ( ) { } public Control createContents ( Composite parent , WorkbenchWindow window ) { workbenchWindow = window ; region = new Composite ( parent , SWT . NONE ) ; FormLayout regionLayout = new FormLayout ( ) ; region . setLayout ( regionLayout ) ; Label seperator = new Label ( region , SWT . SEPARATOR ) ; item = new ProgressAnimationItem ( window ) ; item . createControl ( region ) ; Control itemControl = item . getControl ( ) ; <START_BUG> viewer = new ProgressViewer ( region , SWT . NONE , 1 , 36 ) ; <END_BUG> viewer . setUseHashlookup ( true ) ; Control viewerControl = viewer . getControl ( ) ; int widthPreference = AnimationManager . getInstance ( ) . getPreferredWidth ( ) ; Point preferredSize = viewer . getSizeHints ( ) ; int margin = 2 ; FormData labelData = new FormData ( ) ; labelData . left = new FormAttachment ( 0 , margin ) ; labelData . top = new FormAttachment ( 0 ) ; seperator . setLayoutData ( labelData ) ; FormData itemData = new FormData ( ) ; itemData . right = new FormAttachment ( 100 , ( ( - 1 ) * margin ) ) ; itemData . top = new FormAttachment ( viewerControl , margin , SWT . TOP ) ; itemData . width = widthPreference + ( margin * 2 ) ; itemData . height = preferredSize . y ; itemControl . setLayoutData ( itemData ) ; FormData viewerData = new FormData ( ) ; viewerData . left = new FormAttachment ( seperator , margin ) ; viewerData . right = new FormAttachment ( itemControl , margin ) ; viewerData . top = new FormAttachment ( 0 ) ; viewerData . bottom = new FormAttachment ( 100 ) ; viewerData . width = ( preferredSize . x ) + margin ; viewerData . height = preferredSize . y ; viewerControl . setLayoutData ( viewerData ) ; viewerControl . addMouseListener ( new MouseAdapter ( ) { public void mouseDoubleClick ( MouseEvent e ) { ProgressManagerUtil . openProgressView ( workbenchWindow ) ; } } ) ; viewerControl . addMouseTrackListener ( new MouseTrackListener ( ) { public void mouseEnter ( MouseEvent e ) { } public void mouseExit ( MouseEvent e ) { } public void mouseHover ( MouseEvent e ) { item . openFloatingWindow ( ) ; } } ) ; IContentProvider provider = new ProgressViewerContentProvider ( viewer ) ; viewer . setContentProvider ( provider ) ; viewer . setInput ( provider ) ; viewer . setLabelProvider ( new ProgressViewerLabelProvider ( viewerControl ) ) ; viewer . setSorter ( ProgressManagerUtil . getProgressViewerSorter ( ) ) ; return region ; } public AnimationItem getAnimationItem ( ) { } public Control getControl ( ) { } }

Fix:
viewer = new ProgressViewer ( region , SWT . NO_FOCUS , 1 , 36 ) ;
Buggy code:
public abstract class Resource implements IResourceListener { private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( Resource . class ) ; private boolean cacheable ; private static final ThreadLocal < IValueMap > parameters = new ThreadLocal < IValueMap > ( ) ; protected Resource ( ) { } public abstract IResourceStream getResourceStream ( ) { } public final boolean isCacheable ( ) { } public final void onResourceRequested ( ) { } public final Resource setCacheable ( boolean cacheable ) { } public final void setParameters ( final Map < String , ? > parameters ) { } protected void configureResponse ( final Response response ) { } protected ValueMap getParameters ( ) { if ( ( Resource . parameters . get ( ) ) == null ) { <START_BUG> return new ValueMap ( RequestCycle . get ( ) . getRequest ( ) . getRequestParameters ( ) . getParameters ( ) ) ; <END_BUG> } return ( ( ValueMap ) ( Resource . parameters . get ( ) ) ) ; } protected void invalidate ( ) { } private final IResourceStream init ( ) { } }

Fix:
return new ValueMap ( RequestCycle . get ( ) . getRequest ( ) . getObsoleteRequestParameters ( ) . getParameters ( ) ) ;
Buggy code:
public class TestHasWonAsWellAsPlacePieceCon extends TestCase { SuperModel sm ; Screen pls ; Screen lls ; Screen rls ; Application app ; Level pl ; Level ll ; Level rl ; Point p0 ; Point p1 ; Point p2 ; Point p3 ; Point p4 ; Point p5 ; Point p6 ; Piece testPiece ; Piece tpcopy ; Piece flip ; Piece changed ; PieceTile [ ] arr ; PieceTile [ ] arr2 ; Progress pro ; @ Override protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testPlacePiecePL ( ) throws Exception { } public void testPlacePieceLL ( ) throws Exception { } public void testPlacePieceRL ( ) throws Exception { Move stm0 = new kabasuji . moves . SelectTileMove ( rl , p0 ) ; stm0 . execute ( ) ; Move stm1 = new kabasuji . moves . SelectTileMove ( rl , p1 ) ; stm1 . execute ( ) ; Move stm2 = new kabasuji . moves . SelectTileMove ( rl , p2 ) ; stm2 . execute ( ) ; Move stm3 = new kabasuji . moves . SelectTileMove ( rl , p3 ) ; stm3 . execute ( ) ; Move stm4 = new kabasuji . moves . SelectTileMove ( rl , p4 ) ; stm4 . execute ( ) ; Move stm5 = new kabasuji . moves . SelectTileMove ( rl , p5 ) ; stm5 . execute ( ) ; LevelPlayView lpv = new LevelPlayView ( "ReleaseTest" , sm ) ; sm . setActiveLevel ( rl ) ; rl . setLevelType ( "Release" ) ; app = new Application ( rls ) ; pro = new Progress ( rl . getBoard ( ) ) ; rl . getBoard ( ) . createBoardTile ( 0 , 0 , "Release" ) ; rl . getBoard ( ) . createBoardTile ( 1 , 0 , "Release" ) ; rl . getBoard ( ) . createBoardTile ( 2 , 0 , "Release" ) ; rl . getBoard ( ) . createBoardTile ( 3 , 0 , "Release" ) ; rl . getBoard ( ) . createBoardTile ( 4 , 0 , "Release" ) ; rl . getBoard ( ) . createBoardTile ( 5 , 0 , "Release" ) ; assertEquals ( "R_testyd" , rl . getLevelName ( ) ) ; rl . setActivePiece ( testPiece ) ; rl . setSelected ( testPiece ) ; rl . setSelectedPiece ( testPiece ) ; assertTrue ( testPiece . contains ( 0 , 0 ) ) ; assertTrue ( testPiece . containsy ( 0 , 0 ) ) ; PlacePieceController rpc = new PlacePieceController ( app , sm ) ; rl . getBoard ( ) . place ( 0 , 0 , testPiece ) ; <START_BUG> assertEquals ( 100 , rl . getBoard ( ) . getProgress ( "release" ) ) ; <END_BUG> rl . getBoard ( ) . uncoverPieceArea ( 0 , 0 , testPiece ) ; rl . getBoard ( ) . coverPieceArea ( 0 , 0 , testPiece ) ; assertTrue ( rl . getBoard ( ) . pieceCovering ( 0 , 0 , testPiece ) ) ; HasWonController hwc = new HasWonController ( app , sm ) ; rl . progress = new Progress ( rl . getBoard ( ) ) ; System . out . println ( pro . updateProgressRelease ( ) ) ; System . out . print ( rl . progress . updateProgressRelease ( ) ) ; assertTrue ( hwc . hasWon ( ) ) ; rl . setNumStars ( ) ; assertEquals ( 3 , rl . getNumStars ( ) ) ; } }

Fix:
assertEquals ( 100 , rl . getBoard ( ) . getReleaseProgress ( ) ) ;
Buggy code:
public class BookOperations extends Model { private MongoDatabase getdatabaseasync ( ) { } private com . mongodb . client . MongoDatabase getdatabase ( ) { } public Boolean addbook ( Books book ) { } public void delete ( String id ) { } public Books getone ( String strid ) { } public ArrayList < Books > getInventory ( String seller ) { } public ArrayList < Books > getcategory ( String category ) { com . mongodb . client . MongoDatabase database = getdatabase ( ) ; MongoCollection < Document > collection = database . getCollection ( "Books" ) ; <START_BUG> int c = Integer . parseInt ( category ) ; <END_BUG> FindIterable < Document > results = collection . find ( Filters . eq ( "category" , c ) ) . limit ( 300 ) ; ArrayList < Books > list = new ArrayList < > ( ) ; for ( Document result : results ) { Books book = new Books ( ) ; book . id = result . getObjectId ( "_id" ) ; book . authors = result . getString ( "authors" ) ; book . edition = result . getInteger ( "edition" ) ; book . isbn = result . getString ( "isbn" ) ; book . price = result . getDouble ( "price" ) ; book . seller = result . getString ( "seller" ) ; book . stock = result . getInteger ( "stock" ) ; book . title = result . getString ( "title" ) ; book . description = result . getString ( "description" ) ; book . year = result . getInteger ( "year" ) ; book . shippingfee = result . getDouble ( "shippingfee" ) ; book . category = result . getString ( "category" ) ; list . add ( book ) ; } return list ; } public void updatestock ( String id , int reduceby ) { } public ArrayList < Books > getall ( ) { } public ArrayList < Books > getThree ( ) { } public ArrayList < Books > search ( String text ) { } public void update ( Books book ) { } }

Fix:
String c = category ;
Buggy code:
public class UnknownElement extends Task { private String elementName ; private Task realTask ; private Vector children = new Vector ( ) ; public UnknownElement ( String elementName ) { } public String getTag ( ) { } public void maybeConfigure ( ) throws BuildException { } public void execute ( ) { } public void addChild ( UnknownElement child ) { } protected void handleChildren ( Object parent , RuntimeConfigurable parentWrapper ) throws BuildException { if ( parent instanceof TaskAdapter ) { parent = ( ( TaskAdapter ) ( parent ) ) . getProxy ( ) ; } Class parentClass = parent . getClass ( ) ; IntrospectionHelper ih = IntrospectionHelper . getHelper ( parentClass ) ; for ( int i = 0 ; i < ( children . size ( ) ) ; i ++ ) { RuntimeConfigurable childWrapper = parentWrapper . getChild ( i ) ; UnknownElement child = ( ( UnknownElement ) ( children . elementAt ( i ) ) ) ; Object realChild = null ; if ( parent instanceof TaskContainer ) { realChild = makeTask ( child , childWrapper ) ; ( ( TaskContainer ) ( parent ) ) . addTask ( ( ( Task ) ( realChild ) ) ) ; } else { <START_BUG> ih . createElement ( project , parent , child . getTag ( ) ) ; <END_BUG> } childWrapper . setProxy ( realChild ) ; if ( realChild instanceof Task ) { ( ( Task ) ( realChild ) ) . setRuntimeConfigurableWrapper ( childWrapper ) ; } child . handleChildren ( realChild , childWrapper ) ; if ( realChild instanceof Task ) { ( ( Task ) ( realChild ) ) . maybeConfigure ( ) ; } } } protected Task makeTask ( UnknownElement ue , RuntimeConfigurable w ) { } }

Fix:
realChild = ih . createElement ( project , parent , child . getTag ( ) ) ;
Buggy code:
public final class AdvisedFunction { private final Function _function ; private final List < AroundAdvice > _advice ; private final int _firstCacheableIndex ; private final AdviceScopeCounter _scopeCounter ; private final ThisJoinPointStaticPart _thisJoinPointStaticPart ; public AdvisedFunction ( QualifiedName functionName , Function function , List < AroundAdvice > advice , AdviceScopeCounter scopeCounter ) { } public Object evaluate ( ExecutionContext ctx , List < ? > params ) { } private Object proceedInternal ( final ExecutionContext ctx , final int indNextAdvice , final List < ? > params ) { if ( indNextAdvice >= ( _advice . size ( ) ) ) return ctx . getFunctionInvoker ( ) . invoke ( ctx , _function , params ) ; if ( indNextAdvice >= ( _firstCacheableIndex ) ) { final ObjectWrapper ow = ctx . getAdviceContext ( ) . getResultCache ( ) . get ( new Triplet < Function , AroundAdvice , List < ? > > ( _function , _advice . get ( indNextAdvice ) , params ) ) ; if ( ow != null ) return ow . _content ; } final ThisJoinPoint thisJoinPoint = new ThisJoinPoint ( ctx . getStacktrace ( ) , params ) { @ Override <START_BUG> public Object proceed ( List < ? > localParams ) { <END_BUG> return proceedInternal ( ctx , ( indNextAdvice + 1 ) , localParams ) ; } } ; final AroundAdvice advice = _advice . get ( indNextAdvice ) ; final Object result = advice . evaluate ( ctx , _scopeCounter , thisJoinPoint , _thisJoinPointStaticPart ) ; if ( indNextAdvice >= ( _firstCacheableIndex ) ) { final Triplet < Function , AroundAdvice , List < ? > > key = new Triplet < Function , AroundAdvice , List < ? > > ( _function , _advice . get ( indNextAdvice ) , params ) ; ctx . getAdviceContext ( ) . getResultCache ( ) . put ( key , new ObjectWrapper ( result ) ) ; } return result ; } }

Fix:
public Object proceedWithParams ( List < ? > localParams ) {
Buggy code:
public class FirstMoment extends AbstractStorelessUnivariateStatistic implements Serializable { private static final long serialVersionUID = 6112755307178490473L ; protected long n ; protected double m1 ; protected double dev ; protected double nDev ; public FirstMoment ( ) { } public FirstMoment ( FirstMoment original ) { } @ Override public void increment ( final double d ) { } @ Override public void clear ( ) { } @ Override public double getResult ( ) { } public long getN ( ) { } @ Override public FirstMoment copy ( ) { } public static void copy ( FirstMoment source , FirstMoment dest ) { dest . n = source . n ; dest . m1 = source . m1 ; dest . dev = source . dev ; <START_BUG> dest . nDev = dest . nDev ; <END_BUG> } }

Fix:
dest . nDev = source . nDev ;