nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class ContextService implements IContextService { private final ContextAuthority contextAuthority ; private final ContextManager contextManager ; private final ContextPersistence contextPersistence ; public ContextService ( final ContextManager contextManager ) { } public void deferUpdates ( boolean defer ) { } public final IContextActivation activateContext ( final String contextId ) { } public final IContextActivation activateContext ( final String contextId , final Expression expression ) { } public IContextActivation activateContext ( String contextId , Expression expression , boolean global ) { } public final IContextActivation activateContext ( final String contextId , final Expression expression , final int sourcePriority ) { } public final void addContextManagerListener ( final IContextManagerListener listener ) { } public final void addSourceProvider ( final ISourceProvider provider ) { } public final void deactivateContext ( final IContextActivation activation ) { } public final void deactivateContexts ( final Collection activations ) { } public final void dispose ( ) { } public final Collection getActiveContextIds ( ) { } public final Context getContext ( final String contextId ) { } public final Collection getDefinedContextIds ( ) { } public final Context [ ] getDefinedContexts ( ) { } public final int getShellType ( final Shell shell ) { } public final void readRegistry ( ) { } public final boolean registerShell ( final Shell shell , final int type ) { } public final void removeContextManagerListener ( final IContextManagerListener listener ) { <START_BUG> contextManager . addContextManagerListener ( listener ) ; <END_BUG> } public final void removeSourceProvider ( final ISourceProvider provider ) { } public final boolean unregisterShell ( final Shell shell ) { } public final void updateShellKludge ( ) { } public final void updateShellKludge ( final Shell shell ) { } }

Fix:
contextManager . removeContextManagerListener ( listener ) ;
Buggy code:
public class KeyToolUtils { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String DEFAULT_DNAME = "cn=JMeter<seq2seq4repair_space>Proxy<seq2seq4repair_space>(DO<seq2seq4repair_space>NOT<seq2seq4repair_space>TRUST)" ; private static final String DNAME_ROOT_CA_KEY ; private static final String KEYTOOL_DIRECTORY = "keytool.directory" ; private static final String KEYTOOL_PATH ; private static void addElement ( StringBuilder sb , String prefix , String value ) { } private static final String DNAME_INTERMEDIATE_CA_KEY = "cn=DO<seq2seq4repair_space>NOT<seq2seq4repair_space>INSTALL<seq2seq4repair_space>THIS<seq2seq4repair_space>CERTIFICATE<seq2seq4repair_space>(JMeter<seq2seq4repair_space>Intermediate<seq2seq4repair_space>CA)" ; public static final String ROOT_CACERT_CRT_PFX = "ApacheJMeterTemporaryRootCA" ; private static final String ROOT_CACERT_CRT = ( KeyToolUtils . ROOT_CACERT_CRT_PFX ) + ".crt" ; private static final String ROOT_CACERT_USR = ( KeyToolUtils . ROOT_CACERT_CRT_PFX ) + ".usr" ; private static final String ROOTCA_ALIAS = ":root_ca:" ; private static final String INTERMEDIATE_CA_ALIAS = ":intermediate_ca:" ; public static final boolean SUPPORTS_HOST_CERT = SystemUtils . isJavaVersionAtLeast ( JavaVersion . JAVA_1_7 ) ; private KeyToolUtils ( ) { } public static void genkeypair ( final File keystore , String alias , final String password , int validity , String dname , String ext ) throws IOException { } private static String formatCommand ( List < String > arguments ) { } public static void generateProxyCA ( File keystore , String password , int validity ) throws IOException { } public static void generateHostCert ( File keystore , String password , String host , int validity ) throws IOException { } private static void generateSignedCert ( File keystore , String password , int validity , String alias , String subject ) throws IOException { } public static String list ( final File keystore , final String storePass ) throws IOException { } public static String [ ] getCAaliases ( ) { } public static String getRootCAalias ( ) { } private static void keytool ( String command , File keystore , String password , String alias , InputStream input , OutputStream output , String ... parameters ) throws IOException { } public static boolean haveKeytool ( ) { } private static String getKeyToolPath ( ) throws IOException { if ( ( KeyToolUtils . KEYTOOL_PATH ) == null ) { throw new IOException ( "keytool<seq2seq4repair_space>application<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>found" ) ; } <START_BUG> return "keytool" ; <END_BUG> } private static boolean checkKeytool ( String keytoolPath ) { } }

Fix:
return KeyToolUtils . KEYTOOL_PATH ;
Buggy code:
public class AbstractFolderTstCase extends TestCase { private AddressbookFolder sourceFolder ; private AddressbookFolder destFolder ; private Set folders ; private static int folderId = 0 ; public AbstractFolderTstCase ( String arg0 ) { } protected void setUp ( ) throws Exception { File file = new File ( "test_config" ) ; file . mkdir ( ) ; new Config ( file ) ; Logging . DEBUG = true ; Logging . createDefaultHandler ( ) ; new AddressbookMain ( ) ; <START_BUG> PluginManager . getInstance ( ) . initPlugins ( ) ; <END_BUG> folders = new HashSet ( ) ; sourceFolder = FolderTstFactory . createFolder ( ( ( AbstractFolderTstCase . folderId ) ++ ) ) ; folders . add ( sourceFolder ) ; destFolder = FolderTstFactory . createFolder ( ( ( AbstractFolderTstCase . folderId ) ++ ) ) ; folders . add ( destFolder ) ; } protected void tearDown ( ) throws Exception { } public AddressbookFolder getDestFolder ( ) { } public AddressbookFolder getSourceFolder ( ) { } }

