nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ObjectsTest extends WicketTestCase { public ObjectsTest ( String name ) { } public void testEqual ( ) { } public void testCloneNull ( ) { } public void testCloneString ( ) { } public void testCloneObject ( ) { Object cloneMe = new Object ( ) ; try { <START_BUG> Objects . cloneModel ( cloneMe ) ; <END_BUG> fail ( "Exception<seq2seq4repair_space>expected" ) ; } catch ( RuntimeException e ) { assertTrue ( true ) ; } } public void testComponentClone ( ) { } public void testCloneCloneObject ( ) { } private static final class CloneObject implements Serializable { private static final long serialVersionUID = 1L ; private int nr ; @ Override public boolean equals ( Object o ) { } } }

Fix:
Objects . cloneModel ( ( ( Serializable ) ( cloneMe ) ) ) ;
Buggy code:
class AddClassFileToIndex implements IJobConstants , IJob { IFile resource ; IndexManager manager ; byte [ ] contents ; public AddClassFileToIndex ( IFile resource , IndexManager manager ) { } public boolean belongsTo ( String jobFamily ) { } public boolean execute ( ) { try { IProject project = resource . getProject ( ) ; IIndex index = manager . getIndex ( project . getFullPath ( ) ) ; if ( ! ( resource . isLocal ( IResource . DEPTH_ZERO ) ) ) { return IJob . FAILED ; } if ( index == null ) return IJob . COMPLETE ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return IJob . COMPLETE ; try { monitor . enterWrite ( ) ; byte [ ] contents = this . getContents ( ) ; if ( contents == null ) return IJob . FAILED ; <START_BUG> index . add ( new IFileDocument ( resource , contents ) , new BinaryIndexer ( ) ) ; <END_BUG> } finally { monitor . exitWrite ( ) ; } } catch ( IOException e ) { return IJob . FAILED ; } return IJob . COMPLETE ; } private byte [ ] getContents ( ) { } public void initializeContents ( ) { } public String toString ( ) { } }

Fix:
index . add ( new IFileDocument ( resource , contents ) , new BinaryIndexer ( true ) ) ;
Buggy code:
public class PrincipalRemove implements OperationStepHandler { private final WritableAuthorizerConfiguration authorizerConfiguration ; private final MatchType matchType ; private PrincipalRemove ( final WritableAuthorizerConfiguration authorizerConfiguration , final WritableAuthorizerConfiguration . MatchType matchType ) { } public static OperationStepHandler createForInclude ( final WritableAuthorizerConfiguration authorizerConfiguration ) { } public static OperationStepHandler createForExclude ( final WritableAuthorizerConfiguration authorizerConfiguration ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ModelNode model = context . readResource ( EMPTY_ADDRESS ) . getModel ( ) ; final String roleName = RoleMappingResourceDefinition . getRoleName ( operation ) ; final AuthorizerConfiguration . PrincipalType principalType = PrincipalResourceDefinition . getPrincipalType ( context , model ) ; final String realm = PrincipalResourceDefinition . getRealm ( context , model ) ; final String name = PrincipalResourceDefinition . getName ( context , model ) ; context . removeResource ( EMPTY_ADDRESS ) ; if ( ( matchType ) == ( MatchType . INCLUDE ) ) { <START_BUG> RbacSanityCheckOperation . registerOperation ( context ) ; <END_BUG> } registerRuntimeRemove ( context , roleName , principalType , name , realm ) ; context . stepCompleted ( ) ; } private void registerRuntimeRemove ( final OperationContext context , final String roleName , final AuthorizerConfiguration . PrincipalType principalType , final String name , final String realm ) { } private void registerRollbackHandler ( final OperationContext context , final String roleName , final AuthorizerConfiguration . PrincipalType principalType , final String name , final String realm ) { } }

Fix:
RbacSanityCheckOperation . addOperation ( context ) ;
Buggy code:
public class ReportMethod extends HttpEntityEnclosingRequestBase { private static final Logger log = LoggerFactory . getLogger ( PropFindMethod . class ) ; public ReportMethod ( String uri ) throws URISyntaxException { } @ Override public String getMethod ( ) { } public Document getResponseAsDocument ( HttpClient client , HttpContext context ) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; Utils . executeHttpWithStatus ( client , this , out , context ) ; String xml = out . toString ( ) ; try { <START_BUG> Document document = RespUtils . getJDomDocument ( new ByteArrayInputStream ( xml . getBytes ( "UTF-8" ) ) ) ; <END_BUG> return document ; } catch ( JDOMException ex ) { throw new RuntimeException ( xml , ex ) ; } } }

