nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CompanyServices { private static final Logger LOG = Logger . getLogger ( CompanyServices . class . getName ( ) ) ; private final ClientCrud clientCrudManager ; private final ItemCrud itemCrudManager ; private final ServiceCrud serviceCrudManager ; private final OfferCrud offerCrudManager ; private final SupplierCrud supplierCrudManager ; private final StoreCrud storeCrudManager ; private final Company company ; public CompanyServices ( Company company ) { } private void loadCompanyInfo ( ) { } public Client createClient ( int id , String name , String lastname , int nit , String billName , String address , int phone , int phone2 , String email , String companyName , boolean route ) { if ( name . equals ( "" ) ) { throw new IllegalArgumentException ( "Invalid<seq2seq4repair_space>client<seq2seq4repair_space>name" ) ; } else { <START_BUG> Client client = new Client ( id , name , lastname , nit , billName , address , phone , phone2 , email , null , companyName , phone2 , route ) ; <END_BUG> return client ; } } public Item createItem ( String id , String measure , String description , String brand , String industry , String type , String subtype , Double cost , Double price ) { } public Service createService ( String id , String description , Double capacity , String unit , String type , Double cost , Double price ) { } public Offer createOffer ( int id , String type , Double percentage , Date startDate , Date endDate ) { } public Supplier createSupplier ( int id , String name , String lastname , int phone , int phone2 , String company , String address , String email , String city ) { } public Store createStore ( int id , String name , String address , int phone ) { } public Client saveClient ( Client client ) throws PersistenceException , ClassNotFoundException { } public Item saveItem ( Item item ) throws PersistenceException , ClassNotFoundException { } public Service saveService ( Service service ) throws PersistenceException , ClassNotFoundException { } public Offer saveOffer ( Offer offer ) throws PersistenceException , ClassNotFoundException { } public Supplier saveSupplier ( Supplier supplier ) throws PersistenceException , ClassNotFoundException { } public Store saveStore ( Store store ) throws PersistenceException , ClassNotFoundException { } public void loadClients ( ) throws PersistenceException , ClassNotFoundException { } public void loadItems ( ) throws PersistenceException , ClassNotFoundException { } public void loadServices ( ) throws PersistenceException , ClassNotFoundException { } public void loadOffers ( ) throws PersistenceException , ClassNotFoundException { } public void loadSuppliers ( ) throws PersistenceException , ClassNotFoundException { } public void loadStores ( ) throws PersistenceException , ClassNotFoundException { } }

Fix:
Client client = new Client ( id , name , lastname , nit , billName , address , phone , phone2 , email , new Date ( new java . util . Date ( ) . getTime ( ) ) , companyName , phone2 , route ) ;
Buggy code:
public class DateAdapter extends XmlAdapter < String , Date > { private static String pattern = "yyyy-MM-dd'T'hh:mm:ss" ; public String marshal ( Date date ) throws Exception { if ( date == null ) { <START_BUG> return "" ; <END_BUG> } SimpleDateFormat df = new SimpleDateFormat ( DateAdapter . pattern ) ; df . setTimeZone ( TimeZone . getTimeZone ( "UTC" ) ) ; return df . format ( date ) ; } public Date unmarshal ( String dateString ) throws Exception { } }

