nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Component ( immediate = true , service = WebHandler . class ) public final class PortalForwardHandler extends BaseWebHandler { private static final String PREFIX = "//admin//portal" ; private static final String EDIT_PREFIX = ( PortalForwardHandler . PREFIX ) + "//edit//" ; private static final String PREVIEW_PREFIX = ( PortalForwardHandler . PREFIX ) + "//preview//" ; public PortalForwardHandler ( ) { } @ Override protected boolean canHandle ( final HttpServletRequest req ) { } @ Override protected void doHandle ( final HttpServletRequest req , final HttpServletResponse res , final WebHandlerChain chain ) throws Exception { } private void forwardToPortal ( final RenderMode mode , final String path , final HttpServletRequest req , final HttpServletResponse res ) throws Exception { final PortalContext context = new PortalContext ( ) ; <START_BUG> context . setBaseUri ( PortalForwardHandler . PREFIX ) ; <END_BUG> context . setMode ( mode ) ; PortalContextAccessor . set ( req , context ) ; final RequestDispatcher dispatcher = req . getRequestDispatcher ( ( "//portal//" + path ) ) ; dispatcher . forward ( req , res ) ; } }

Fix:
context . setBaseUri ( ( ( ( PortalForwardHandler . PREFIX ) + "//" ) + ( mode . toString ( ) ) ) ) ;
Buggy code:
public class MicroblockTest extends NovaLauncherTest { @ Override public Set < Class < ? > > getTestModClasses ( ) { } @ Override public void doLaunchAssert ( NovaLauncher launcher ) { } @ Test public void testMicroblockInjection ( ) { } @ Test public void testMicroblockPlacement ( ) { } @ Test public void testMultiblockPlacement ( ) { } @ Test public void testMultiMicroblock1 ( ) { NovaLauncher launcher = createLauncher ( ) ; FakeWorld fakeWorld = new FakeWorld ( ) ; Vector3i testPosition = new Vector3i ( 5 , 5 , 5 ) ; MicroblockAPI . MicroblockInjectFactory injectionFactory = ( ( MicroblockAPI . MicroblockInjectFactory ) ( TestMicroblockMod . multiMicroblock1 ) ) ; MicroblockOperation microblockOperation = new MicroblockOperation ( fakeWorld , injectionFactory . containedFactory . makeBlock ( ) , testPosition , new Vector3i ( 0 , 0 , 0 ) ) ; assertThat ( microblockOperation . setBlock ( ) ) . isTrue ( ) ; Block blockA = fakeWorld . getBlock ( testPosition ) . get ( ) ; Block blockB = fakeWorld . getBlock ( testPosition . add ( yAxis ) ) . get ( ) ; Block [ ] multiblocks = new Block [ ] { blockA , blockB } ; Arrays . stream ( multiblocks ) . forEach ( ( block ) -> { assertThat ( block . getID ( ) ) . isEqualTo ( TestMicroblockMod . containerID ) ; assertThat ( block . has ( . class ) ) . isTrue ( ) ; } ) ; MicroblockContainer microblockContainerA = blockA . get ( MicroblockContainer . class ) ; <START_BUG> int sub = microblockContainerA . subdivisions ; <END_BUG> assertThat ( microblockContainerA . map ( ) . size ( ) ) . isEqualTo ( ( ( sub * sub ) * sub ) ) ; Microblock sampleA = microblockContainerA . get ( new Vector3i ( 0 , 0 , 0 ) ) . get ( ) ; forEachPos ( zero , one . multiply ( sub ) , ( pos ) -> assertThat ( microblockContainerA . get ( pos ) ) . contains ( sampleA ) ) ; MicroblockContainer microblockContainerB = blockB . get ( MicroblockContainer . class ) ; Microblock sampleB = microblockContainerB . get ( new Vector3i ( 0 , 0 , 0 ) ) . get ( ) ; assertThat ( microblockContainerB . map ( ) . size ( ) ) . isEqualTo ( ( ( ( sub * sub ) // 2 ) * sub ) ) ; forEachPos ( zero , new Vector3i ( sub , ( sub // 2 ) , sub ) , ( pos ) -> assertThat ( microblockContainerB . get ( pos ) ) . contains ( sampleB ) ) ; forEachPos ( new Vector3i ( sub , ( sub // 2 ) , sub ) , one . multiply ( sub ) , ( pos ) -> assertThat ( microblockContainerB . get ( pos ) ) . isEmpty ( ) ) ; } public void forEachPos ( Vector3i min , Vector3i max , Consumer < Vector3i > consumer ) { } }

Fix:
int sub = microblockContainerA . subdivision ;
Buggy code:
public class HUD { private Node hud = new Node ( ) ; private void setBackgroundLayer ( AssetManager assetManager , AppSettings settings ) { } private void setTextLayer ( AssetManager assetManager , BitmapFont guiFont , AppSettings settings , ArrayList < BitmapText > hudList ) { BitmapText heliNameText = new BitmapText ( guiFont , false ) ; heliNameText . setSize ( ( ( settings . getHeight ( ) ) // 45 ) ) ; heliNameText . setColor ( White ) ; <START_BUG> heliNameText . setText ( "Helicopter" ) ; <END_BUG> heliNameText . setLocalTranslation ( 0 , ( ( heliNameText . getLineHeight ( ) ) * 6 ) , 0 ) ; hud . attachChild ( heliNameText ) ; BitmapText speedText = new BitmapText ( guiFont , false ) ; speedText . setSize ( ( ( settings . getHeight ( ) ) // 45 ) ) ; speedText . setColor ( White ) ; speedText . setText ( ( "Speed:<seq2seq4repair_space>" + "<seq2seq4repair_space>mph" ) ) ; speedText . setLocalTranslation ( 0 , ( ( speedText . getLineHeight ( ) ) * 5 ) , 0 ) ; hud . attachChild ( speedText ) ; BitmapText altitudeText = new BitmapText ( guiFont , false ) ; altitudeText . setSize ( ( ( settings . getHeight ( ) ) // 45 ) ) ; altitudeText . setColor ( White ) ; altitudeText . setText ( "Height:" ) ; altitudeText . setLocalTranslation ( 0 , ( ( altitudeText . getLineHeight ( ) ) * 4 ) , 0 ) ; hud . attachChild ( altitudeText ) ; BitmapText posText = new BitmapText ( guiFont , false ) ; posText . setSize ( ( ( settings . getHeight ( ) ) // 45 ) ) ; posText . setColor ( White ) ; posText . setText ( "Position:" ) ; posText . setLocalTranslation ( 0 , ( ( posText . getLineHeight ( ) ) * 3 ) , 0 ) ; hud . attachChild ( posText ) ; BitmapText timeText = new BitmapText ( guiFont , false ) ; timeText . setSize ( ( ( settings . getHeight ( ) ) // 45 ) ) ; timeText . setColor ( White ) ; timeText . setText ( "" ) ; timeText . setLocalTranslation ( 0 , ( ( timeText . getLineHeight ( ) ) * 2 ) , 0 ) ; hud . attachChild ( timeText ) ; BitmapText popText = new BitmapText ( guiFont , false ) ; popText . setSize ( ( ( settings . getHeight ( ) ) // 45 ) ) ; popText . setColor ( White ) ; popText . setText ( "" ) ; popText . setLocalTranslation ( 0 , popText . getLineHeight ( ) , 0 ) ; hud . attachChild ( popText ) ; hudList . add ( heliNameText ) ; hudList . add ( speedText ) ; hudList . add ( altitudeText ) ; hudList . add ( posText ) ; hudList . add ( timeText ) ; hudList . add ( popText ) ; } public Node createHUD ( AssetManager assetManager , BitmapFont guiFont , AppSettings settings , ArrayList < BitmapText > hudList ) { } }

Fix:
heliNameText . setText ( "Helicopter:<seq2seq4repair_space>" ) ;
Buggy code:
public class AccountCreationServlet extends HttpServlet { private static final long serialVersionUID = 1L ; protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { String instName = req . getParameter ( "institutionName" ) ; String accountName = req . getParameter ( "accountName" ) ; String password = req . getParameter ( "password" ) ; String passwordCheck = req . getParameter ( "passwordConfirm" ) ; String error = null ; AccountCreationController controller = new AccountCreationController ( ) ; controller . createAccount ( instName , accountName , password , passwordCheck ) ; req . setAttribute ( "create" , controller ) ; <START_BUG> if ( ( ! ( controller . passwordsMatching ( ) ) ) && ( controller . done ( ) ) ) { <END_BUG> System . out . println ( "done" ) ; req . getRequestDispatcher ( "//_view//adminHomePage.jsp" ) . forward ( req , resp ) ; } else { if ( ! ( controller . passwordsMatching ( ) ) ) { if ( error == null ) error = "Errors<seq2seq4repair_space>:" ; error += "*Password<seq2seq4repair_space>mismatch<seq2seq4repair_space>-<seq2seq4repair_space>please<seq2seq4repair_space>make<seq2seq4repair_space>sure<seq2seq4repair_space>your<seq2seq4repair_space>password<seq2seq4repair_space>is<seq2seq4repair_space>typed<seq2seq4repair_space>correctly<seq2seq4repair_space>\n" ; } if ( controller . instAlreadyExists ( ) ) { if ( error == null ) error = "Errors<seq2seq4repair_space>:" ; error += "*This<seq2seq4repair_space>institution<seq2seq4repair_space>already<seq2seq4repair_space>exists,<seq2seq4repair_space>please<seq2seq4repair_space>conact<seq2seq4repair_space>admin<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>account<seq2seq4repair_space>\n" ; } req . setAttribute ( "errorMessage" , error ) ; req . getRequestDispatcher ( "//_view//accountCreation.jsp" ) . forward ( req , resp ) ; } } }

Fix:
if ( ( controller . passwordsMatching ( ) ) && ( controller . done ( ) ) ) {
Buggy code:
final class TimedResult < T > { final Duration duration ; final T result ; TimedResult ( final Duration duration , final T result ) { } public static < T > Supplier < TimedResult < T > > of ( final Supplier < ? extends T > supplier , final Clock clock ) { } public static < T , R > Function < T , TimedResult < R > > of ( final Function < ? super T , ? extends R > function , final Clock clock ) { return ( value ) -> { <START_BUG> final Timer timer = Timer . of ( ) . start ( ) ; <END_BUG> final R result = function . apply ( value ) ; return new TimedResult ( timer . stop ( ) . getTime ( ) , result ) ; } ; } }

Fix:
final Timer timer = Timer . of ( clock ) . start ( ) ;
Buggy code:
public class HeapNode { private TstNode node ; private String builtWord ; public HeapNode ( TstNode node ) { } public HeapNode ( TstNode node , String startWord ) { } public String getBuiltWord ( ) { } public void setNode ( TstNode node ) { } public void addCharacter ( Character character ) { } public TstNode getNode ( ) { } public int compareTo ( HeapNode parent ) { } public HeapNode clone ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( "HeapNode{" + "builtWord='" ) + ( builtWord ) ) + '\'' ) + ",<seq2seq4repair_space>node=" ) + ( node . getCharacter ( ) ) ) + "|" ) + ( node . getSpecificWeight ( ) ) ) + '}' ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( "HeapNode{" + "builtWord=" ) + ( builtWord ) ) + ",<seq2seq4repair_space>node=" ) + ( node . getCharacter ( ) ) ) + "|" ) + ( node . getSpecificWeight ( ) ) ) + '}' ;
Buggy code:
public class TestMultiFieldQPHelper extends LuceneTestCase { public void testStopwordsParsing ( ) throws Exception { } private void assertStopQueryEquals ( String qtxt , String expectedRes ) throws Exception { } public void testSimple ( ) throws Exception { } public void testBoostsSimple ( ) throws Exception { } public void testStaticMethod1 ( ) throws QueryNodeException { } public void testStaticMethod2 ( ) throws QueryNodeException { } public void testStaticMethod2Old ( ) throws QueryNodeException { } public void testStaticMethod3 ( ) throws QueryNodeException { } public void testStaticMethod3Old ( ) throws QueryNodeException { } public void testAnalyzerReturningNull ( ) throws QueryNodeException { } public void testStopWordSearching ( ) throws Exception { Analyzer analyzer = new MockAnalyzer ( random ( ) ) ; Directory ramDir = newDirectory ( ) ; IndexWriter iw = new IndexWriter ( ramDir , newIndexWriterConfig ( TEST_VERSION_CURRENT , analyzer ) ) ; Document doc = new Document ( ) ; doc . add ( newTextField ( "body" , "blah<seq2seq4repair_space>the<seq2seq4repair_space>footest<seq2seq4repair_space>blah" , NO ) ) ; iw . addDocument ( doc ) ; <START_BUG> iw . close ( ) ; <END_BUG> StandardQueryParser mfqp = new StandardQueryParser ( ) ; mfqp . setMultiFields ( new String [ ] { "body" } ) ; mfqp . setAnalyzer ( analyzer ) ; mfqp . setDefaultOperator ( AND ) ; Query q = mfqp . parse ( "the<seq2seq4repair_space>footest" , null ) ; IndexReader ir = DirectoryReader . open ( ramDir ) ; IndexSearcher is = newSearcher ( ir ) ; ScoreDoc [ ] hits = is . search ( q , null , 1000 ) . scoreDocs ; assertEquals ( 1 , hits . length ) ; ir . close ( ) ; ramDir . close ( ) ; } private static class AnalyzerReturningNull extends Analyzer { MockAnalyzer stdAnalyzer = new MockAnalyzer ( random ( ) ) ; public AnalyzerReturningNull ( ) { } @ Override protected Reader initReader ( String fieldName , Reader reader ) { } @ Override public TokenStreamComponents createComponents ( String fieldName ) { } } }