Fix:
Document document = Host . getJDomDocument ( new ByteArrayInputStream ( xml . getBytes ( "UTF-8" ) ) ) ;
Buggy code:
public class FileReadSortCheck { static int [ ] array ; public static void main ( String [ ] args ) { } public static void fileRead ( ) { FileInputStream fis = null ; try { <START_BUG> File f = new File ( "input1.txt" ) ; <END_BUG> byte [ ] bytes = new byte [ ( ( int ) ( f . length ( ) ) ) ] ; fis = new FileInputStream ( f ) ; fis . read ( bytes ) ; fis . close ( ) ; String [ ] valueStr = new String ( bytes ) . trim ( ) . split ( "\\s+" ) ; FileReadSortCheck . array = new int [ valueStr . length ] ; for ( int i = 0 ; i < ( valueStr . length ) ; i ++ ) { FileReadSortCheck . array [ i ] = Integer . parseInt ( valueStr [ i ] ) ; System . out . println ( FileReadSortCheck . array [ i ] ) ; } System . out . println ( Arrays . asList ( FileReadSortCheck . array ) ) ; } catch ( IOException ex ) { Logger . getLogger ( FileReadSortCheck . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } finally { try { fis . close ( ) ; } catch ( IOException ex ) { Logger . getLogger ( FileReadSortCheck . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } } public static boolean sortCheckAsc ( int [ ] a ) { } public static boolean sortCheckDesc ( int [ ] a ) { } }

Fix:
File f = new File ( "input//input1.txt" ) ;
Buggy code:
public interface FeatureSpecificationExecutor { <START_BUG> void execute ( FeatureSpecification spec , ExecutorContext executorContext ) ; <END_BUG> }

Fix:
void execute ( FeatureSpecification spec , SpecificationContext specificationContext ) ;
Buggy code:
public class ExtendedLabelProvider implements IItemLabelProvider { private static final String ICONS_FOLDER = "icons" ; private static final String ICON_EXTENSION_NAME = "icon" ; private static final String LABEL_EXTENSION_NAME = "label" ; private final ExtXptFacade facade ; private IItemLabelProvider registryItemLabelProvider ; public ExtendedLabelProvider ( ExtXptFacade facade ) { } public Object getImage ( Object element ) { } private Object locateImage ( String iconName , Resource eResource , EObject eObject ) throws IOException , MalformedURLException { Object retVal = null ; if ( eResource != null ) { URI metaModelURI = eResource . getURI ( ) ; URI iconURI = createIconURI ( eObject , iconName , metaModelURI ) ; if ( metaModelURI . isPlatform ( ) ) { String platformString = metaModelURI . toPlatformString ( true ) ; IFile metaModelFile = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getFile ( new Path ( platformString ) ) ; if ( metaModelFile != null ) { IFile f = metaModelFile . getProject ( ) . getFile ( iconURI . path ( ) ) ; if ( ( f != null ) && ( f . exists ( ) ) ) { retVal = org . eclipse . emf . editor . ui . ImageRegistry . getDefault ( ) . getImage ( f ) ; } } } else if ( metaModelURI . isArchive ( ) ) { if ( checkAccessable ( iconURI ) ) retVal = iconURI ; } else { URI classpathURI = URI . createURI ( ( ( ( ClasspathUriResolver . CLASSPATH_SCHEME ) + ":" ) + ( iconURI . path ( ) ) ) ) ; URI iconNormalizedURI = new ClasspathUriResolver ( ) . resolve ( facade . getProject ( ) , classpathURI ) ; <START_BUG> if ( ( ! ( ClasspathUriResolver . isClassapthUri ( iconNormalizedURI ) ) ) && ( checkAccessable ( iconNormalizedURI ) ) ) <END_BUG> retVal = iconNormalizedURI ; } } return retVal ; } private boolean checkAccessable ( URI iconURI ) throws IOException { } private URI createIconURI ( EObject eObject , String iconName , URI metaModelURI ) { } public String getText ( Object element ) { } private String evaluate ( Object element , String name ) { } private String packageName ( EObject object ) { } }

Fix:
if ( ( ! ( ClasspathUriResolver . isClasspathUri ( iconNormalizedURI ) ) ) && ( checkAccessable ( iconNormalizedURI ) ) )
Buggy code:
abstract class AnsiUserDao extends AbstractDao implements UserDao { public User getUser ( long id ) { } public long getUserID ( String address ) { } public User getUserByAddress ( String address ) { } public int getUserCount ( String domain ) { } public int updateUser ( User user ) { } public int deleteUser ( long id ) { } public Alias getAlias ( long id ) { } public int getAliasCount ( String domain ) { } public List < Alias > expandAlias ( String alias ) { <START_BUG> String sql = "SELECT<seq2seq4repair_space>a.*,<seq2seq4repair_space>u.userid<seq2seq4repair_space>FROM<seq2seq4repair_space>hw_alias<seq2seq4repair_space>a,<seq2seq4repair_space>hw_user<seq2seq4repair_space>u<seq2seq4repair_space>WHERE<seq2seq4repair_space>a.alias<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>AND<seq2seq4repair_space>a.deliver_to<seq2seq4repair_space>=<seq2seq4repair_space>u.userid" ; <END_BUG> return getJdbcTemplate ( ) . query ( sql , new Object [ ] { alias } , AnsiUserDao . aliasMapper ) ; } public int updateAlias ( Alias alias ) { } public int deleteAlias ( long id ) { } public long getQuotaLimit ( long ownerID ) { } public Quota getQuota ( long ownerID , long mailboxID , String quotaRoot ) { } public void setQuota ( long ownerID , Quota quota ) { } protected static RowMapper < User > userMapper = new RowMapper < User > ( ) { public User mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } ; protected static RowMapper < Alias > aliasMapper = new RowMapper < Alias > ( ) { public Alias mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } ; }

Fix:
String sql = "SELECT<seq2seq4repair_space>a.*,<seq2seq4repair_space>u.loginid<seq2seq4repair_space>FROM<seq2seq4repair_space>hw_alias<seq2seq4repair_space>a,<seq2seq4repair_space>hw_user<seq2seq4repair_space>u<seq2seq4repair_space>WHERE<seq2seq4repair_space>a.alias<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>AND<seq2seq4repair_space>a.deliver_to<seq2seq4repair_space>=<seq2seq4repair_space>u.userid" ;
Buggy code:
public class WorkbookReader { final int SHEET_MEDIA_NAME_ROW = 0 ; final int SHEET_MEDIA_NAME_CELL = 5 ; final int SLIDE_METRIC_ROW_START = 2 ; final int STATISTIC_NAME_CELL = 0 ; final int STATISTIC_VALUE_CELL = 5 ; final String SLIDE_METRIC_SUFFIX = "-SM" ; final String LOOK_ZONE_SUFFIX = "-LZ" ; final String LOOK_ZONE_OUT_SUFFIX = "-OUT" ; final String FILE_EXTENSION = ".xlsx" ; String subject ; String media ; public void readFile ( File f ) throws IOException { } void extractData ( XSSFWorkbook workbook ) { } void extractMediaName ( XSSFSheet sheet ) { } void extractStimuliFromSheet ( XSSFSheet sheet ) { } int extractSlideMetricDataFromSheet ( XSSFSheet sheet ) { } void extractLookZoneDataFromSheet ( XSSFSheet sheet , int startLookZone ) { } List < Integer > getNullRowIndices ( XSSFSheet sheet , int startIndex ) { } int getNumStats ( XSSFSheet sheet , List < Integer > nullIndices ) { } void readLookZoneData ( XSSFSheet sheet , int numStats , List < Integer > nullIndices ) { } void addLookZoneData ( XSSFSheet sheet , int startIndex , int endIndex ) { Row row ; String statName ; Double statValue ; for ( int i = endIndex ; i > startIndex ; i -- ) { row = sheet . getRow ( i ) ; Cell statNameCell = row . getCell ( STATISTIC_NAME_CELL ) ; statName = statNameCell . getStringCellValue ( ) ; Cell statValueCell = row . getCell ( STATISTIC_VALUE_CELL ) ; <START_BUG> statValue = statValueCell . getNumericCellValue ( ) ; <END_BUG> } } String getStimulusName ( XSSFSheet sheet , List < Integer > nullIndices , int lookZoneIndex ) { } No newline ; at end ; of file ; }

Fix:
statValue = ( statValueCell == null ) ? null : statValueCell . getNumericCellValue ( ) ;
Buggy code:
public abstract class ConfiguratorBase implements Configurator { public static final String DEBUG_KEY = "log4j.debug" ; protected Logger getLogger ( LoggerRepository repository ) { } protected void addError ( ErrorItem errorItem ) { } public abstract List getErrorList ( ) { } protected void attachListAppender ( LoggerRepository repository ) { } protected void detachListAppender ( LoggerRepository repository ) { } public static void attachTemporaryConsoleAppender ( LoggerRepository repository ) { Logger ll = repository . getLogger ( LOG4J_PACKAGE_NAME ) ; ConsoleAppender appender = new ConsoleAppender ( ) ; <START_BUG> appender . setLayout ( new PatternLayout ( "LOG4J-INTERNAL:<seq2seq4repair_space>%d<seq2seq4repair_space>%level<seq2seq4repair_space>[%t]<seq2seq4repair_space>%c<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ) ) ; <END_BUG> appender . setName ( TEMP_CONSOLE_APPENDER_NAME ) ; appender . activateOptions ( ) ; ll . addAppender ( appender ) ; } public static void detachTemporaryConsoleAppender ( LoggerRepository repository , List errorList ) { } public void dumpErrors ( ) { } }

Fix:
appender . setLayout ( new PatternLayout ( "TEMPORARY<seq2seq4repair_space>CONSOLE<seq2seq4repair_space>APPPENDER:<seq2seq4repair_space>%d<seq2seq4repair_space>%level<seq2seq4repair_space>[%t]<seq2seq4repair_space>%c<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ) ) ;
Buggy code:
public final class CompressSpacePageOperation extends PhysicalPageOperation { protected int newHighestPage ; protected int num_pages_truncated ; public CompressSpacePageOperation ( AllocPage allocPage , int highest_page , int num_truncated ) throws StandardException { } public CompressSpacePageOperation ( ) { } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } public int getTypeFormatId ( ) { } public final void doMe ( Transaction tran , LogInstant instant , LimitObjectInput in ) throws StandardException { } public void undoMe ( Transaction xact , BasePage undoPage , LogInstant CLRInstant , LimitObjectInput in ) throws StandardException { if ( SanityManager . DEBUG ) { SanityManager . ASSERT ( ( undoPage != null ) , "undo<seq2seq4repair_space>Page<seq2seq4repair_space>null" ) ; SanityManager . ASSERT ( ( undoPage instanceof AllocPage ) , "undo<seq2seq4repair_space>Page<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>an<seq2seq4repair_space>allocPage" ) ; } <START_BUG> ( ( AllocPage ) ( undoPage ) ) . compressSpace ( CLRInstant , newHighestPage , num_pages_truncated ) ; <END_BUG> } public void restoreMe ( Transaction xact , BasePage undoPage , LogInstant CLRinstant , LimitObjectInput in ) { } public String toString ( ) { } }

Fix:
( ( AllocPage ) ( undoPage ) ) . undoCompressSpace ( CLRInstant , newHighestPage , num_pages_truncated ) ;
Buggy code:
public class Check extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private static final String ATTR_DISABLED = "disabled" ; private short uuid = - 1 ; public Check ( String id ) { } public Check ( String id , IModel model ) { } public final String getValue ( ) { } protected void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "checkbox" ) ; CheckGroup group = ( ( CheckGroup ) ( findParent ( CheckGroup . class ) ) ) ; if ( group == null ) { throw new wicket . WicketRuntimeException ( ( ( "Check<seq2seq4repair_space>component<seq2seq4repair_space>[" + ( getPath ( ) ) ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>find<seq2seq4repair_space>its<seq2seq4repair_space>parent<seq2seq4repair_space>CheckGroup" ) ) ; } final String uuid = getValue ( ) ; tag . put ( "name" , group . getInputName ( ) ) ; tag . put ( "value" , uuid ) ; Collection collection = ( ( Collection ) ( group . getModelObject ( ) ) ) ; if ( collection == null ) { throw new wicket . WicketRuntimeException ( ( ( "CheckGroup<seq2seq4repair_space>[" + ( group . getPath ( ) ) ) + "]<seq2seq4repair_space>contains<seq2seq4repair_space>a<seq2seq4repair_space>null<seq2seq4repair_space>model<seq2seq4repair_space>object,<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>an<seq2seq4repair_space>object<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>java.util.Collection" ) ) ; } if ( group . hasRawInput ( ) ) { final String [ ] input = group . getInputAsArray ( ) ; if ( input != null ) { for ( int i = 0 ; i < ( input . length ) ; i ++ ) { if ( uuid . equals ( input [ i ] ) ) { tag . put ( "checked" , "checked" ) ; } } } } else if ( collection . contains ( getModelObject ( ) ) ) { tag . put ( "checked" , "checked" ) ; } if ( group . wantOnSelectionChangedNotifications ( ) ) { final CharSequence url = group . urlFor ( INTERFACE ) ; Form form = ( ( Form ) ( group . findParent ( Form . class ) ) ) ; if ( form != null ) { tag . put ( "onclick" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + "&" ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ; <END_BUG> } } if ( ( ( ! ( isActionAuthorized ( ENABLE ) ) ) || ( ! ( isEnabled ( ) ) ) ) || ( ! ( group . isEnabled ( ) ) ) ) { tag . put ( Check . ATTR_DISABLED , Check . ATTR_DISABLED ) ; } } }

Fix:
tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + "&amp;" ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ;
Buggy code:
public class ResourceUrlProviderJavaConfigTests { private final ResourceUrlProviderJavaConfigTests . TestServlet servlet = new ResourceUrlProviderJavaConfigTests . TestServlet ( ) ; private MockFilterChain filterChain ; private MockHttpServletRequest request ; @ Before @ SuppressWarnings ( "resource" ) public void setup ( ) throws Exception { } @ Test public void rootServletMapping ( ) throws Exception { } @ Test public void prefixServletMapping ( ) throws Exception { } @ Test public void extensionServletMapping ( ) throws Exception { } @ Configuration static class WebConfig extends WebMvcConfigurationSupport { @ Override public void addResourceHandlers ( ResourceHandlerRegistry registry ) { <START_BUG> registry . addResourceHandler ( "//resources//**" ) . addResourceLocations ( "classpath:org//springframework//web//servlet//resource//test//" ) . setResourceResolvers ( new FingerprintResourceResolver ( ) , new PathResourceResolver ( ) ) ; <END_BUG> } } @ SuppressWarnings ( "serial" ) private static class TestServlet extends HttpServlet { private HttpServletResponse response ; @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) { } } }

Fix:
registry . addResourceHandler ( "//resources//**" ) . addResourceLocations ( "classpath:org//springframework//web//servlet//resource//test//" ) . addVersionHash ( "//**" ) ;
Buggy code:
public class GUnzip extends Unpack { private static final String DEFAULT_EXTENSION = ".gz" ; protected String getDefaultExtension ( ) { } protected void extract ( ) { if ( ( source . lastModified ( ) ) > ( dest . lastModified ( ) ) ) { log ( ( ( ( "Expanding<seq2seq4repair_space>" + ( source . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) ) ; FileOutputStream out = null ; GZIPInputStream zIn = null ; FileInputStream fis = null ; try { out = new FileOutputStream ( dest ) ; fis = new FileInputStream ( source ) ; zIn = new GZIPInputStream ( fis ) ; byte [ ] buffer = new byte [ 8 * 1024 ] ; int count = 0 ; do { out . write ( buffer , 0 , count ) ; count = zIn . read ( buffer , 0 , buffer . length ) ; } while ( count != ( - 1 ) ) ; } catch ( IOException ioe ) { String msg = "Problem<seq2seq4repair_space>expanding<seq2seq4repair_space>gzip<seq2seq4repair_space>" + ( ioe . getMessage ( ) ) ; <START_BUG> throw new org . apache . tools . ant . BuildException ( msg , ioe , location ) ; <END_BUG> } finally { if ( fis != null ) { try { fis . close ( ) ; } catch ( IOException ioex ) { } } if ( out != null ) { try { out . close ( ) ; } catch ( IOException ioex ) { } } if ( zIn != null ) { try { zIn . close ( ) ; } catch ( IOException ioex ) { } } } } } }

Fix:
throw new BuildException ( msg , ioe ) ;
Buggy code:
public class MimeTypeLookup { private Hashtable extTable ; public MimeTypeLookup ( ) { } private boolean loadExtensionList ( ) { } public String getMimeType ( String ext ) { if ( ext == null ) return "application//octet-stream" ; if ( extTable . containsKey ( ext ) ) return ( ( String ) ( extTable . get ( ext ) ) ) ; else <START_BUG> return new String ( "application//octet-stream" ) ; <END_BUG> } }

Fix:
return "application//octet-stream" ;
Buggy code:
public class CacheContainerReadAttributeHandler implements OperationStepHandler { public static final CacheContainerReadAttributeHandler INSTANCE = new CacheContainerReadAttributeHandler ( ) ; private final ParametersValidator nameValidator = new ParametersValidator ( ) ; private final Map < String , AttributeDefinition > attributeDefinitions ; private CacheContainerReadAttributeHandler ( ) { } private CacheContainerReadAttributeHandler ( final AttributeDefinition ... definitions ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { nameValidator . validate ( operation ) ; final String attributeName = operation . require ( NAME ) . asString ( ) ; final ModelNode submodel = context . readResource ( EMPTY_ADDRESS ) . getModel ( ) ; final ModelNode currentValue = submodel . get ( attributeName ) . clone ( ) ; context . getResult ( ) . set ( currentValue ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } public void registerAttributes ( final ManagementResourceRegistration registry ) { } protected AttributeDefinition getAttributeDefinition ( final String attributeName ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class MongoMigrationsIntegrationTest { @ Rule public FongoRule FONGO = new FongoRule ( "migration_test" , false ) ; private Jongo jongo ; private static final Logger LOGGER = ( ( Logger ) ( LoggerFactory . getLogger ( MongoMigrations . class ) ) ) ; private static final String SCHEMA_VERSION_COLLECTION = "_schema_version" ; @ SuppressWarnings ( "unchecked" ) private final Appender < ILoggingEvent > appender = mock ( Appender . class ) ; private final ArgumentCaptor < ILoggingEvent > captor = ArgumentCaptor . forClass ( ILoggingEvent . class ) ; @ Before public void setUp ( ) throws UnknownHostException { } @ SuppressWarnings ( "unchecked" ) @ Test public void shouldRetryFailedMigrationsAndApplyNewOnesAndCompleteSuccessfully ( ) throws MongoMigrationsFailureException { } @ Test public void shouldHandleZeroPendingMigrations ( ) throws MongoMigrationsFailureException { } @ Test public void shouldHandleZeroCommandsProvided ( ) throws MongoMigrationsFailureException { } @ SuppressWarnings ( "unchecked" ) @ Test public void shouldFailMigrationsOnLastMigration ( ) { } @ Test public void shouldReportOnMigrations ( ) throws MongoMigrationsFailureException { } private String toTimeStamp ( String timeStamp ) { <START_BUG> return DateTime . parse ( timeStamp ) . toString ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss" ) ; <END_BUG> } @ SuppressWarnings ( "unchecked" ) private void validateMigrations ( TypeSafeMatcher < Migration > ... migrations ) { } private static List < MigrationCommand > commands ( MigrationCommand ... commands ) { } private DBFactory dbFactory ( ) { } @ MongoMigration ( version = "1.0.0" , description = "Applied<seq2seq4repair_space>migration" ) public static class Migration100 implements MigrationCommand { @ Override public void migrate ( Jongo jongo ) { } } @ MongoMigration ( version = "1.0.1" , description = "Another<seq2seq4repair_space>applied<seq2seq4repair_space>migration" ) public static class Migration101 implements MigrationCommand { @ Override public void migrate ( Jongo jongo ) { } } @ MongoMigration ( version = "1.0.2" , description = "Failed<seq2seq4repair_space>last<seq2seq4repair_space>time<seq2seq4repair_space>migration" ) public static class Migration102 implements MigrationCommand { @ Override public void migrate ( Jongo jongo ) { } } @ MongoMigration ( version = "2.0.0" , description = "Brand<seq2seq4repair_space>new<seq2seq4repair_space>migration" ) public static class Migration200 implements MigrationCommand { @ Override public void migrate ( Jongo jongo ) { } } @ MongoMigration ( version = "2.0.0.1" , description = "I<seq2seq4repair_space>will<seq2seq4repair_space>always<seq2seq4repair_space>fail" ) public static class Migration2001 implements MigrationCommand { @ Override public void migrate ( Jongo jongo ) { } } private static TypeSafeMatcher < Migration > migrationOf ( final String version , final MigrationStatus status ) { } No newline ; at end ; of file ; }

Fix:
return DateTime . parse ( timeStamp ) . toLocalDateTime ( ) . toString ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss" ) ;
Buggy code:
public class CacheContainerRemove extends AbstractRemoveStepHandler { public static final CacheContainerRemove INSTANCE = new CacheContainerRemove ( ) ; @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } private static void reinstallExistingCacheServices ( OperationContext context , ModelNode containerModel , String containerName , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } private static void removeExistingCacheServices ( OperationContext context , ModelNode containerModel , String containerName ) throws OperationFailedException { } private static List < Property > getCachesFromParentModel ( String cacheType , ModelNode model ) { } private static ModelNode createCacheRemoveOperation ( String cacheType , String containerName , String cacheName ) { } private static ModelNode createCacheAddOperation ( String cacheType , String containerName , String cacheName ) { } private static PathAddress getCacheAddress ( String containerName , String cacheName , String cacheType ) { <START_BUG> PathAddress cacheAddr = PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , SUBSYSTEM_NAME ) , PathElement . pathElement ( CACHE_CONTAINER , containerName ) , PathElement . pathElement ( cacheType , cacheName ) ) ; <END_BUG> return cacheAddr ; } }

Fix:
PathAddress cacheAddr = PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , SUBSYSTEM_NAME ) , PathElement . pathElement ( "cache-container" , containerName ) , PathElement . pathElement ( cacheType , cacheName ) ) ;
Buggy code:
public class Socket extends ProjectComponent implements Condition { private String server = null ; private int port = 0 ; public void setServer ( String server ) { } public void setPort ( int port ) { } public boolean eval ( ) throws BuildException { if ( ( server ) == null ) { throw new BuildException ( ( "No<seq2seq4repair_space>server<seq2seq4repair_space>specified<seq2seq4repair_space>in<seq2seq4repair_space>socket<seq2seq4repair_space>" + "condition" ) ) ; } if ( ( port ) == 0 ) { throw new BuildException ( "No<seq2seq4repair_space>port<seq2seq4repair_space>specified<seq2seq4repair_space>in<seq2seq4repair_space>socket<seq2seq4repair_space>condition" ) ; } log ( ( ( ( "Checking<seq2seq4repair_space>for<seq2seq4repair_space>listener<seq2seq4repair_space>at<seq2seq4repair_space>" + ( server ) ) + ":" ) + ( port ) ) , MSG_VERBOSE ) ; try { <START_BUG> java . net . Socket socket = new java . net . Socket ( server , port ) ; <END_BUG> } catch ( IOException e ) { return false ; } return true ; } }

Fix:
new java . net . Socket ( server , port ) ;
Buggy code:
public class HeroChatHook extends IRC { private HeroChat HeroChatHook ; private IRC plugin ; public HeroChatHook ( final IRC plugin ) { } private void initHeroChatHook ( ) { if ( ( HeroChatHook ) != null ) { return ; } Plugin HeroChatPlugin = plugin . getServer ( ) . getPluginManager ( ) . getPlugin ( "HeroChat" ) ; if ( HeroChatPlugin == null ) { <START_BUG> log ( "HeroChat<seq2seq4repair_space>not<seq2seq4repair_space>detected." ) ; <END_BUG> HeroChatHook = null ; return ; } HeroChatHook = ( ( HeroChat ) ( HeroChatPlugin ) ) ; log ( ( "HeroChat<seq2seq4repair_space>detected;<seq2seq4repair_space>hooking:<seq2seq4repair_space>" + ( ( ( HeroChat ) ( HeroChatPlugin ) ) . getDescription ( ) . getFullName ( ) ) ) ) ; String ver = ( ( HeroChat ) ( HeroChatPlugin ) ) . getDescription ( ) . getVersion ( ) ; if ( ! ( ver . startsWith ( "5" ) ) ) { Variables . hc4 = true ; } } public HeroChat getHook ( ) { } No newline ; at end ; of file ; }

Fix:
log ( "HeroChat<seq2seq4repair_space>4<seq2seq4repair_space>not<seq2seq4repair_space>detected." ) ;
Buggy code:
public class OwnerDetailsView extends ViewImpl implements OwnerDetailsPresenter . MyView { public interface Binder extends UiBinder < Widget , OwnerDetailsView > { } private final Widget widget ; private OwnerDetailUiHandlers presenter ; @ UiField Element name ; @ UiField Element email ; @ UiField Element phoneNumber ; @ UiField Element mobileNumber ; @ UiField Element birthDay ; @ UiField Element addresse ; @ UiField Element maritalStatus ; @ UiField Element matrimonialRegime ; @ UiField Element bic ; @ UiField Element iban ; @ UiField Element fee ; @ UiField Element nationalRegister ; @ UiField Element nationality ; @ UiField Element job ; @ UiField Element fax ; @ UiField Element placeOfBirth ; @ UiField Element estates ; @ Inject public OwnerDetailsView ( final OwnerDetailsView . Binder binder ) { } @ Override public Widget asWidget ( ) { } @ UiHandler ( "btnDelete" ) public void onDeleteClicked ( ClickEvent e ) { } @ UiHandler ( "btnToList" ) public void onGoToListClicked ( ClickEvent e ) { } @ UiHandler ( "btnUpdate" ) public void onUpdateClicked ( ClickEvent e ) { } @ Override public void setOwner ( Owner o ) { displayName ( o ) ; displayFee ( o ) ; iban . setInnerText ( o . getIban ( ) ) ; bic . setInnerText ( o . getBic ( ) ) ; email . setInnerText ( o . getEmail ( ) ) ; phoneNumber . setInnerText ( o . getPhoneNumber ( ) ) ; mobileNumber . setInnerText ( o . getMobilePhoneNumber ( ) ) ; fax . setInnerText ( o . getFax ( ) ) ; placeOfBirth . setInnerText ( o . getPlaceOfBirth ( ) ) ; nationality . setInnerText ( o . getNationality ( ) ) ; job . setInnerText ( o . getJobTitle ( ) ) ; nationalRegister . setInnerText ( o . getNationalRegisterNumber ( ) ) ; <START_BUG> birthDay . setInnerText ( ( ( o . getDateOfBirth ( ) ) != null ? o . getDateOfBirth ( ) . toGMTString ( ) : "" ) ) ; <END_BUG> addresse . setInnerText ( ( ( ( ( ( o . getStreet ( ) ) + "<seq2seq4repair_space>" ) + ( o . getCity ( ) ) ) + "<seq2seq4repair_space>" ) + ( o . getCountry ( ) ) ) ) ; maritalStatus . setInnerText ( ( ( o . getMaritalStatus ( ) ) != null ? UiHelper . translateEnum ( "MaritalStatus_" , o . getMaritalStatus ( ) ) : "" ) ) ; matrimonialRegime . setInnerText ( ( ( o . getMatrimonialRegime ( ) ) != null ? UiHelper . translateEnum ( "MatrimonialRegime_" , o . getMatrimonialRegime ( ) ) : "" ) ) ; List < SimpleRealEstate > realEstates = o . getEstates ( ) ; String sLstEstates = "<br//>" ; if ( realEstates != null ) { for ( SimpleRealEstate e : realEstates ) { sLstEstates += ( ( ( ( ( e . getReference ( ) ) + "<seq2seq4repair_space>" ) + ( e . getAddress ( ) ) ) + "<seq2seq4repair_space>" ) + ( e . getCity ( ) ) ) + "<br//>" ; } estates . setInnerHTML ( sLstEstates ) ; } } private void displayFee ( Owner o ) { } private void displayName ( Owner o ) { } @ Override public void setOwnerDetailUiHandler ( OwnerDetailUiHandlers handler ) { } No newline ; at end ; of file ; }

Fix:
birthDay . setInnerText ( UiHelper . displayDate ( o . getDateOfBirth ( ) ) ) ;
Buggy code:
public class ItemFlags implements Property { public static boolean describes ( dObject item ) { } public static ItemFlags getFrom ( dObject _item ) { } private ItemFlags ( dItem _item ) { } public dList flags ( ) { dList output = new dList ( ) ; for ( ItemFlag flag : item . getItemStack ( ) . getItemMeta ( ) . getItemFlags ( ) ) { output . add ( flag . name ( ) ) ; } <START_BUG> return output . class ; <END_BUG> } dItem item ; @ Override public String getAttribute ( Attribute attribute ) { } @ Override public String getPropertyString ( ) { } @ Override public String getPropertyId ( ) { } @ Override public void adjust ( Mechanism mechanism ) { } }

Fix:
return output ;
Buggy code:
public final class NativeAuthenticationServiceImpl extends AuthenticationServiceBase implements UserAuthenticator { private boolean _creatingCredentialsDB = false ; private String _credentialsDB ; private boolean _authenticateDatabaseOperationsLocally ; private long _passwordLifetimeMillis = Property . AUTHENTICATION_NATIVE_PASSWORD_LIFETIME_DEFAULT ; private double _passwordExpirationThreshold = Property . AUTHENTICATION_PASSWORD_EXPIRATION_THRESHOLD_DEFAULT ; private String _badlyFormattedPasswordProperty ; public boolean canSupport ( Properties properties ) { } private void parseNativeSpecification ( Properties properties ) { } private boolean validAuthenticationProvider ( ) throws StandardException { } public void boot ( boolean create , Properties properties ) throws StandardException { } public String getSystemCredentialsDatabaseName ( ) { } public boolean authenticateUser ( String userName , String userPassword , String databaseName , Properties info ) throws SQLException { } private boolean authenticatingInThisDatabase ( String userVisibleDatabaseName ) throws StandardException { } private boolean authenticatingInThisService ( String canonicalDatabaseName ) throws StandardException { } private boolean isCredentialsService ( String canonicalDatabaseName ) throws StandardException { } private String getCanonicalServiceName ( ) throws StandardException { } private String getCanonicalServiceName ( String rawName ) throws StandardException { } private boolean authenticateRemotely ( String userName , String userPassword , String databaseName ) throws SQLWarning , StandardException { if ( ( _credentialsDB ) == null ) { throw StandardException . newException ( BAD_NATIVE_AUTH_SPEC ) ; } SQLWarning warnings = null ; try { Properties properties = new Properties ( ) ; properties . setProperty ( USERNAME_ATTR , userName ) ; properties . setProperty ( PASSWORD_ATTR , userPassword ) ; String connectionURL = ( Attribute . PROTOCOL ) + ( _credentialsDB ) ; <START_BUG> Connection conn = InternalDriver . activeDriver ( ) . connect ( connectionURL , properties ) ; <END_BUG> warnings = conn . getWarnings ( ) ; conn . close ( ) ; } catch ( SQLException se ) { String sqlState = se . getSQLState ( ) ; if ( LOGIN_FAILED . equals ( sqlState ) ) { return false ; } else if ( DATABASE_NOT_FOUND . startsWith ( sqlState ) ) { throw StandardException . newException ( MISSING_CREDENTIALS_DB , _credentialsDB ) ; } else { throw wrap ( se ) ; } } if ( warnings != null ) { throw warnings ; } return true ; } private void callDataSourceSetter ( DataSource ds , String methodName , String value ) throws StandardException { } private StandardException wrap ( Throwable t ) { } private boolean authenticateLocally ( String userName , String userPassword , String databaseName ) throws SQLException , StandardException { } }

Fix:
Connection conn = InternalDriver . activeDriver ( ) . connect ( connectionURL , properties , 0 ) ;
Buggy code:
public class JiraTemplateFactory { public static JiraCreatorService generateCreator ( String templateCode , JiraClient jiraClient ) { if ( templateCode . equals ( "yanghui-gaphone" ) ) { return new JiraCreatorServiceYanghui ( jiraClient ) ; } else <START_BUG> if ( templateCode . equals ( "linjh-requirement" ) ) { <END_BUG> return new JiraCreatorServiceLinjh ( jiraClient ) ; } return null ; } }

Fix:
if ( templateCode . equals ( "linjh-ba" ) ) {
Buggy code:
class Utils { static int digit16 ( final byte b ) throws DecoderException { <START_BUG> final int i = Character . digit ( ( ( char ) ( b ) ) , 16 ) ; <END_BUG> if ( i == ( - 1 ) ) { throw new DecoderException ( ( ( ( "Invalid<seq2seq4repair_space>URL<seq2seq4repair_space>encoding:<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>digit<seq2seq4repair_space>(radix<seq2seq4repair_space>" + ( URLCodec . RADIX ) ) + "):<seq2seq4repair_space>" ) + b ) ) ; } return i ; } }

Fix:
final int i = Character . digit ( ( ( char ) ( b ) ) , URLCodec . RADIX ) ;
Buggy code:
public class BinaryTypeConverter { public static TypeDeclaration buildTypeDeclaration ( IType type , CompilationUnitDeclaration compilationUnit , CompilationResult compilationResult ) throws JavaModelException { } private static FieldDeclaration convert ( IField field , IType type ) throws JavaModelException { } private static AbstractMethodDeclaration convert ( IMethod method , IType type , CompilationResult compilationResult ) throws JavaModelException { AbstractMethodDeclaration methodDeclaration ; if ( method . isConstructor ( ) ) { ConstructorDeclaration decl = new ConstructorDeclaration ( compilationResult ) ; <START_BUG> decl . isDefaultConstructor = false ; <END_BUG> methodDeclaration = decl ; } else { MethodDeclaration decl = ( type . isAnnotation ( ) ) ? new AnnotationMethodDeclaration ( compilationResult ) : new MethodDeclaration ( compilationResult ) ; decl . returnType = BinaryTypeConverter . createTypeReference ( Signature . toString ( method . getReturnType ( ) ) . toCharArray ( ) ) ; methodDeclaration = decl ; } methodDeclaration . selector = method . getElementName ( ) . toCharArray ( ) ; int flags = method . getFlags ( ) ; boolean isVarargs = Flags . isVarargs ( flags ) ; methodDeclaration . modifiers = flags & ( ~ ( Flags . AccVarargs ) ) ; String [ ] argumentTypeNames = method . getParameterTypes ( ) ; String [ ] argumentNames = method . getParameterNames ( ) ; int argumentCount = ( argumentTypeNames == null ) ? 0 : argumentTypeNames . length ; methodDeclaration . arguments = new Argument [ argumentCount ] ; for ( int i = 0 ; i < argumentCount ; i ++ ) { String argumentTypeName = argumentTypeNames [ i ] ; TypeReference typeReference = BinaryTypeConverter . createTypeReference ( Signature . toString ( argumentTypeName ) . toCharArray ( ) ) ; if ( isVarargs && ( i == ( argumentCount - 1 ) ) ) { typeReference . bits |= ASTNode . IsVarArgs ; } methodDeclaration . arguments [ i ] = new Argument ( argumentNames [ i ] . toCharArray ( ) , 0 , typeReference , ClassFileConstants . AccDefault ) ; } String [ ] exceptionTypeNames = method . getExceptionTypes ( ) ; int exceptionCount = ( exceptionTypeNames == null ) ? 0 : exceptionTypeNames . length ; if ( exceptionCount > 0 ) { methodDeclaration . thrownExceptions = new TypeReference [ exceptionCount ] ; for ( int i = 0 ; i < exceptionCount ; i ++ ) { methodDeclaration . thrownExceptions [ i ] = BinaryTypeConverter . createTypeReference ( Signature . toString ( exceptionTypeNames [ i ] ) . toCharArray ( ) ) ; } } return methodDeclaration ; } private static TypeDeclaration convert ( IType type , IType alreadyComputedMember , TypeDeclaration alreadyComputedMemberDeclaration , CompilationResult compilationResult ) throws JavaModelException { } private static TypeReference createTypeReference ( char [ ] type ) { } }

Fix:
decl . bits &= ~ ( ASTNode . IsDefaultConstructor ) ;
Buggy code:
public class CpioArchiveOutputStream extends ArchiveOutputStream implements CpioConstants { private CpioArchiveEntry entry ; private boolean closed = false ; private boolean finished ; private final short entryFormat ; private final HashMap < String , CpioArchiveEntry > names = new HashMap < String , CpioArchiveEntry > ( ) ; private long crc = 0 ; private long written ; private final OutputStream out ; private final int blockSize ; private long nextArtificalDeviceAndInode = 1 ; public CpioArchiveOutputStream ( final OutputStream out , final short format ) { } public CpioArchiveOutputStream ( final OutputStream out , final short format , final int blockSize ) { } public CpioArchiveOutputStream ( final OutputStream out ) { } private void ensureOpen ( ) throws IOException { } @ Override public void putArchiveEntry ( ArchiveEntry entry ) throws IOException { } private void writeHeader ( final CpioArchiveEntry e ) throws IOException { } private void writeNewEntry ( final CpioArchiveEntry entry ) throws IOException { } private void writeOldAsciiEntry ( final CpioArchiveEntry entry ) throws IOException { } private void writeOldBinaryEntry ( final CpioArchiveEntry entry , final boolean swapHalfWord ) throws IOException { } @ Override public void closeArchiveEntry ( ) throws IOException { } @ Override public void write ( final byte [ ] b , final int off , final int len ) throws IOException { } @ Override public void finish ( ) throws IOException { } @ Override public void close ( ) throws IOException { } private void pad ( int count ) throws IOException { } private void writeBinaryLong ( final long number , final int length , final boolean swapHalfWord ) throws IOException { } private void writeAsciiLong ( final long number , final int length , final int radix ) throws IOException { <START_BUG> StringBuffer tmp = new StringBuffer ( ) ; <END_BUG> String tmpStr ; if ( radix == 16 ) { tmp . append ( Long . toHexString ( number ) ) ; } else if ( radix == 8 ) { tmp . append ( Long . toOctalString ( number ) ) ; } else { tmp . append ( Long . toString ( number ) ) ; } if ( ( tmp . length ( ) ) <= length ) { long insertLength = length - ( tmp . length ( ) ) ; for ( int pos = 0 ; pos < insertLength ; pos ++ ) { tmp . insert ( 0 , "0" ) ; } tmpStr = tmp . toString ( ) ; } else { tmpStr = tmp . substring ( ( ( tmp . length ( ) ) - length ) ) ; } byte [ ] b = ArchiveUtils . toAsciiBytes ( tmpStr ) ; out . write ( b ) ; count ( b . length ) ; } private void writeCString ( final String str ) throws IOException { } @ Override public ArchiveEntry createArchiveEntry ( File inputFile , String entryName ) throws IOException { } }

Fix:
StringBuilder tmp = new StringBuilder ( ) ;
Buggy code:
public class Aj implements ClassPreProcessor { private IWeavingContext weavingContext ; public Aj ( ) { } public Aj ( IWeavingContext context ) { } public void initialize ( ) { } public byte [ ] preProcess ( String className , byte [ ] bytes , ClassLoader loader ) { } static class WeaverContainer { private static Map weavingAdaptors = new WeakHashMap ( ) ; static WeavingAdaptor getWeaver ( ClassLoader loader , IWeavingContext weavingContext ) { } } static class ExplicitlyInitializedClassLoaderWeavingAdaptor { private final ClassLoaderWeavingAdaptor weavingAdaptor ; private boolean isInitialized ; public ExplicitlyInitializedClassLoaderWeavingAdaptor ( ClassLoaderWeavingAdaptor weavingAdaptor ) { } private void initialize ( ClassLoader loader , IWeavingContext weavingContext ) { } public ClassLoaderWeavingAdaptor getWeavingAdaptor ( ClassLoader loader , IWeavingContext weavingContext ) { } } public String getNamespace ( ClassLoader loader ) { } public boolean generatedClassesExist ( ClassLoader loader ) { <START_BUG> return ( ( ClassLoaderWeavingAdaptor ) ( Aj . WeaverContainer . getWeaver ( loader , weavingContext ) ) ) . generatedClassesExist ( ) ; <END_BUG> } public void flushGeneratedClasses ( ClassLoader loader ) { } }

Fix:
return ( ( ClassLoaderWeavingAdaptor ) ( Aj . WeaverContainer . getWeaver ( loader , weavingContext ) ) ) . generatedClassesExistFor ( null ) ;
Buggy code:
public class CommandLineMain { private static CommandLineParser parser = new GnuParser ( ) ; private static Options options = new Options ( ) ; private static HelpFormatter formatter = new HelpFormatter ( ) ; private static final String usage = "jdr.{sh,bat}<seq2seq4repair_space>[options]" ; public static void main ( String [ ] args ) { <START_BUG> String port = "9990" ; <END_BUG> String host = "localhost" ; String protocol = "http-remoting" ; try { CommandLine line = CommandLineMain . parser . parse ( CommandLineMain . options , args , false ) ; if ( line . hasOption ( "help" ) ) { CommandLineMain . formatter . printHelp ( CommandLineMain . usage , CommandLineMain . options ) ; return ; } if ( line . hasOption ( "host" ) ) { host = line . getOptionValue ( "host" ) ; } if ( line . hasOption ( "port" ) ) { port = line . getOptionValue ( "port" ) ; } if ( line . hasOption ( "protocol" ) ) { protocol = line . getOptionValue ( "protocol" ) ; } } catch ( ParseException e ) { System . out . println ( e . getMessage ( ) ) ; CommandLineMain . formatter . printHelp ( CommandLineMain . usage , CommandLineMain . options ) ; return ; } System . out . println ( "Initializing<seq2seq4repair_space>JBoss<seq2seq4repair_space>Diagnostic<seq2seq4repair_space>Reporter..." ) ; JdrReportService reportService = new JdrReportService ( ) ; JdrReport response = null ; try { response = reportService . standaloneCollect ( protocol , host , port ) ; System . out . println ( ( "JDR<seq2seq4repair_space>started:<seq2seq4repair_space>" + ( response . getStartTime ( ) . toString ( ) ) ) ) ; System . out . println ( ( "JDR<seq2seq4repair_space>ended:<seq2seq4repair_space>" + ( response . getEndTime ( ) . toString ( ) ) ) ) ; System . out . println ( ( "JDR<seq2seq4repair_space>location:<seq2seq4repair_space>" + ( response . getLocation ( ) ) ) ) ; } catch ( OperationFailedException e ) { System . out . println ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>complete<seq2seq4repair_space>the<seq2seq4repair_space>JDR<seq2seq4repair_space>report:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } System . exit ( 0 ) ; } }

Fix:
String port = "9999" ;
Buggy code:
public class AjMethodDeclaration extends MethodDeclaration { public AjMethodDeclaration ( CompilationResult compilationResult ) { } protected int generateInfoAttributes ( ClassFile classFile ) { List extras = new ArrayList ( ) ; addDeclarationStartLineAttribute ( extras , classFile ) ; <START_BUG> return classFile . generateMethodInfoAttribute ( binding , extras ) ; <END_BUG> } protected void addDeclarationStartLineAttribute ( List extraAttributeList , ClassFile classFile ) { } }

Fix:
return classFile . generateMethodInfoAttribute ( binding , false , extras ) ;