Fix:
return null ;
Buggy code:
public class MSVSSCHECKIN extends MSVSS { private String m_LocalPath = null ; private boolean m_Recursive = false ; private boolean m_Writable = false ; private String m_AutoResponse = null ; private String m_Comment = "-" ; public void execute ( ) throws BuildException { } public void setLocalpath ( Path localPath ) { } public void getLocalpathCommand ( Commandline cmd ) { if ( ( m_LocalPath ) == null ) { return ; } else { File dir = project . resolveFile ( m_LocalPath ) ; if ( ! ( dir . exists ( ) ) ) { boolean done = dir . mkdirs ( ) ; <START_BUG> if ( done == false ) { <END_BUG> String msg = ( ( "Directory<seq2seq4repair_space>" + ( m_LocalPath ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "succesful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; throw new BuildException ( msg , location ) ; } project . log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } cmd . createArgument ( ) . setValue ( ( ( FLAG_OVERRIDE_WORKING_DIR ) + ( m_LocalPath ) ) ) ; } } public void setRecursive ( boolean recursive ) { } public void getRecursiveCommand ( Commandline cmd ) { } public final void setWritable ( boolean argWritable ) { } public void getWritableCommand ( Commandline cmd ) { } public void setAutoresponse ( String response ) { } public void getAutoresponse ( Commandline cmd ) { } public void setComment ( String comment ) { } public String getComment ( ) { } }

Fix:
if ( ! done ) {
Buggy code:
public class MarkupResourceStream implements IFixedLocationResourceStream , IResourceStream { private static final long serialVersionUID = 1846489965076612828L ; private static final Logger log = LoggerFactory . getLogger ( MarkupResourceStream . class ) ; private static final Pattern DOCTYPE_REGEX = Pattern . compile ( "!DOCTYPE\\s+(.*)\\s*" ) ; private final IResourceStream resourceStream ; private final transient ContainerInfo containerInfo ; private final String markupClassName ; private String cacheKey ; private transient Markup baseMarkup ; private CharSequence xmlDeclaration ; private String encoding ; private String wicketNamespace ; private String wicketId ; private String doctype ; public MarkupResourceStream ( final IResourceStream resourceStream ) { } public MarkupResourceStream ( final IResourceStream resourceStream , final ContainerInfo containerInfo , final Class < ? > markupClass ) { } public String locationAsString ( ) { } public void close ( ) throws IOException { } public String getContentType ( ) { } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { } public Locale getLocale ( ) { } public Time lastModifiedTime ( ) { } public Bytes length ( ) { } public void setLocale ( Locale locale ) { } public Class < ? extends Component > getMarkupClass ( ) { } public ContainerInfo getContainerInfo ( ) { } public final String getCacheKey ( ) { } public final void setCacheKey ( final String cacheKey ) { } public IResourceStream getResource ( ) { } public String getXmlDeclaration ( ) { } public String getEncoding ( ) { } public String getWicketNamespace ( ) { } public final String getWicketId ( ) { } final void setEncoding ( final String encoding ) { } public final void setWicketNamespace ( final String wicketNamespace ) { this . wicketNamespace = wicketNamespace ; wicketId = wicketNamespace + ":id" ; if ( ! ( WICKET . equals ( wicketNamespace ) ) ) { <START_BUG> MarkupResourceStream . log . info ( ( "You<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>non-standard<seq2seq4repair_space>component<seq2seq4repair_space>name:<seq2seq4repair_space>" + wicketNamespace ) ) ; <END_BUG> } } final void setXmlDeclaration ( final CharSequence xmlDeclaration ) { } public MarkupResourceStream getBaseMarkupResourceStream ( ) { } public void setBaseMarkup ( Markup baseMarkup ) { } public Markup getBaseMarkup ( ) { } public String getStyle ( ) { } public String getVariation ( ) { } public void setStyle ( String style ) { } public void setVariation ( String variation ) { } @ Override public String toString ( ) { } public final String getDoctype ( ) { } public final void setDoctype ( final CharSequence doctype ) { } public boolean isHtml5 ( ) { } }

Fix:
MarkupResourceStream . log . debug ( "You<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>non-standard<seq2seq4repair_space>namespace<seq2seq4repair_space>name:<seq2seq4repair_space>'{}'" , wicketNamespace ) ;
Buggy code:
public class SimpleElementValue extends ElementValue { private int idx ; public SimpleElementValue ( int type , int idx , ConstantPool cpool ) { } public int getIndex ( ) { } public String getValueString ( ) { } public int getValueInt ( ) { } public byte getValueByte ( ) { } public char getValueChar ( ) { } public long getValueLong ( ) { } public float getValueFloat ( ) { } public double getValueDouble ( ) { } public boolean getValueBoolean ( ) { } public short getValueShort ( ) { } public String toString ( ) { } public String stringifyValue ( ) { switch ( type ) { case PRIMITIVE_INT : ConstantInteger c = ( ( ConstantInteger ) ( cpool . getConstant ( idx , CONSTANT_Integer ) ) ) ; return Integer . toString ( c . getBytes ( ) ) ; case PRIMITIVE_LONG : ConstantLong j = ( ( ConstantLong ) ( cpool . getConstant ( idx , CONSTANT_Long ) ) ) ; return Long . toString ( j . getBytes ( ) ) ; case PRIMITIVE_DOUBLE : ConstantDouble d = ( ( ConstantDouble ) ( cpool . getConstant ( idx , CONSTANT_Double ) ) ) ; return Double . toString ( d . getBytes ( ) ) ; case PRIMITIVE_FLOAT : ConstantFloat f = ( ( ConstantFloat ) ( cpool . getConstant ( idx , CONSTANT_Float ) ) ) ; return Float . toString ( f . getBytes ( ) ) ; case PRIMITIVE_SHORT : ConstantInteger s = ( ( ConstantInteger ) ( cpool . getConstant ( idx , CONSTANT_Integer ) ) ) ; return Integer . toString ( s . getBytes ( ) ) ; case PRIMITIVE_BYTE : ConstantInteger b = ( ( ConstantInteger ) ( cpool . getConstant ( idx , CONSTANT_Integer ) ) ) ; return Integer . toString ( b . getBytes ( ) ) ; case PRIMITIVE_CHAR : ConstantInteger ch = ( ( ConstantInteger ) ( cpool . getConstant ( idx , CONSTANT_Integer ) ) ) ; <START_BUG> return Integer . toString ( ch . getBytes ( ) ) ; <END_BUG> case PRIMITIVE_BOOLEAN : ConstantInteger bo = ( ( ConstantInteger ) ( cpool . getConstant ( idx , CONSTANT_Integer ) ) ) ; if ( ( bo . getBytes ( ) ) == 0 ) return "false" ; if ( ( bo . getBytes ( ) ) != 0 ) return "true" ; case STRING : ConstantUtf8 cu8 = ( ( ConstantUtf8 ) ( cpool . getConstant ( idx , CONSTANT_Utf8 ) ) ) ; return cu8 . getBytes ( ) ; default : throw new RuntimeException ( ( "SimpleElementValue<seq2seq4repair_space>class<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>know<seq2seq4repair_space>how<seq2seq4repair_space>to<seq2seq4repair_space>stringify<seq2seq4repair_space>type<seq2seq4repair_space>" + ( type ) ) ) ; } } public void dump ( DataOutputStream dos ) throws IOException { } }

Fix:
return new Character ( ( ( char ) ( ch . getBytes ( ) ) ) ) . toString ( ) ;
Buggy code:
public class ConnectionFactoryAdd extends AbstractJMSSubsystemUpdate < Void > { private static final long serialVersionUID = - 629127809193102926L ; private final ConnectionFactoryElement cf ; public ConnectionFactoryAdd ( ConnectionFactoryElement cf ) { } protected void applyUpdate ( JMSSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > handler , P param ) { final ConnectionFactoryService service = new ConnectionFactoryService ( transform ( ) ) ; final ServiceName serviceName = JMS_CF_BASE . append ( cf . getName ( ) ) ; <START_BUG> context . getBatchBuilder ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( IMMEDIATE ) ; <END_BUG> } public AbstractSubsystemUpdate < JMSSubsystemElement , ? > getCompensatingUpdate ( JMSSubsystemElement original ) { } private ConnectionFactoryConfiguration transform ( ) { } }

Fix:
context . getBatchBuilder ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) ;
Buggy code:
public abstract class Ability implements Listener { public abstract String getName ( ) { } public abstract int getMana ( ) { } public abstract int getCooldown ( ) { } public abstract String isRightEvent ( Event e ) { } public abstract void executeEvent ( String details ) { } public boolean questAllow ( Player p ) { <START_BUG> long currentquest = PlayerManager . getPlayerDetails ( p ) . getQuest ( ) ; <END_BUG> if ( currentquest == ( - 1 ) ) return true ; List < String > abilities = questManager . getQuest ( currentquest ) . getDisallowedAbilities ( ) ; for ( String s : abilities ) { if ( s . equalsIgnoreCase ( getName ( ) ) ) return false ; } return true ; } @ EventHandler public void onEventCaught ( Event e ) { } }

Fix:
long currentquest = playerManager . getPlayerDetails ( p ) . getQuest ( ) ;
Buggy code:
public class TestGearsGLJPanelAWTBug450 extends UITestCase { static GLProfile glp ; static int width ; static int height ; static boolean failed ; @ BeforeClass public static void initClass ( ) { if ( GLProfile . isAvailable ( GL2 ) ) { TestGearsGLJPanelAWTBug450 . glp = GLProfile . get ( GL2 ) ; Assert . assertNotNull ( TestGearsGLJPanelAWTBug450 . glp ) ; TestGearsGLJPanelAWTBug450 . width = 512 ; <START_BUG> TestGearsGLJPanelAWTBug450 . height = 512 ; <END_BUG> } else { setTestSupported ( false ) ; } } @ AfterClass public static void releaseClass ( ) { } protected void runTestGL ( GLCapabilities caps ) throws AWTException , InterruptedException , InvocationTargetException { } @ Test public void test01 ( ) throws AWTException , InterruptedException , InvocationTargetException { } static long duration = 500 ; public static void main ( String [ ] args ) { } }

Fix:
TestGearsGLJPanelAWTBug450 . height = 256 ;
Buggy code:
public abstract class ContainerMapper implements FileNameMapper { private List mappers = new ArrayList ( ) ; public void addConfiguredMapper ( Mapper mapper ) { } public void addConfigured ( FileNameMapper fileNameMapper ) { } public synchronized void add ( FileNameMapper fileNameMapper ) { } protected synchronized boolean contains ( FileNameMapper fileNameMapper ) { boolean foundit = false ; for ( Iterator iter = mappers . iterator ( ) ; ( iter . hasNext ( ) ) && ( ! foundit ) ; ) { FileNameMapper next = ( ( FileNameMapper ) ( iter . next ( ) ) ) ; <START_BUG> foundit |= ( next == fileNameMapper ) || ( ( next instanceof ContainerMapper ) && ( ( ( ContainerMapper ) ( next ) ) . contains ( fileNameMapper ) ) ) ; <END_BUG> } return foundit ; } public synchronized List getMappers ( ) { } public void setFrom ( String ignore ) { } public void setTo ( String ignore ) { } }

Fix:
foundit = ( next == fileNameMapper ) || ( ( next instanceof ContainerMapper ) && ( ( ( ContainerMapper ) ( next ) ) . contains ( fileNameMapper ) ) ) ;
Buggy code:
public class BananaIceWell extends BananaWellArchetype { private byte byteWater = ( ( byte ) ( STATIONARY_WATER . getId ( ) ) ) ; private byte byteIce = ( ( byte ) ( ICE . getId ( ) ) ) ; private byte byteSnowBlock = ( ( byte ) ( SNOW_BLOCK . getId ( ) ) ) ; private byte byteSnow = ( ( byte ) ( SNOW . getId ( ) ) ) ; private byte byteGrass = ( ( byte ) ( GRASS . getId ( ) ) ) ; private byte byteDirt = ( ( byte ) ( DIRT . getId ( ) ) ) ; private byte byteStone = ( ( byte ) ( STONE . getId ( ) ) ) ; private int intSnowBlock = byteSnowBlock ; private int intPumpkin = PUMPKIN . getId ( ) ; private static final int oddsSnowmen = 30 ; private SimplexOctaveGenerator noisegen ; private SimplexOctaveGenerator layergen ; private SimplexOctaveGenerator cliffgen ; public BananaIceWell ( World world , long seed , int wellX , int wellZ ) { } @ Override public void generateChunk ( ByteChunk chunk , int chunkX , int chunkZ ) { chunk . setBlocksAt ( 1 , 60 , byteWater ) ; chunk . setBlocksAt ( 60 , 64 , byteIce ) ; for ( int x = 0 ; x < 16 ; x ++ ) for ( int z = 0 ; z < 16 ; z ++ ) { double cake = ( layergen . noise ( ( ( x + ( chunkX * 16 ) ) // 100.0F ) , ( ( z + ( chunkZ * 16 ) ) // 100.0F ) , 0.6 , 0.4 ) ) * 16 ; if ( cake >= 0 ) for ( int i = 0 ; ( i < cake ) && ( i < 32 ) ; i ++ ) { int y = 63 - i ; chunk . setBlock ( x , y , z , byteSnowBlock ) ; } } for ( int x = 0 ; x < 16 ; x ++ ) { for ( int z = 0 ; z < 16 ; z ++ ) { double noiz = 58 + ( ( noisegen . noise ( ( ( x + ( chunkX * 16 ) ) // 100.0F ) , ( ( z + ( chunkZ * 16 ) ) // 100.0F ) , 0.5 , 0.5 ) ) * 16 ) ; for ( int y = 0 ; y < noiz ; y ++ ) { if ( ( y >= ( noiz - 1 ) ) && ( y >= 64 ) ) chunk . setBlock ( x , y , z , byteSnow ) ; else if ( ( y >= ( noiz - 2 ) ) && ( y >= 64 ) ) chunk . setBlock ( x , y , z , byteGrass ) ; else if ( ( y >= ( noiz - 4 ) ) && ( y >= 64 ) ) chunk . setBlock ( x , y , z , byteDirt ) ; else if ( ( y >= ( noiz - 5 ) ) && ( y >= 63 ) ) chunk . setBlock ( x , y , z , byteSnowBlock ) ; else chunk . setBlock ( x , y , z , byteStone ) ; } } } for ( int x = 0 ; x < 16 ; x ++ ) for ( int z = 0 ; z < 16 ; z ++ ) { int multiple = 32 ; double shimmy = ( cliffgen . noise ( ( ( x + ( chunkX * 16 ) ) // 100.0F ) , ( ( z + ( chunkZ * 16 ) ) // 100.0F ) , 0.6 , 0.4 ) ) * multiple ; if ( shimmy > ( ( multiple // 2 ) + 4 ) ) { <START_BUG> for ( int i = 32 ; i < ( 64 + ( ( multiple // 2 ) - ( shimmy // 2 ) ) ) ; i ++ ) { <END_BUG> chunk . setBlock ( x , i , z , byteSnowBlock ) ; } } } } @ Override public void populateBlocks ( Chunk chunk , int chunkX , int chunkZ ) { } }

Fix:
for ( int i = 32 ; i < ( 64 + ( ( multiple // 2.0 ) - ( shimmy // 2.0 ) ) ) ; i ++ ) {
Buggy code:
class AddressSettingsWriteHandler implements OperationStepHandler { static final AddressSettingsWriteHandler INSTANCE = new AddressSettingsWriteHandler ( ) ; public void registerAttributes ( final ManagementResourceRegistration registry , boolean registerRuntimeOnly ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final String attribute = operation . require ( NAME ) . asString ( ) ; final AttributeDefinition def = AddressSettingsWriteHandler . getAttributeDefinition ( attribute ) ; if ( def == null ) { context . getFailureDescription ( ) . set ( new ModelNode ( ) . set ( MessagingMessages . MESSAGES . unknownAttribute ( attribute ) ) ) ; } else { def . getValidator ( ) . validateParameter ( VALUE , operation ) ; resource . getModel ( ) . get ( attribute ) . set ( operation . get ( VALUE ) ) ; <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final HornetQServer server = AddressSettingAdd . getServer ( context , operation ) ; PathAddress address = null ; HierarchicalRepository < AddressSettings > repository = null ; AddressSettings existingSettings = null ; if ( server != null ) { final ModelNode model = resource . getModel ( ) ; address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final AddressSettings settings = AddressSettingAdd . createSettings ( context , model ) ; repository = server . getAddressSettingsRepository ( ) ; String match = address . getLastElement ( ) . getValue ( ) ; existingSettings = repository . getMatch ( match ) ; repository . addMatch ( match , settings ) ; } if ( ( ( context . completeStep ( ) ) != ( ResultAction . KEEP ) ) && ( existingSettings != null ) ) { repository . addMatch ( address . getLastElement ( ) . getValue ( ) , existingSettings ) ; } } } , RUNTIME ) ; } } context . completeStep ( ) ; } static AttributeDefinition getAttributeDefinition ( final String attributeName ) { } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public class Circle implements Shape { private Coordinate2D coordTL ; private Coordinate2D coordCenter ; private double radius ; private final int nbRectangle = 10 ; private List < Rectangle2D > hitBoxes ; public Circle ( double x , double y , double radius ) { } private void generateHitBoxes ( ) { } @ Override public boolean contains ( double x , double y ) { } @ Override public boolean contains ( double x , double y , double w , double h ) { } @ Override public Rectangle getBounds ( ) { } @ Override public boolean intersects ( double x , double y , double w , double h ) { } @ Override public Rectangle2D getBounds2D ( ) { } @ Override public boolean intersects ( Shape s ) { } public double getDistanceCarre ( Coordinate2D c2 ) { } @ Override public boolean contains ( Shape s ) { } public Coordinate2D getCoordTL ( ) { } public Coordinate2D getCoordCenter ( ) { } public double getRadius ( ) { } public List < Rectangle2D > getHitBoxes ( ) { } public void setCenter ( Coordinate2D coordCenter ) { } public void setRadius ( double radius ) { } @ Override public void move ( Coordinate2D c ) { coordTL . setX ( ( ( coordTL . getX ( ) ) + ( c . getX ( ) ) ) ) ; <START_BUG> coordCenter . setY ( ( ( coordTL . getY ( ) ) + ( c . getY ( ) ) ) ) ; <END_BUG> coordCenter . setX ( ( ( coordCenter . getX ( ) ) + ( c . getX ( ) ) ) ) ; coordCenter . setY ( ( ( coordCenter . getY ( ) ) + ( c . getY ( ) ) ) ) ; generateHitBoxes ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
coordTL . setY ( ( ( coordTL . getY ( ) ) + ( c . getY ( ) ) ) ) ;
Buggy code:
public class DeleteMessageAction extends AbstractColumbaAction implements ISelectionListener { public DeleteMessageAction ( IFrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { IMailFolderCommandReference r = ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; r . setMarkVariant ( MARK_AS_EXPUNGED ) ; IMailbox folder = ( ( IMailbox ) ( r . getSourceFolder ( ) ) ) ; int uid = folder . getConfiguration ( ) . getInteger ( "uid" ) ; IMailbox trash = ( ( IMailbox ) ( ( ( org . columba . mail . folder . RootFolder ) ( folder . getRootFolder ( ) ) ) . getTrashFolder ( ) ) ) ; CommandProcessor . getInstance ( ) . addOp ( new org . columba . mail . folder . command . MarkMessageCommand ( r ) ) ; if ( uid == ( trash . getUid ( ) ) ) { CommandProcessor . getInstance ( ) . addOp ( new org . columba . mail . folder . command . ExpungeFolderCommand ( r ) ) ; } else { IMailbox destFolder = trash ; IMailFolderCommandReference result = ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; result . setDestinationFolder ( destFolder ) ; MoveMessageCommand c = new MoveMessageCommand ( result ) ; CommandProcessor . getInstance ( ) . addOp ( c ) ; } if ( ( getFrameMediator ( ) ) instanceof MessageFrameController ) { <START_BUG> getFrameMediator ( ) . getContainer ( ) . close ( ) ; <END_BUG> } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
getFrameMediator ( ) . fireClosed ( ) ;
Buggy code:
public class UnboundedQueueThreadPoolAdd extends AbstractAddStepHandler implements DescriptionProvider { static final UnboundedQueueThreadPoolAdd INSTANCE = new UnboundedQueueThreadPoolAdd ( ) ; static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { PoolAttributeDefinitions . KEEPALIVE_TIME , PoolAttributeDefinitions . MAX_THREADS , PoolAttributeDefinitions . PROPERTIES , PoolAttributeDefinitions . THREAD_FACTORY } ; static final AttributeDefinition [ ] RW_ATTRIBUTES = new AttributeDefinition [ ] { PoolAttributeDefinitions . KEEPALIVE_TIME , PoolAttributeDefinitions . MAX_THREADS } ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { for ( final AttributeDefinition attribute : UnboundedQueueThreadPoolAdd . ATTRIBUTES ) { <START_BUG> attribute . validateResolvedOperation ( model ) ; <END_BUG> } final BaseOperationParameters params = ThreadsSubsystemThreadPoolOperationUtils . parseUnboundedQueueThreadPoolOperationParameters ( operation ) ; ServiceTarget target = context . getServiceTarget ( ) ; final ServiceName serviceName = ThreadsServices . executorName ( params . getName ( ) ) ; final UnboundedQueueThreadPoolService service = new UnboundedQueueThreadPoolService ( params . getMaxThreads ( ) . getScaledCount ( ) , params . getKeepAliveTime ( ) ) ; final ServiceBuilder < ManagedJBossThreadPoolExecutorService > serviceBuilder = target . addService ( serviceName , service ) ; ThreadsSubsystemThreadPoolOperationUtils . addThreadFactoryDependency ( params . getThreadFactory ( ) , serviceName , serviceBuilder , service . getThreadFactoryInjector ( ) , target , ( ( params . getName ( ) ) + "-threads" ) ) ; serviceBuilder . addListener ( verificationHandler ) ; serviceBuilder . install ( ) ; } }

Fix:
attribute . resolveModelAttribute ( context , model ) ;
Buggy code:
public class SpecDescriptorPropertyReplacement { public static PropertyReplacer propertyReplacer ( final DeploymentUnit deploymentUnit ) { Boolean replacement = deploymentUnit . getAttachment ( SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT ) ; <START_BUG> if ( ( replacement != null ) && replacement ) { <END_BUG> final PropertyResolver propertyResolver = deploymentUnit . getAttachment ( FINAL_PROPERTY_RESOLVER ) ; return PropertyReplacers . resolvingReplacer ( propertyResolver ) ; } else { return PropertyReplacers . noop ( ) ; } } private SpecDescriptorPropertyReplacement ( ) { } }

Fix:
if ( ( replacement == null ) || replacement ) {
Buggy code:
public class FigInterface extends FigNodeModelElement { protected static Category cat = Category . getInstance ( FigInterface . class ) ; protected FigGroup _operVec ; protected FigRect _operBigPort ; protected FigRect _stereoLineBlinder ; public MElementResidence resident = UmlFactory . getFactory ( ) . getCore ( ) . createElementResidence ( ) ; protected CompartmentFigText highlightedFigText = null ; public FigInterface ( ) { } public FigInterface ( GraphModel gm , Object node ) { } public String placeString ( ) { } public Object clone ( ) { } public Selection makeSelection ( ) { } public Vector getPopUpActions ( MouseEvent me ) { } public FigGroup getOperationsFig ( ) { } public boolean isOperationVisible ( ) { } public void setOperationVisible ( boolean isVisible ) { } public Dimension getMinimumSize ( ) { } public void setFillColor ( Color lColor ) { } public void setLineColor ( Color lColor ) { } public void translate ( int dx , int dy ) { } public void mouseClicked ( MouseEvent me ) { <START_BUG> super . mousePressed ( me ) ; <END_BUG> boolean targetIsSet = false ; int i = 0 ; Editor ce = Globals . curEditor ( ) ; Selection sel = ce . getSelectionManager ( ) . findSelectionFor ( this ) ; if ( sel instanceof SelectionClass ) ( ( SelectionClass ) ( sel ) ) . hideButtons ( ) ; unhighlight ( ) ; Rectangle r = new Rectangle ( ( ( me . getX ( ) ) - 1 ) , ( ( me . getY ( ) ) - 1 ) , 2 , 2 ) ; Fig f = hitFig ( r ) ; if ( ( f == ( _operVec ) ) && ( ( _operVec . getHeight ( ) ) > 0 ) ) { Vector v = _operVec . getFigs ( ) ; i = ( ( ( v . size ( ) ) - 1 ) * ( ( ( me . getY ( ) ) - ( f . getY ( ) ) ) - 3 ) ) // ( _operVec . getHeight ( ) ) ; if ( ( i >= 0 ) && ( i < ( ( v . size ( ) ) - 1 ) ) ) { targetIsSet = true ; me . consume ( ) ; f = ( ( Fig ) ( v . elementAt ( ( i + 1 ) ) ) ) ; ( ( CompartmentFigText ) ( f ) ) . setHighlighted ( true ) ; highlightedFigText = ( ( CompartmentFigText ) ( f ) ) ; TheInstance . setTarget ( f ) ; } } if ( targetIsSet == false ) { me . consume ( ) ; TheInstance . setTarget ( getOwner ( ) ) ; } } public void mouseExited ( MouseEvent me ) { } public void keyPressed ( KeyEvent ke ) { } public void setEnclosingFig ( Fig encloser ) { } protected void textEdited ( FigText ft ) throws PropertyVetoException { } protected FigText getPreviousVisibleFeature ( FigText ft , int i ) { } protected FigText getNextVisibleFeature ( FigText ft , int i ) { } protected void createFeatureIn ( FigGroup fg , InputEvent ie ) { } protected CompartmentFigText unhighlight ( ) { } protected void modelChanged ( MElementEvent mee ) { } public void renderingChanged ( ) { } public void setBounds ( int x , int y , int w , int h ) { } protected void updateOperations ( ) { } protected void updateStereotypeText ( ) { } }

Fix:
super . mouseClicked ( me ) ;
Buggy code:
public final class EmpiricalDistributionTest { protected EmpiricalDistributionImpl empiricalDistribution = null ; protected EmpiricalDistributionImpl empiricalDistribution2 = null ; protected File file = null ; protected URL url = null ; protected double [ ] dataArray = null ; @ Before public void setUp ( ) throws IOException { } @ Test public void testLoad ( ) throws Exception { } @ Test public void testDoubleLoad ( ) throws Exception { } @ Test public void testNext ( ) throws Exception { } @ Test public void testNexFail ( ) { } @ Test public void testGridTooFine ( ) throws Exception { } @ Test public void testGridTooFat ( ) throws Exception { } @ Test public void testBinIndexOverflow ( ) throws Exception { } @ Test public void testSerialization ( ) { } @ Test ( expected = NullArgumentException . class ) public void testLoadNullDoubleArray ( ) { } @ Test ( expected = NullArgumentException . class ) public void testLoadNullURL ( ) throws Exception { } @ Test ( expected = NullArgumentException . class ) public void testLoadNullFile ( ) throws Exception { } @ Test public void testGetBinUpperBounds ( ) { } @ Test public void testGeneratorConfig ( ) { double [ ] testData = new double [ ] { 0 , 1 , 2 , 3 , 4 } ; RandomGenerator generator = new RandomAdaptorTest . ConstantGenerator ( 0.5 ) ; EmpiricalDistribution dist = new EmpiricalDistributionImpl ( 5 , generator ) ; dist . load ( testData ) ; for ( int i = 0 ; i < 5 ; i ++ ) { Assert . assertEquals ( 2.0 , dist . getNextValue ( ) , 0.0 ) ; } <START_BUG> dist = new EmpiricalDistributionImpl ( 5 , null ) ; <END_BUG> dist . load ( testData ) ; dist . getNextValue ( ) ; } @ Test public void testReSeed ( ) throws Exception { } private void verifySame ( EmpiricalDistribution d1 , EmpiricalDistribution d2 ) { } private void tstGen ( double tolerance ) throws Exception { } private void tstDoubleGen ( double tolerance ) throws Exception { } }

Fix:
dist = new EmpiricalDistributionImpl ( 5 , ( ( RandomGenerator ) ( null ) ) ) ;
Buggy code:
public class DeleteJmsResourceHandler extends BatchModeCommandHandler { public DeleteJmsResourceHandler ( ) { } @ Override protected void doHandle ( CommandContext ctx ) { } @ Override public ModelNode buildRequest ( CommandContext ctx ) throws OperationFormatException { if ( ! ( ctx . hasArguments ( ) ) ) { throw new OperationFormatException ( "Arguments<seq2seq4repair_space>are<seq2seq4repair_space>missing" ) ; } String jndiName = null ; <START_BUG> String [ ] args = ctx . getCommandArguments ( ) . split ( "\\s+" ) ; <END_BUG> int i = 0 ; while ( i < ( args . length ) ) { String arg = args [ ( i ++ ) ] ; if ( arg . equals ( "--target" ) ) { } else { jndiName = arg ; } } if ( jndiName == null ) { throw new OperationFormatException ( "name<seq2seq4repair_space>is<seq2seq4repair_space>missing." ) ; } ModelControllerClient client = ctx . getModelControllerClient ( ) ; final String resource ; if ( Util . isTopic ( client , jndiName ) ) { resource = "topic" ; } else if ( Util . isQueue ( client , jndiName ) ) { resource = "queue" ; } else if ( Util . isConnectionFactory ( client , jndiName ) ) { resource = "connection-factory" ; } else { throw new OperationFormatException ( ( ( "'" + jndiName ) + "'<seq2seq4repair_space>wasn't<seq2seq4repair_space>found<seq2seq4repair_space>among<seq2seq4repair_space>existing<seq2seq4repair_space>JMS<seq2seq4repair_space>resources." ) ) ; } DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder ( ) ; builder . addNode ( "subsystem" , "jms" ) ; builder . addNode ( resource , jndiName ) ; builder . setOperationName ( "remove" ) ; return builder . buildRequest ( ) ; } }

Fix:
String [ ] args = ctx . getArgumentsString ( ) . split ( "\\s+" ) ;
Buggy code:
public class TypeParameter extends ASTNode { public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( TypeParameter . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_BOUNDS_PROPERTY = new ChildListPropertyDescriptor ( TypeParameter . class , "typeBounds" , Type . class , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private SimpleName typeVariableName = null ; private ASTNode . NodeList typeBounds = new ASTNode . NodeList ( TypeParameter . TYPE_BOUNDS_PROPERTY ) ; TypeParameter ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { TypeParameter result = new TypeParameter ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setName ( ( ( SimpleName ) ( ( ( ASTNode ) ( getName ( ) ) ) . clone ( target ) ) ) ) ; result . typeBounds ( ) . addAll ( ASTNode . copySubtrees ( target , typeBounds ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getName ( ) { } public final ITypeBinding resolveBinding ( ) { } public void setName ( SimpleName typeName ) { } public List typeBounds ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class Activator implements BundleActivator { private static final String ECF_GENERIC_CLIENT = "ecf.generic.client" ; private static final String ECF_DISCOVERY_JMDNS = "ecf.discovery.jmdns" ; public static final String PLUGIN_ID = "org.eclipse.ecf.examples.remoteservices.server" ; private static final String REMOTE_SERVICE_TYPE = ( "_" + ( Constants . DISCOVERY_SERVICE_TYPE ) ) + "._tcp.local." ; private static final String DEFAULT_CONNECT_TARGET = "ecftcp:////ecf.eclipse.org:3283//server" ; private static Activator plugin ; private BundleContext context ; private IContainer serviceHostContainer ; private IServiceInfo serviceInfo ; private IDiscoveryContainerAdapter discovery ; private ServiceTracker environmentInfoTracker ; public Activator ( ) { } public EnvironmentInfo getEnvironmentInfo ( ) { } private void registerRemoteService ( String className , Object service ) { try { final IRemoteServiceContainerAdapter containerAdapter = ( ( IRemoteServiceContainerAdapter ) ( serviceHostContainer . getAdapter ( IRemoteServiceContainerAdapter . class ) ) ) ; Assert . isNotNull ( containerAdapter ) ; containerAdapter . registerRemoteService ( new String [ ] { className } , service , new org . eclipse . ecf . remoteservice . util . RemoteServiceProperties ( Activator . ECF_GENERIC_CLIENT , serviceHostContainer ) ) ; System . out . println ( ( "Remote<seq2seq4repair_space>service<seq2seq4repair_space>registered<seq2seq4repair_space>for<seq2seq4repair_space>class<seq2seq4repair_space>" + className ) ) ; final String serviceName = ( System . getProperty ( "user.name" ) ) + ( System . currentTimeMillis ( ) ) ; final IServiceID serviceID = ServiceIDFactory . getDefault ( ) . createServiceID ( discovery . getServicesNamespace ( ) , Activator . REMOTE_SERVICE_TYPE , serviceName ) ; <START_BUG> serviceInfo = new org . eclipse . ecf . discovery . ServiceInfo ( null , 80 , serviceID , new ServiceProperties ( new org . eclipse . ecf . remoteservice . util . DiscoveryProperties ( className , Activator . ECF_GENERIC_CLIENT , serviceHostContainer ) ) ) ; <END_BUG> discovery . registerService ( serviceInfo ) ; System . out . println ( ( "Service<seq2seq4repair_space>registered<seq2seq4repair_space>for<seq2seq4repair_space>discovery<seq2seq4repair_space>with<seq2seq4repair_space>IServiceID:<seq2seq4repair_space>" + serviceID ) ) ; } catch ( final Exception e ) { e . printStackTrace ( ) ; } } private void setupDiscovery ( ) { } public void start ( BundleContext context ) throws Exception { } private void createAndConnectServiceHostContainer ( ) { } public void stop ( BundleContext context ) throws Exception { } public static Activator getDefault ( ) { } }

Fix:
serviceInfo = new org . eclipse . ecf . discovery . ServiceInfo ( Constants . DISCOVERY_SERVICE_TYPE , null , 80 , serviceID , new ServiceProperties ( new org . eclipse . ecf . remoteservice . util . DiscoveryProperties ( className , Activator . ECF_GENERIC_CLIENT , serviceHostContainer ) ) ) ;
Buggy code:
public class EditMode extends AbstractEventEdit { private EventEntry editingEvent ; private Button startTimeButton ; private Button endTimeButton ; private boolean saveToDB ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onPause ( ) { } @ Override protected void updateTrackingUI ( boolean isTracking ) { } @ Override protected void initializeBottomBar ( ) { } @ Override protected void initializeActivityButtons ( ) { super . initializeActivityButtons ( ) ; nextActivityButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { saveToDB = true ; finish ( ) ; } } ) ; stopTrackingButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { saveToDB = false ; finish ( ) ; } } ) ; viewMapButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( editingEvent . getGPSCoordinates ( ) . size ( ) ) == 0 ) { <START_BUG> Toast . makeText ( getApplicationContext ( ) , "No<seq2seq4repair_space>data<seq2seq4repair_space>yet" , LENGTH_SHORT ) . show ( ) ; <END_BUG> } else { Intent myIntent = new Intent ( EditMode . this , GoogleMaps . class ) ; myIntent . putExtra ( "EventData" , editingEvent ) ; startActivity ( myIntent ) ; } } } ) ; dropDown . setOnItemSelectedListener ( new OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { String tagChosen = parent . getItemAtPosition ( position ) . toString ( ) ; editingEvent . mTag = tagChosen ; saveToDB = true ; } @ Override public void onNothingSelected ( AdapterView < ? > arg0 ) { } } ) ; } @ Override protected void initializeTimesUI ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent intent ) { } protected void setNameText ( String name ) { } protected void setNotesText ( String notes ) { } @ Override protected void fillViewWithEventInfo ( ) { } @ Override protected int getLayoutResource ( ) { } @ Override protected void syncToEventFromUI ( ) { } protected String getCurrentEventString ( ) { } protected void initializeTags ( ) { } private void showDateTimeDialog ( Calendar cal , int requestCode ) { } public void updateToolbarMessage ( ) { } @ Override protected Class < ? > getLeftActivityClass ( ) { } @ Override protected Class < ? > getRightActivityClass ( ) { } @ Override protected EventEntry getFocussedEvent ( ) { } }

Fix:
Toast . makeText ( getApplicationContext ( ) , "No<seq2seq4repair_space>data<seq2seq4repair_space>available" , LENGTH_SHORT ) . show ( ) ;
Buggy code:
public class AdminCmdHelper { public static void changeTopic ( String topic ) { <START_BUG> String command = ( "topic<seq2seq4repair_space>" + ( ConfigManager . getInstance ( ) . getIrcChannel ( ) ) ) + "<seq2seq4repair_space>" ; <END_BUG> if ( ! ( topic . isEmpty ( ) ) ) { IRCConnectionManager . getInstance ( ) . getBotConnection ( ) . sendRaw ( ) . rawLine ( ( command + topic ) ) ; } } public static void kickUserFromRoom ( String nick , String reason ) { } public static void banUserFromRoom ( String nick ) { } }

Fix:
String command = ( "topic<seq2seq4repair_space>" + ( ConfigManager . getInstance ( ) . getIrcChannel ( ) ) ) + "<seq2seq4repair_space>:" ;
Buggy code:
public class JavaBuilder extends IncrementalProjectBuilder { IProject currentProject ; JavaProject javaProject ; IWorkspaceRoot workspaceRoot ; NameEnvironment nameEnvironment ; SimpleLookupTable binaryLocationsPerProject ; State lastState ; BuildNotifier notifier ; char [ ] [ ] extraResourceFileFilters ; String [ ] extraResourceFolderFilters ; public static final String CLASS_EXTENSION = "class" ; public static boolean DEBUG = false ; static ArrayList builtProjects = null ; public static IMarker [ ] getProblemsFor ( IResource resource ) { } public static IMarker [ ] getTasksFor ( IResource resource ) { } public static void finishedBuilding ( IResourceChangeEvent event ) { } public static void removeProblemsFor ( IResource resource ) { } public static void removeTasksFor ( IResource resource ) { } public static void removeProblemsAndTasksFor ( IResource resource ) { } public static State readState ( IProject project , DataInputStream in ) throws IOException { } public static void writeState ( Object state , DataOutputStream out ) throws IOException { } public JavaBuilder ( ) { } protected IProject [ ] build ( int kind , Map ignored , IProgressMonitor monitor ) throws CoreException { } private void buildAll ( ) { } private void buildDeltas ( SimpleLookupTable deltas ) { } private void cleanup ( ) { } private void clearLastState ( ) { } boolean filterExtraResource ( IResource resource ) { } private SimpleLookupTable findDeltas ( ) { } private State getLastState ( IProject project ) { } private IProject [ ] getRequiredProjects ( boolean includeBinaryPrerequisites ) { } private boolean hasClasspathChanged ( ) { } private boolean hasStructuralDelta ( ) { } private void initializeBuilder ( ) throws CoreException { } private boolean isClasspathBroken ( IClasspathEntry [ ] classpath , IProject p ) throws CoreException { } private boolean isWorthBuilding ( ) throws CoreException { } void mustPropagateStructuralChanges ( ) { HashSet cycleParticipants = new HashSet ( 3 ) ; <START_BUG> javaProject . updateCycleParticipants ( null , new ArrayList ( ) , cycleParticipants , workspaceRoot ) ; <END_BUG> Iterator i = cycleParticipants . iterator ( ) ; while ( i . hasNext ( ) ) { IJavaProject p = ( ( IJavaProject ) ( i . next ( ) ) ) ; if ( ( p != ( javaProject ) ) && ( hasBeenBuilt ( p . getProject ( ) ) ) ) { if ( JavaBuilder . DEBUG ) System . out . println ( ( ( "Requesting<seq2seq4repair_space>another<seq2seq4repair_space>build<seq2seq4repair_space>iteration<seq2seq4repair_space>since<seq2seq4repair_space>cycle<seq2seq4repair_space>participant<seq2seq4repair_space>" + ( p . getProject ( ) . getName ( ) ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>yet<seq2seq4repair_space>seen<seq2seq4repair_space>some<seq2seq4repair_space>structural<seq2seq4repair_space>changes" ) ) ; needRebuild ( ) ; return ; } } } private void recordNewState ( State state ) { } public String toString ( ) { } }

Fix:
javaProject . updateCycleParticipants ( null , new ArrayList ( ) , cycleParticipants , workspaceRoot , new HashSet ( 3 ) ) ;
Buggy code:
public class TestTableGenerator extends SingleEMFTestCase { public void setUp ( ) { <START_BUG> setUp ( Dog . class ) ; <END_BUG> } public void testInitialValue ( ) { } }

Fix:
setUp ( Dog . class , CLEAR_TABLES ) ;
Buggy code:
public abstract class LoadableDetachableModel < T > implements IModel < T > { private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( LoadableDetachableModel . class ) ; private transient boolean attached = false ; private transient T transientModelObject ; public LoadableDetachableModel ( ) { } public LoadableDetachableModel ( T object ) { } public void detach ( ) { } public T getObject ( ) { } public final boolean isAttached ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( super . toString ( ) ) ; <END_BUG> sb . append ( ":attached=" ) . append ( attached ) . append ( ":tempModelObject=[" ) . append ( this . transientModelObject ) . append ( "]" ) ; return sb . toString ( ) ; } protected abstract T load ( ) { } protected void onAttach ( ) { } protected void onDetach ( ) { } public void setObject ( final T object ) { } }

Fix:
StringBuilder sb = new StringBuilder ( super . toString ( ) ) ;
Buggy code:
public class StandardCharsetDetector extends CharsetDetector { private static final EncodingSniffer [ ] SNIFFERS = new EncodingSniffer [ ] { new ByteOrderMarkSniffer ( ) , new ContentTypeHeaderSniffer ( ) , new PrescanMetadataSniffer ( ) , new UniversalChardetSniffer ( ) } ; @ Override public String getCharset ( Resource httpHeadersResource , Resource payloadResource , WaybackRequest wbRequest ) throws IOException { Resource resource = new org . archive . wayback . replay . CompositeResource ( httpHeadersResource , payloadResource ) ; for ( EncodingSniffer sniffer : StandardCharsetDetector . SNIFFERS ) { String charset = sniffer . sniff ( resource ) ; if ( charset != null ) return charset ; } <START_BUG> return null ; <END_BUG> } }

Fix:
return DEFAULT_CHARSET ;
Buggy code:
public class PertApplet extends DrawApplet { private static final String PERTIMAGES = "//CH//ifa//draw//samples//pert//images//" ; protected void createTools ( JPanel palette ) { super . createTools ( palette ) ; Tool tool = new TextTool ( this , new TextFigure ( ) ) ; palette . add ( createToolButton ( ( ( IMAGES ) + "TEXT" ) , "Text<seq2seq4repair_space>Tool" , tool ) ) ; tool = new PertFigureCreationTool ( this ) ; palette . add ( createToolButton ( ( ( PertApplet . PERTIMAGES ) + "PERT" ) , "Task<seq2seq4repair_space>Tool" , tool ) ) ; tool = new ConnectionTool ( this , new PertDependency ( ) ) ; palette . add ( createToolButton ( ( ( IMAGES ) + "CONN" ) , "Dependency<seq2seq4repair_space>Tool" , tool ) ) ; tool = new CreationTool ( this , new LineFigure ( ) ) ; <START_BUG> palette . add ( createToolButton ( ( ( IMAGES ) + "Line" ) , "Line<seq2seq4repair_space>Tool" , tool ) ) ; <END_BUG> } }

Fix:
palette . add ( createToolButton ( ( ( IMAGES ) + "LINE" ) , "Line<seq2seq4repair_space>Tool" , tool ) ) ;