nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractTable extends AbstractTestElement implements ReportTable { private static final long serialVersionUID = 240L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public static final String REPORT_TABLE_MEAN = "ReportTable.Mean" ; public static final String REPORT_TABLE_MEDIAN = "ReportTable.Median" ; public static final String REPORT_TABLE_MAX = "ReportTable.Max" ; public static final String REPORT_TABLE_MIN = "ReportTable.Min" ; public static final String REPORT_TABLE_RESPONSE_RATE = "ReportTable.Response_rate" ; public static final String REPORT_TABLE_TRANSFER_RATE = "ReportTable.Transfer_rate" ; public static final String REPORT_TABLE_50_PERCENT = "ReportTable.50_percent" ; public static final String REPORT_TABLE_90_PERCENT = "ReportTable.90_percent" ; public static final String REPORT_TABLE_ERROR_RATE = "ReportTable.Error.rate" ; public static final String [ ] items = new String [ ] { AbstractTable . REPORT_TABLE_MEAN , AbstractTable . REPORT_TABLE_MEDIAN , AbstractTable . REPORT_TABLE_MAX , AbstractTable . REPORT_TABLE_MIN , AbstractTable . REPORT_TABLE_RESPONSE_RATE , AbstractTable . REPORT_TABLE_TRANSFER_RATE , AbstractTable . REPORT_TABLE_50_PERCENT , AbstractTable . REPORT_TABLE_90_PERCENT , AbstractTable . REPORT_TABLE_ERROR_RATE } ; public static final String REPORT_TABLE_TOTAL = "ReportTable.total" ; public static final String REPORT_TABLE_URL = "ReportTable.url" ; public static final String [ ] xitems = new String [ ] { AbstractTable . REPORT_TABLE_TOTAL , AbstractTable . REPORT_TABLE_URL } ; public AbstractTable ( ) { } public boolean getMean ( ) { } public void setMean ( String set ) { } public boolean getMedian ( ) { } public void setMedian ( String set ) { } public boolean getMax ( ) { } public void setMax ( String set ) { } public boolean getMin ( ) { } public void setMin ( String set ) { } public boolean getResponseRate ( ) { } public void setResponseRate ( String set ) { } public boolean getTransferRate ( ) { } public void setTransferRate ( String set ) { } public boolean get50Percent ( ) { } public void set50Percent ( String set ) { } public boolean get90Percent ( ) { } public void set90Percent ( String set ) { } public boolean getErrorRate ( ) { } public void setErrorRate ( String set ) { } @ Override public void addTestElement ( TestElement el ) { } <START_BUG> @ SuppressWarnings ( "unchecked" ) <END_BUG> public abstract String [ ] [ ] getTableData ( List data ) ; }

Fix:
@ SuppressWarnings ( "rawtypes" )
Buggy code:
public class OptimizedReplaceEdit { int offset ; int length ; String replacement ; public OptimizedReplaceEdit ( int offset , int length , String replacement ) { } public String toString ( ) { <START_BUG> return ( ( ( ( ( "(" + ( this . offset ) ) + ",<seq2seq4repair_space>length<seq2seq4repair_space>" ) + ( this . length ) ) + "<seq2seq4repair_space>:>" ) + ( this . replacement ) ) + "<" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( this . offset ) < 0 ? "(" : "X(" ) + ( this . offset ) ) + ",<seq2seq4repair_space>length<seq2seq4repair_space>" ) + ( this . length ) ) + "<seq2seq4repair_space>:>" ) + ( this . replacement ) ) + "<" ;
Buggy code:
class PatchConfigBuilder { public static enum AffectsType { UPDATED , ORIGINAL , BOTH , NONE ; } private String patchId ; private String description ; private String resultingVersion ; private PatchType patchType ; private boolean generateByDiff ; private List < String > appliesTo = new ArrayList < String > ( ) ; private Set < String > runtimeUseItems = new HashSet < String > ( ) ; private DistributionStructure updatedStructure ; private DistributionStructure appliesToStructure ; PatchConfigBuilder setPatchId ( String patchId ) { } PatchConfigBuilder setDescription ( String description ) { } PatchConfigBuilder setCumulativeType ( String appliesToVersion , String resultingVersion ) { <START_BUG> this . patchType = PatchType . UPGRADE ; <END_BUG> this . appliesTo = Collections . singletonList ( appliesToVersion ) ; this . resultingVersion = resultingVersion ; this . updatedStructure = Factory . create ( resultingVersion ) ; this . appliesToStructure = Factory . create ( appliesToVersion ) ; return this ; } PatchConfigBuilder setOneOffType ( List < String > appliesTo ) { } PatchConfigBuilder setGenerateByDiff ( boolean generateByDiff ) { } PatchConfigBuilder addRuntimeUseItem ( String item ) { } PatchConfigBuilder addModuleSearchPath ( final String name , final String standardPath , PatchConfigBuilder . AffectsType affectsType ) { } PatchConfigBuilder setDefaultModuleSearchPathExclusion ( PatchConfigBuilder . AffectsType affectsType ) { } PatchConfigBuilder setDefaultBundleSearchPathExclusion ( PatchConfigBuilder . AffectsType affectsType ) { } PatchConfigBuilder addBundleSearchPath ( final String name , final String standardPath , PatchConfigBuilder . AffectsType affectsType ) { } PatchConfigBuilder addIgnoredPath ( final String path , PatchConfigBuilder . AffectsType affectsType ) { } PatchConfig build ( ) { } private class PatchConfigImpl implements PatchConfig { @ Override public String getPatchId ( ) { } @ Override public String getDescription ( ) { } @ Override public PatchType getPatchType ( ) { } @ Override public String getResultingVersion ( ) { } @ Override public List < String > getAppliesTo ( ) { } @ Override public Set < String > getInRuntimeUseItems ( ) { } @ Override public boolean isGenerateByDiff ( ) { } @ Override public DistributionStructure getOriginalDistributionStructure ( ) { } @ Override public DistributionStructure getUpdatedDistributionStructure ( ) { } @ Override public PatchBuilder toPatchBuilder ( ) { } } }