Fix:
iw . shutdown ( ) ;
Buggy code:
public class ZatchBot extends PircBot { static String Master ; static String BotNick ; static String OpNick ; static String OpHostname ; static String LogsLocation ; boolean OpNickUsed = false ; boolean OpHostnameUsed ; boolean toggleLogs ; String [ ] OpNicks ; String [ ] OpHostnames ; public ZatchBot ( ) throws Exception { } protected void onJoin ( String channel , String sender , String login , String hostname ) { for ( int OpNumber = 0 ; OpNumber < ( OpNicks . length ) ; ++ OpNumber ) { if ( ( ( OpHostnameUsed ) == false ) && ( ( sender . equalsIgnoreCase ( ZatchBot . Master ) ) || ( sender . equalsIgnoreCase ( OpNicks [ OpNumber ] ) ) ) ) { op ( channel , sender ) ; } <START_BUG> if ( ( ( OpHostnameUsed ) == true ) && ( ( ( sender . equalsIgnoreCase ( ZatchBot . Master ) ) || ( ( ( OpNickUsed ) == true ) && ( sender . equalsIgnoreCase ( OpNicks [ OpNumber ] ) ) ) ) || ( ( OpNickUsed ) == false ) ) ) { <END_BUG> for ( int opHostnameNumber = 0 ; opHostnameNumber < ( OpHostnames . length ) ; ++ opHostnameNumber ) { if ( hostname . equals ( OpHostnames [ opHostnameNumber ] ) ) { op ( channel , sender ) ; } } } } String Hello = "Hello<seq2seq4repair_space>" ; if ( sender . equals ( ZatchBot . BotNick ) ) { sender = "" ; Hello = "" ; sendMessage ( channel , ( sender + Hello ) ) ; } else if ( sender . equalsIgnoreCase ( ZatchBot . Master ) ) { sendMessage ( channel , "MASTER!" ) ; } else { sendMessage ( channel , ( Hello + sender ) ) ; } } protected void onPart ( String channel , String sender , String login , String hostname ) { } protected void onPrivateMessage ( String sender , String login , String hostname , String message ) { } public void onMessage ( String channel , String sender , String login , String hostname , String message ) { } protected void onKick ( String channel , String kickerNick , String kickerLogin , String kickerHostname , String recipientNick , String reason ) { } protected void onDisconnect ( ) { } }

