nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ElementNSImpl extends ElementImpl { static final long serialVersionUID = - 9142310625494392642L ; static final String xmlURI = "http:////www.w3.org//XML//1998//namespace" ; protected String namespaceURI ; protected String localName ; transient XSTypeDefinition type ; protected ElementNSImpl ( ) { } protected ElementNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName ) throws DOMException { } private void setName ( String namespaceURI , String qname ) { } protected ElementNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName , String localName ) throws DOMException { } protected ElementNSImpl ( CoreDocumentImpl ownerDocument , String value ) { } void rename ( String namespaceURI , String qualifiedName ) { } protected void setValues ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName , String localName ) { } public String getNamespaceURI ( ) { } public String getPrefix ( ) { } public void setPrefix ( String prefix ) throws DOMException { if ( needsSyncData ( ) ) { synchronizeData ( ) ; } if ( ownerDocument ( ) . errorChecking ) { if ( isReadOnly ( ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NO_MODIFICATION_ALLOWED_ERR" , null ) ; throw new DOMException ( DOMException . NO_MODIFICATION_ALLOWED_ERR , msg ) ; } if ( ( prefix != null ) && ( ( prefix . length ( ) ) != 0 ) ) { <START_BUG> if ( ! ( CoreDocumentImpl . isXMLName ( prefix , ownerDocument ( ) . isXML11Version ( ) ) ) ) { <END_BUG> String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "INVALID_CHARACTER_ERR" , null ) ; throw new DOMException ( DOMException . INVALID_CHARACTER_ERR , msg ) ; } if ( ( ( namespaceURI ) == null ) || ( ( prefix . indexOf ( ':' ) ) >= 0 ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } else if ( prefix . equals ( "xml" ) ) { if ( ! ( namespaceURI . equals ( ElementNSImpl . xmlURI ) ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } } } } if ( ( prefix != null ) && ( ( prefix . length ( ) ) != 0 ) ) { name = ( prefix + ":" ) + ( localName ) ; } else { name = localName ; } } public String getLocalName ( ) { } public String getBaseURI ( ) { } public String getTypeName ( ) { } public String getTypeNamespace ( ) { } public boolean isDerivedFrom ( String typeNamespaceArg , String typeNameArg , int derivationMethod ) { } public void setType ( XSTypeDefinition type ) { } }

Fix:
if ( ! ( ownerDocument ( ) . isXMLName ( prefix , ownerDocument ( ) . isXML11Version ( ) ) ) ) {
Buggy code:
class BackgroundHelper { public static void setBackground ( Activity activity ) { View layout = activity . findViewById ( background ) ; final BitmapFactory . Options blurOptions = new BitmapFactory . Options ( ) ; blurOptions . inSampleSize = 15 ; Bitmap blurTemplate = BitmapFactory . decodeResource ( activity . getResources ( ) , BackgroundHelper . selectBackgroundImage ( ) , blurOptions ) ; BitmapDrawable drawableBackground = new BitmapDrawable ( blurTemplate ) ; <START_BUG> layout . setBackground ( drawableBackground ) ; <END_BUG> } public static int selectBackgroundImage ( ) { } private static int getCurrentUserScore ( ) { } }

Fix:
layout . setBackgroundDrawable ( drawableBackground ) ;
Buggy code:
public class LineBuffer extends AbstractBuffer < Entry > { public LineBuffer ( int size ) { } public void moveTo ( float x , float y ) { } public void lineTo ( float x , float y ) { } @ Override public void feed ( List < Entry > entries ) { <START_BUG> moveTo ( entries . get ( mFrom ) . getXIndex ( ) , entries . get ( mFrom ) . getVal ( ) ) ; <END_BUG> int size = ( ( int ) ( Math . ceil ( ( ( ( ( mTo ) - ( mFrom ) ) * ( phaseX ) ) + ( mFrom ) ) ) ) ) ; for ( int i = ( mFrom ) + 1 ; i < size ; i ++ ) { Entry e = entries . get ( i ) ; lineTo ( e . getXIndex ( ) , ( ( e . getVal ( ) ) * ( phaseY ) ) ) ; } reset ( ) ; } }

Fix:
moveTo ( entries . get ( mFrom ) . getXIndex ( ) , ( ( entries . get ( mFrom ) . getVal ( ) ) * ( phaseY ) ) ) ;
Buggy code:
public class FilesystemServiceImpl implements FilesystemService { private TitanGraph titanGraph ; public FilesystemServiceImpl ( ) { } @ Override public void createNewFilesystem ( String filesystemId , String userId , Map < String , Object > filesystemProperties ) throws DuplicateFilesystem , UserNotFound { } @ Override public void createNewVersion ( String userId , String filesystemId , Map < String , Object > changeMetadata , Map < String , Object > changedProperties ) throws FilesystemNotFound , UserNotFound { } @ Override public void deleteFilesystemTemporarily ( String userId , String filesystemId ) throws FilesystemNotFound , UserNotFound { } @ Override public Map < String , Object > getFilesystem ( String userId , String filesystemId , int version ) throws FilesystemNotFound , UserNotFound , VersionNotFound { TitanTransaction titanTransaction = this . titanGraph . newTransaction ( ) ; try { Vertex filesystem = null ; try { <START_BUG> filesystem = new CommonCode ( ) . getVersion ( "filesystem" , userId , filesystemId , null , null , ( - 1 ) ) ; <END_BUG> } catch ( FileNotFound | DirectoryNotFound e ) { } Map < String , Object > filesystemProperties = new HashMap < String , Object > ( ) ; Iterable < String > keys = filesystem . getPropertyKeys ( ) ; for ( String key : keys ) { filesystemProperties . put ( key , filesystem . getProperty ( key ) ) ; } titanTransaction . commit ( ) ; return filesystemProperties ; } finally { if ( titanTransaction . isOpen ( ) ) { titanTransaction . rollback ( ) ; } } } }

Fix:
filesystem = new CommonCode ( ) . getVersion ( "filesystem" , userId , filesystemId , null , null , version ) ;
Buggy code:
public class CDFitness implements Writable { private int tp ; private int fp ; private int tn ; private int fn ; public CDFitness ( ) { } public CDFitness ( CDFitness f ) { } public CDFitness ( int tp , int fp , int tn , int fn ) { } public int getTp ( ) { } public int getFp ( ) { } public int getTn ( ) { } public int getFn ( ) { } public void add ( CDFitness f ) { } @ Override public boolean equals ( Object obj ) { if ( ( this ) == obj ) return true ; if ( ( obj == null ) || ( ! ( obj instanceof CDFitness ) ) ) return false ; CDFitness f = ( ( CDFitness ) ( obj ) ) ; <START_BUG> return ( ( ( ( tp ) == ( f . getFp ( ) ) ) && ( ( fp ) == ( f . getFp ( ) ) ) ) && ( ( tn ) == ( f . getTn ( ) ) ) ) && ( ( fn ) == ( f . getTn ( ) ) ) ; <END_BUG> } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } public double get ( ) { } @ Override public void readFields ( DataInput in ) throws IOException { } @ Override public void write ( DataOutput out ) throws IOException { } }

Fix:
return ( ( ( ( tp ) == ( f . getTp ( ) ) ) && ( ( fp ) == ( f . getFp ( ) ) ) ) && ( ( tn ) == ( f . getTn ( ) ) ) ) && ( ( fn ) == ( f . getFn ( ) ) ) ;
Buggy code:
public class InboundHandshake extends RTMPHandshake { private byte [ ] s1 ; private byte [ ] c1 ; private int digestPosServer ; public InboundHandshake ( ) { } public InboundHandshake ( byte handshakeType ) { } public InboundHandshake ( byte handshakeType , int algorithm ) { } public IoBuffer doHandshake ( IoBuffer in ) { } public IoBuffer decodeClientRequest1 ( IoBuffer in ) { } public boolean decodeClientRequest2 ( IoBuffer in ) { } private IoBuffer generateUnversionedHandshake ( byte [ ] input ) { log . debug ( "Using<seq2seq4repair_space>old<seq2seq4repair_space>style<seq2seq4repair_space>(un-versioned)<seq2seq4repair_space>handshake" ) ; <START_BUG> IoBuffer output = IoBuffer . allocate ( HANDSHAKE_SIZE_SERVER ) ; <END_BUG> output . put ( RTMP_NON_ENCRYPTED ) ; output . putInt ( ( ( ( int ) ( Red5 . getUpTime ( ) ) ) // 1000 ) ) ; output . position ( ( ( Constants . HANDSHAKE_SIZE ) + 1 ) ) ; output . put ( input ) ; output . flip ( ) ; output . mark ( ) ; output . position ( 1 ) ; output . get ( s1 ) ; output . reset ( ) ; return output ; } @ Override protected void createHandshakeBytes ( ) { } @ Override public boolean validate ( byte [ ] handshake ) { } private boolean validateScheme ( byte [ ] handshake , int scheme ) { } public void setHandshakeBytes ( byte [ ] handshake ) { } public byte [ ] getHandshakeBytes ( ) { } }

Fix:
IoBuffer output = IoBuffer . allocate ( ( ( ( Constants . HANDSHAKE_SIZE ) * 2 ) + 1 ) ) ;
Buggy code:
public class WorldConfig implements Configurable { private static WorldConfig config = new WorldConfig ( ) ; private WorldConfig ( ) { } public static WorldConfig getConfig ( ) { } private Path configFile = Paths . get ( ( ( EssentialCmds . getEssentialCmds ( ) . getConfigDir ( ) . resolve ( "data" ) ) + "//world.conf" ) ) ; private ConfigurationLoader < CommentedConfigurationNode > configLoader = HoconConfigurationLoader . builder ( ) . setPath ( configFile ) . build ( ) ; private CommentedConfigurationNode configNode ; @ Override public void setup ( ) { } @ Override public void load ( ) { } @ Override public void save ( ) { } @ Override public void populate ( ) { <START_BUG> get ( ) . getNode ( "world" , "inventory" , "separate" ) . setValue ( true ) . setComment ( "Toggles<seq2seq4repair_space>separate<seq2seq4repair_space>inventories<seq2seq4repair_space>between<seq2seq4repair_space>worlds." ) ; <END_BUG> get ( ) . getNode ( "world" , "inventory" , "groups" ) . setComment ( "Contains<seq2seq4repair_space>all<seq2seq4repair_space>world<seq2seq4repair_space>inventory<seq2seq4repair_space>groups." ) ; get ( ) . getNode ( "world" , "inventory" , "groups" , "example" ) . setValue ( "world,<seq2seq4repair_space>DIM1,<seq2seq4repair_space>DIM-1" ) . setComment ( "Example<seq2seq4repair_space>world<seq2seq4repair_space>inventory<seq2seq4repair_space>group." ) ; get ( ) . getNode ( "world" , "weather" , "locked" ) . setComment ( "Worlds<seq2seq4repair_space>listed<seq2seq4repair_space>here,<seq2seq4repair_space>will<seq2seq4repair_space>not<seq2seq4repair_space>change<seq2seq4repair_space>weather." ) ; } @ Override public CommentedConfigurationNode get ( ) { } }

Fix:
get ( ) . getNode ( "world" , "inventory" , "separate" ) . setValue ( false ) . setComment ( "Toggles<seq2seq4repair_space>separate<seq2seq4repair_space>inventories<seq2seq4repair_space>between<seq2seq4repair_space>worlds." ) ;
Buggy code:
public class CoreExampleMain { private static final int DISPLAY_WIDTH = 1024 ; private static final int DISPLAY_HEIGHT = 768 ; public static void runExample ( RenderLoopCallback example , String [ ] mainArgs ) { <START_BUG> String backendName = "jogl" ; <END_BUG> if ( ( mainArgs . length ) == 0 ) { System . err . println ( ( ( "No<seq2seq4repair_space>backend<seq2seq4repair_space>argument<seq2seq4repair_space>supplied.<seq2seq4repair_space>Defaulting<seq2seq4repair_space>to<seq2seq4repair_space>'" + backendName ) + "'" ) ) ; CoreExampleMain . printUsageString ( ) ; } else { backendName = mainArgs [ 0 ] ; } CoreGL gl = null ; CoreSetup setup = null ; if ( backendName . equalsIgnoreCase ( "jogl" ) ) { System . err . println ( ( ( ( "running<seq2seq4repair_space>" + ( example . getClass ( ) . getName ( ) ) ) + ":<seq2seq4repair_space>" ) + "backend=JOGL" ) ) ; gl = new JoglCoreGL ( ) ; setup = new CoreSetupJogl ( gl ) ; } else if ( backendName . equalsIgnoreCase ( "lwjgl" ) ) { System . err . println ( ( ( ( "running<seq2seq4repair_space>" + ( example . getClass ( ) . getName ( ) ) ) + ":<seq2seq4repair_space>" ) + "backend=LWJGL" ) ) ; gl = new LwjglCoreGL ( ) ; setup = new CoreSetupLwjgl ( gl ) ; } else { System . err . println ( ( "unrecognized<seq2seq4repair_space>backend<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( mainArgs [ 0 ] ) ) ) ; CoreExampleMain . printUsageString ( ) ; } if ( ( gl != null ) && ( setup != null ) ) { try { setup . initialize ( ( ( ( ( example . getClass ( ) . getSimpleName ( ) ) + "<seq2seq4repair_space>(" ) + ( backendName . toUpperCase ( ) ) ) + ")" ) , CoreExampleMain . DISPLAY_WIDTH , CoreExampleMain . DISPLAY_HEIGHT ) ; setup . renderLoop ( example ) ; setup . destroy ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } private static void printUsageString ( ) { } }

Fix:
String backendName = "JOGL" ;
Buggy code:
public class Eval { public static int eval ( Board board ) { int sum = 50 ; int score = board . isConnectN ( ) ; if ( score == 1 ) { sum = 1000 ; } else if ( score == 2 ) { <START_BUG> sum = - 10000 ; <END_BUG> } else if ( score == ( - 1 ) ) { } return sum ; } }

Fix:
sum = - 1000 ;
Buggy code:
public class WhileStmt extends Stmt { private Expr condition ; private List < Stmt > body ; public WhileStmt ( Expr cond , List < Stmt > b , int lineNum , int colNum ) { } public Expr getCond ( ) { } public List < Stmt > getBody ( ) { } public Type typecheck ( SymTab s ) { <START_BUG> if ( ( condition . typecheck ( s ) . getType ( ) ) != "bool" ) <END_BUG> throw new Error ( ( ( ( ( ( line ) + ":" ) + ( column ) ) + "<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + "not<seq2seq4repair_space>boolean<seq2seq4repair_space>in<seq2seq4repair_space>if<seq2seq4repair_space>condition" ) ) ; if ( ( body . size ( ) ) == 0 ) return new Type ( "unit" ) ; for ( int a = 0 ; a < ( body . size ( ) ) ; a ++ ) { if ( a == ( ( body . size ( ) ) - 1 ) ) { Type t = body . get ( a ) . typecheck ( s ) ; if ( ( ( t . getType ( ) ) != "unit" ) && ( ( t . getType ( ) ) != "void" ) ) { throw new Error ( ( ( ( ( ( line ) + ":" ) + ( column ) ) + "<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + "last<seq2seq4repair_space>stmt<seq2seq4repair_space>in<seq2seq4repair_space>while<seq2seq4repair_space>block<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>typecheck" ) ) ; } else return new Type ( "unit" ) ; } else if ( ( body . get ( a ) . typecheck ( s ) . getType ( ) ) != "unit" ) throw new Error ( ( ( ( ( ( line ) + ":" ) + ( column ) ) + "<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + "stmt<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>unit<seq2seq4repair_space>type" ) ) ; } throw new Error ( ( ( ( ( ( line ) + ":" ) + ( column ) ) + "<seq2seq4repair_space>error:<seq2seq4repair_space>" ) + "shouldn't<seq2seq4repair_space>get<seq2seq4repair_space>here<seq2seq4repair_space>in<seq2seq4repair_space>whileblock<seq2seq4repair_space>typecheck" ) ) ; } public String toString ( ) { } @ Override public IRStmt buildIRStmt ( ) { } }

Fix:
if ( ! ( condition . typecheck ( s ) . equals ( new Type ( "bool" ) ) ) )
Buggy code:
public class XChartTheme implements Theme { @ Override public Color getChartBackgroundColor ( ) { } @ Override public Color getChartFontColor ( ) { } @ Override public int getChartPadding ( ) { } @ Override public Font getChartTitleFont ( ) { } @ Override public boolean isChartTitleVisible ( ) { } @ Override public boolean isChartTitleBoxVisible ( ) { } @ Override public Color getChartTitleBoxBackgroundColor ( ) { } @ Override public Color getChartTitleBoxBorderColor ( ) { } @ Override public int getChartTitlePadding ( ) { } @ Override public Font getLegendFont ( ) { } @ Override public boolean isLegendVisible ( ) { } @ Override public Color getLegendBackgroundColor ( ) { } @ Override public Color getLegendBorderColor ( ) { } @ Override public int getLegendPadding ( ) { } @ Override public int getLegendSeriesLineLength ( ) { } @ Override public LegendPosition getLegendPosition ( ) { } @ Override public boolean isXAxisTitleVisible ( ) { } @ Override public boolean isYAxisTitleVisible ( ) { } @ Override public Font getAxisTitleFont ( ) { } @ Override public boolean isXAxisTicksVisible ( ) { } @ Override public boolean isYAxisTicksVisible ( ) { } @ Override public Font getAxisTickLabelsFont ( ) { } @ Override public int getAxisTickMarkLength ( ) { } @ Override public int getAxisTickPadding ( ) { } @ Override public Color getAxisTickMarksColor ( ) { } @ Override public Stroke getAxisTickMarksStroke ( ) { <START_BUG> return new BasicStroke ( 1 , BasicStroke . CAP_BUTT , BasicStroke . JOIN_BEVEL ) ; <END_BUG> } @ Override public Color getAxisTickLabelsColor ( ) { } @ Override public boolean isAxisTicksLineVisible ( ) { } @ Override public boolean isAxisTicksMarksVisible ( ) { } @ Override public int getPlotPadding ( ) { } @ Override public int getAxisTitlePadding ( ) { } @ Override public int getXAxisTickMarkSpacingHint ( ) { } @ Override public int getYAxisTickMarkSpacingHint ( ) { } @ Override public boolean isPlotGridLinesVisible ( ) { } @ Override public Color getPlotBackgroundColor ( ) { } @ Override public Color getPlotBorderColor ( ) { } @ Override public boolean isPlotBorderVisible ( ) { } @ Override public boolean isPlotTicksMarksVisible ( ) { } @ Override public Color getPlotGridLinesColor ( ) { } @ Override public Stroke getPlotGridLinesStroke ( ) { } @ Override public double getBarWidthPercentage ( ) { } @ Override public boolean isBarsOverlapped ( ) { } @ Override public boolean isBarFilled ( ) { } @ Override public int getMarkerSize ( ) { } @ Override public Color getErrorBarsColor ( ) { } @ Override public boolean isErrorBarsColorSeriesColor ( ) { } }

Fix:
return new BasicStroke ( 1 , BasicStroke . CAP_BUTT , BasicStroke . JOIN_BEVEL , 10.0F , new float [ ] { 3.0F , 0.0F } , 0.0F ) ;
Buggy code:
public class ForeachControlPanel extends AbstractControllerGui { private JTextField inputVal ; private JTextField returnVal ; private boolean displayName = true ; private static final String INPUTVAL = "Input<seq2seq4repair_space>Field" ; private static final String RETURNVAL = "Return<seq2seq4repair_space>Field" ; public ForeachControlPanel ( ) { } public ForeachControlPanel ( boolean displayName ) { } public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement lc ) { } public String getStaticLabel ( ) { <START_BUG> return ( JMeterUtils . getResString ( "foreach_controller_title" ) ) + "<seq2seq4repair_space>(BETA)" ; <END_BUG> } private void init ( ) { } private JPanel createLoopCountPanel ( ) { } }

Fix:
return JMeterUtils . getResString ( "foreach_controller_title" ) ;
Buggy code:
public class PerObject extends PerClause { private boolean isThis ; private Pointcut entry ; public PerObject ( Pointcut entry , boolean isThis ) { } public FuzzyBoolean match ( Shadow shadow ) { } public void resolveBindings ( IScope scope , Bindings bindings ) { } private Var getVar ( Shadow shadow ) { } public Test findResidue ( Shadow shadow , ExposedState state ) { } public PerClause concretize ( ResolvedTypeX inAspect ) { PerObject ret = new PerObject ( entry , isThis ) ; ret . inAspect = inAspect ; if ( inAspect . isAbstract ( ) ) return ret ; World world = inAspect . getWorld ( ) ; <START_BUG> Pointcut concreteEntry = entry . concretize ( inAspect , EMPTY ) ; <END_BUG> inAspect . crosscuttingMembers . addConcreteShadowMunger ( Advice . makePerObjectEntry ( world , concreteEntry , isThis , inAspect ) ) ; ResolvedTypeMunger munger = new PerObjectInterfaceTypeMunger ( inAspect , concreteEntry ) ; inAspect . crosscuttingMembers . addTypeMunger ( world . concreteTypeMunger ( munger , inAspect ) ) ; return ret ; } public void write ( DataOutputStream s ) throws IOException { } public static PerClause readPerClause ( DataInputStream s , ISourceContext context ) throws IOException { } public Kind getKind ( ) { } public String toString ( ) { } }

Fix:
Pointcut concreteEntry = entry . concretize ( inAspect , 0 , null ) ;
Buggy code:
public enum ConsoleMode { CONSOLE ( ) { @ Override ResourceHandler createConsoleHandler ( String slot ) throws ModuleLoadException { } @ Override public boolean hasConsole ( ) { } } , SLAVE_HC ( ) { @ Override ResourceHandler createConsoleHandler ( String slot ) throws ModuleLoadException { } @ Override public boolean hasConsole ( ) { } } , ADMIN_ONLY ( ) { @ Override ResourceHandler createConsoleHandler ( String slot ) throws ModuleLoadException { } @ Override public boolean hasConsole ( ) { } } , NO_CONSOLE ( ) { @ Override ResourceHandler createConsoleHandler ( String slot ) throws ModuleLoadException { } @ Override public boolean hasConsole ( ) { } } ; ResourceHandler createConsoleHandler ( String slot ) throws ModuleLoadException { } public boolean hasConsole ( ) { } private static class ConsoleHandler extends ResourceHandler { private static final String NOCACHE_JS = ".nocache.js" ; private static final String INDEX_HTML = "index.html" ; private static final String APP_HTML = "App.html" ; private static final String CONSOLE_MODULE = "org.jboss.as.console" ; private static final String CONTEXT = "//console" ; private static final String DEFAULT_RESOURCE = "//" + ( ConsoleMode . ConsoleHandler . INDEX_HTML ) ; ConsoleHandler ( String slot ) throws ModuleLoadException { } @ Override protected boolean skipCache ( String resource ) { } @ Override public void start ( HttpServer httpServer , SecurityRealm securityRealm ) { HttpContext httpContext = httpServer . createContext ( getContext ( ) , this ) ; if ( ( securityRealm != null ) && ( ( securityRealm . getSupportedAuthenticationMechanisms ( ) . contains ( CLIENT_CERT ) ) == false ) ) { <START_BUG> httpContext . getFilters ( ) . add ( new RealmReadinessFilter ( securityRealm , ErrorHandler . getRealmRedirect ( ) ) ) ; <END_BUG> } } } static class DisabledConsoleHandler extends ResourceHandler { private static final String ERROR_MODULE = "org.jboss.as.domain-http-error-context" ; private static final String CONTEXT = "//consoleerror" ; private static final String NO_CONSOLE_FOR_SLAVE = "//noConsoleForSlaveDcError.html" ; private static final String NO_CONSOLE_FOR_ADMIN_MODE = "//noConsoleForAdminModeError.html" ; private DisabledConsoleHandler ( String slot , String resource ) throws ModuleLoadException { } static ConsoleMode . DisabledConsoleHandler createNoConsoleForSlave ( String slot ) throws ModuleLoadException { } static ConsoleMode . DisabledConsoleHandler createNoConsoleForAdminMode ( String slot ) throws ModuleLoadException { } @ Override protected boolean skipCache ( String resource ) { } } }

Fix:
httpContext . getFilters ( ) . add ( new RedirectReadinessFilter ( securityRealm , ErrorHandler . getRealmRedirect ( ) ) ) ;
Buggy code:
public class StatelessComponentTest extends WicketTestCase { public StatelessComponentTest ( String name ) { } public void testStatelessComponentPage ( ) throws Exception { } public void testStatelessComponentPageWithMount ( ) throws Exception { tester . getApplication ( ) . mountBookmarkablePage ( "//stateless" , StatelessComponentPage . class ) ; tester . setupRequestAndResponse ( ) ; <START_BUG> tester . getServletRequest ( ) . setURL ( "//WicketTester$DummyWebApplication//WicketTester$DummyWebApplication//stateless//wicket:interface//:0:link::ILinkListener:" ) ; <END_BUG> try { tester . processRequestCycle ( ) ; fail ( "An<seq2seq4repair_space>exception<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>thrown<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>request!" ) ; } catch ( Exception e ) { assertEquals ( "wanted<seq2seq4repair_space>exception" , e . getMessage ( ) ) ; } } }

Fix:
tester . getServletRequest ( ) . setURL ( "//WicketTester$DummyWebApplication//WicketTester$DummyWebApplication//stateless//wicket:interface//:0:link::ILinkListener::" ) ;
Buggy code:
public class Icon { private final int type ; private int special ; private int specialState ; public Icon ( int t ) { } public int getType ( ) { } public int getSpecial ( ) { } public void setSpecial ( int t ) { this . special = t ; <START_BUG> this . specialState = 2 ; <END_BUG> } public void reduceSpecialStateByOne ( ) { } public int getSpecialState ( ) { } public boolean equals ( Icon other ) { } }

Fix:
this . specialState = 3 ;
Buggy code:
public class EeExtension implements Extension { public static final String SUBSYSTEM_NAME = "ee" ; private static final String RESOURCE_NAME = ( EeExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 0 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; protected static final PathElement PATH_SUBSYSTEM = PathElement . pathElement ( SUBSYSTEM , EeExtension . SUBSYSTEM_NAME ) ; static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( EeExtension . SUBSYSTEM_NAME , EeExtension . MANAGEMENT_API_MAJOR_VERSION , EeExtension . MANAGEMENT_API_MINOR_VERSION , EeExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration rootResource = subsystem . registerSubsystemModel ( INSTANCE ) ; <START_BUG> rootResource . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <END_BUG> subsystem . registerXMLElementWriter ( EESubsystemParser11 . INSTANCE ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

Fix:
rootResource . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ;
Buggy code:
public class FileHandel { private static String TABLE_NAME = "file" ; public boolean saveFile ( String fileName , String hashName , String token , String folder , String fileType , String fromIp , float fileSize ) { } public FileModel getFileDetailByToken ( String token ) { } public boolean modifyFile ( int id , String oldToken , String newToken , String exp ) { <START_BUG> List < FileModel > files = dao . find ( ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>as<seq2seq4repair_space>res<seq2seq4repair_space>from<seq2seq4repair_space>file<seq2seq4repair_space>where<seq2seq4repair_space>token<seq2seq4repair_space>=<seq2seq4repair_space>" + oldToken ) ) ; <END_BUG> Number num = files . get ( 0 ) . get ( "res" ) ; if ( ( num . intValue ( ) ) == 1 ) { return dao . findById ( id ) . set ( "token" , newToken ) . set ( "expiration" , exp ) . update ( ) ; } else { return false ; } } public boolean modifyFileExp ( int id , String exp ) { } public void downFileNum ( String token ) { } public void delFileByDate ( ) throws ParseException { } public void deleteFileDbById ( int id ) { } public void deleteFileSystem ( String folder , String hashName ) { } }

Fix:
List < FileModel > files = dao . find ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>as<seq2seq4repair_space>res<seq2seq4repair_space>from<seq2seq4repair_space>file<seq2seq4repair_space>where<seq2seq4repair_space>token<seq2seq4repair_space>=<seq2seq4repair_space>?" , oldToken ) ;
Buggy code:
public class AntlibTest extends BuildFileTest { public AntlibTest ( String name ) { } public void setUp ( ) { } public void testAntlibFile ( ) { } public void testNsCurrent ( ) { <START_BUG> expectLog ( "ns.current" , "Echo2<seq2seq4repair_space>calledEcho2<seq2seq4repair_space>inside<seq2seq4repair_space>a<seq2seq4repair_space>macro" ) ; <END_BUG> } public static class MyTask extends Task { public void execute ( ) { } } }

Fix:
expectLog ( "ns.current" , "Echo2<seq2seq4repair_space>inside<seq2seq4repair_space>a<seq2seq4repair_space>macroHello<seq2seq4repair_space>from<seq2seq4repair_space>x:p" ) ;
Buggy code:
@ Controller public class MainController { @ RequestMapping ( "//" ) public String redirect ( ) { } @ RequestMapping ( "//notLogin" ) <START_BUG> @ ResponseStatus ( HttpStatus . BAD_REQUEST ) <END_BUG> public void notLogin ( ) { } }

Fix:
@ ResponseStatus ( HttpStatus . UNAUTHORIZED )
Buggy code:
public class ToDoPane extends JPanel implements ItemListener , MouseListener , TreeSelectionListener , ToDoListListener { public static int WIDTH = 690 ; public static int HEIGHT = 520 ; public static int INITIAL_WIDTH = 400 ; public static int INITIAL_HEIGHT = 200 ; protected ProjectBrowser _pb = null ; protected Vector _perspectives = new Vector ( ) ; protected ToolBar _toolbar = new ToolBar ( ) ; protected JComboBox _combo = new JComboBox ( ) ; protected ToDoList _root = null ; protected Action _flatView = Actions . FlatToDo ; protected JToggleButton _flatButton ; protected JLabel _countLabel = new JLabel ( "<seq2seq4repair_space>000<seq2seq4repair_space>Items<seq2seq4repair_space>" ) ; protected ToDoPerspective _curPerspective = null ; protected JTree _tree = new DisplayTextTree ( ) ; protected boolean _flat = false ; protected Object _lastSel ; public static int _clicksInToDoPane = 0 ; public static int _dblClicksInToDoPane = 0 ; public static int _toDoPerspectivesChanged = 0 ; public ToDoPane ( ) { } public void setRoot ( ToDoList r ) { } public ToDoList getRoot ( ) { } public Vector getPerspectives ( ) { } public void setPerspectives ( Vector pers ) { } public ToDoPerspective getCurPerspective ( ) { } public void setCurPerspective ( TreeModel per ) { } public Object getSelectedObject ( ) { } public boolean isFlat ( ) { } public void setFlat ( boolean b ) { } public void toggleFlat ( ) { } public Dimension getPreferredSize ( ) { } public Dimension getMinimumSize ( ) { } public void itemStateChanged ( ItemEvent e ) { } public void valueChanged ( TreeSelectionEvent e ) { } public void mousePressed ( MouseEvent e ) { } public void mouseReleased ( MouseEvent e ) { } public void mouseEntered ( MouseEvent e ) { } public void mouseExited ( MouseEvent e ) { } public void mouseClicked ( MouseEvent e ) { } public void mySingleClick ( int row , TreePath path ) { } public void myDoubleClick ( int row , TreePath path ) { ( ToDoPane . _dblClicksInToDoPane ) ++ ; if ( ( getSelectedObject ( ) ) == null ) return ; Object sel = getSelectedObject ( ) ; if ( sel instanceof ToDoItem ) { ( ( ToDoItem ) ( sel ) ) . action ( ) ; <START_BUG> Set offs = ( ( ToDoItem ) ( sel ) ) . getOffenders ( ) ; <END_BUG> TheInstance . jumpToDiagramShowing ( offs ) ; } } public void toDoItemsChanged ( ToDoListEvent tde ) { } public void toDoItemsAdded ( ToDoListEvent tde ) { } public void toDoItemsRemoved ( ToDoListEvent tde ) { } public void toDoListChanged ( ToDoListEvent tde ) { } public void updateCountLabel ( ) { } protected void updateTree ( ) { } protected static ImageIcon loadIconResource ( String imgName , String desc ) { } protected static String imageName ( String name ) { } protected static String stripJunk ( String s ) { } }

Fix:
VectorSet offs = ( ( ToDoItem ) ( sel ) ) . getOffenders ( ) ;
Buggy code:
class BinaryField extends BinaryMember implements IField { protected BinaryField ( JavaElement parent , String name ) { } public boolean equals ( Object o ) { } public Object getConstant ( ) throws JavaModelException { } public int getFlags ( ) throws JavaModelException { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( boolean forceOpen ) throws JavaModelException { } public String getTypeSignature ( ) throws JavaModelException { } public boolean isEnumConstant ( ) throws JavaModelException { } public boolean isResolved ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } public String getAttachedJavadoc ( IProgressMonitor monitor , String defaultEncoding ) throws JavaModelException { String contents = ( ( BinaryType ) ( this . getDeclaringType ( ) ) ) . getJavadocContents ( monitor , defaultEncoding ) ; if ( contents == null ) <START_BUG> throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . CANNOT_RETRIEVE_ATTACHED_JAVADOC , this ) ) ; <END_BUG> int indexAnchor = contents . indexOf ( ( ( ( JavadocConstants . ANCHOR_PREFIX_START ) + ( this . getElementName ( ) ) ) + ( JavadocConstants . ANCHOR_PREFIX_END ) ) ) ; if ( indexAnchor == ( - 1 ) ) throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . UNKNOWN_JAVADOC_FORMAT , this ) ) ; int indexOfEndLink = contents . indexOf ( JavadocConstants . ANCHOR_SUFFIX , indexAnchor ) ; if ( indexOfEndLink == ( - 1 ) ) throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . UNKNOWN_JAVADOC_FORMAT , this ) ) ; int indexOfNextField = contents . indexOf ( JavadocConstants . ANCHOR_PREFIX_START , indexOfEndLink ) ; int indexOfBottom = contents . indexOf ( JavadocConstants . CONSTRUCTOR_DETAIL , indexOfEndLink ) ; indexOfNextField = Math . min ( indexOfNextField , indexOfBottom ) ; if ( indexOfNextField == ( - 1 ) ) throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . UNKNOWN_JAVADOC_FORMAT , this ) ) ; return contents . substring ( ( indexOfEndLink + ( JavadocConstants . ANCHOR_SUFFIX_LENGTH ) ) , indexOfNextField ) ; } }

Fix:
return null ;
Buggy code:
public class IgnoreList { public static List < IgnoreList > list = new LinkedList < > ( ) ; public static IgnoreList getIgnoreList ( Player p ) { for ( IgnoreList il : IgnoreList . list ) { if ( il . target . equals ( p ) ) { return il ; } } <START_BUG> return null ; <END_BUG> } protected Player target ; private Collection < OfflinePlayer > ignored = new LinkedList < > ( ) ; public IgnoreList ( Player p ) { } public void addIgnoredPlayer ( OfflinePlayer p ) { } public void removeIgnoredPlayer ( OfflinePlayer p ) { } public Collection < OfflinePlayer > getIgnoredPlayers ( ) { } public boolean isIgnored ( OfflinePlayer p ) { } public void close ( ) { } }

Fix:
return new IgnoreList ( p ) ;
Buggy code:
public class JcaArchiveValidationDefinition extends SimpleResourceDefinition { protected static final PathElement PATH_ARCHIVE_VALIDATION = PathElement . pathElement ( Constants . ARCHIVE_VALIDATION , Constants . ARCHIVE_VALIDATION ) ; static final JcaArchiveValidationDefinition INSTANCE = new JcaArchiveValidationDefinition ( ) ; private JcaArchiveValidationDefinition ( ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { super . registerAttributes ( resourceRegistration ) ; for ( final JcaArchiveValidationDefinition . ArchiveValidationParameters parameter : JcaArchiveValidationDefinition . ArchiveValidationParameters . values ( ) ) { <START_BUG> resourceRegistration . registerReadWriteAttribute ( parameter . getAttribute ( ) , null , JcaAttributeWriteHandler . INSTANCE ) ; <END_BUG> } } public static enum ArchiveValidationParameters { ARCHIVE_VALIDATION_ENABLED ( SimpleAttributeDefinitionBuilder . create ( "enabled" , BOOLEAN ) . setAllowExpression ( true ) . setAllowNull ( true ) . setDefaultValue ( new ModelNode ( ) . set ( true ) ) . setMeasurementUnit ( NONE ) . setRestartAllServices ( ) . setXmlName ( "enabled" ) . build ( ) ) , ARCHIVE_VALIDATION_FAIL_ON_ERROR ( SimpleAttributeDefinitionBuilder . create ( "fail-on-error" , BOOLEAN ) . setAllowExpression ( true ) . setAllowNull ( true ) . setDefaultValue ( new ModelNode ( ) . set ( true ) ) . setMeasurementUnit ( NONE ) . setRestartAllServices ( ) . setXmlName ( "fail-on-error" ) . build ( ) ) , ARCHIVE_VALIDATION_FAIL_ON_WARN ( SimpleAttributeDefinitionBuilder . create ( "fail-on-warn" , BOOLEAN ) . setAllowExpression ( true ) . setAllowNull ( true ) . setDefaultValue ( new ModelNode ( ) . set ( false ) ) . setMeasurementUnit ( NONE ) . setRestartAllServices ( ) . setXmlName ( "fail-on-warn" ) . build ( ) ) ; private ArchiveValidationParameters ( SimpleAttributeDefinition attribute ) { } public SimpleAttributeDefinition getAttribute ( ) { } private SimpleAttributeDefinition attribute ; } }

Fix:
resourceRegistration . registerReadWriteAttribute ( parameter . getAttribute ( ) , null , JcaArchiveValidationWriteHandler . INSTANCE ) ;
Buggy code:
public class App { private static ArrayList < Calendar > holidayList2012 ; public static void main ( String [ ] args ) { long startTime = System . nanoTime ( ) ; System . out . println ( "=======================" ) ; System . out . println ( "FLIGHT<seq2seq4repair_space>DELAY<seq2seq4repair_space>PREDICTION" ) ; System . out . println ( "=======================" ) ; App logisticRegression = new App ( ) ; List < App . Observation > trainingData = logisticRegression . parseInputFile ( "input//data.csv" ) ; OnlineLogisticRegression olr = logisticRegression . train ( trainingData ) ; logisticRegression . predict ( olr , "input//predict.csv" , "output" ) ; logisticRegression . calcAccuracy ( "input//check.csv" , "output" ) ; <START_BUG> long runningTime = ( ( nanoTime ) - startTime ) // 1000000000 ; <END_BUG> System . out . println ( ( ( "\nRunning<seq2seq4repair_space>time:<seq2seq4repair_space>" + runningTime ) + "<seq2seq4repair_space>second(s)" ) ) ; } public int daysFromNearestHoliday ( String year , String month , String day ) { } public int hourFromTime ( String time ) { } public List < App . Observation > parseInputFile ( String inputFile ) { } public OnlineLogisticRegression train ( List < App . Observation > trainData ) { } public void predict ( OnlineLogisticRegression olr , String inputFile , String outputFile ) { } public void calcAccuracy ( String inputFile1 , String inputFile2 ) { } class Observation { private DenseVector vector = new DenseVector ( 10 ) ; private int actual ; public Observation ( String [ ] values ) { } public Vector getVector ( ) { } public int getActual ( ) { } } }

Fix:
long runningTime = ( ( System . nanoTime ( ) ) - startTime ) // 1000000000 ;
Buggy code:
public interface ServerCommunicationHandler { void sendMessage ( List < String > message ) throws IOException { } <START_BUG> void sendMessage ( byte [ ] msg , long checksum ) throws IOException ; <END_BUG> }

Fix:
void sendMessage ( byte [ ] msg ) throws IOException ;
Buggy code:
public class PropertySourcesPropertyResolver extends AbstractPropertyResolver { private final PropertySources propertySources ; public PropertySourcesPropertyResolver ( PropertySources propertySources ) { } public boolean containsProperty ( String key ) { } public String getProperty ( String key ) { } public < T > T getProperty ( String key , Class < T > targetValueType ) { boolean debugEnabled = logger . isDebugEnabled ( ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( String . format ( "getProperty(\"%s\",<seq2seq4repair_space>%s)" , key , targetValueType . getSimpleName ( ) ) ) ; } for ( PropertySource < ? > propertySource : this . propertySources ) { if ( debugEnabled ) { logger . debug ( String . format ( "Searching<seq2seq4repair_space>for<seq2seq4repair_space>key<seq2seq4repair_space>'%s'<seq2seq4repair_space>in<seq2seq4repair_space>[%s]" , key , propertySource . getName ( ) ) ) ; } Object value ; if ( ( value = propertySource . getProperty ( key ) ) != null ) { Class < ? > valueType = value . getClass ( ) ; if ( String . class . equals ( valueType ) ) { <START_BUG> value = this . resolveRequiredPlaceholders ( ( ( String ) ( value ) ) ) ; <END_BUG> } if ( debugEnabled ) { logger . debug ( String . format ( "Found<seq2seq4repair_space>key<seq2seq4repair_space>'%s'<seq2seq4repair_space>in<seq2seq4repair_space>[%s]<seq2seq4repair_space>with<seq2seq4repair_space>type<seq2seq4repair_space>[%s]<seq2seq4repair_space>and<seq2seq4repair_space>value<seq2seq4repair_space>'%s'" , key , propertySource . getName ( ) , valueType . getSimpleName ( ) , value ) ) ; } if ( ! ( this . conversionService . canConvert ( valueType , targetValueType ) ) ) { throw new IllegalArgumentException ( String . format ( "Cannot<seq2seq4repair_space>convert<seq2seq4repair_space>value<seq2seq4repair_space>[%s]<seq2seq4repair_space>from<seq2seq4repair_space>source<seq2seq4repair_space>type<seq2seq4repair_space>[%s]<seq2seq4repair_space>to<seq2seq4repair_space>target<seq2seq4repair_space>type<seq2seq4repair_space>[%s]" , value , valueType . getSimpleName ( ) , targetValueType . getSimpleName ( ) ) ) ; } return conversionService . convert ( value , targetValueType ) ; } } if ( debugEnabled ) { logger . debug ( String . format ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>key<seq2seq4repair_space>'%s'<seq2seq4repair_space>in<seq2seq4repair_space>any<seq2seq4repair_space>property<seq2seq4repair_space>source.<seq2seq4repair_space>Returning<seq2seq4repair_space>[null]" , key ) ) ; } return null ; } public < T > Class < T > getPropertyAsClass ( String key , Class < T > targetValueType ) { } @ SuppressWarnings ( "serial" ) static class ClassConversionException extends ConversionException { public ClassConversionException ( Class < ? > actual , Class < ? > expected ) { } public ClassConversionException ( String actual , Class < ? > expected , Exception ex ) { } } }

Fix:
value = this . resolveNestedPlaceholders ( ( ( String ) ( value ) ) ) ;
Buggy code:
public class DynamicTask extends Task implements DynamicConfigurator { public void execute ( ) { } public void setDynamicAttribute ( String name , String value ) { project . setNewProperty ( name , value ) ; } public Object createDynamicElement ( String name ) { } public class Sub implements DynamicConfigurator { public void setDynamicAttribute ( String name , String value ) { <START_BUG> project . setNewProperty ( name , value ) ; <END_BUG> } public Object createDynamicElement ( String name ) { } } }

Fix:
getProject ( ) . setNewProperty ( name , value ) ;
Buggy code:
public class IRWriter { public static void persist ( IRWriterEncoder file , IRScope script ) throws IOException { } private static void persistScopeInstructions ( IRWriterEncoder file , IRScope parent ) { } private static void persistScopeInstrs ( IRWriterEncoder file , IRScope scope ) { } private static void persistScopeHeaders ( IRWriterEncoder file , IRScope parent ) { } private static void persistScopeHeader ( IRWriterEncoder file , IRScope scope ) { if ( RubyInstanceConfig . IR_WRITING_DEBUG ) System . out . println ( "Writing<seq2seq4repair_space>Scope<seq2seq4repair_space>Header" ) ; file . startEncodingScopeHeader ( scope ) ; if ( RubyInstanceConfig . IR_WRITING_DEBUG ) System . out . println ( ( "IRScopeType<seq2seq4repair_space>=<seq2seq4repair_space>" + ( scope . getScopeType ( ) ) ) ) ; file . encode ( scope . getScopeType ( ) ) ; if ( RubyInstanceConfig . IR_WRITING_DEBUG ) System . out . println ( ( "NAME<seq2seq4repair_space>=<seq2seq4repair_space>" + ( scope . getName ( ) ) ) ) ; file . encode ( scope . getName ( ) ) ; if ( RubyInstanceConfig . IR_WRITING_DEBUG ) System . out . println ( ( "Line<seq2seq4repair_space>#<seq2seq4repair_space>=<seq2seq4repair_space>" + ( scope . getLineNumber ( ) ) ) ) ; file . encode ( scope . getLineNumber ( ) ) ; if ( RubyInstanceConfig . IR_WRITING_DEBUG ) System . out . println ( ( "#<seq2seq4repair_space>of<seq2seq4repair_space>temp<seq2seq4repair_space>vars<seq2seq4repair_space>=<seq2seq4repair_space>" + ( scope . getTemporaryVariablesCount ( ) ) ) ) ; file . encode ( scope . getTemporaryVariablesCount ( ) ) ; IRWriter . persistScopeLabelIndices ( scope , file ) ; if ( ! ( scope instanceof IRScriptBody ) ) file . encode ( scope . getLexicalParent ( ) ) ; if ( scope instanceof IRClosure ) { IRClosure closure = ( ( IRClosure ) ( scope ) ) ; <START_BUG> file . encode ( closure . getArity ( ) . getValue ( ) ) ; <END_BUG> file . encode ( closure . getArgumentType ( ) ) ; } IRWriter . persistStaticScope ( file , scope . getStaticScope ( ) ) ; IRWriter . persistLocalVariables ( scope , file ) ; file . endEncodingScopeHeader ( scope ) ; } private static void persistLocalVariables ( IRScope scope , IRWriterEncoder file ) { } private static void persistScopeLabelIndices ( IRScope scope , IRWriterEncoder file ) { } private static void persistStaticScope ( IRWriterEncoder file , StaticScope staticScope ) { } }

Fix:
file . encode ( closure . getSignature ( ) . encode ( ) ) ;
Buggy code:
public class TestWASManagedRuntime extends TestCase { public void testInterfaceAdded ( ) throws ClassNotFoundException { String msg = null ; try { Class . forName ( CLASS ) ; fail ( "expected<seq2seq4repair_space>an<seq2seq4repair_space>exception<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>thrown" ) ; } catch ( NoClassDefFoundError e ) { msg = e . getMessage ( ) ; } String interfaceName = Strings . getClassName ( INTERFACE ) ; <START_BUG> assertTrue ( ( ( ( ( "message<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>contained<seq2seq4repair_space>" + interfaceName ) + ",<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>'" ) + msg ) + "'" ) , msg . contains ( interfaceName ) ) ; <END_BUG> } }

Fix:
assertTrue ( ( ( ( ( "message<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>contained<seq2seq4repair_space>" + interfaceName ) + ",<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>'" ) + msg ) + "'" ) , ( ( msg . indexOf ( interfaceName ) ) != ( - 1 ) ) ) ;
Buggy code:
class SourceField extends Member implements IField { protected SourceField ( JavaElement parent , String name ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public Object getConstant ( ) throws JavaModelException { Object constant = null ; SourceFieldElementInfo info = ( ( SourceFieldElementInfo ) ( getElementInfo ( ) ) ) ; if ( ( info . initializationSource ) == null ) { return null ; } String constantSource = new String ( info . initializationSource ) ; String signature = info . getTypeSignature ( ) ; if ( signature . equals ( Signature . SIG_INT ) ) { constant = new Integer ( constantSource ) ; } else if ( signature . equals ( Signature . SIG_SHORT ) ) { constant = new Short ( constantSource ) ; } else if ( signature . equals ( Signature . SIG_BYTE ) ) { constant = new Byte ( constantSource ) ; } else if ( signature . equals ( Signature . SIG_BOOLEAN ) ) { <START_BUG> constant = new Boolean ( constantSource ) ; <END_BUG> } else if ( signature . equals ( Signature . SIG_CHAR ) ) { constant = new Character ( constantSource . charAt ( 0 ) ) ; } else if ( signature . equals ( Signature . SIG_DOUBLE ) ) { constant = new Double ( constantSource ) ; } else if ( signature . equals ( Signature . SIG_FLOAT ) ) { constant = new Float ( constantSource ) ; } else if ( signature . equals ( Signature . SIG_LONG ) ) { constant = new Long ( constantSource ) ; } else if ( signature . equals ( "QString;" ) ) { constant = constantSource ; } return constant ; } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { } public String getTypeSignature ( ) throws JavaModelException { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
constant = Boolean . valueOf ( constantSource ) ;
Buggy code:
public class Priority { int level ; String levelStr ; int syslogEquivalent ; public static final int OFF_INT = Integer . MAX_VALUE ; public static final int FATAL_INT = 50000 ; public static final int ERROR_INT = 40000 ; public static final int WARN_INT = 30000 ; public static final int INFO_INT = 20000 ; public static final int DEBUG_INT = 10000 ; public static final int ALL_INT = Integer . MIN_VALUE ; public static final Level OFF = new Level ( Priority . OFF_INT , "OFF" , 0 ) ; public static final Level FATAL = new Level ( Priority . FATAL_INT , "FATAL" , 0 ) ; public static final Level ERROR = new Level ( Priority . ERROR_INT , "ERROR" , 3 ) ; public static final Level WARN = new Level ( Priority . WARN_INT , "WARN" , 4 ) ; public static final Level INFO = new Level ( Priority . INFO_INT , "INFO" , 6 ) ; public static final Level DEBUG = new Level ( Priority . DEBUG_INT , "DEBUG" , 7 ) ; public static final Level ALL = new Level ( Priority . ALL_INT , "ALL" , 7 ) ; protected Priority ( int level , String levelStr , int syslogEquivalent ) { } public final int getSyslogEquivalent ( ) { } public final String toString ( ) { } public final int toInt ( ) { } public boolean isGreaterOrEqual ( Priority r ) { } public static Priority [ ] getAllPossiblePriorities ( ) { } public static Level toPriority ( String sArg ) { <START_BUG> return Level . toPriority ( sArg ) ; <END_BUG> } public static Level toPriority ( int val ) { } public static Level toPriority ( int val , Level defaultPriority ) { } public static Level toPriority ( String sArg , Level defaultPriority ) { } }

Fix:
return Level . toLevel ( sArg ) ;