Fix:
this . patchType = PatchType . CUMULATIVE ;
Buggy code:
class ReadRepairManager { private static Logger logger_ = Logger . getLogger ( ReadRepairManager . class ) ; private static final long expirationTimeInMillis = 2000 ; private static Lock lock_ = new ReentrantLock ( ) ; private static ReadRepairManager self_ = null ; static class ReadRepairPerformer implements ICacheExpungeHook < String , Message > { public void callMe ( String target , Message message ) { } } private ICachetable < String , Message > readRepairTable_ = new org . apache . cassandra . utils . Cachetable < String , Message > ( ReadRepairManager . expirationTimeInMillis , new ReadRepairManager . ReadRepairPerformer ( ) ) ; protected ReadRepairManager ( ) { } public static ReadRepairManager instance ( ) { } public void schedule ( EndPoint target , RowMutationMessage rowMutationMessage ) { try { <START_BUG> Message message = RowMutationMessage . makeRowMutationMessage ( rowMutationMessage , readRepairVerbHandler_ ) ; <END_BUG> String key = ( target + ":" ) + ( message . getMessageId ( ) ) ; readRepairTable_ . put ( key , message ) ; } catch ( IOException ex ) { ReadRepairManager . logger_ . error ( LogUtil . throwableToString ( ex ) ) ; } } }

Fix:
Message message = rowMutationMessage . makeRowMutationMessage ( readRepairVerbHandler_ ) ;
Buggy code:
@ Slow public class FullSolrCloudDistribCmdsTest extends AbstractFullDistribZkTestBase { @ BeforeClass public static void beforeSuperClass ( ) { } public FullSolrCloudDistribCmdsTest ( ) { } @ Override public void doTest ( ) throws Exception { } private long testThatCantForwardToLeaderFails ( long docId ) throws Exception { } private long addTwoDocsInOneRequest ( long docId ) throws Exception { } private long addUpdateDelete ( ) throws IOException , Exception { } private void testDeleteByQueryDistrib ( ) throws Exception { } private long testIndexQueryDeleteHierarchical ( long docId ) throws Exception { } private long addChildren ( String prefix , SolrInputDocument topDocument , int childIndex , boolean lastLevel , long docId ) { } private long testIndexingDocPerRequestWithHttpSolrServer ( long docId ) throws Exception { } private long testIndexingBatchPerRequestWithHttpSolrServer ( long docId ) throws Exception { } private long addDoc ( long docId , UpdateRequest uReq ) { } private long addDoc ( String docId , UpdateRequest uReq ) { } private long testIndexingWithSuss ( long docId ) throws Exception { ConcurrentUpdateSolrServer suss = new ConcurrentUpdateSolrServer ( ( ( org . apache . solr . client . solrj . impl . HttpSolrServer ) ( clients . get ( 0 ) ) ) . getBaseURL ( ) , 10 , 2 ) ; QueryResponse results = query ( cloudClient ) ; long beforeCount = results . getResults ( ) . getNumFound ( ) ; int cnt = ( TEST_NIGHTLY ) ? 2933 : 313 ; try { <START_BUG> suss . setConnectionTimeout ( 30000 ) ; <END_BUG> for ( int i = 0 ; i < cnt ; i ++ ) { index_specific ( suss , id , ( docId ++ ) , "text_t" , "some<seq2seq4repair_space>text<seq2seq4repair_space>so<seq2seq4repair_space>that<seq2seq4repair_space>it<seq2seq4repair_space>not's<seq2seq4repair_space>negligent<seq2seq4repair_space>work<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>this<seq2seq4repair_space>doc,<seq2seq4repair_space>even<seq2seq4repair_space>though<seq2seq4repair_space>it's<seq2seq4repair_space>still<seq2seq4repair_space>a<seq2seq4repair_space>pretty<seq2seq4repair_space>short<seq2seq4repair_space>doc" ) ; } suss . blockUntilFinished ( ) ; commit ( ) ; checkShardConsistency ( ) ; assertDocCounts ( VERBOSE ) ; } finally { suss . shutdown ( ) ; } results = query ( cloudClient ) ; assertEquals ( ( beforeCount + cnt ) , results . getResults ( ) . getNumFound ( ) ) ; return docId ; } private void testOptimisticUpdate ( QueryResponse results ) throws Exception { } private QueryResponse query ( SolrServer server ) throws SolrServerException { } @ Override public void tearDown ( ) throws Exception { } protected SolrInputDocument addRandFields ( SolrInputDocument sdoc ) { } }

Fix:
suss . setConnectionTimeout ( 120000 ) ;
Buggy code:
public class RemoveCardAction extends FrameAction { public RemoveCardAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> AddressbookFrameController addressbookFrameController = ( ( AddressbookFrameController ) ( frameController ) ) ; <END_BUG> Object [ ] uids = addressbookFrameController . getTable ( ) . getView ( ) . getSelectedUids ( ) ; AddressbookFolder folder = ( ( AddressbookFolder ) ( addressbookFrameController . getTree ( ) . getView ( ) . getSelectedFolder ( ) ) ) ; for ( int i = 0 ; i < ( uids . length ) ; i ++ ) { folder . remove ( uids [ i ] ) ; } addressbookFrameController . getTable ( ) . getView ( ) . setFolder ( folder ) ; } }

Fix:
AddressbookFrameController addressbookFrameController = ( ( AddressbookFrameController ) ( frameMediator ) ) ;
Buggy code:
public final class ServerFactory { private ServerFactory ( ) { } public static Void combine ( DomainModel domainModel , HostModel hostModel , String serverName , List < AbstractServerModelUpdate < ? > > list ) { final ServerElement serverElement = hostModel . getServer ( serverName ) ; final String serverGroupName = serverElement . getServerGroup ( ) ; final ServerGroupElement serverGroup = domainModel . getServerGroup ( serverGroupName ) ; final String profileName = serverGroup . getProfileName ( ) ; final ProfileElement leafProfile = domainModel . getProfile ( profileName ) ; final Set < String > extensionNames = new LinkedHashSet < String > ( ) ; for ( String name : domainModel . getExtensions ( ) ) { extensionNames . add ( name ) ; } for ( String name : hostModel . getExtensions ( ) ) { extensionNames . add ( name ) ; } for ( String name : extensionNames ) { list . add ( new ServerExtensionAdd ( name ) ) ; } for ( AbstractSubsystemElement < ? extends AbstractSubsystemElement < ? > > subsystemElement : leafProfile . getSubsystems ( ) ) { final AbstractSubsystemAdd < ? > subsystemAdd = subsystemElement . getAdd ( ) ; list . add ( new ServerSubsystemAdd ( subsystemAdd ) ) ; final List < AbstractSubsystemUpdate < ? extends AbstractSubsystemElement < ? > , ? > > subsystemList = new ArrayList < AbstractSubsystemUpdate < ? extends AbstractSubsystemElement < ? > , ? > > ( ) ; subsystemElement . getUpdates ( subsystemList ) ; for ( AbstractSubsystemUpdate < ? extends AbstractSubsystemElement < ? > , ? > update : subsystemList ) { <START_BUG> list . add ( ServerProfileUpdate . create ( update ) ) ; <END_BUG> } } return null ; } }