Fix:
PluginManager . getInstance ( ) . initCorePlugins ( ) ;
Buggy code:
public class ButtonFlat extends Button { TextView textButton ; public ButtonFlat ( Context context , AttributeSet attrs ) { } protected void setDefaultProperties ( ) { } @ Override protected void setAttributes ( AttributeSet attrs ) { } @ Override protected void onDraw ( Canvas canvas ) { super . onDraw ( canvas ) ; if ( ( x ) != ( - 1 ) ) { Paint paint = new Paint ( ) ; paint . setAntiAlias ( true ) ; paint . setColor ( makePressColor ( ) ) ; canvas . drawCircle ( x , y , radius , paint ) ; if ( ( radius ) > ( ( getHeight ( ) ) // ( rippleSize ) ) ) radius += rippleSpeed ; if ( ( radius ) >= ( getWidth ( ) ) ) { x = - 1 ; y = - 1 ; radius = ( getHeight ( ) ) // ( rippleSize ) ; <START_BUG> if ( ( onClickListener ) != null ) <END_BUG> onClickListener . onClick ( this ) ; } invalidate ( ) ; } } @ Override protected int makePressColor ( ) { } public void setText ( String text ) { } public void setBackgroundColor ( int color ) { } @ Override public TextView getTextView ( ) { } public String getText ( ) { } }

Fix:
if ( ( ( onClickListener ) != null ) && ( clickAfterRipple ) )
Buggy code:
final class MetaDataBuilderJAXWS_EJB extends AbstractMetaDataBuilderEJB { @ Override protected void buildEnterpriseBeansMetaData ( final Deployment dep , final EJBArchiveMetaData ejbArchiveMD ) { if ( ! ( WSHelper . isJaxwsJseDeployment ( dep ) ) ) { final JBossWebMetaData jbossWebMD = WSHelper . getOptionalAttachment ( dep , JBossWebMetaData . class ) ; final String contextRoot = getContextRoot ( dep , jbossWebMD ) ; if ( contextRoot != null ) { final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData ( ) ; jseArchiveMD . setContextRoot ( contextRoot ) ; dep . addAttachment ( JSEArchiveMetaData . class , jseArchiveMD ) ; } } final JAXWSDeployment jaxwsDeployment = WSHelper . getRequiredAttachment ( dep , JAXWSDeployment . class ) ; final List < EJBMetaData > wsEjbsMD = new LinkedList < EJBMetaData > ( ) ; final JBossWebservicesMetaData jbossWebservicesMD = WSHelper . getOptionalAttachment ( dep , JBossWebservicesMetaData . class ) ; for ( final EJBEndpoint jbossEjbMD : jaxwsDeployment . getEjbEndpoints ( ) ) { <START_BUG> this . buildEnterpriseBeanMetaData ( wsEjbsMD , jbossEjbMD , jbossWebservicesMD ) ; <END_BUG> } ejbArchiveMD . setEnterpriseBeans ( wsEjbsMD ) ; } }

Fix:
buildEnterpriseBeanMetaData ( wsEjbsMD , jbossEjbMD , jbossWebservicesMD ) ;
Buggy code:
public class RaDeploymentActivator { public void activate ( final BootUpdateContext updateContext ) { <START_BUG> final ServiceTarget serviceTarget = updateContext . getBatchBuilder ( ) ; <END_BUG> MdrService mdrService = new MdrService ( ) ; serviceTarget . addService ( IRONJACAMAR_MDR , mdrService ) . install ( ) ; ResourceAdapterDeploymentRegistryService registryService = new ResourceAdapterDeploymentRegistryService ( ) ; serviceTarget . addService ( RESOURCE_ADAPTER_REGISTRY_SERVICE , registryService ) . install ( ) ; JndiStrategyService jndiStrategyService = new JndiStrategyService ( ) ; serviceTarget . addService ( JNDI_STRATEGY_SERVICE , jndiStrategyService ) . install ( ) ; updateContext . addDeploymentProcessor ( new RarConfigProcessor ( ) , RAR_CONFIG_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new RaDeploymentParsingProcessor ( ) , RA_DEPLOYMENT_PARSING_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new IronJacamarDeploymentParsingProcessor ( ) , IRON_JACAMAR_DEPLOYMENT_PARSING_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new ParsedRaDeploymentProcessor ( ) , PARSED_RA_DEPLOYMENT_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new org . jboss . as . connector . deployers . processors . RaXmlDeploymentProcessor ( mdrService . getValue ( ) ) , RA_XML_DEPLOYMENT_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new DsDependencyProcessor ( ) , DS_DEPENDENCY_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new DsDeploymentProcessor ( ) , DS_DEPLOYMENT_PROCESSOR ) ; updateContext . addDeploymentProcessor ( new RaNestedJarInlineProcessor ( ) , RA_NESTED_JAR_INLINE_PROCESSOR ) ; } }

Fix:
final ServiceTarget serviceTarget = updateContext . getServiceTarget ( ) ;
Buggy code:
public class SendMessageCommand extends FolderCommand { private SendMessageDialog sendMessageDialog ; private boolean showComposer = false ; private ComposerController composerController ; public SendMessageCommand ( DefaultCommandReference [ ] references ) { } private void showInvalidRecipientMessage ( String recipient ) { <START_BUG> String message = MailResourceLoader . getString ( "dialog" , "error" , "invalid_recipient" ) ; <END_BUG> String title = MailResourceLoader . getString ( "dialog" , "error" , "invalid_recipient_title" ) ; message = MessageFormat . format ( message , new Object [ ] { recipient } ) ; JOptionPane . showMessageDialog ( null , message , title , JOptionPane . ERROR_MESSAGE ) ; } private boolean validArguments ( ComposerCommandReference [ ] references ) { } public void execute ( WorkerStatusController worker ) throws Exception { } public void updateGUI ( ) throws Exception { } }

Fix:
String message = MailResourceLoader . getString ( "dialog" , "error" , recipient ) ;
Buggy code:
public class GranularWebFailoverTestCase extends ClusteredWebFailoverAbstractCase { @ Deployment ( name = DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_1 ) public static Archive < ? > deployment0 ( ) { } @ Deployment ( name = DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_2 ) public static Archive < ? > deployment1 ( ) { } private static Archive < ? > createDeployment ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "granular-distributable.war" ) ; war . addClass ( SimpleServlet . class ) ; war . setWebXML ( ClusteredWebSimpleTestCase . class . getPackage ( ) , "web.xml" ) ; war . addAsWebInfResource ( ClusteredWebSimpleTestCase . class . getPackage ( ) , "jboss-web_granular.xml" , "jboss-web.xml" ) ; war . addClasses ( ViewChangeListenerServlet . class , ViewChangeListener . class , ViewChangeListenerBean . class ) ; war . setManifest ( new StringAsset ( "Manifest-Version:<seq2seq4repair_space>1.0\nDependencies:<seq2seq4repair_space>org.jboss.msc,<seq2seq4repair_space>org.jboss.as.clustering.common,<seq2seq4repair_space>org.infinispan\n" ) ) ; <START_BUG> System . out . println ( war . toString ( true ) ) ; <END_BUG> return war ; } }

Fix:
log . info ( war . toString ( true ) ) ;
Buggy code:
public class LazilyCompactedRow extends AbstractCompactedRow implements IIterableColumns { private final List < SSTableIdentityIterator > rows ; private final CompactionController controller ; private final boolean shouldPurge ; private final DataOutputBuffer headerBuffer ; private ColumnFamily emptyColumnFamily ; private LazilyCompactedRow . LazyColumnIterator iter ; private int columnCount ; private long columnSerializedSize ; public LazilyCompactedRow ( CompactionController controller , List < SSTableIdentityIterator > rows ) { } public void write ( DataOutput out ) throws IOException { } public void update ( MessageDigest digest ) { } public boolean isEmpty ( ) { } public int getEstimatedColumnCount ( ) { } public AbstractType getComparator ( ) { } public Iterator < IColumn > iterator ( ) { } public int columnCount ( ) { } private class LazyColumnIterator extends ReducingIterator < IColumn , IColumn > { ColumnFamily container = emptyColumnFamily . cloneMeShallow ( ) ; long serializedSize = 4 ; int size = 0 ; public LazyColumnIterator ( Iterator < IColumn > source ) { } @ Override protected boolean isEqual ( IColumn o1 , IColumn o2 ) { } public void reduce ( IColumn current ) { } protected IColumn getReduced ( ) { assert ( container ) != null ; IColumn reduced = container . iterator ( ) . next ( ) ; ColumnFamily purged = ( shouldPurge ) ? ColumnFamilyStore . removeDeleted ( container , controller . gcBefore ) : container ; <START_BUG> if ( ( purged != null ) && ( purged . metadata ( ) . getDefaultValidator ( ) . isCommutative ( ) ) ) { <END_BUG> CounterColumn . removeOldShards ( purged , controller . gcBefore ) ; } if ( ( purged == null ) || ( ! ( purged . iterator ( ) . hasNext ( ) ) ) ) { container . clear ( ) ; return null ; } container . clear ( ) ; serializedSize += reduced . serializedSize ( ) ; ( size ) ++ ; return reduced ; } } }

Fix:
if ( ( ( shouldPurge ) && ( purged != null ) ) && ( purged . metadata ( ) . getDefaultValidator ( ) . isCommutative ( ) ) ) {
Buggy code:
public class inputParser { private PC currCharacter ; public PC getPC ( ) { } Room [ ] rooms ; public Room [ ] generateRooms ( File inputFile ) { try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder dBuilder = dbFactory . newDocumentBuilder ( ) ; Document doc = dBuilder . parse ( inputFile ) ; <START_BUG> String [ ] posits = new String [ ] { Door . EAST , Door . NORTH , Door . SOUTH , Door . WEST } ; <END_BUG> doc . getDocumentElement ( ) . normalize ( ) ; NodeList nList = doc . getElementsByTagName ( "room" ) ; rooms = new Room [ nList . getLength ( ) ] ; for ( int temp = 0 ; temp < ( nList . getLength ( ) ) ; temp ++ ) { Node nNode = nList . item ( temp ) ; if ( ( nNode . getNodeType ( ) ) == ( Node . ELEMENT_NODE ) ) { Element eElement = ( ( Element ) ( nNode ) ) ; String name = eElement . getAttribute ( "name" ) ; String description = eElement . getAttribute ( "description" ) ; String state = eElement . getAttribute ( "state" ) ; rooms [ temp ] = new Room ( name , description , state ) ; NodeList anis = eElement . getElementsByTagName ( "animal" ) ; for ( int aniTemp = 0 ; aniTemp < ( anis . getLength ( ) ) ; aniTemp ++ ) { Node aNode = anis . item ( aniTemp ) ; Element aElement = ( ( Element ) ( aNode ) ) ; String aniName = aElement . getAttribute ( "name" ) ; String aniDescription = aElement . getAttribute ( "description" ) ; rooms [ temp ] . insertCreature ( new Animal ( aniName , aniDescription , rooms [ temp ] ) ) ; } NodeList nNpc = eElement . getElementsByTagName ( "NPC" ) ; for ( int nPcTemp = 0 ; nPcTemp < ( nNpc . getLength ( ) ) ; nPcTemp ++ ) { Node aNode = nNpc . item ( nPcTemp ) ; Element nPcElement = ( ( Element ) ( aNode ) ) ; String nPCname = nPcElement . getAttribute ( "name" ) ; String nPcDescription = nPcElement . getAttribute ( "description" ) ; rooms [ temp ] . insertCreature ( new NPC ( nPCname , nPcDescription , rooms [ temp ] ) ) ; } NodeList pC = eElement . getElementsByTagName ( "PC" ) ; for ( int pCtemp = 0 ; pCtemp < ( pC . getLength ( ) ) ; pCtemp ++ ) { Node pNode = pC . item ( pCtemp ) ; Element pCElement = ( ( Element ) ( pNode ) ) ; String pcName = pCElement . getAttribute ( "name" ) ; String pCDescription = pCElement . getAttribute ( "description" ) ; currCharacter = new PC ( pcName , pCDescription , rooms [ temp ] ) ; rooms [ temp ] . setPlayer ( currCharacter ) ; } } } for ( int doorTemp = 0 ; doorTemp < ( nList . getLength ( ) ) ; doorTemp ++ ) { Node rNode = nList . item ( doorTemp ) ; if ( ( rNode . getNodeType ( ) ) == ( Node . ELEMENT_NODE ) ) { Room currRoom = rooms [ doorTemp ] ; Element rElement = ( ( Element ) ( rNode ) ) ; for ( String x : posits ) { rElement . getAttribute ( x ) ; for ( Room room : rooms ) { if ( room . getName ( ) . equals ( rElement . getAttribute ( x ) ) ) { currRoom . insertNeighbor ( room , x ) ; } } } } } } catch ( Exception e ) { System . out . println ( e ) ; return null ; } return rooms ; } No newline ; at end ; of file ; }

Fix:
String [ ] posits = new String [ ] { "north" , "south" , "east" , "west" } ;
Buggy code:
public class RaAdd extends AbstractAddStepHandler { static final RaAdd INSTANCE = new RaAdd ( ) ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override public void performRuntime ( final OperationContext context , ModelNode operation , ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { final ModelNode address = operation . require ( OP_ADDR ) ; final String name = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; final String archiveOrModuleName ; if ( ( ! ( model . hasDefined ( Constants . ARCHIVE . getName ( ) ) ) ) && ( ! ( model . hasDefined ( Constants . MODULE . getName ( ) ) ) ) ) { throw ROOT_LOGGER . archiveOrModuleRequired ( ) ; } if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { archiveOrModuleName = model . get ( Constants . ARCHIVE . getName ( ) ) . asString ( ) ; } else { archiveOrModuleName = model . get ( Constants . MODULE . getName ( ) ) . asString ( ) ; } ModifiableResourceAdapter resourceAdapter = RaOperationUtil . buildResourceAdaptersObject ( name , context , operation , archiveOrModuleName ) ; if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { RaOperationUtil . installRaServices ( context , verificationHandler , name , resourceAdapter , newControllers ) ; } else { RaOperationUtil . installRaServicesAndDeployFromModule ( context , verificationHandler , name , resourceAdapter , archiveOrModuleName , newControllers ) ; if ( context . isBooting ( ) ) { context . addStep ( new OperationStepHandler ( ) { public void execute ( final OperationContext context , ModelNode operation ) throws OperationFailedException { final ServiceVerificationHandler svh = new ServiceVerificationHandler ( ) ; ServiceName restartedServiceName = RaOperationUtil . restartIfPresent ( context , archiveOrModuleName , name , svh ) ; if ( restartedServiceName == null ) { <START_BUG> RaOperationUtil . activate ( context , name , archiveOrModuleName , svh ) ; <END_BUG> } context . addStep ( svh , VERIFY ) ; context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { try { RaOperationUtil . removeIfActive ( context , archiveOrModuleName , name ) ; } catch ( OperationFailedException e ) { } } } ) ; } } , RUNTIME ) ; } } } }

Fix:
RaOperationUtil . activate ( context , name , svh ) ;
Buggy code:
public class LoginActions extends CommonActions { private static Log logger = LogFactory . getLog ( SiteActions . class ) ; public static long refreshDuration = 25000 ; static final String SITE_VISIBILITY_PUBLIC = "public" ; protected static final String SITE_VISIBILITY_PRIVATE = "private" ; protected static final String SITE_VISIBILITY_MODERATED = "moderated" ; protected static final String UNIQUE_TESTDATA_STRING = "sync" ; public SharePage loginToShare ( WebDrone drone , String [ ] userInfo , String shareUrl ) { } public HtmlPage logout ( WebDrone drone ) { HtmlPage currentPage = null ; checkIfDriverIsNull ( drone ) ; try { SharePage page = drone . getCurrentPage ( ) . render ( ) ; <START_BUG> page . getNav ( ) . logout ( ) ; <END_BUG> } catch ( Exception e ) { LoginActions . logger . info ( ( "already<seq2seq4repair_space>logged<seq2seq4repair_space>out" + ( e . getMessage ( ) ) ) ) ; } return currentPage ; } }

Fix:
currentPage = page . getNav ( ) . logout ( ) . render ( ) ;
Buggy code:
public class EsbErrorDAOImpl implements EsbErrorDAO { private final EntityManager mgr ; private final AuditEventDAO auditDAO ; private final EncryptionUtil encrypter ; private static final Logger LOGGER = LoggerFactory . getLogger ( EsbErrorDAOImpl . class ) ; private static final String MESSAGE_PROPERTY_PAYLOAD_HASH = "esbPayloadHash" ; private Set < String > sortingFields = new HashSet < > ( ) ; private List < Configuration > nonViewableConfiguration = null ; private List < Configuration > partiallyViewableConfiguration = null ; public EsbErrorDAOImpl ( EntityManager mgr , AuditEventDAO auditDAO , EncryptionUtil encryptionUtil , JSONObject config ) { } public void create ( EsbMessage em , Map < String , List < String > > extractedHeaders ) { } private void maskSensitiveInfo ( EsbMessage em , EsbMessageEntity eme ) { em . setPayload ( em . getPayload ( ) . replaceAll ( "\n" , "" ) ) ; em . setPayload ( em . getPayload ( ) . replaceAll ( "\r" , "" ) ) ; em . setPayload ( em . getPayload ( ) . replaceAll ( "\t" , "" ) ) ; em . setPayload ( em . getPayload ( ) . replaceAll ( ">\\s*<" , "><" ) ) ; Map < String , String > matchedConfiguration = matchCriteria ( em , partiallyViewableConfiguration ) ; if ( matchedConfiguration != null ) { String parentTag = matchedConfiguration . get ( "sensitiveTag" ) ; Pattern pattern = Pattern . compile ( ( ( ( ( ( ( "<(" + parentTag ) + ")>((?!<(" ) + parentTag ) + ")>).)*<//(" ) + parentTag ) + ")>" ) ) ; Matcher matcher = pattern . matcher ( em . getPayload ( ) ) ; <START_BUG> ArrayList < String > sensitiveInformation = new ArrayList < > ( ) ; <END_BUG> while ( matcher . find ( ) ) { sensitiveInformation . add ( matcher . group ( 0 ) ) ; } matcher . reset ( ) ; String maskedText = matcher . replaceAll ( ( ( "<$1>" + ( matchedConfiguration . get ( "replacementText" ) ) ) + "<//$1>" ) ) ; eme . setErrorSensitiveInfo ( ConversionUtility . convertToEsbMessageSensitiveInfo ( encrypter , eme , sensitiveInformation ) ) ; eme . setPayload ( maskedText ) ; } } private void extractHeaders ( Map < String , List < String > > extractedHeaders , EsbMessageEntity eme ) { } @ Override public SearchResult findMessagesBySearchCriteria ( SearchCriteria criteria , Date fromDate , Date toDate , String sortField , Boolean sortAsc , Integer start , Integer maxResults ) { } private Query getQueryFromCriteria ( SearchCriteria criteria , String sortField , boolean sortAsc , Date fromDate , Date toDate , boolean countQuery ) { } @ Override public SearchResult getMessageById ( Long id ) { } private Map < String , String > matchCriteria ( EsbMessage message , List < Configuration > configurations ) { } public List < EsbMessageEntity > getMessagesByPayloadHash ( String payloadHash ) { } }

Fix:
List < String > sensitiveInformation = new ArrayList < > ( ) ;
Buggy code:
public class CheckEnv { public static void checkMCVersion ( ) { <START_BUG> if ( ( Loader . MC_VERSION ) == ( AMCoreProps . REQUIRED_MC_VERSION ) ) { <END_BUG> log . trace ( "Using<seq2seq4repair_space>MC<seq2seq4repair_space>Version<seq2seq4repair_space>1.7.10,<seq2seq4repair_space>proceed" ) ; } else { FMLLog . severe ( "Not<seq2seq4repair_space>using<seq2seq4repair_space>MC<seq2seq4repair_space>version<seq2seq4repair_space>1.7.10,<seq2seq4repair_space>aborting" ) ; System . gc ( ) ; System . exit ( ( - 1 ) ) ; } } }

Fix:
if ( ( Loader . MC_VERSION ) == ( AMCoreProps . MC_VERSION ) ) {
Buggy code:
public class ASTTypeVisitor extends AbstractPluginVisitor { protected String thisClassName = "" ; public String getClassName ( ) { } public void setClassName ( String className ) { } public String getFullClassName ( ) { } public String discardGenericType ( String name ) { } public boolean isInheritedClassName ( ITypeBinding binding , String name ) { } public String shortenQualifiedName ( String name ) { } public String shortenPackageName ( String fullName ) { String name = fullName . substring ( 0 , fullName . lastIndexOf ( '.' ) ) ; name = Bindings . removeBrackets ( name ) ; int index = name . indexOf ( "java.lang." ) ; char ch = 0 ; <START_BUG> if ( ( index != ( - 1 ) ) && ( ( ( name . indexOf ( '.' , ( index + 10 ) ) ) == ( - 1 ) ) || ( ( ( ch = name . charAt ( ( index + 10 ) ) ) >= 'A' ) && ( ch <= 'Z' ) ) ) ) { <END_BUG> if ( ( ( ( ! ( fullName . startsWith ( "java.lang.ref" ) ) ) && ( ! ( fullName . startsWith ( "java.lang.annotation" ) ) ) ) && ( ! ( fullName . startsWith ( "java.lang.instrument" ) ) ) ) && ( ! ( fullName . startsWith ( "java.lang.management" ) ) ) ) { name = name . substring ( 10 ) ; } } String swt = "org.eclipse.swt.SWT" ; index = name . indexOf ( swt ) ; if ( index != ( - 1 ) ) { String after = name . substring ( swt . length ( ) ) ; if ( ( ( after . length ( ) ) == 0 ) || ( after . startsWith ( "." ) ) ) { name = "$WT" + after ; } } else { String os = "org.eclipse.swt.internal.browser.OS" ; index = name . indexOf ( os ) ; if ( index != ( - 1 ) ) { String after = name . substring ( os . length ( ) ) ; if ( ( ( after . length ( ) ) == 0 ) || ( after . startsWith ( "." ) ) ) { name = "O$" + after ; } } } swt = "org.eclipse.swt" ; index = name . indexOf ( swt ) ; if ( index != ( - 1 ) ) { String after = name . substring ( swt . length ( ) ) ; name = "$wt" + after ; } return name ; } public String getTypeStringName ( Type type ) { } public String assureQualifiedName ( String name ) { } public boolean isIntegerType ( String type ) { } }

Fix:
if ( ( index == 0 ) && ( ( ( name . indexOf ( '.' , ( index + 10 ) ) ) == ( - 1 ) ) || ( ( ( ch = name . charAt ( ( index + 10 ) ) ) >= 'A' ) && ( ch <= 'Z' ) ) ) ) {
Buggy code:
public class AxisLayout extends Layout { private String m_field ; private int m_scale = Constants . LINEAR_SCALE ; private int m_axis = Constants . X_AXIS ; private int m_type = Constants . UNKNOWN ; private boolean m_modelSet = false ; private ValuedRangeModel m_model = null ; private Predicate m_filter = null ; private double m_min ; private double m_range ; private double [ ] m_dist = new double [ 2 ] ; public AxisLayout ( String group , String field ) { } public AxisLayout ( String group , String field , int axis ) { } public AxisLayout ( String group , String field , int axis , Predicate filter ) { } public void setDataField ( String field ) { } public String getDataField ( ) { } public void setRangeModel ( ValuedRangeModel model ) { } public ValuedRangeModel getRangeModel ( ) { } public void setFilter ( Predicate filter ) { } public Predicate getFilter ( ) { } public int getScale ( ) { } public void setScale ( int scale ) { } public int getAxis ( ) { } public void setAxis ( int axis ) { } public int getDataType ( ) { } public void setDataType ( int type ) { } public void run ( double frac ) { } protected int getDataType ( TupleSet ts ) { } private void setMinMax ( ) { } protected void set ( VisualItem item , double frac ) { } protected void numericalLayout ( TupleSet ts ) { } protected void ordinalLayout ( TupleSet ts ) { if ( ! ( m_modelSet ) ) { Object [ ] array = DataLib . ordinalArray ( ts , m_field ) ; if ( ( m_model ) == null ) { m_model = new ObjectRangeModel ( array ) ; } else { ( ( ObjectRangeModel ) ( m_model ) ) . setValueRange ( array ) ; } } ObjectRangeModel model = ( ( ObjectRangeModel ) ( m_model ) ) ; int start = model . getValue ( ) ; int end = start + ( model . getExtent ( ) ) ; double total = ( ( double ) ( end - start ) ) ; Iterator iter = m_vis . items ( m_group , m_filter ) ; while ( iter . hasNext ( ) ) { VisualItem item = ( ( VisualItem ) ( iter . next ( ) ) ) ; int order = ( model . getIndex ( item . get ( m_field ) ) ) - start ; <START_BUG> set ( item , ( order // total ) ) ; <END_BUG> } } }

Fix:
set ( item , ( total > 0.0 ? order // total : 0.5 ) ) ;
Buggy code:
public class ExportGenbank implements SequenceExporter { @ Override public boolean isType ( File f ) { } @ Override public void save ( OutputStream is , List < AnnotatedSequence > list ) throws IOException { PrintWriter pw = new PrintWriter ( is ) ; AnnotatedSequence seq = list . get ( 0 ) ; pw . print ( ( ( ( ( "LOCUS<seq2seq4repair_space>" + ( ExportGenbank . pad ( seq . name , 24 ) ) ) + "<seq2seq4repair_space>" ) + ( seq . getLength ( ) ) ) + "<seq2seq4repair_space>bp<seq2seq4repair_space>DNA<seq2seq4repair_space>" ) ) ; if ( seq . isCircular ) pw . print ( "circular" ) ; else pw . print ( "linear" ) ; pw . println ( ) ; pw . println ( "FEATURES<seq2seq4repair_space>Location//Qualifiers" ) ; for ( SeqAnnotation a : seq . annotations ) { pw . println ( ( ( ( "<seq2seq4repair_space>misc_feature<seq2seq4repair_space>" + ( ( a . getFrom ( ) ) + 1 ) ) + ".." ) + ( a . getTo ( ) ) ) ) ; pw . println ( ( ( "<seq2seq4repair_space>//label=\"" + ( a . name ) ) + "\"" ) ) ; pw . println ( ( "<seq2seq4repair_space>//ApEinfo_revcolor=#" + ( a . color . getColorAsRGBstring ( ) ) ) ) ; pw . println ( ( "<seq2seq4repair_space>//ApEinfo_fwdcolor=#" + ( a . color . getColorAsRGBstring ( ) ) ) ) ; } pw . println ( "ORIGIN" ) ; int colsize = 10 ; int perline = 60 ; for ( int start = 0 ; start < ( seq . getLength ( ) ) ; start += perline ) { pw . print ( "<seq2seq4repair_space>" ) ; for ( int j = 0 ; j < perline ; j += colsize ) { int s1 = Math . min ( seq . getLength ( ) , ( start + j ) ) ; int end = Math . min ( seq . getLength ( ) , ( ( start + j ) + colsize ) ) ; pw . print ( seq . getSequence ( ) . substring ( s1 , end ) ) ; pw . print ( "<seq2seq4repair_space>" ) ; } pw . println ( ) ; } pw . println ( "////" ) ; <START_BUG> pw . close ( ) ; <END_BUG> } private static String pad ( String s , int n ) { } }

Fix:
pw . flush ( ) ;
Buggy code:
public class FieldDoc extends ScoreDoc { public Comparable [ ] fields ; public FieldDoc ( int doc , float score ) { } public FieldDoc ( int doc , float score , Comparable [ ] fields ) { } @ Override public String toString ( ) { StringBuilder sb = new StringBuilder ( super . toString ( ) ) ; sb . append ( "[" ) ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { sb . append ( fields [ i ] ) . append ( ",<seq2seq4repair_space>" ) ; } sb . setLength ( ( ( sb . length ( ) ) - 2 ) ) ; sb . append ( "]" ) ; <START_BUG> return super . toString ( ) ; <END_BUG> } }

Fix:
return sb . toString ( ) ;
Buggy code:
public class KenLMState extends LMState { private static final Logger logger = LogManager . getLogger ( KenLMState . class . getName ( ) ) ; private final int [ ] state ; private final int hashCode ; public KenLMState ( double score , int [ ] state , int stateLength ) { } public int [ ] getState ( ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } @ Override public int length ( ) { } @ Override public String toString ( ) { <START_BUG> return String . format ( "%.6f\t%s" , score , Arrays . toString ( state ) ) ; <END_BUG> } }

Fix:
return String . format ( "%.6f<seq2seq4repair_space>(%s)" , score , Arrays . toString ( state ) ) ;
Buggy code:
public class WebDocument extends URLMessage { protected String mimeType ; protected byte [ ] document ; protected int resultCode ; protected int size ; protected String title ; public WebDocument ( URL url , String mimeType , byte [ ] document , int resultCode , URL referer , int size , String title ) { } public String getTitle ( ) { } public URL getUrl ( ) { } public int getSize ( ) { } public void setSize ( int size ) { } public void setDocument ( byte [ ] document ) { } public int getResultCode ( ) { } public void setResultCode ( int resultCode ) { } public byte [ ] getDocumentBytes ( ) { } public void setUrl ( URL url ) { } public void setMimeType ( String mimeType ) { } public String getMimeType ( ) { } public String getInfo ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( ( super . getInfo ( ) ) + "\t" ) + ( this . resultCode ) ) + "\t" ) + ( this . mimeType ) ) + "\t" ) + ( this . size ) ) + "\t" ) + "\"" ) + ( this . title . replace ( '\"' , ( ( char ) ( 255 ) ) ) . replace ( '\n' , '<seq2seq4repair_space>' ) . replace ( '\r' , '<seq2seq4repair_space>' ) ) ) + "\"" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( ( ( ( super . getInfo ( ) ) + "\t" ) + ( this . resultCode ) ) + "\t" ) + ( this . mimeType ) ) + "\t" ) + ( this . size ) ) + "\t" ) + "\"" ) + ( this . title . replace ( '\t' , '<seq2seq4repair_space>' ) . replace ( '\"' , ( ( char ) ( 255 ) ) ) . replace ( '\n' , '<seq2seq4repair_space>' ) . replace ( '\r' , '<seq2seq4repair_space>' ) ) ) + "\"" ;
Buggy code:
@ SuppressWarnings ( "serial" ) @ Bind ( uri = "//user//process" ) public class UserProcessApi extends GenericApi { private static final Logger logger = Logger . getLogger ( UserProcessApi . class . getName ( ) ) ; private static final String appPropertyId = "Api.UserProcess.ValidateData" ; @ Get public GenericResponse getUserProcess ( GenericRequest request ) { DataAccessor dataAccessor = DataAccessorFactory . getDataAccessor ( ) ; PersistenceManager pm = dataAccessor . getPersistenceManager ( ) ; AppProperty appProperty = dataAccessor . getAppProperty ( UserProcessApi . appPropertyId ) ; if ( appProperty == null ) { appProperty = dataAccessor . newAppProperty ( UserProcessApi . appPropertyId ) ; appProperty . setValue ( new Date ( 0 ) ) ; } GaeQueryBuilder gaeQueryBuilder = new GaeQueryBuilder ( pm . newQuery ( UserEntity . class ) ) ; gaeQueryBuilder . addFilter ( "signUpDate" , appProperty . getValue ( ) , GREATER_THAN ) ; gaeQueryBuilder . addOrdering ( "signUpDate" , true ) ; gaeQueryBuilder . setRange ( 0 , 1000 ) ; gaeQueryBuilder . setResult ( "id" ) ; Query query = gaeQueryBuilder . build ( ) ; List < Long > userIdList = ( ( List < Long > ) ( query . execute ( appProperty . getValue ( ) ) ) ) ; List < Task > taskList = new ArrayList < > ( userIdList . size ( ) ) ; for ( Long userId : userIdList ) { Task task = TaskQueueFactory . newTask ( ) . setUrl ( "//user//process" ) . addParam ( "userId" , userId . toString ( ) ) . addParam ( "validateData" , "true" ) ; taskList . add ( task ) ; } <START_BUG> TaskQueueFactory . getAuthorTaskQueue ( ) . addAll ( taskList ) ; <END_BUG> UserProcessApi . logger . log ( Level . INFO , ( ( "Added<seq2seq4repair_space>" + ( taskList . size ( ) ) ) + "<seq2seq4repair_space>tasks." ) ) ; appProperty . setValue ( dataAccessor . getUser ( userIdList . get ( ( ( userIdList . size ( ) ) - 1 ) ) ) . getSignUpDate ( ) ) ; dataAccessor . createOrUpdateAppProperty ( appProperty ) ; return new GenericResponse ( ) ; } @ Post public GenericResponse postUserProcess ( PostUserProcessRequest request ) throws InvalidArgumentException { } No newline ; at end ; of file ; }