Fix:
if ( ( ( OpHostnameUsed ) == true ) && ( ( sender . equalsIgnoreCase ( ZatchBot . Master ) ) || ( ( ( ( OpNickUsed ) == true ) && ( sender . equalsIgnoreCase ( OpNicks [ OpNumber ] ) ) ) || ( ( OpNickUsed ) == false ) ) ) ) {
Buggy code:
public class TextPrefixFunction implements BstFunction { private final VM vm ; public TextPrefixFunction ( VM vm ) { } @ Override public void execute ( BstEntry context ) { Stack < Object > stack = vm . getStack ( ) ; if ( ( stack . size ( ) ) < 2 ) { throw new VMException ( "Not<seq2seq4repair_space>enough<seq2seq4repair_space>operands<seq2seq4repair_space>on<seq2seq4repair_space>stack<seq2seq4repair_space>for<seq2seq4repair_space>operation<seq2seq4repair_space>text.prefix$" ) ; } Object o1 = stack . pop ( ) ; Object o2 = stack . pop ( ) ; if ( ! ( o1 instanceof Integer ) ) { vm . warn ( "An<seq2seq4repair_space>integer<seq2seq4repair_space>is<seq2seq4repair_space>needed<seq2seq4repair_space>as<seq2seq4repair_space>first<seq2seq4repair_space>parameter<seq2seq4repair_space>to<seq2seq4repair_space>text.prefix$" ) ; stack . push ( "" ) ; return ; } <START_BUG> if ( ! ( o1 instanceof String ) ) { <END_BUG> vm . warn ( "A<seq2seq4repair_space>string<seq2seq4repair_space>is<seq2seq4repair_space>needed<seq2seq4repair_space>as<seq2seq4repair_space>second<seq2seq4repair_space>parameter<seq2seq4repair_space>to<seq2seq4repair_space>text.prefix$" ) ; stack . push ( "" ) ; return ; } stack . push ( BibtexTextPrefix . textPrefix ( ( ( Integer ) ( o1 ) ) , ( ( String ) ( o2 ) ) , vm ) ) ; } }

Fix:
if ( ! ( o2 instanceof String ) ) {
Buggy code:
public abstract class BaseMarkupFilter extends AbstractMarkupFilter { public BaseMarkupFilter ( ) { } public BaseMarkupFilter ( final IMarkupFilter parent ) { } public final MarkupElement nextTag ( ) throws ParseException { <START_BUG> final MarkupElement tag = getParent ( ) . nextTag ( ) ; <END_BUG> if ( tag == null ) { return tag ; } return nextTag ( ( ( ComponentTag ) ( tag ) ) ) ; } protected abstract MarkupElement nextTag ( ComponentTag tag ) throws ParseException { } }

Fix:
final MarkupElement tag = getNextFilter ( ) . nextTag ( ) ;
Buggy code:
public abstract class AbstractNode implements Cloneable , INode , IDumpable { protected int fOrder = - 1 ; protected INode [ ] fDependencies = AbstractNode . fgEmptyNodeList ; protected INode [ ] fDependents = AbstractNode . fgEmptyNodeList ; protected int fNumDependents = 0 ; protected static final INode [ ] fgEmptyNodeList = new INode [ 0 ] ; protected AbstractNode ( ) { } public void addDependent ( INode nodeThatDependsOnMe ) { } public void clearDependencies ( ) { } public abstract AbstractNode copy ( ) { } public void copyAddDependent ( INode nodeThatDependsOnMe ) { } INode copyWithoutReplacingDeps ( ) { } public void dump ( Dumper dumper ) { } public boolean equals ( Object o ) { <START_BUG> Assert . isTrue ( false , Util . bind ( "build.noEqualityForNodes" ) ) ; <END_BUG> return false ; } public INode [ ] getDependencies ( ) { } public INode [ ] getDependents ( ) { } int getFootprint ( ) { } public int getOrder ( ) { } private int getOrder ( int recursionLevel ) { } public abstract IType [ ] getTypes ( ) { } public void invalidateOrder ( ) { } public void removeDependency ( INode nodeThatIDependOn ) { } public void removeDependent ( INode nodeThatDependsOnMe ) { } void replaceDeps ( DependencyGraph graph ) { } public void setDependencies ( INode [ ] nodesThatIDependOn ) { } public void trace ( int recursionLevel , int refCount ) { } }

Fix:
Assert . isTrue ( false , "Internal<seq2seq4repair_space>Error<seq2seq4repair_space>-<seq2seq4repair_space>Equality<seq2seq4repair_space>not<seq2seq4repair_space>defined<seq2seq4repair_space>for<seq2seq4repair_space>dependency<seq2seq4repair_space>graph<seq2seq4repair_space>nodes" ) ;
Buggy code:
public class Krb5ConfServerSetupTask implements ServerSetupTask { private static Logger LOGGER = Logger . getLogger ( Krb5ConfServerSetupTask . class ) ; private static final File WORK_DIR = new File ( "SPNEGO-workdir" ) ; private static final String KRB5_CONF = "krb5.conf" ; private static final File KRB5_CONF_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , Krb5ConfServerSetupTask . KRB5_CONF ) ; public static final File HTTP_KEYTAB_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , "http.keytab" ) ; public static final File HNELSON_KEYTAB_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , "hnelson.keytab" ) ; public static final File JDUKE_KEYTAB_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , "jduke.keytab" ) ; private String origKrb5Conf ; private String origKrbDebug ; public void setup ( ManagementClient managementClient , String containerId ) throws Exception { } public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { } public static final String getKrb5ConfFullPath ( ) { } public static final String getKeyTabFullPath ( ) { } private void createKeytab ( final String principalName , final String passPhrase , final File keytabFile ) throws IOException { Krb5ConfServerSetupTask . LOGGER . info ( ( "Principal<seq2seq4repair_space>name:<seq2seq4repair_space>" + principalName ) ) ; final KerberosTime timeStamp = new KerberosTime ( ) ; DataOutputStream dos = null ; try { dos = new DataOutputStream ( new FileOutputStream ( keytabFile ) ) ; <START_BUG> dos . write ( VERSION_52 ) ; <END_BUG> for ( Map . Entry < EncryptionType , EncryptionKey > keyEntry : KerberosKeyFactory . getKerberosKeys ( principalName , passPhrase ) . entrySet ( ) ) { final EncryptionKey key = keyEntry . getValue ( ) ; final byte keyVersion = ( ( byte ) ( key . getKeyVersion ( ) ) ) ; final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; DataOutputStream entryDos = new DataOutputStream ( baos ) ; String [ ] spnSplit = principalName . split ( "@" ) ; String nameComponent = spnSplit [ 0 ] ; String realm = spnSplit [ 1 ] ; String [ ] nameComponents = nameComponent . split ( "//" ) ; try { entryDos . writeShort ( ( ( short ) ( nameComponents . length ) ) ) ; entryDos . writeUTF ( realm ) ; for ( String component : nameComponents ) { entryDos . writeUTF ( component ) ; } entryDos . writeInt ( 1 ) ; entryDos . writeInt ( ( ( int ) ( ( timeStamp . getTime ( ) ) // 1000 ) ) ) ; entryDos . write ( keyVersion ) ; entryDos . writeShort ( ( ( short ) ( key . getKeyType ( ) . getValue ( ) ) ) ) ; byte [ ] data = key . getKeyValue ( ) ; entryDos . writeShort ( ( ( short ) ( data . length ) ) ) ; entryDos . write ( data ) ; } finally { IOUtils . closeQuietly ( entryDos ) ; } final byte [ ] entryBytes = baos . toByteArray ( ) ; dos . writeInt ( entryBytes . length ) ; dos . write ( entryBytes ) ; } } finally { IOUtils . closeQuietly ( dos ) ; } } }

Fix:
dos . write ( VERSION_0X502_BYTES ) ;
Buggy code:
public class InitializeDatabaseIntegrationTests { private String enabled ; private ClassPathXmlApplicationContext context ; @ Before public void init ( ) { } @ After public void after ( ) { } @ Test public void testCreateEmbeddedDatabase ( ) throws Exception { } @ Test ( expected = BadSqlGrammarException . class ) public void testDisableCreateEmbeddedDatabase ( ) throws Exception { } @ Test public void testIgnoreFailedDrops ( ) throws Exception { } @ Test public void testScriptNameWithPattern ( ) throws Exception { } @ Test public void testScriptNameWithPlaceholder ( ) throws Exception { } @ Test public void testScriptNameWithExpressions ( ) throws Exception { } @ Test public void testCacheInitialization ( ) throws Exception { } private void assertCorrectSetup ( DataSource dataSource ) { JdbcTemplate t = new JdbcTemplate ( dataSource ) ; <START_BUG> assertEquals ( 1 , t . queryForInt ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>T_TEST" ) ) ; <END_BUG> } public static class CacheData implements InitializingBean { private JdbcTemplate jdbcTemplate ; private List < Map < String , Object > > cache ; public void setDataSource ( DataSource dataSource ) { } public List < Map < String , Object > > getCachedData ( ) { } @ Override public void afterPropertiesSet ( ) throws Exception { } } }

Fix:
assertEquals ( 1 , t . queryForObject ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>T_TEST" , Integer . class ) . intValue ( ) ) ;
Buggy code:
public class IronJacamarDeploymentParsingProcessor implements DeploymentUnitProcessor { public IronJacamarDeploymentParsingProcessor ( ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final ResourceRoot resourceRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) ; final VirtualFile deploymentRoot = resourceRoot . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) return ; <START_BUG> final String deploymentRootName = deploymentRoot . getName ( ) ; <END_BUG> VirtualFile serviceXmlFile = null ; if ( deploymentRootName . endsWith ( ".rar" ) ) { serviceXmlFile = deploymentRoot . getChild ( "//META-INF//ironjacamar.xml" ) ; } if ( ( serviceXmlFile == null ) || ( ! ( serviceXmlFile . exists ( ) ) ) ) return ; InputStream xmlStream = null ; IronJacamar result = null ; try { xmlStream = serviceXmlFile . openStream ( ) ; result = new IronJacamarParser ( ) . parse ( xmlStream ) ; if ( result != null ) { IronJacamarXmlDescriptor xmlDescriptor = new IronJacamarXmlDescriptor ( result ) ; phaseContext . getDeploymentUnit ( ) . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ; } else throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) , e ) ; } finally { VFSUtils . safeClose ( xmlStream ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final String deploymentRootName = deploymentRoot . getLowerCaseName ( ) ;
Buggy code:
public abstract class AbstractValidator implements IValidator { public ValidationErrorMessage errorMessage ( final String input , final FormComponent component ) { } public ValidationErrorMessage errorMessage ( final String resourceKey , final IModel resourceModel , final String input , final FormComponent component ) { } public ValidationErrorMessage errorMessage ( final String resourceKey , final Map map , final String input , final FormComponent component ) { } public ValidationErrorMessage errorMessage ( final String resourceKey , final String input , final FormComponent component ) { } protected Map getMessageContextVariables ( final String input , final FormComponent component ) { <START_BUG> final Map resourceModel = new HashMap ( 2 ) ; <END_BUG> resourceModel . put ( "input" , input ) ; resourceModel . put ( "name" , component . getName ( ) ) ; return resourceModel ; } protected String getResourceKey ( final FormComponent component ) { } }

Fix:
final Map resourceModel = new HashMap ( 4 ) ;
Buggy code:
public interface ResourceInjection { void inject ( final Object target ) { } void uninject ( final Object target ) { } class Factory { public static < V > ResourceInjection create ( final ResourceInjectionConfiguration resourceConfiguration , final Class < ? > beanClass , final ClassReflectionIndex < ? > reflectionIndex , final Value < V > value ) { final Class < ? > argClass ; try { argClass = beanClass . getClassLoader ( ) . loadClass ( resourceConfiguration . getInjectedType ( ) ) ; } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException ( "Invalid<seq2seq4repair_space>resource<seq2seq4repair_space>injection<seq2seq4repair_space>configuration." , e ) ; } switch ( resourceConfiguration . getTargetType ( ) ) { case FIELD : { final Field field = reflectionIndex . getField ( resourceConfiguration . getName ( ) ) ; <START_BUG> return new FieldResourceInjection < V > ( Values . immediateValue ( field ) , value , argClass . isPrimitive ( ) ) ; <END_BUG> } case METHOD : { final Method method = reflectionIndex . getMethod ( Void . class , resourceConfiguration . getName ( ) , argClass ) ; return new MethodResourceInjection < V > ( Values . immediateValue ( method ) , value , argClass . isPrimitive ( ) ) ; } default : { return null ; } } } } }

Fix:
return new FieldResourceInjection < V > ( field , value , argClass . isPrimitive ( ) ) ;
Buggy code:
public class GroovyElementCatalogLoader extends DiskGroovyLoader { private PreparedStmt stmt ; private Log logger = LogUtil . getLog ( getClass ( ) ) ; private boolean isLoaded = false ; private String path ; public GroovyElementCatalogLoader ( ServletContext servletContext ) { } @ Override public Object load ( ICS ics , String resourceName ) throws Exception { if ( ! ( isLoaded ) ) { bootEngine ( ics , path ) ; isLoaded = true ; } if ( logger . isDebugEnabled ( ) ) logger . debug ( ( "Loading<seq2seq4repair_space>groovy<seq2seq4repair_space>script<seq2seq4repair_space>" + resourceName ) ) ; if ( ics . IsElement ( resourceName ) ) { final StatementParam param = stmt . newParam ( ) ; param . setString ( 0 , resourceName ) ; Row row = SqlHelper . selectSingle ( ics , stmt , param ) ; String url = row . getString ( "url" ) ; String res1 = row . getString ( "resdetails1" ) ; String res2 = row . getString ( "resdetails2" ) ; Map < String , String > m = new HashMap < String , String > ( ) ; Utilities . getParams ( res1 , m , false ) ; Utilities . getParams ( res2 , m , false ) ; String tid = m . get ( "tid" ) ; String eid = m . get ( "eid" ) ; if ( StringUtils . isNotBlank ( tid ) ) { LogDep . logDep ( ics , "Template" , tid ) ; } <START_BUG> if ( StringUtils . isNotBlank ( tid ) ) { <END_BUG> LogDep . logDep ( ics , "CSElement" , eid ) ; } if ( url . endsWith ( ".groovy" ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( ( ( ( "Found<seq2seq4repair_space>element<seq2seq4repair_space>for<seq2seq4repair_space>" + resourceName ) + "<seq2seq4repair_space>=><seq2seq4repair_space>" ) + url ) ) ; } Class < ? > x = getGroovyScriptEngine ( ) . loadScriptByName ( url ) ; return x . newInstance ( ) ; } else { return super . load ( ics , resourceName ) ; } } else { return super . load ( ics , resourceName ) ; } } @ Override public void bootEngine ( final String path ) { } public void bootEngine ( ICS ics , final String path ) { } }

Fix:
if ( StringUtils . isNotBlank ( eid ) ) {
Buggy code:
public class TestTableEntity extends DatabaseTableEntity { public TestTableEntity ( String name , RestEntity parent ) { } @ Override protected RestEntity loadEntityWithID ( String id ) throws HttpException { <START_BUG> return new TestDatabaseEntity ( this , id ) ; <END_BUG> } @ Override public RestEntity Post ( Map < String , String > parameters ) throws HttpException { } @ Override public void Put ( Map < String , String > parameters ) throws HttpException { } @ Override protected void prepareDelete ( Map < String , String > parameters ) throws HttpException { } @ Override protected RestEntityList wrapIntoList ( String name , RestEntity parent , List < RestEntity > entities ) { } }

Fix:
return new TestDatabaseEntity ( ( ( getPath ( ) ) + "//" ) , id ) ;
Buggy code:
public class SequenceService extends SequenceRepository { private static final Logger LOG = LoggerFactory . getLogger ( SequenceService . class ) ; private LocalDate today ; private LocalDate refDate ; @ Inject public SequenceService ( ) { } public SequenceService ( LocalDate today ) { } public SequenceService setRefDate ( LocalDate refDate ) { } public Sequence getSequence ( String code ) { } public Sequence getSequence ( String code , Company company ) { } public String getSequenceNumber ( String code ) { } public String getSequenceNumber ( String code , Company company ) { } public boolean hasSequence ( String code , Company company ) { } @ Transactional ( rollbackOn = { AxelorException . class , Exception . class } ) public String getSequenceNumber ( Sequence sequence ) { } private boolean reset ( Sequence sequence ) { <START_BUG> if ( ( this . refDate ) == null ) { <END_BUG> return false ; } if ( ( ! ( sequence . getYearlyResetOk ( ) ) ) && ( ! ( sequence . getMonthlyResetOk ( ) ) ) ) { return false ; } if ( ! ( this . refDate . isAfter ( sequence . getResetDate ( ) ) ) ) { return false ; } if ( ( sequence . getYearlyResetOk ( ) ) && ( ! ( this . refDate . equals ( this . refDate . monthOfYear ( ) . withMinimumValue ( ) . dayOfMonth ( ) . withMinimumValue ( ) ) ) ) ) { return false ; } if ( ( sequence . getMonthlyResetOk ( ) ) && ( ! ( this . refDate . equals ( this . refDate . dayOfMonth ( ) . withMinimumValue ( ) ) ) ) ) { return false ; } sequence . setResetDate ( refDate ) ; sequence . setNextNum ( 1 ) ; return true ; } No newline ; at end ; of file ; }

Fix:
if ( ( ( this . refDate ) == null ) || ( ( sequence . getResetDate ( ) ) == null ) ) {
Buggy code:
public class SpongeMod extends DummyModContainer { public static SpongeMod instance ; private final Game game ; private Map < Object , PluginContainer > plugins = Maps . newHashMap ( ) ; private Map < String , PluginContainer > pluginIdMap = Maps . newHashMap ( ) ; private SpongeEventBus eventBus ; @ SuppressWarnings ( "unused" ) private LoadController controller ; private Injector spongeInjector = Guice . createInjector ( new SpongeGuiceModule ( ) ) ; private Logger logger ; private SpongeGameRegistry registry ; public SpongeMod ( ) { } public void registerPluginContainer ( SpongePluginContainer spongePluginContainer , String pluginId , Object instance ) { } public Collection < PluginContainer > getPlugins ( ) { } public PluginContainer getPlugin ( String s ) { } public PluginContainer getPluginContainer ( Object instance ) { } public Game getGame ( ) { } public Injector getInjector ( ) { } public Logger getLogger ( ) { } @ Override public boolean registerBus ( EventBus bus , LoadController controller ) { } @ Subscribe public void onPreInit ( FMLPreInitializationEvent e ) { this . logger = e . getModLog ( ) ; EVENT_BUS . register ( new SpongeEventHooks ( ) ) ; <START_BUG> FMLCommonHandler . instance ( ) . bus ( ) . register ( this . getGame ( ) . getScheduler ( ) ) ; <END_BUG> } @ Subscribe public void onInitialization ( FMLInitializationEvent e ) { } @ Subscribe public void onInitialization ( FMLPostInitializationEvent e ) { } }

Fix:
FMLCommonHandler . instance ( ) . bus ( ) . register ( this . getGame ( ) . getSyncScheduler ( ) ) ;
Buggy code:
public class CopyElementsOperation extends MultiOperation implements SuffixConstants { private Map sources = new HashMap ( ) ; public CopyElementsOperation ( IJavaElement [ ] elementsToCopy , IJavaElement [ ] destContainers , boolean force ) { } public CopyElementsOperation ( IJavaElement [ ] elementsToCopy , IJavaElement destContainer , boolean force ) { } protected String getMainTaskName ( ) { } protected JavaModelOperation getNestedOperation ( IJavaElement element ) { } private String getSourceFor ( IJavaElement element ) throws JavaModelException { } protected boolean isRenamingMainType ( IJavaElement element , IJavaElement dest ) throws JavaModelException { } protected void processElement ( IJavaElement element ) throws JavaModelException { JavaModelOperation op = getNestedOperation ( element ) ; boolean createElementInCUOperation = op instanceof CreateElementInCUOperation ; if ( op == null ) { return ; } if ( createElementInCUOperation ) { IJavaElement sibling = ( ( IJavaElement ) ( this . insertBeforeElements . get ( element ) ) ) ; if ( sibling != null ) { ( ( CreateElementInCUOperation ) ( op ) ) . setRelativePosition ( sibling , CreateElementInCUOperation . INSERT_BEFORE ) ; } else if ( isRename ( ) ) { IJavaElement anchor = resolveRenameAnchor ( element ) ; if ( anchor != null ) { ( ( CreateElementInCUOperation ) ( op ) ) . setRelativePosition ( anchor , CreateElementInCUOperation . INSERT_AFTER ) ; } } String newName = getNewNameFor ( element ) ; if ( newName != null ) { ( ( CreateElementInCUOperation ) ( op ) ) . setAlteredName ( newName ) ; } } executeNestedOperation ( op , 1 ) ; JavaElement destination = ( ( JavaElement ) ( getDestinationParent ( element ) ) ) ; ICompilationUnit unit = destination . getCompilationUnit ( ) ; if ( ! ( unit . isWorkingCopy ( ) ) ) { unit . close ( ) ; } if ( ( createElementInCUOperation && ( isMove ( ) ) ) && ( ! ( isRenamingMainType ( element , destination ) ) ) ) { <START_BUG> DeleteElementsOperation deleteOp = new DeleteElementsOperation ( new IJavaElement [ ] { element } , this . force ) ; <END_BUG> executeNestedOperation ( deleteOp , 1 ) ; } } private IJavaElement resolveRenameAnchor ( IJavaElement element ) throws JavaModelException { } protected IJavaModelStatus verify ( ) { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
JavaModelOperation deleteOp = new DeleteElementsOperation ( new IJavaElement [ ] { element } , this . force ) ;
Buggy code:
public class JoystickView extends View implements Runnable { private final double RAD = 57.2957795 ; public static final long DEFAULT_LOOP_INTERVAL = 100 ; public static final int FRONT = 3 ; public static final int FRONT_RIGHT = 4 ; public static final int RIGHT = 5 ; public static final int RIGHT_BOTTOM = 6 ; public static final int BOTTOM = 7 ; public static final int BOTTOM_LEFT = 8 ; public static final int LEFT = 1 ; public static final int LEFT_FRONT = 2 ; private JoystickView . OnJoystickMoveListener onJoystickMoveListener ; private Thread thread = new Thread ( this ) ; private long loopInterval = JoystickView . DEFAULT_LOOP_INTERVAL ; private int xPosition = 0 ; private int yPosition = 0 ; private double centerX = 0 ; private double centerY = 0 ; private Paint mainCircle ; private Paint secondaryCircle ; private Paint button ; private Paint horizontalLine ; private Paint verticalLine ; private int joystickRadius ; private int buttonRadius ; private int lastAngle = 0 ; private int lastPower = 0 ; private boolean XisAutoCenter = true ; private boolean YisAutoCenter = true ; public JoystickView ( Context context ) { } public JoystickView ( Context context , AttributeSet attrs ) { } public JoystickView ( Context context , AttributeSet attrs , int defaultStyle ) { } protected void initJoystickView ( ) { } @ Override protected void onFinishInflate ( ) { } @ Override protected void onSizeChanged ( int xNew , int yNew , int xOld , int yOld ) { super . onSizeChanged ( xNew , yNew , xOld , yOld ) ; xPosition = ( ( int ) ( getWidth ( ) ) ) // 2 ; <START_BUG> yPosition = ( ( int ) ( getWidth ( ) ) ) // 2 ; <END_BUG> int d = Math . min ( xNew , yNew ) ; buttonRadius = ( ( int ) ( ( d // 2 ) * 0.25 ) ) ; joystickRadius = ( ( int ) ( ( d // 2 ) * 0.75 ) ) ; } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } private int measure ( int measureSpec ) { } @ Override protected void onDraw ( Canvas canvas ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { } public void setXisAutoCenter ( boolean xisAutoCenter ) { } public void setYisAutoCenter ( boolean yisAutoCenter ) { } private int getAngle ( ) { } private int getPower ( ) { } private int getDirection ( ) { } public void setOnJoystickMoveListener ( JoystickView . OnJoystickMoveListener listener , long repeatInterval ) { } public static interface OnJoystickMoveListener { public void onValueChanged ( int xPosition , int yPosition ) { } } @ Override public void run ( ) { } }

Fix:
yPosition = ( ( int ) ( getHeight ( ) ) ) // 2 ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class WTPVEXValidator implements Validator { private static final long serialVersionUID = - 7632029717211069257L ; private static CMDocument contentModel ; public static CMDocument getContentModel ( ) { } public static void setContentModel ( CMDocument contentModel ) { } private CMDocument attributeContentModel ; private WTPVEXValidator ( ) { } public static WTPVEXValidator create ( URL url ) throws IOException { } public AttributeDefinition getAttributeDefinition ( String element , String attribute ) { } public AttributeDefinition [ ] getAttributeDefinitions ( String element ) { } private CMElementDeclaration getElementDeclaration ( String element ) { } private AttributeDefinition createAttributeDefinition ( CMAttributeDeclaration attribute ) { } public Set < String > getValidItems ( String element ) { } protected List < CMNode > getAvailableContent ( String element , CMElementDeclaration ed ) { } private List < CMNode > getAllChildren ( CMGroup group ) { } public Set getValidRootElements ( ) { } <START_BUG> public boolean isValidSequence ( String element , String [ ] nodes , boolean partial ) { <END_BUG> return true ; } public boolean isValidSequence ( String element , String [ ] seq1 , String [ ] seq2 , String [ ] seq3 , boolean partial ) { } }

Fix:
public boolean isValidSequence ( String element , List < String > nodes , boolean partial ) {
Buggy code:
public class AssistCompilationUnit extends CompilationUnit { private Map infoCache ; private Map bindingCache ; public AssistCompilationUnit ( ICompilationUnit compilationUnit , WorkingCopyOwner owner , Map bindingCache , Map infoCache ) { } public Object getElementInfo ( IProgressMonitor monitor ) throws JavaModelException { <START_BUG> return infoCache . get ( this ) ; <END_BUG> } public IImportContainer getImportContainer ( ) { } public IPackageDeclaration getPackageDeclaration ( String pkg ) { } public IType getType ( String typeName ) { } public boolean hasChildren ( ) throws JavaModelException { } }

Fix:
return this . infoCache . get ( this ) ;
Buggy code:
public class ThrowStatement extends Statement { public Expression exception ; public TypeBinding exceptionType ; public ThrowStatement ( Expression exception , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { exceptionType = exception . resolveTypeExpecting ( scope , scope . getJavaLangThrowable ( ) ) ; <START_BUG> if ( ( ( exceptionType ) == ( NullBinding ) ) && ( ( scope . environment ( ) . options . complianceLevel ) <= ( ClassFileConstants . JDK1_3 ) ) ) { <END_BUG> scope . problemReporter ( ) . cannotThrowNull ( this ) ; } exception . computeConversion ( scope , exceptionType , exceptionType ) ; } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ( exceptionType ) == ( NullBinding ) ) && ( ( scope . compilerOptions ( ) . complianceLevel ) <= ( ClassFileConstants . JDK1_3 ) ) ) {
Buggy code:
class EESubsystemXmlPersister implements XMLStreamConstants , XMLElementWriter < SubsystemMarshallingContext > { public static final EESubsystemXmlPersister INSTANCE = new EESubsystemXmlPersister ( ) ; private EESubsystemXmlPersister ( ) { } @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { context . startSubsystemElement ( EE_2_0 . getUriString ( ) , false ) ; ModelNode eeSubSystem = context . getModelNode ( ) ; GlobalModulesDefinition . INSTANCE . marshallAsElement ( eeSubSystem , writer ) ; EAR_SUBDEPLOYMENTS_ISOLATED . marshallAsElement ( eeSubSystem , writer ) ; SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ; JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ; <START_BUG> ANNOTATION_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ; <END_BUG> writeConcurrentElement ( writer , eeSubSystem ) ; writeDefaultBindingsElement ( writer , eeSubSystem ) ; writer . writeEndElement ( ) ; } private void writeConcurrentElement ( XMLExtendedStreamWriter writer , ModelNode eeSubSystem ) throws XMLStreamException { } private void writeContextServices ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeManagedThreadFactories ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeManagedExecutorServices ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeManagedScheduledExecutorServices ( final XMLExtendedStreamWriter writer , final ModelNode subModel ) throws XMLStreamException { } private void writeDefaultBindingsElement ( XMLExtendedStreamWriter writer , ModelNode eeSubSystem ) throws XMLStreamException { } }

Fix:
EJB_ANNOTATION_PROPERTY_REPLACEMENT . marshallAsElement ( eeSubSystem , writer ) ;
Buggy code:
public class ChecksumAlgorithm implements Algorithm { private String algorithm = "CRC" ; private Checksum checksum = null ; public void setAlgorithm ( String algorithm ) { } public void initChecksum ( ) { } public boolean isValid ( ) { } public String getValue ( File file ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> buf . append ( "<ChecksumAlgorithm:" ) ; buf . append ( "algorithm=" ) . append ( algorithm ) ; buf . append ( ">" ) ; return buf . toString ( ) ; } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public final class LogitechDualAction extends RepeatingSubsystem implements Gamepad { public enum LogitechControl implements Control { LEFT_STICK , RIGHT_STICK , DPAD ; @ Override public int getIdentifier ( final Axis axis ) { } } public enum LogitechButton implements Button { LEFT_BUMPER , RIGHT_BUMPER , LEFT_TRIGGER , RIGHT_TRIGGER , SELECT , START ; @ Override public int getIdentifier ( ) { } } public enum LogitechAxis implements Axis { X , Y , Z ; @ Override public int getIdentifier ( ) { } } private final GenericHID backingHID ; private final Map < Control , JoystickMode > controlsModeMap = new HashMap < > ( ) ; private final Map < LogitechDualAction . Binding , Runnable > buttonBindings = new HashMap < > ( ) ; private final Map < Button , Boolean > buttonStates = new HashMap < > ( ) ; private final int port ; public LogitechDualAction ( final int port ) { } @ Override public GenericHID getBackingHID ( ) { } @ Override public int getPort ( ) { } @ Override public double getValue ( final Control control , final Axis axis ) { } @ Override public boolean getButton ( final Button button ) { } @ Override public void setMode ( final Control control , final JoystickMode joystickMode ) { } @ Override public void bind ( final Button button , final PressType pressType , final Runnable binding ) { Objects . requireNonNull ( button ) ; Objects . requireNonNull ( pressType ) ; Objects . requireNonNull ( binding ) ; if ( ! ( button instanceof LogitechDualAction . LogitechButton ) ) { <START_BUG> System . err . println ( ( ( ( "Gamepad<seq2seq4repair_space>on<seq2seq4repair_space>port<seq2seq4repair_space>" + ( this . port ) ) + "<seq2seq4repair_space>unbind()<seq2seq4repair_space>called<seq2seq4repair_space>with<seq2seq4repair_space>invalid<seq2seq4repair_space>button<seq2seq4repair_space>" ) + button ) ) ; <END_BUG> } buttonBindings . put ( new LogitechDualAction . Binding ( button , pressType ) , binding ) ; } @ Override public void unbind ( final Button button , final PressType pressType ) { } @ Override public boolean hasBinding ( final Button button , final PressType pressType ) { } @ Override public void enableBindings ( ) { } @ Override public void disableBindings ( ) { } @ Override protected void defineResources ( ) { } @ Override protected void task ( ) throws Exception { } private static class Binding { private final Button button ; private final PressType pressType ; public Binding ( final Button button , final PressType pressType ) { } public Button getButton ( ) { } public PressType getPressType ( ) { } @ Override public boolean equals ( final Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
System . err . println ( ( ( ( "Gamepad<seq2seq4repair_space>on<seq2seq4repair_space>port<seq2seq4repair_space>" + ( this . port ) ) + "<seq2seq4repair_space>bind()<seq2seq4repair_space>called<seq2seq4repair_space>with<seq2seq4repair_space>invalid<seq2seq4repair_space>button<seq2seq4repair_space>" ) + button ) ) ;
Buggy code:
public class GzipTest { @ BeforeClass public static void setup ( ) { <START_BUG> Spark . staticFileLocation ( "//public" ) ; <END_BUG> GzipExample . addRoutes ( ) ; Spark . awaitInitialization ( ) ; } @ AfterClass public static void tearDown ( ) { } @ Test public void checkGzipCompression ( ) throws Exception { } @ Test public void testStaticFileCssStyleCss ( ) throws Exception { } private static void testGet ( ) throws Exception { } }

Fix:
GzipExample . addStaticFileLocation ( ) ;
Buggy code:
public class SudokuPointedStrategy implements SudokuStrategy { Logger log = Logger . getLogger ( SudokuPointedStrategy . class ) ; private long elapsedTime = 0L ; @ Override public SudokuModel applyStrategy ( SudokuModel model , int x , int y ) { } private Map < Integer , Integer > countSubSquareColumnInstances ( SudokuModel model , int x , int y , int columnIndex ) { } private Map < Integer , Integer > countSubSquareInstances ( SudokuModel model , int x , int y ) { } private Map < Integer , Integer > countSubSquareRowInstances ( SudokuModel model , int x , int y , int rowIndex ) { } private void updateInstanceCount ( Map < Integer , Integer > count , Integer number ) { } private boolean isPointedPairInRow ( SudokuModel model , int x , int y , int rowIndex , int number ) { for ( int i = 0 ; i < ( SudokuModel . SIZE ) ; i ++ ) { <START_BUG> if ( ( i < x ) || ( i > ( x + 3 ) ) ) { <END_BUG> Set < Integer > currentSet = model . getSet ( i , ( y + rowIndex ) ) ; if ( currentSet . contains ( number ) ) { return true ; } } } return false ; } private boolean isPointedPairInColumn ( SudokuModel model , int x , int y , int columnIndex , int number ) { } private SudokuModel removePointedNumberFromRow ( SudokuModel model , int x , int y , int rowIndex , int number ) { } private SudokuModel removePointedNumberFromColumn ( SudokuModel model , int x , int y , int columnIndex , int number ) { } private SudokuModel removePointedNumberFromSubSquare ( SudokuModel model , int x , int y , int columnIndex , int rowIndex , int number ) { } @ Override public String getName ( ) { } @ Override public long getElapsedTimeInStrategy ( ) { } }

Fix:
if ( ( i < x ) || ( i >= ( x + 3 ) ) ) {