Fix:
list . add ( ServerSubsystemUpdate . create ( update ) ) ;
Buggy code:
public class KillRing { public static void propertiesChanged ( ) { <START_BUG> int newSize = jEdit . getIntegerProperty ( "history" , 25 ) ; <END_BUG> if ( ( KillRing . ring ) == null ) KillRing . ring = new UndoManager . Remove [ newSize ] ; else if ( newSize != ( KillRing . ring . length ) ) { UndoManager [ ] newRing = new UndoManager . Remove [ newSize ] ; ListModel model = new KillRing . RingListModel ( ) ; int newCount = Math . min ( model . getSize ( ) , newSize ) ; for ( int i = 0 ; i < newCount ; i ++ ) { newRing [ i ] = ( ( UndoManager . Remove ) ( model . getElementAt ( i ) ) ) ; } KillRing . ring = newRing ; KillRing . count = newCount ; KillRing . wrap = false ; } else if ( ( KillRing . count ) == ( KillRing . ring . length ) ) { KillRing . count = 0 ; KillRing . wrap = true ; } } public static ListModel getListModel ( ) { } public static void load ( ) { } public static void save ( ) { } static Remove [ ] ring ; static int count ; static boolean wrap ; static void changed ( UndoManager . Remove rem ) { } static void add ( UndoManager . Remove rem ) { } static void remove ( int i ) { } private static long killRingModTime ; private KillRing ( ) { } static class RingListModel implements ListModel { public void addListDataListener ( ListDataListener listener ) { } public void removeListDataListener ( ListDataListener listener ) { } public Object getElementAt ( int index ) { } public int getSize ( ) { } } static class KillRingHandler extends HandlerBase { List list = new LinkedList ( ) ; public Object resolveEntity ( String publicId , String systemId ) { } public void doctypeDecl ( String name , String publicId , String systemId ) throws Exception { } public void endElement ( String name ) { } public void charData ( char [ ] ch , int start , int length ) { } private String charData ; } }

Fix:
int newSize = Math . max ( 1 , jEdit . getIntegerProperty ( "history" , 25 ) ) ;
Buggy code:
public class AjpListenerService extends ListenerService < AjpListenerService > { private volatile AcceptingChannel < StreamConnection > server ; private final String scheme ; public AjpListenerService ( String name , final String scheme , OptionMap listenerOptions , OptionMap socketOptions ) { } @ Override protected OpenListener createOpenListener ( ) { <START_BUG> AjpOpenListener ajpOpenListener = new AjpOpenListener ( getBufferPool ( ) . getValue ( ) , OptionMap . builder ( ) . addAll ( commonOptions ) . addAll ( listenerOptions ) . set ( ENABLE_CONNECTOR_STATISTICS , getUndertowService ( ) . isStatisticsEnabled ( ) ) . getMap ( ) ) ; <END_BUG> ajpOpenListener . setScheme ( scheme ) ; return ajpOpenListener ; } @ Override void startListening ( XnioWorker worker , InetSocketAddress socketAddress , ChannelListener < AcceptingChannel < StreamConnection > > acceptListener ) throws IOException { } @ Override void stopListening ( ) { } @ Override public AjpListenerService getValue ( ) throws IllegalArgumentException , IllegalStateException { } @ Override public boolean isSecure ( ) { } @ Override protected void preStart ( final StartContext context ) { } @ Override protected String getProtocol ( ) { } }

Fix:
AjpOpenListener ajpOpenListener = new AjpOpenListener ( getBufferPool ( ) . getValue ( ) , OptionMap . builder ( ) . addAll ( commonOptions ) . addAll ( listenerOptions ) . set ( ENABLE_CONNECTOR_STATISTICS , getUndertowService ( ) . isStatisticsEnabled ( ) ) . getMap ( ) , getBufferSize ( ) ) ;
Buggy code:
public class SurfaceSize implements Comparable < SurfaceSize > { final DimensionImmutable resolution ; final int bitsPerPixel ; public SurfaceSize ( final DimensionImmutable resolution , final int bitsPerPixel ) { } public final DimensionImmutable getResolution ( ) { } public final int getBitsPerPixel ( ) { } @ Override public final String toString ( ) { } @ Override public int compareTo ( final SurfaceSize ssz ) { } @ Override public final boolean equals ( final Object obj ) { } @ Override public final int hashCode ( ) { <START_BUG> int hash = 31 + ( getResolution ( ) . hashCode ( ) ) ; <END_BUG> hash = ( ( hash << 5 ) - hash ) + ( getBitsPerPixel ( ) ) ; return hash ; } }

Fix:
int hash = getResolution ( ) . hashCode ( ) ;
Buggy code:
public class PackageTest extends TestCase { private static PropertyResourceBundle defaultPRB ; private PropertyResourceBundle getRAS ( String res ) throws Exception { } private static Object [ ] DUMMY_PARAMS = new Object [ ] { "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" } ; private int readRF ( String res , List l ) throws Exception { } private static String getResName ( String lang ) { } private void check ( String resname ) throws Exception { } private void check ( String resname , boolean checkUnexpected ) throws Exception { } public static Test suite ( ) { <START_BUG> TestSuite ts = new TestSuite ( ) ; <END_BUG> ts . addTest ( new PackageTest ( "atestDefault" ) ) ; ts . addTest ( new PackageTest ( "atestDE" ) ) ; ts . addTest ( new PackageTest ( "atestNO" ) ) ; ts . addTest ( new PackageTest ( "atestJA" ) ) ; ts . addTest ( new PackageTest ( "atestzh_CN" ) ) ; ts . addTest ( new PackageTest ( "atestzh_TW" ) ) ; ts . addTest ( new PackageTest ( "atestFR" ) ) ; ts . addTest ( new PackageTest ( "atestES" ) ) ; return ts ; } private int subTestFailures ; public PackageTest ( String string ) { } public void atestDE ( ) throws Exception { } public void atestJA ( ) throws Exception { } public void atestzh_CN ( ) throws Exception { } public void atestzh_TW ( ) throws Exception { } public void atestNO ( ) throws Exception { } public void atestFR ( ) throws Exception { } public void atestES ( ) throws Exception { } public void atestDefault ( ) throws Exception { } }