Fix:
TaskQueueFactory . getUserTaskQueue ( ) . addAll ( taskList ) ;
Buggy code:
public class Radio < T > extends WebMarkupContainer < T > { private static final String ATTR_DISABLED = "disabled" ; private static final long serialVersionUID = 1L ; public Radio ( MarkupContainer parent , String id ) { } public Radio ( MarkupContainer parent , String id , IModel < T > model ) { } @ SuppressWarnings ( "unchecked" ) @ Override protected void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "radio" ) ; final RadioGroup group = Radio . findParent ( RadioGroup . class ) ; final String path = Radio . getPath ( ) ; if ( group == null ) { throw new WicketRuntimeException ( ( ( "Radio<seq2seq4repair_space>component<seq2seq4repair_space>[" + path ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>find<seq2seq4repair_space>its<seq2seq4repair_space>parent<seq2seq4repair_space>RadioGroup.<seq2seq4repair_space>All<seq2seq4repair_space>Radio<seq2seq4repair_space>components<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>child<seq2seq4repair_space>of<seq2seq4repair_space>or<seq2seq4repair_space>below<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>hierarchy<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>RadioGroup<seq2seq4repair_space>component." ) ) ; } final String relativePath = path . substring ( ( ( group . getPath ( ) . length ( ) ) + 1 ) ) ; tag . put ( "name" , group . getInputName ( ) ) ; tag . put ( "value" , relativePath ) ; if ( group . hasRawInput ( ) ) { String rawInput = group . getRawInput ( ) ; if ( ( rawInput != null ) && ( rawInput . equals ( relativePath ) ) ) { tag . put ( "checked" , "checked" ) ; } } else if ( Objects . equal ( group . getModelObject ( ) , Radio . 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" , ( ( ( ( "location.href='" + url ) + "&" ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ; <END_BUG> } } if ( ( ( ! ( isActionAuthorized ( ENABLE ) ) ) || ( ! ( Radio . isEnabled ( ) ) ) ) || ( ! ( group . isEnabled ( ) ) ) ) { tag . put ( Radio . ATTR_DISABLED , Radio . ATTR_DISABLED ) ; } } }

Fix:
tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + "&" ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ;
Buggy code:
class ProgressBarTab extends RangeTab { ProgressBar progressBar1 ; Group progressBarGroup ; Button smoothButton ; Button indeterminateButton ; ProgressBarTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Widget [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Selection" , "ToolTipText" } ; <END_BUG> } String getShortTabText ( ) { } String getTabText ( ) { } void setExampleWidgetState ( ) { } int getDefaultMaximum ( ) { } int getDefaultMinimum ( ) { } int getDefaultSelection ( ) { } void setWidgetMaximum ( ) { } void setWidgetMinimum ( ) { } void setWidgetSelection ( ) { } void updateSpinners ( ) { } }

Fix:
return new String [ ] { "Selection" , "State" , "ToolTipText" } ;
Buggy code:
public class MessageStatusExtractorTest { @ Test public final void testTokenizer ( ) throws IOException , ParseException { } @ Test public final void testTypicalGmailInboxHeaders ( ) throws IOException , ParseException { } private static List < String > unfoldAssertionLines ( List < String > assertions ) { List < String > unfoldedAssertions = Lists . newArrayListWithCapacity ( assertions . size ( ) ) ; for ( int i = 0 ; i < ( assertions . size ( ) ) ; i ++ ) { String assertion = assertions . get ( i ) ; <START_BUG> if ( ! ( assertion . endsWith ( "}" ) ) ) { <END_BUG> String next = assertions . get ( ( i + 1 ) ) ; if ( ! ( next . startsWith ( "MessageStatus{" ) ) ) { assertion += '\n' + next ; assertions . remove ( ( i + 1 ) ) ; } } unfoldedAssertions . add ( assertion ) ; } assertions = unfoldedAssertions ; return assertions ; } @ Test public final void alternateDateFormatRegex ( ) throws IOException , ParseException { } }

Fix:
while ( ! ( assertion . endsWith ( "}" ) ) ) {
Buggy code:
public final class PaneFolder { private CTabFolder tabFolder ; private Control titleAreaProxy ; private ViewForm viewForm ; private ProxyControl contentProxy ; private ProxyControl viewFormTopLeftProxy ; private ProxyControl viewFormTopRightProxy ; private ProxyControl viewFormTopCenterProxy ; private SizeCache topRightCache = new SizeCache ( ) ; private SizeCache topCenterCache = new SizeCache ( ) ; private SizeCache topLeftCache = new SizeCache ( ) ; private int tabPosition ; private boolean putTrimOnTop = true ; private List buttonListeners = new ArrayList ( 1 ) ; private int state = IStackPresentationSite . STATE_RESTORED ; private int mousedownState = - 1 ; private CTabFolder2Adapter expandListener = new CTabFolder2Adapter ( ) { public void minimize ( CTabFolderEvent event ) { } public void restore ( CTabFolderEvent event ) { } public void maximize ( CTabFolderEvent event ) { } public void close ( CTabFolderEvent event ) { } public void showList ( CTabFolderEvent event ) { } } ; private MouseListener mouseListener = new MouseAdapter ( ) { public void mouseDown ( MouseEvent e ) { } public void mouseDoubleClick ( MouseEvent e ) { } } ; public PaneFolder ( Composite parent , int flags ) { } public Composite getControl ( ) { } public void setTopCenter ( Control topCenter ) { } public void setTopRight ( Control topRight ) { } public void setTopLeft ( Control topLeft ) { } public void layout ( boolean flushCache ) { } public Rectangle getClientArea ( ) { } public int getState ( ) { } protected void notifyButtonListeners ( int buttonId ) { } protected void notifyShowListeners ( CTabFolderEvent event ) { } protected void notifyCloseListeners ( CTabItem tabItem ) { } public void setState ( int state ) { } public void addButtonListener ( PaneFolderButtonListener listener ) { } public void removeButtonListener ( PaneFolderButtonListener listener ) { } public void setTabPosition ( int newTabPosition ) { } public int getTabPosition ( ) { } public boolean isDisposed ( ) { } public CTabItem createItem ( int style , int index ) { } public void setSelection ( int selection ) { } public Rectangle computeTrim ( int i , int j , int k , int l ) { } public void setUnselectedCloseVisible ( boolean b ) { } public void setSelectionForeground ( Color fgColor ) { } public void setSelectionBackground ( Color [ ] bgColors , int [ ] percentages , boolean vertical ) { } public CTabItem getItem ( int idx ) { } public int getSelectionIndex ( ) { } public int getTabHeight ( ) { } public int indexOf ( CTabItem toFind ) { } public void setTabHeight ( int height ) { <START_BUG> tabFolder . setTabHeight ( ( height + 1 ) ) ; <END_BUG> } public int getItemCount ( ) { } public CTabItem [ ] getItems ( ) { } public CTabItem getItem ( Point toGet ) { } public CTabItem getSelection ( ) { } public void setMinimizeVisible ( boolean isVisible ) { } public void setMaximizeVisible ( boolean isVisible ) { } public void setSimpleTab ( boolean traditionalTab ) { } public void setUnselectedImageVisible ( boolean b ) { } public void setSingleTab ( boolean b ) { } }

Fix:
tabFolder . setTabHeight ( height ) ;
Buggy code:
public class MainGame extends BasicGameState { float gameTimer ; Context context ; Player player ; ArrayList < Button > buttons ; BackgroundObject skyBackground ; BackgroundObject grassBackground ; @ Override public void init ( GameContainer gc , StateBasedGame game ) throws SlickException { <START_BUG> context = new Context ( gc , gc . getGraphics ( ) , new Polygon ( new float [ ] { 0 , ( gc . getHeight ( ) ) // 1.25F , 0 , gc . getHeight ( ) } ) ) ; <END_BUG> buttons = new ArrayList < Button > ( ) ; } @ Override public void enter ( GameContainer gc , StateBasedGame game ) throws SlickException { } public void buttons ( GameContainer gc , StateBasedGame game ) throws SlickException { } @ Override public void update ( GameContainer gc , StateBasedGame game , int i ) throws SlickException { } @ Override public void render ( GameContainer gc , StateBasedGame game , Graphics g ) throws SlickException { } public boolean isPlayerDead ( ) { } @ Override public int getID ( ) { } No newline ; at end ; of file ; }

Fix:
context = new Context ( gc , gc . getGraphics ( ) , new Polygon ( new float [ ] { 0 , ( gc . getHeight ( ) ) // 1.5F , 0 , gc . getHeight ( ) } ) ) ;
Buggy code:
public class SuperMethodInvocation extends Expression { public static final ChildPropertyDescriptor QUALIFIER_PROPERTY = new ChildPropertyDescriptor ( SuperMethodInvocation . class , "qualifier" , Name . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( SuperMethodInvocation . class , "typeArguments" , Type . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( SuperMethodInvocation . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( SuperMethodInvocation . class , "arguments" , Expression . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private Name optionalQualifier = null ; private ASTNode . NodeList typeArguments = null ; private SimpleName methodName = null ; private ASTNode . NodeList arguments = new ASTNode . NodeList ( SuperMethodInvocation . ARGUMENTS_PROPERTY ) ; SuperMethodInvocation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Name getQualifier ( ) { } public void setQualifier ( Name name ) { } public List typeArguments ( ) { } public SimpleName getName ( ) { if ( ( this . methodName ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . methodName ) == null ) { preLazyInit ( ) ; this . methodName = new SimpleName ( this . ast ) ; postLazyInit ( this . methodName , SuperMethodInvocation . NAME_PROPERTY ) ; } } } return this . methodName ; } public void setName ( SimpleName name ) { } public List arguments ( ) { } public IMethodBinding resolveMethodBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class Translator { TreeNode r ; private Map < String , Lexeme > variablesTable ; private Map < String , Lexeme > constantsTable ; private int expressionCounter = 0 ; private CommandSet expressionSet = null ; public Translator ( TreeNode r , Map < String , Lexeme > variablesTable , Map < String , Lexeme > constantsTable ) { } public CommandSet translate ( ) { } public String translateVar ( ) { } private CommandSet translateBody ( TreeNode root ) { } private CommandSet translatePrint ( TreeNode root ) { } private CommandSet translateTest ( TreeNode root ) { } private CommandSet translateIteration ( TreeNode root ) { } private CommandSet translateSelection ( TreeNode root ) { TreeNode left = root . getChildren ( ) . get ( 0 ) ; TreeNode right = root . getChildren ( ) . get ( 1 ) ; CommandSet leftSet = translateBody ( left ) ; CommandSet rightSet = translateBody ( right ) ; int maxLeft = leftSet . getMax ( ) ; rightSet . addToLabels ( ( maxLeft + 1 ) ) ; int maxRight = rightSet . getMax ( ) ; rightSet . addNextLabelToLast ( ( maxRight + 1 ) ) ; leftSet . addNextLabelToLast ( ( maxRight + 1 ) ) ; Command jumpEnd = new Command ( ( maxRight + 1 ) , "\\jmp" ) ; Command jumpStart = new Command ( ( - 1 ) , "\\jmp" ) ; <START_BUG> jumpStart . addNextCommand ( 1 ) ; <END_BUG> jumpStart . addNextCommand ( ( maxLeft + 1 ) ) ; leftSet . addAll ( rightSet ) ; leftSet . addCommand ( jumpEnd ) ; leftSet . addBefore ( jumpStart ) ; leftSet . addToLabels ( 1 ) ; return leftSet ; } private CommandSet translateSuccessively ( TreeNode root ) { } private CommandSet translateAssignment ( TreeNode root ) { } private void translateExpression ( TreeNode root ) { } public Map < String , Lexeme > getVariablesTable ( ) { } }

Fix:
jumpStart . addNextCommand ( 0 ) ;