Fix:
TestSuite ts = new TestSuite ( "Resources<seq2seq4repair_space>PackageTest" ) ;
Buggy code:
public class CommentsScreen extends BaseActivityAnim implements SubmissionDisplay { public static final String EXTRA_PAGE = "page" ; public static final String EXTRA_SUBREDDIT = "subreddit" ; public static final String EXTRA_MULTIREDDIT = "multireddit" ; private PostLoader subredditPosts ; int firstPage ; CommentsScreen . OverviewPagerAdapter comments ; private String subreddit ; public OfflineSubreddit o ; private String baseSubreddit ; String multireddit ; @ Override public boolean dispatchKeyEvent ( KeyEvent event ) { } @ Override public void onDestroy ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onCreate ( Bundle savedInstance ) { } private void updateSubredditAndSubmission ( Submission post ) { } @ Override public void updateSuccess ( final List < Submission > submissions , final int startIndex ) { } @ Override public void updateOffline ( List < Submission > submissions , final long cacheTime ) { } @ Override public void updateOfflineError ( ) { } @ Override public void updateError ( ) { } public class OverviewPagerAdapter extends FragmentStatePagerAdapter { private Fragment mCurrentFragment ; public OverviewPagerAdapter ( FragmentManager fm ) { } public Fragment getCurrentFragment ( ) { } @ Override public void setPrimaryItem ( ViewGroup container , int position , Object object ) { } @ Override public Fragment getItem ( int i ) { } @ Override public int getCount ( ) { <START_BUG> return subredditPosts . getPosts ( ) . size ( ) ; <END_BUG> } } }

Fix:
return ( subredditPosts . getPosts ( ) . size ( ) ) - 1 ;
Buggy code:
public class JmxManagementInterface implements ManagementInterface { private final JMXConnector jmxConnector ; private final String domain ; protected JmxManagementInterface ( JMXConnector jmxConnector , String domain ) { } public void close ( ) { } @ Override public ModelNode execute ( ModelNode operation ) { } private ModelNode doExecute ( ObjectName objectName , ModelNode op ) { } private ModelNode getAttribute ( ObjectName objectName , String name ) { } private ModelNode setAttribute ( ObjectName objectName , String name , Object value ) { } private ModelNode invoke ( ObjectName objectName , String name ) { } private ModelNode getInfo ( ObjectName objectName ) { } private ModelNode [ ] modelNodeAttributesInfo ( MBeanAttributeInfo [ ] attributeInfos , ObjectName objectName ) throws IOException , JMException { MBeanServerConnection connection = getConnection ( ) ; ModelNode attributes = new ModelNode ( ) ; ModelNode filtered = new ModelNode ( ) . setEmptyList ( ) ; ModelNode headers = null ; for ( MBeanAttributeInfo attribute : attributeInfos ) { String attributeName = attribute . getName ( ) ; try { Object attributeValue = connection . getAttribute ( objectName , attributeName ) ; try { attributes . get ( JmxInterfaceStringUtils . toDashCase ( attributeName ) ) . set ( JmxManagementInterface . modelNode ( attributeValue ) ) ; } catch ( UnsupportedOperationException e ) { } } catch ( JMException e ) { String message = e . getMessage ( ) ; <START_BUG> if ( ( message . contains ( "14807" ) ) || ( message . contains ( "14883" ) ) ) { <END_BUG> throw e ; } else if ( message . contains ( "13456" ) ) { filtered . add ( JmxInterfaceStringUtils . toDashCase ( attributeName ) ) ; } else { throw new RuntimeException ( e ) ; } } } if ( ! ( filtered . asList ( ) . isEmpty ( ) ) ) { headers = new ModelNode ( ) ; headers . get ( ACCESS_CONTROL , "filtered-attributes" ) . set ( filtered ) ; } return new ModelNode [ ] { attributes , headers } ; } private ModelNode modelNodeResult ( Object result , JMException exception ) { } private ModelNode modelNodeResult ( Object result , JMException exception , ModelNode headers ) { } private static ModelNode modelNode ( Object obj ) { } private static Object object ( ModelNode node ) { } private ObjectName objectName ( ModelNode operation ) throws MalformedObjectNameException { } public MBeanServerConnection getConnection ( ) { } public static JmxManagementInterface create ( JMXServiceURL url , String username , String password , String domain ) { } }

Fix:
if ( ( ( message . contains ( "14807" ) ) || ( message . contains ( "14883" ) ) ) || ( message . contains ( "11340" ) ) ) {
Buggy code:
public class ForwardInlineCommand extends FolderCommand { ComposerController controller ; public ForwardInlineCommand ( FrameController frameController , DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { Folder folder = ( ( Folder ) ( ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getFolder ( ) ) ) ; Object [ ] uids = ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getUids ( ) ; <START_BUG> Message message = ( ( Message ) ( folder . getMessage ( uids [ 0 ] , worker ) ) ) ; <END_BUG> ColumbaHeader header = ( ( ColumbaHeader ) ( message . getHeader ( ) ) ) ; MimePartTree mimePartTree = folder . getMimePartTree ( uids [ 0 ] , worker ) ; boolean viewhtml = MailConfig . getMainFrameOptionsConfig ( ) . getWindowItem ( ) . getHtmlViewer ( ) ; MimePart bodyPart = null ; if ( viewhtml ) bodyPart = mimePartTree . getFirstTextPart ( "html" ) ; else bodyPart = mimePartTree . getFirstTextPart ( "plain" ) ; if ( bodyPart == null ) { bodyPart = new MimePart ( ) ; bodyPart . setBody ( new String ( "<No<seq2seq4repair_space>Message-Text>" ) ) ; } else bodyPart = folder . getMimePart ( uids [ 0 ] , bodyPart . getAddress ( ) , worker ) ; message . setBodyPart ( bodyPart ) ; controller = new ComposerController ( frameController ) ; MessageBuilder . getInstance ( ) . createMessage ( message , controller . getModel ( ) , FORWARD_INLINE ) ; } public void undo ( Worker worker ) throws Exception { } public void redo ( Worker worker ) throws Exception { } }

Fix:
Message message = new Message ( ) ;
Buggy code:
public class FunctionProperty extends AbstractProperty { private static final long serialVersionUID = 233L ; private transient CompoundVariable function ; private int testIteration = - 1 ; private String cacheValue ; public FunctionProperty ( String name , CompoundVariable func ) { } public FunctionProperty ( ) { } public void setObjectValue ( Object v ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } public String getStringValue ( ) { } public Object getObjectValue ( ) { } @ Override <START_BUG> public Object clone ( ) { <END_BUG> FunctionProperty prop = ( ( FunctionProperty ) ( super . clone ( ) ) ) ; prop . cacheValue = cacheValue ; prop . testIteration = testIteration ; prop . function = function ; return prop ; } public void recoverRunningVersion ( TestElement owner ) { } }

Fix:
public FunctionProperty clone ( ) {
Buggy code:
abstract class AbstractRealmPrincipal extends SecurityRealmPrincipal implements RealmPrincipal { private static final long serialVersionUID = - 5558581540228214884L ; private int hashBase = this . getClass ( ) . getName ( ) . hashCode ( ) ; private final String realm ; public AbstractRealmPrincipal ( final String name ) { } public AbstractRealmPrincipal ( final String realm , final String name ) { } public String getRealm ( ) { } public String getFullName ( ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } private boolean equals ( AbstractRealmPrincipal user ) { <START_BUG> return ( this ) == user ? true : ( super . equals ( user ) ) && ( realm . equals ( user . realm ) ) ; <END_BUG> } }

Fix:
return ( ( this ) == user ? true : super . equals ( user ) ) && ( ( realm ) == null ? ( user . realm ) == null : realm . equals ( user . realm ) ) ;
Buggy code:
public class Operation extends BehavioralFeature { public Uninterpreted _specification ; public boolean _isPolymorphic ; public CallConcurrencyKind _concurrency ; public Vector _method = new Vector ( ) ; public Operation ( ) { } public Operation ( Name name ) { } public Operation ( String nameStr ) { } public Operation ( Classifier returnType , String nameStr ) { } public Operation ( Classifier returnType , String nameStr , Classifier arg1Type , String arg1Name ) { } public Operation ( Classifier returnType , String nameStr , Classifier arg1Type , String arg1Name , Classifier arg2Type , String arg2Name ) { } public Operation ( Classifier returnType , String nameStr , Classifier arg1Type , String arg1Name , Classifier arg2Type , String arg2Name , Classifier arg3Type , String arg3Name ) { } public Uninterpreted getSpecification ( ) { } public void setSpecification ( Uninterpreted x ) throws PropertyVetoException { } public boolean getIsPolymorphic ( ) { } public void setIsPolymorphic ( boolean x ) throws PropertyVetoException { } public CallConcurrencyKind getConcurrency ( ) { } public void setConcurrency ( CallConcurrencyKind x ) { } public Vector getMethod ( ) { <START_BUG> return ( ( Vector ) ( _method . clone ( ) ) ) ; <END_BUG> } public void setMethod ( Vector x ) throws PropertyVetoException { } public void addMethod ( Method x ) throws PropertyVetoException { } public void removeMethod ( Method x ) throws PropertyVetoException { } public String dbgString ( ) { } }

Fix:
return ( ( Vector ) ( _method ) ) ;
Buggy code:
public class MojoTest { @ Test public void walksTheDirectoryTreeToFindAndUseJshintFiles ( ) throws Exception { String [ ] jshintIgnorePaths = new String [ ] { ".jshintignore" , "foo//.jshintignore" , "foo//bar//.jshintignore" , "foo//bar//baz//.jshintignore" } ; for ( String jshintIgnorePath : jshintIgnorePaths ) { File directory = tempDir ( ) ; try { File ignoreFile = new File ( directory , jshintIgnorePath ) ; FileUtils . writeStringToFile ( ignoreFile , "src//main//resources//foo.qunit.js" ) ; File projectDirectory = mkdirs ( directory , "foo//bar//baz" ) ; File resourcesDirectory = mkdirs ( projectDirectory , "src//main//resources" ) ; File fileToIgnore = new File ( resourcesDirectory , "foo.qunit.js" ) ; FileUtils . writeStringToFile ( fileToIgnore , "whatever,<seq2seq4repair_space>this<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>ignored" ) ; LogStub log = new LogStub ( ) ; Mojo mojo = new Mojo ( "" , "" , projectDirectory , Collections . singletonList ( "src//main//resources" ) , Collections . < String > emptyList ( ) , Collections . < String > emptyList ( ) , true , null , null , null , null ) ; mojo . setLog ( log ) ; mojo . execute ( ) ; assertTrue ( "Sees<seq2seq4repair_space>ignore<seq2seq4repair_space>files" , log . hasMessage ( "info" , ( "Using<seq2seq4repair_space>ignore<seq2seq4repair_space>file:<seq2seq4repair_space>" + ( ignoreFile . getAbsolutePath ( ) ) ) ) ) ; <START_BUG> assertTrue ( "Uses<seq2seq4repair_space>ignore<seq2seq4repair_space>files" , log . hasMessage ( "warn" , ( "Excluding<seq2seq4repair_space>" + ( fileToIgnore . getAbsolutePath ( ) ) ) ) ) ; <END_BUG> } finally { deleteDirectory ( directory ) ; } } } @ Test public void warnsUsersWhenConfiguredToWorkWithNonexistentDirectories ( ) throws Exception { } @ Test public void resolvesConfigFileRelativeToMavenBasedirProperty ( ) throws Exception { } }

Fix:
assertTrue ( "Uses<seq2seq4repair_space>ignore<seq2seq4repair_space>files" , log . hasMessage ( "debug" , ( "Excluding<seq2seq4repair_space>" + ( fileToIgnore . getAbsolutePath ( ) ) ) ) ) ;
Buggy code:
public class DTManualCmd extends CommandBase { public DTManualCmd ( ) { } protected void initialize ( ) { } protected void execute ( ) { <START_BUG> dt . driveLR ( oi . lPowerDT ( ) , oi . rPowerDT ( ) ) ; <END_BUG> } protected boolean isFinished ( ) { } protected void end ( ) { } protected void interrupted ( ) { } }

Fix:
dt . driveLR ( oi . lPowerDT ( ) , ( - ( oi . rPowerDT ( ) ) ) ) ;
Buggy code:
public class Loop { static int runLength ; static final Logger logger = Logger . getLogger ( Loop . class ) ; public static void main ( String [ ] args ) throws Exception { Logger j = Logger . getLogger ( "org.apache.log4j.joran" ) ; j . setAdditivity ( false ) ; j . setLevel ( Level . WARN ) ; ConsoleAppender a = new ConsoleAppender ( ) ; a . setLayout ( new PatternLayout ( "%d<seq2seq4repair_space>%level<seq2seq4repair_space>%c<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ) ) ; a . setName ( "console" ) ; <START_BUG> a . activateOptions ( ) ; <END_BUG> j . addAppender ( a ) ; if ( ( args . length ) == 2 ) { Loop . init ( args [ 0 ] , args [ 1 ] ) ; } else { Loop . usage ( "Wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments." ) ; } Loop . loop ( 1000 , Loop . logger , "Some<seq2seq4repair_space>fix<seq2seq4repair_space>message<seq2seq4repair_space>of<seq2seq4repair_space>medium<seq2seq4repair_space>length." ) ; long res = Loop . loop ( Loop . runLength , Loop . logger , "Some<seq2seq4repair_space>fix<seq2seq4repair_space>message<seq2seq4repair_space>of<seq2seq4repair_space>medium<seq2seq4repair_space>length." ) ; double average = ( res * 1000.0 ) // ( Loop . runLength ) ; System . out . println ( ( ( ( ( "Loop<seq2seq4repair_space>completed<seq2seq4repair_space>in<seq2seq4repair_space>[" + res ) + "]<seq2seq4repair_space>milliseconds,<seq2seq4repair_space>or<seq2seq4repair_space>[" ) + average ) + "]<seq2seq4repair_space>microseconds<seq2seq4repair_space>per<seq2seq4repair_space>log." ) ) ; } static void usage ( String msg ) { } static void memPrint ( ) { } static void init ( String runLengthStr , String configFile ) throws Exception { } static long loop ( long len , Logger logger , String msg ) { } }

Fix:
a . activate ( ) ;
Buggy code:
public class NoopFieldValueFactoryTest extends TestCase { private Field field ; @ Override protected void setUp ( ) throws Exception { <START_BUG> field = NoopFieldValueFactoryTest . class . getDeclaredField ( "testField" ) ; <END_BUG> } public void test ( ) { } }

Fix:
field = NoopFieldValueFactoryTest . class . getDeclaredField ( "field" ) ;
Buggy code:
public interface JUnitTaskMirror { <START_BUG> void addVmExit ( JUnitTest test , JUnitTaskMirror . JUnitResultFormatterMirror formatter , OutputStream out , final String message ) ; <END_BUG> JUnitTaskMirror . JUnitTestRunnerMirror newJUnitTestRunner ( JUnitTest test , boolean haltOnError , boolean filterTrace , boolean haltOnFailure , boolean showOutput , boolean logTestListenerEvents , AntClassLoader classLoader ) { } JUnitTaskMirror . SummaryJUnitResultFormatterMirror newSummaryJUnitResultFormatter ( ) { } public interface JUnitResultFormatterMirror { void setOutput ( OutputStream outputStream ) { } } public interface SummaryJUnitResultFormatterMirror extends JUnitTaskMirror . JUnitResultFormatterMirror { void setWithOutAndErr ( boolean value ) { } } public interface JUnitTestRunnerMirror { String IGNORED_FILE_NAME = "IGNORETHIS" ; int SUCCESS = 0 ; int FAILURES = 1 ; int ERRORS = 2 ; void setPermissions ( Permissions perm ) { } void run ( ) { } void addFormatter ( JUnitTaskMirror . JUnitResultFormatterMirror formatter ) { } int getRetCode ( ) { } void handleErrorFlush ( String output ) { } void handleErrorOutput ( String output ) { } void handleOutput ( String output ) { } int handleInput ( byte [ ] buffer , int offset , int length ) throws IOException { } void handleFlush ( String output ) { } } }

Fix:
void addVmExit ( JUnitTest test , JUnitTaskMirror . JUnitResultFormatterMirror formatter , OutputStream out , String message ) ;
Buggy code:
public class FixedAspectRatioDemoActivity extends LayoutParamsSwitcherActivity { private CassowaryLayout cassowaryLayout ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { <START_BUG> getMenuInflater ( ) . inflate ( menu_pre_setup_test , menu ) ; <END_BUG> return true ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
getMenuInflater ( ) . inflate ( menu_fixed_aspect_ratio_demo , menu ) ;
Buggy code:
@ Controller @ RequestMapping ( "//pageurlinfo" ) public class PageurlinfoController extends BasicController { @ Autowired private PageurlinfoService pageurlinfoService ; @ RequestMapping ( "" ) public String list ( Model model , ServletRequest request ) { } @ RequestMapping ( "findList" ) @ ResponseBody public DataGrid findList ( @ RequestParam ( value = "sort" , defaultValue = "auto" ) String sortType , @ RequestParam ( value = "order" , defaultValue = "desc" ) String order , @ RequestParam ( value = "page" , defaultValue = "1" ) int pageNumber , @ RequestParam ( value = "rows" , defaultValue = ROWS ) int rows , Model model , ServletRequest request ) { } @ RequestMapping ( value = "create" , method = RequestMethod . GET ) public String createForm ( Model model ) { } @ RequestMapping ( value = "create" , method = RequestMethod . POST ) @ ResponseBody public Message create ( @ Valid Pageurlinfo pageurlinfo , RedirectAttributes redirectAttributes ) { } @ RequestMapping ( value = "update//{id}" , method = RequestMethod . GET ) public String updateForm ( @ PathVariable ( "id" ) Long id , Model model ) { } @ RequestMapping ( value = "update" , method = RequestMethod . POST ) @ ResponseBody public Message update ( @ Valid @ ModelAttribute ( "preloadPageurlinfo" ) Pageurlinfo pageurlinfo , RedirectAttributes redirectAttributes ) { try { ShiroUser su = super . getLoginUser ( ) ; User user = accountService . findUserByLoginName ( su . getLoginName ( ) ) ; if ( user != null ) { try { <START_BUG> Integer . parseInt ( pageurlinfo . getNextScheduleOn ( ) ) ; <END_BUG> pageurlinfo . setNextScheduleOn ( pageurlinfo . getJobon ( ) ) ; } catch ( Exception e ) { pageurlinfo . setJobon ( null ) ; pageurlinfo . setNextScheduleOn ( null ) ; } pageurlinfoService . save ( pageurlinfo ) ; msg . setSuccess ( true ) ; msg . setMessage ( "信息更新成功" ) ; msg . setData ( pageurlinfo ) ; } else { logger . log ( this . getClass ( ) , ERROR_INT , "登陆帐号无效!" , "" , null ) ; msg . setSuccess ( false ) ; msg . setMessage ( "登陆帐号无效!" ) ; msg . setData ( "" ) ; } } catch ( Exception ex ) { logger . log ( this . getClass ( ) , ERROR_INT , ex . getMessage ( ) , super . getLoginUser ( ) . getLoginName ( ) , null ) ; msg . setSuccess ( false ) ; msg . setMessage ( ex . getMessage ( ) ) ; msg . setData ( "" ) ; } return msg ; } @ RequestMapping ( value = "delete" , method = RequestMethod . POST ) @ ResponseBody public Message delete ( @ RequestParam ( "ids" ) List < Long > ids , ServletRequest request ) throws Exception { } @ RequestMapping ( value = "deleteGroup" , method = RequestMethod . POST ) @ ResponseBody public Message deleteGroup ( @ RequestParam ( "ids" ) List < String > url , ServletRequest request ) throws Exception { } @ RequestMapping ( value = "view//{id}" , method = RequestMethod . GET ) public String view ( @ PathVariable ( "id" ) Long id , Model model ) { } @ ModelAttribute ( "preloadPageurlinfo" ) public Pageurlinfo getPageurlinfo ( @ RequestParam ( value = "id" , required = false ) Long id ) { } No newline ; at end ; of file ; }

Fix:
Integer . parseInt ( pageurlinfo . getJobon ( ) ) ;
Buggy code:
public class CMDTurnToCamera extends Command { private boolean flag = true ; private boolean done = false ; private double target = 0 ; private static final double TOLERANCE = 15.0 ; private static final double SPD = 0.5 ; private static final double NIL = 0.0 ; public CMDTurnToCamera ( ) { } protected void initialize ( ) { } protected void execute ( ) { if ( flag ) { sensors . getGyro ( ) . reset ( ) ; target = ( ( cameraMount . getXPos ( ) ) * 180 ) - 90 ; flag = false ; } double curr = sensors . getGyro ( ) . getAngle ( ) ; if ( ( Math . abs ( ( ( target ) - curr ) ) ) < ( CMDTurnToCamera . TOLERANCE ) ) { System . out . println ( "Rotation<seq2seq4repair_space>Completed" ) ; cameraMount . center ( ) ; done = true ; flag = true ; return ; } System . out . println ( ( "Current<seq2seq4repair_space>Error:<seq2seq4repair_space>" + ( ( target ) - curr ) ) ) ; <START_BUG> double dir = ( ( ( target ) - curr ) < 0 ) ? CMDTurnToCamera . SPD : - ( CMDTurnToCamera . SPD ) ; <END_BUG> drive . moveMechanum ( CMDTurnToCamera . NIL , CMDTurnToCamera . NIL , dir ) ; } protected boolean isFinished ( ) { } protected void end ( ) { } protected void interrupted ( ) { } }

Fix:
double dir = ( ( target ) < curr ) ? - ( CMDTurnToCamera . SPD ) : CMDTurnToCamera . SPD ;
Buggy code:
public class SwitchCase extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( SwitchCase . class , "expression" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression optionalExpression = null ; private boolean expressionInitialized = false ; SwitchCase ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { if ( ! ( this . expressionInitialized ) ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ! ( this . expressionInitialized ) ) { preLazyInit ( ) ; this . optionalExpression = new SimpleName ( this . ast ) ; this . expressionInitialized = true ; postLazyInit ( this . optionalExpression , SwitchCase . EXPRESSION_PROPERTY ) ; } } } return this . optionalExpression ; } public void setExpression ( Expression expression ) { } public boolean isDefault ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class PathAddress implements Iterable < PathElement > { public static final PathAddress EMPTY_ADDRESS = new PathAddress ( Collections . < PathElement > emptyList ( ) ) ; public static PathAddress pathAddress ( final ModelNode node ) { final Map < String , PathElement > pathMap ; if ( node . isDefined ( ) ) { final List < Property > props = new ArrayList < Property > ( ) ; String key = null ; for ( ModelNode element : node . asList ( ) ) { Property prop = null ; <START_BUG> if ( ( element . getType ( ) ) == ( ModelType . PROPERTY ) ) { <END_BUG> prop = element . asProperty ( ) ; } else if ( key == null ) { key = element . asString ( ) ; } else { prop = new Property ( key , element ) ; } if ( prop != null ) { props . add ( prop ) ; key = null ; } } if ( ( props . size ( ) ) == 0 ) { return PathAddress . EMPTY_ADDRESS ; } else { pathMap = new LinkedHashMap < String , PathElement > ( ) ; for ( final Property prop : props ) { final String name = prop . getName ( ) ; if ( ( pathMap . put ( name , new PathElement ( name , prop . getValue ( ) . asString ( ) ) ) ) != null ) { throw PathAddress . duplicateElement ( name ) ; } } } } else { return PathAddress . EMPTY_ADDRESS ; } return new PathAddress ( Collections . unmodifiableList ( new ArrayList < PathElement > ( pathMap . values ( ) ) ) ) ; } public static PathAddress pathAddress ( List < PathElement > elements ) { } public static PathAddress pathAddress ( PathElement ... elements ) { } private static IllegalArgumentException duplicateElement ( final String name ) { } private final List < PathElement > pathAddressList ; PathAddress ( final List < PathElement > pathAddressList ) { } public PathElement getElement ( int index ) { } public PathElement getLastElement ( ) { } public PathAddress subAddress ( int start ) { } public PathAddress subAddress ( int start , int end ) { } public PathAddress append ( List < PathElement > additionalElements ) { } public PathAddress append ( PathElement ... additionalElements ) { } public PathAddress append ( PathAddress address ) { } public ModelNode navigate ( ModelNode model , boolean create ) throws NoSuchElementException { } public ModelNode remove ( ModelNode model ) throws NoSuchElementException { } public static Set < PathAddress > resolve ( final PathAddress address , final ModelNode model , boolean create ) { } private static void resolve ( final PathAddress address , PathAddress base , ModelNode model , final Set < PathAddress > resolved , final boolean create ) { } public ModelNode toModelNode ( ) { } public boolean isMultiTarget ( ) { } public int size ( ) { } @ Override public ListIterator < PathElement > iterator ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object other ) { } public boolean equals ( PathAddress other ) { } @ Override public String toString ( ) { } }

Fix:
if ( ( ( element . getType ( ) ) == ( ModelType . PROPERTY ) ) || ( ( element . getType ( ) ) == ( ModelType . OBJECT ) ) ) {
Buggy code:
public class ParameterizedBuildHook implements RepositorySettingsValidator , AsyncPostReceiveRepositoryHook { private boolean pathMatched = false ; private static final String REFS_HEADS = "refs//heads//" ; private final SettingsService settingsService ; private final CommitService commitService ; private final Jenkins jenkins ; public ParameterizedBuildHook ( SettingsService settingsService , CommitService commitService , Jenkins jenkins ) { } @ Override public void postReceive ( RepositoryHookContext context , Collection < RefChange > refChanges ) { Repository repository = context . getRepository ( ) ; for ( RefChange refChange : refChanges ) { String branch = refChange . getRefId ( ) . replace ( ParameterizedBuildHook . REFS_HEADS , "" ) ; for ( Job job : settingsService . getJobs ( context . getSettings ( ) . asMap ( ) ) ) { pathMatched = false ; String query = job . getQueryString ( branch ) ; if ( buildBranchCheck ( repository , refChange , branch , job . getBranchRegex ( ) , job . getPathRegex ( ) , job . getTriggers ( ) ) ) { <START_BUG> jenkins . triggerJob ( job . getJobName ( ) , query , null ) ; <END_BUG> } } } } public boolean buildBranchCheck ( final Repository repository , RefChange refChange , String branch , String branchCheck , final String pathCheck , List < Trigger > triggers ) { } public void storePathMatched ( boolean matched ) { } @ Override public void validate ( Settings settings , SettingsValidationErrors errors , Repository repository ) { } No newline ; at end ; of file ; }

Fix:
jenkins . triggerJob ( job , query , null ) ;
Buggy code:
public class RecoveredType extends RecoveredStatement implements CompilerModifiers , TerminalSymbols { public TypeDeclaration typeDeclaration ; public RecoveredType [ ] memberTypes ; public int memberTypeCount ; public RecoveredField [ ] fields ; public int fieldCount ; public RecoveredMethod [ ] methods ; public int methodCount ; public boolean preserveContent = false ; public int bodyEnd ; public RecoveredType ( TypeDeclaration typeDeclaration , RecoveredElement parent , int bracketBalance ) { } public RecoveredElement add ( AbstractMethodDeclaration methodDeclaration , int bracketBalance ) { if ( ( ( typeDeclaration . declarationSourceEnd ) != 0 ) && ( ( methodDeclaration . declarationSourceStart ) > ( typeDeclaration . declarationSourceEnd ) ) ) { return this . parent . add ( methodDeclaration , bracketBalance ) ; } if ( ( methods ) == null ) { methods = new RecoveredMethod [ 5 ] ; methodCount = 0 ; } else { if ( ( methodCount ) == ( methods . length ) ) { System . arraycopy ( methods , 0 , ( methods = new RecoveredMethod [ 2 * ( methodCount ) ] ) , 0 , methodCount ) ; } } <START_BUG> RecoveredMethod element = new RecoveredMethod ( methodDeclaration , this , bracketBalance ) ; <END_BUG> methods [ ( ( methodCount ) ++ ) ] = element ; if ( ! ( foundOpeningBrace ) ) { foundOpeningBrace = true ; ( this . bracketBalance ) ++ ; } if ( ( methodDeclaration . declarationSourceEnd ) == 0 ) return element ; return this ; } public RecoveredElement add ( FieldDeclaration fieldDeclaration , int bracketBalance ) { } public RecoveredElement add ( TypeDeclaration memberTypeDeclaration , int bracketBalance ) { } public int bodyEnd ( ) { } public boolean bodyStartsAtHeaderEnd ( ) { } public RecoveredType enclosingType ( ) { } public char [ ] name ( ) { } public AstNode parseTree ( ) { } public int sourceEnd ( ) { } public String toString ( int tab ) { } public void updateBodyStart ( int bodyStart ) { } public Statement updatedStatement ( ) { } public TypeDeclaration updatedTypeDeclaration ( ) { } public void updateFromParserState ( ) { } public RecoveredElement updateOnClosingBrace ( int braceStart , int braceEnd ) { } public RecoveredElement updateOnOpeningBrace ( int braceEnd ) { } public void updateParseTree ( ) { } public void updateSourceEndIfNecessary ( int sourceEnd ) { } }

Fix:
RecoveredMethod element = new RecoveredMethod ( methodDeclaration , this , bracketBalance , this . recoveringParser ) ;
Buggy code:
public class TryCompilationTest { @ Test public void testThrowThrowable ( ) { final Exception e = new Exception ( "exc" ) ; <START_BUG> final Throw t = new Throw ( e ) ; <END_BUG> Assert . assertEquals ( t . throwable ( ) , e ) ; } @ Test public void testReturnThrowable ( ) { } }

Fix:
final Throw < Void > t = new Throw < Void > ( e ) ;
Buggy code:
public class ProductConfig implements Serializable { private static final long serialVersionUID = 1L ; private final String name ; private final String version ; private final String consoleSlot ; public ProductConfig ( ModuleLoader loader , String home , Map < ? , ? > providedProperties ) { } private static String getProductConf ( String home ) { } public ProductConfig ( final String productName , final String productVersion , final String consoleSlot ) { } public String getProductName ( ) { } public String getProductVersion ( ) { } public String getConsoleSlot ( ) { } public String getPrettyVersionString ( ) { } public String resolveVersion ( ) { } public String resolveName ( ) { <START_BUG> return ( name ) != null ? name : Version . AS_RELEASE_CODENAME ; <END_BUG> } public static String getPrettyVersionString ( final String name , String version1 , String version2 ) { } private void setSystemProperties ( final Properties propConfProps , final Map providedProperties ) { } private static void safeClose ( Closeable c ) { } }

Fix:
return ( name ) != null ? name : "WildFly" ;