nus-yam/ex-repair huggingface dataset:
Buggy code:
public class HtmlProblemFinderTest extends TestCase { public void testProblemFinder ( ) { <START_BUG> final MarkupParser parser = new MarkupParser ( new XmlPullParser ( null ) ) { <END_BUG> public void initFilterChain ( ) { appendMarkupFilter ( new HtmlProblemFinder ( HtmlProblemFinder . ERR_THROW_EXCEPTION ) ) ; } } ; try { parser . parse ( "<img<seq2seq4repair_space>src=\"\"//>" ) ; assertTrue ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>thrown<seq2seq4repair_space>an<seq2seq4repair_space>exception" , false ) ; } catch ( Exception ex ) { } } }

Fix:
final MarkupParser parser = new MarkupParser ( null , new XmlPullParser ( null ) ) {
Buggy code:
public class NullLiteral extends MagicLiteral { static final char [ ] source = new char [ ] { 'n' , 'u' , 'l' , 'l' } ; public NullLiteral ( int s , int e ) { } public void computeConstant ( ) { <START_BUG> constant = Constant . NotAConstant ; <END_BUG> } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public TypeBinding literalType ( BlockScope scope ) { } public int nullStatus ( FlowInfo flowInfo ) { } public Object reusableJSRTarget ( ) { } public char [ ] source ( ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
this . constant = Constant . NotAConstant ;
Buggy code:
public class GameSettings { public static final String SCREEN_RESOLUTION_WIDTH = "Screen<seq2seq4repair_space>Resolution<seq2seq4repair_space>Width" ; public static final String SCREEN_RESOLUTION_HEIGHT = "Screen<seq2seq4repair_space>Resolution<seq2seq4repair_space>Height" ; public static final String NUMBER_OF_PLAYERS = "Number<seq2seq4repair_space>Of<seq2seq4repair_space>Players" ; private static LinkedHashMap < String , Setting > settings ; public static Vector < Color > playerColors ; public static boolean sfx = false ; public static boolean music = false ; private static boolean ignoreControllers = true ; private static int nrOfKeyboardsBound ; public static void initialize ( ) { DebugHelper . log ( "GameSettings" , "initialized." ) ; GameSettings . settings = new LinkedHashMap < String , Setting > ( ) ; GameSettings . add ( GameSettings . SCREEN_RESOLUTION_WIDTH , 1280 ) . makeFinal ( ) ; GameSettings . add ( GameSettings . SCREEN_RESOLUTION_HEIGHT , 720 ) . makeFinal ( ) ; <START_BUG> GameSettings . add ( GameSettings . NUMBER_OF_PLAYERS , 1 ) . setModSteps ( 2 ) . setMinMax ( 0 , 4 ) ; <END_BUG> } public static Setting add ( String name , float value ) { } private static void addNewSetting ( Setting setting ) { } public static float get ( String name ) { } public static HashMap < String , Setting > getSettings ( ) { } public static void setupBaseInputDevice ( ) { } public static InputDevice getFreeInputDevice ( PlayerUnit player ) { } }

Fix:
GameSettings . add ( GameSettings . NUMBER_OF_PLAYERS , 2 ) . setModSteps ( 2 ) . setMinMax ( 0 , 4 ) ;
Buggy code:
public class TEEditor { public JTextArea textEditorArea ; public JButton saveButton ; public JButton newButton ; public JButton openDoc ; private JScrollPane scroll ; private String absoluteFilePath ; public JFrame jFrame = new JFrame ( ) ; public TEEditor ( boolean isNewWindow , JTextArea jTextArea ) { } public TEEditor ( String text , String absoluteFilePath ) { } private class TEActionListener implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { if ( ( e . getSource ( ) ) == ( saveButton ) ) { <START_BUG> new TESave ( textEditorArea , false , absoluteFilePath , true , jFrame ) ; <END_BUG> } else if ( ( e . getSource ( ) ) == ( newButton ) ) { new TENew ( textEditorArea ) ; } else if ( ( e . getSource ( ) ) == ( openDoc ) ) { new TESave ( textEditorArea , true , absoluteFilePath , true , jFrame ) ; } } } }

Fix:
new TESave ( textEditorArea , false , absoluteFilePath , false , jFrame ) ;
Buggy code:
public abstract class Tree extends Panel implements ILinkListener { private TreeStateCache treeState ; private Map links = new HashMap ( ) ; public Tree ( final String componentName , final TreeModel model ) { } public Tree ( final String componentName , final TreeModel model , final boolean makeTreeModelUnique ) { } public Tree ( final String componentName , TreeStateCache treeState ) { } public void makeUnique ( TreeModel treeModel ) { } protected void makeUnique ( DefaultMutableTreeNode node ) { } final void addLink ( AbstractTreeNodeLink link ) { } public final void linkClicked ( ) { String param = AbstractTreeNodeLink . REQUEST_PARAMETER_LINK_ID ; <START_BUG> String linkId = ( ( wicket . protocol . http . HttpRequest ) ( getRequestCycle ( ) . getRequest ( ) ) ) . getParameter ( param ) ; <END_BUG> AbstractTreeNodeLink link = ( ( AbstractTreeNodeLink ) ( links . get ( linkId ) ) ) ; if ( link == null ) { throw new IllegalStateException ( ( ( "link<seq2seq4repair_space>" + linkId ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } link . linkClicked ( ) ; } public final void setSelected ( Object userObject ) { } public final void setSelected ( TreeNodeModel node ) { } public final void setExpandedState ( TreeNodeModel node ) { } public final void setExpandedState ( TreePath selection , boolean expanded ) { } public final TreePath findTreePath ( Serializable userObject ) { } public final TreeStateCache getTreeState ( ) { } public final void setTreeState ( final TreeStateCache treeState ) { } public TreeStateCache newTreeState ( final TreeModel model ) { } protected final TreeStateCache newTreeState ( final TreeModel model , boolean rootVisible ) { } public final DefaultMutableTreeNode findNode ( Serializable userObject ) { } protected abstract void applySelectedPaths ( TreeStateCache treeState ) { } public void refresh ( ) { } public final void setRootVisible ( boolean rootVisible ) { } public final String getTreeModelAsDebugString ( ) { } }

Fix:
String linkId = ( ( wicket . protocol . http . HttpRequest ) ( getRequest ( ) ) ) . getParameter ( param ) ;
Buggy code:
public class ItemFoodAppleMagic extends ItemFood { public static enum MagicType { Potion , Flying , Hearts ; } public static ItemFoodAppleMagic apple_emerald ; public static ItemFoodAppleMagic apple_emerald_rich ; public static ItemFoodAppleMagic apple_diamond ; public static ItemFoodAppleMagic apple_lapis ; public static ItemFoodAppleMagic apple_lapis_rich ; public static ItemFoodAppleMagic apple_chocolate ; public static ItemFoodAppleMagic apple_chocolate_rich ; public static ItemFoodAppleMagic apple_nether_star ; private boolean hasEffect = false ; private static int FLYING_COUNT_PER_EAT = 10000 ; private ArrayList < Integer > potionIds ; private ArrayList < Integer > potionDurations ; private ArrayList < Integer > potionAmplifiers ; private ItemFoodAppleMagic . MagicType type ; public ItemFoodAppleMagic ( ItemFoodAppleMagic . MagicType ptype , int fillsHunger , boolean has_effect ) { } public ItemFoodAppleMagic addEffect ( int potionId , int potionDuration , int potionAmplifier ) { } @ Override protected void onFoodEaten ( ItemStack par1ItemStack , World par2World , EntityPlayer par3EntityPlayer ) { if ( ( ( ItemFoodAppleMagic . MagicType . Potion ) == ( this . type ) ) && ( ( par2World . isRemote ) == false ) ) { SamsUtilities . incrementPlayerIntegerNBT ( par3EntityPlayer , par1ItemStack . getItem ( ) . getUnlocalizedName ( ) , 1 ) ; for ( int i = 0 ; i < ( potionIds . size ( ) ) ; i ++ ) { par3EntityPlayer . addPotionEffect ( new PotionEffect ( potionIds . get ( i ) , potionDurations . get ( i ) , potionAmplifiers . get ( i ) ) ) ; } } <START_BUG> if ( ( ( ItemFoodAppleMagic . MagicType . Flying ) == ( this . type ) ) && ( ( par2World . isRemote ) == true ) ) { <END_BUG> SamsUtilities . incrementPlayerIntegerNBT ( par3EntityPlayer , ( ( Reference . MODID ) + ( ItemFoodAppleMagic . MagicType . Flying . toString ( ) ) ) , ItemFoodAppleMagic . FLYING_COUNT_PER_EAT ) ; } if ( ( ( ItemFoodAppleMagic . MagicType . Hearts ) == ( this . type ) ) && ( ( par2World . isRemote ) == false ) ) { par3EntityPlayer . removePotionEffectClient ( potion_HEALTH_BOOST ) ; SamsUtilities . incrementPlayerIntegerNBT ( par3EntityPlayer , ( ( Reference . MODID ) + ( ItemFoodAppleMagic . MagicType . Hearts . toString ( ) ) ) , 1 ) ; } } @ Override public boolean hasEffect ( ItemStack par1ItemStack ) { } @ Override @ SideOnly ( Side . CLIENT ) public EnumRarity getRarity ( ItemStack par1ItemStack ) { } static int I = 0 ; static int II = 1 ; static int III = 2 ; static int IV = 3 ; static int V = 4 ; static int timeShort = 90 ; static int timeLong = 8 * 60 ; static int hungerSmall = 1 ; static int hungerLarge = 4 ; public static void initChocolate ( ) { } public static void initLapis ( ) { } public static void initEmerald ( ) { } public static void initDiamond ( ) { } public static void initNether ( ) { } }

Fix:
if ( ( ( ItemFoodAppleMagic . MagicType . Flying ) == ( this . type ) ) && ( ( par2World . isRemote ) == false ) ) {
Buggy code:
public class RoundingRule { public enum BySignificantFigures { ALWAYS ( ( - 1 ) ) , FOR_SCIENTIFIC_NOTATION_AND_DECIMALS ( ( - 2 ) ) , FOR_SCIENTIFIC_NOTATION ( ( - 2 ) ) ; int value ; private BySignificantFigures ( int value ) { } } public static final RoundingRule ALWAYS = new RoundingRule ( RoundingRule . BySignificantFigures . ALWAYS ) ; public static final RoundingRule FOR_SCIENTIFIC_NOTATION_AND_DECIMALS = new RoundingRule ( RoundingRule . BySignificantFigures . FOR_SCIENTIFIC_NOTATION_AND_DECIMALS ) ; public static final RoundingRule FOR_SCIENTIFIC_NOTATION = new RoundingRule ( RoundingRule . BySignificantFigures . FOR_SCIENTIFIC_NOTATION ) ; int value ; private RoundingRule ( RoundingRule . BySignificantFigures val ) { } public RoundingRule ( int val ) { } public int getValue ( ) { } public boolean isCannedRule ( ) { <START_BUG> return ( this . value ) > 0 ; <END_BUG> } }

Fix:
return ( this . value ) < 0 ;
Buggy code:
public class IncrementalTableNavigationTest extends TestCase { public IncrementalTableNavigationTest ( ) { } public IncrementalTableNavigationTest ( String name ) { } public void testPagedTable ( ) throws Exception { } private boolean validatePage1 ( String document ) { HtmlDocumentValidator validator = new HtmlDocumentValidator ( ) ; Tag html = new Tag ( "html" ) ; Tag head = new Tag ( "head" ) ; html . addExpectedChild ( head ) ; Tag title = new Tag ( "title" ) ; head . addExpectedChild ( title ) ; title . addExpectedChild ( new TextContent ( "Paged<seq2seq4repair_space>Table<seq2seq4repair_space>Page" ) ) ; Tag body = new Tag ( "body" ) ; html . addExpectedChild ( body ) ; Tag ulTable = new Tag ( "ul" ) ; ulTable . addExpectedChild ( new Tag ( "li" ) . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new TextContent ( "one" ) ) ) ) ; ulTable . addExpectedChild ( new Tag ( "li" ) . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new TextContent ( "two" ) ) ) ) ; body . addExpectedChild ( ulTable ) ; <START_BUG> body . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new Tag ( "i" ) . addExpectedChild ( new TextContent ( "Prev" ) ) ) ) ; <END_BUG> body . addExpectedChild ( new Tag ( "a" ) . addExpectedChild ( new TextContent ( "NextNext" ) ) ) ; validator . addRootElement ( html ) ; return validator . isDocumentValid ( document ) ; } private boolean validatePage2 ( String document ) { } private boolean validatePage3 ( String document ) { } }

Fix:
body . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new Tag ( "em" ) . addExpectedChild ( new TextContent ( "Prev" ) ) ) ) ;
Buggy code:
public class AjcSpecTest extends TestCase { public static final String NOTSAME = "<seq2seq4repair_space>!=<seq2seq4repair_space>" ; public static void sameAjcSuiteSpec ( AjcTest . Suite . Spec lhsSpec , AjcTest . Suite . Spec rhsSpec , Assert a ) { } public static void sameAjcTestSpec ( AjcTest . Spec lhsTest , AjcTest . Spec rhsTest , Assert a ) { } public static void sameAbstractRunSpec ( AbstractRunSpec lhs , AbstractRunSpec rhs , Assert a ) { } static String normal ( Object input ) { } public static void same ( Object lhs , Object rhs , Assert a ) { } public static void sameRA ( String [ ] lhs , String [ ] rhs , Assert a ) { } static String normal ( String [ ] items ) { } static String normal ( List list ) { } public static void sameListSize ( List lhs , List rhs , Assert a ) { } public static void sameList ( List lhs , List rhs , Assert a ) { } public static void sameIAjcRun ( IAjcRun lhs , IAjcRun rhs , Assert reporter ) { } public static void sameSpec ( AbstractRunSpec lhs , AbstractRunSpec rhs , Assert a ) { } public static void sameDirChangesList ( ArrayList lhs , ArrayList rhs , Assert a ) { } public static void sameDirChangesSpec ( DirChanges . Spec lhs , DirChanges . Spec rhs , Assert a ) { } public static void sameMessages ( IMessageHolder one , IMessageHolder two , Assert a ) { } public static void sameMessage ( IMessage lhs , IMessage rhs , Assert a ) { if ( ( null == lhs ) && ( null == rhs ) ) { return ; } assertTrue ( ( lhs != null ) ) ; assertTrue ( ( rhs != null ) ) ; assertTrue ( ( ( lhs . getKind ( ) ) == ( rhs . getKind ( ) ) ) ) ; AjcSpecTest . same ( lhs . getMessage ( ) , rhs . getMessage ( ) , a ) ; assertEquals ( lhs . getThrown ( ) , rhs . getThrown ( ) ) ; <START_BUG> AjcSpecTest . sameSourceLocation ( lhs . getISourceLocation ( ) , rhs . getISourceLocation ( ) , a ) ; <END_BUG> } public static void sameSourceLocation ( ISourceLocation lhs , ISourceLocation rhs , Assert a ) { } public AjcSpecTest ( String name ) { } public void testMinimal ( ) { } }

Fix:
AjcSpecTest . sameSourceLocation ( lhs . getSourceLocation ( ) , rhs . getSourceLocation ( ) , a ) ;
Buggy code:
public class CliDispatcher extends AppServiceBase < CliDispatcher > { private static Logger logger = LogManager . get ( CliDispatcher . class ) ; private Map < String , CliHandler > registry = C . newMap ( ) ; public CliDispatcher ( App app ) { } public CliDispatcher registerCommandHandler ( String command , CommandMethodMetaInfo methodMetaInfo , CommanderClassMetaInfo classMetaInfo ) { if ( registry . containsKey ( command ) ) { <START_BUG> throw E . invalidConfiguration ( "Command<seq2seq4repair_space>%s<seq2seq4repair_space>already<seq2seq4repair_space>registered" ) ; <END_BUG> } addToRegistry ( command , new act . handler . builtin . cli . CliHandlerProxy ( classMetaInfo , methodMetaInfo , app ( ) ) ) ; CliDispatcher . logger . info ( "Command<seq2seq4repair_space>registered:<seq2seq4repair_space>%s" , command ) ; return this ; } public boolean registered ( String command ) { } public CliHandler handler ( String command ) { } public List < String > commands ( boolean sys , boolean app ) { } @ Override protected void releaseResources ( ) { } private void addToRegistry ( String name , CliHandler handler ) { } private void registerBuiltInHandlers ( ) { } }

Fix:
throw E . invalidConfiguration ( "Command<seq2seq4repair_space>%s<seq2seq4repair_space>already<seq2seq4repair_space>registered" , command ) ;
Buggy code:
public class MaintainRoom { private Vector < Room > room = new Vector < Room > ( ) ; private static MaintainRoom instance ; private MaintainRoom ( ) { } public static MaintainRoom getInstance ( ) { } public Vector < Room > getRooms ( ) throws PatrimonyException , SQLException { } public void insertRooms ( String code , String description , String capacity ) throws PatrimonyException , SQLException { } public void changeRoom ( String code , String description , String capacity , Room room ) throws PatrimonyException , SQLException { } public void excludeRoom ( Room room ) throws PatrimonyException , SQLException { <START_BUG> ClassRoomDAO . getInstance ( ) . excludeTeacher ( room ) ; <END_BUG> this . room . remove ( room ) ; } }

Fix:
ClassRoomDAO . getInstance ( ) . excluir ( room ) ;
Buggy code:
public final class NormalAnnotation extends Annotation { public static final ChildPropertyDescriptor TYPE_NAME_PROPERTY = Annotation . internalTypeNamePropertyFactory ( NormalAnnotation . class ) ; public static final ChildListPropertyDescriptor VALUES_PROPERTY = new ChildListPropertyDescriptor ( NormalAnnotation . class , "values" , MemberValuePair . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private ASTNode . NodeList values = new ASTNode . NodeList ( NormalAnnotation . VALUES_PROPERTY ) ; NormalAnnotation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final ChildPropertyDescriptor internalTypeNameProperty ( ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { NormalAnnotation result = new NormalAnnotation ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setTypeName ( ( ( Name ) ( ASTNode . copySubtree ( target , getTypeName ( ) ) ) ) ) ; result . values ( ) . addAll ( ASTNode . copySubtrees ( target , values ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List values ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class testij { private static Properties properties = new Properties ( ) ; private static org . apache . derbyTesting . functionTests . harness . jvm jvm ; private static Vector vCmd ; private static String IjCmd = "org.apache.derby.tools.ij" ; private static String SqlDir = "extin" ; private static String jccSqlFile = "testij.sql" ; private static String sep ; private static String clientSqlFile = "testclientij.sql" ; private static String altExtinDir ; private static boolean useAltExtinDir = false ; private static void execCmd ( String [ ] args ) throws Exception { } private static void execCmdDumpResults ( String [ ] args ) throws Exception { } public static void massageSqlFile ( String hostName , String fileName ) throws Exception { File tmpFile = new File ( "extin" , "tmpFile.sql" ) ; File orgFile = new File ( "extin" , fileName ) ; InputStream original ; OutputStream copy ; try { fileName = ( ( testij . SqlDir ) + ( testij . sep ) ) + fileName ; original = new FileInputStream ( fileName ) ; copy = new FileOutputStream ( tmpFile ) ; } catch ( FileNotFoundException fnfe ) { testij . useAltExtinDir = true ; String userdir = System . getProperty ( "user.dir" ) ; testij . altExtinDir = ( userdir + ( testij . sep ) ) + ".." ; tmpFile = new File ( testij . altExtinDir , "tmpFile.sql" ) ; orgFile = new File ( testij . altExtinDir , fileName ) ; fileName = ( ( testij . altExtinDir ) + ( testij . sep ) ) + fileName ; original = new FileInputStream ( fileName ) ; copy = new FileOutputStream ( tmpFile ) ; } int content ; while ( ( content = original . read ( ) ) > 0 ) { copy . write ( content ) ; } copy . close ( ) ; original . close ( ) ; Sed hostSed = new Sed ( ) ; InputStream sedIs = new ByteArrayInputStream ( ( "substitute=localhost;" + hostName ) . getBytes ( "UTF-8" ) ) ; <START_BUG> hostSed . exec ( tmpFile , orgFile , sedIs , false , false ) ; <END_BUG> } public static void main ( String [ ] args ) throws Exception { } }

Fix:
hostSed . exec ( tmpFile , orgFile , sedIs , false , false , false ) ;
Buggy code:
public class FineSessionFactory < L > implements SessionFactory < FineSessionCacheEntry < L > , L > { private final Cache < String , FineSessionCacheEntry < L > > sessionCache ; private final Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > attributeCache ; private final CacheInvoker invoker ; private final SessionContext context ; private final SessionAttributeMarshaller < Object , MarshalledValue < Object , MarshallingContext > > marshaller ; private final LocalContextFactory < L > localContextFactory ; public FineSessionFactory ( Cache < String , FineSessionCacheEntry < L > > sessionCache , Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > attributeCache , CacheInvoker invoker , SessionContext context , SessionAttributeMarshaller < Object , MarshalledValue < Object , MarshallingContext > > marshaller , LocalContextFactory < L > localContextFactory ) { } @ Override public Session < L > createSession ( String id , FineSessionCacheEntry < L > entry ) { } @ Override public ImmutableSession createImmutableSession ( String id , FineSessionCacheEntry < L > entry ) { } @ Override public FineSessionCacheEntry < L > findValue ( String id ) { } @ Override public FineSessionCacheEntry < L > createValue ( String id ) { } @ Override public void remove ( final String id ) { final FineSessionCacheEntry < L > entry = this . invoker . invoke ( this . sessionCache , new RemoveOperation < String , FineSessionCacheEntry < L > > ( id ) ) ; Operation < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > , Void > attributeOperation = new Operation < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > , Void > ( ) { @ Override public Void invoke ( Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > cache ) { for ( String attribute : entry . getAttributes ( ) ) { cache . remove ( new SessionAttributeCacheKey ( id , attribute ) ) ; } return null ; } } ; <START_BUG> this . invoker . invoke ( this . attributeCache , attributeOperation , IGNORE_RETURN_VALUES ) ; <END_BUG> } @ Override public void evict ( final String id ) { } }

Fix:
this . invoker . invoke ( this . attributeCache , attributeOperation , IGNORE_RETURN_VALUES , SKIP_LOCKING ) ;
Buggy code:
public class CCCheckin extends ClearCase { public static final String FLAG_COMMENT = "-c" ; public static final String FLAG_COMMENTFILE = "-cfile" ; public static final String FLAG_NOCOMMENT = "-nc" ; public static final String FLAG_NOWARN = "-nwarn" ; public static final String FLAG_PRESERVETIME = "-ptime" ; public static final String FLAG_KEEPCOPY = "-keep" ; public static final String FLAG_IDENTICAL = "-identical" ; private String m_Comment = null ; private String m_Cfile = null ; private boolean m_Nwarn = false ; private boolean m_Ptime = false ; private boolean m_Keep = false ; private boolean m_Identical = true ; public void setComment ( String comment ) { } public void setCommentFile ( String cfile ) { } public void setIdentical ( boolean identical ) { } public void setKeepCopy ( boolean keep ) { } public void setNoWarn ( boolean nwarn ) { } public void setPreserveTime ( boolean ptime ) { } public String getComment ( ) { } public String getCommentFile ( ) { } public boolean getIdentical ( ) { } public boolean getKeepCopy ( ) { } public boolean getNoWarn ( ) { } public boolean getPreserveTime ( ) { } public void execute ( ) throws TaskException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { <START_BUG> setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; <END_BUG> } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_CHECKIN ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; throw new TaskException ( msg ) ; } } private void getCommentCommand ( Commandline cmd ) { } private void getCommentFileCommand ( Commandline cmd ) { } private void checkOptions ( Commandline cmd ) { } }

Fix:
setViewPath ( getBaseDirectory ( ) . getPath ( ) ) ;
Buggy code:
public class TransactionalSpoutCoordinator implements IRichSpout { public static final Logger LOG = Logger . getLogger ( TransactionalSpoutCoordinator . class ) ; public static final BigInteger INIT_TXID = new BigInteger ( "1" ) ; public static final String TRANSACTION_BATCH_STREAM_ID = ( TransactionalSpoutCoordinator . class . getName ( ) ) + "//batch" ; public static final String TRANSACTION_COMMIT_STREAM_ID = ( TransactionalSpoutCoordinator . class . getName ( ) ) + "//commit" ; private static final String CURRENT_TX = "currtx" ; private static final String META_DIR = "meta" ; private ITransactionalSpout _spout ; private Coordinator _coordinator ; private TransactionalState _state ; private RotatingTransactionalState _coordinatorState ; Map < BigInteger , TransactionalSpoutCoordinator . TransactionStatus > _activeTx = new HashMap < BigInteger , TransactionalSpoutCoordinator . TransactionStatus > ( ) ; private SpoutOutputCollector _collector ; BigInteger _currTransaction ; int _maxTransactionActive ; TransactionalSpoutCoordinator . StateInitializer _initializer ; public TransactionalSpoutCoordinator ( ITransactionalSpout spout ) { } public ITransactionalSpout getSpout ( ) { } @ Override public void open ( Map conf , TopologyContext context , SpoutOutputCollector collector ) { _state = TransactionalState . newCoordinatorState ( conf , ( ( String ) ( conf . get ( TOPOLOGY_TRANSACTIONAL_ID ) ) ) , _spout . getComponentConfiguration ( ) ) ; _coordinatorState = new RotatingTransactionalState ( _state , TransactionalSpoutCoordinator . META_DIR , true ) ; _collector = collector ; _coordinator = _spout . getCoordinator ( conf , context ) ; _currTransaction = getStoredCurrTransaction ( _state ) ; if ( ! ( conf . containsKey ( TOPOLOGY_MAX_SPOUT_PENDING ) ) ) { <START_BUG> _maxTransactionActive = 0 ; <END_BUG> } else { _maxTransactionActive = Utils . getInt ( conf . get ( TOPOLOGY_MAX_SPOUT_PENDING ) ) ; } _initializer = new TransactionalSpoutCoordinator . StateInitializer ( ) ; } @ Override public void close ( ) { } @ Override public void nextTuple ( ) { } @ Override public void ack ( Object msgId ) { } @ Override public void fail ( Object msgId ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } private void sync ( ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } private static enum AttemptStatus { PROCESSING , PROCESSED , COMMITTING ; } private static class TransactionStatus { TransactionAttempt attempt ; TransactionalSpoutCoordinator . AttemptStatus status ; public TransactionStatus ( TransactionAttempt attempt ) { } @ Override public String toString ( ) { } } private static final BigInteger ONE = new BigInteger ( "1" ) ; private BigInteger nextTransactionId ( BigInteger id ) { } private BigInteger getStoredCurrTransaction ( TransactionalState state ) { } private class StateInitializer implements RotatingTransactionalState . StateInitializer { @ Override public Object init ( BigInteger txid , Object lastState ) { } } }

Fix:
_maxTransactionActive = 1 ;
Buggy code:
public class GwtTestRelationalInputParameter extends GWTTestCase { private String aFileName = "inputA.csv" ; public void testSelectDataSourceOnFilledDropdown ( ) throws AlgorithmConfigurationException , InputValidationException { } public void testSetDataSource ( ) throws AlgorithmConfigurationException , InputValidationException { TestHelper . resetDatabaseSync ( ) ; TabWrapper tabWrapper = new TabWrapper ( ) ; FileInput fileInput = new FileInput ( ) ; fileInput . setFileName ( aFileName ) ; ConfigurationSettingFileInput setting = new ConfigurationSettingFileInput ( ) ; setting . setFileName ( aFileName ) ; ConfigurationRequirementRelationalInput configSpec = new ConfigurationRequirementRelationalInput ( "test" ) ; InputParameterRelationalInputWidget dataSourceWidget = new InputParameterRelationalInputWidget ( configSpec , tabWrapper ) ; dataSourceWidget . inputWidgets . get ( 0 ) . listbox . addValue ( aFileName ) ; dataSourceWidget . inputWidgets . get ( 0 ) . inputs . put ( aFileName , fileInput ) ; dataSourceWidget . setDataSource ( setting ) ; <START_BUG> assertTrue ( ( ( ( ( RelationalInputInput ) ( dataSourceWidget . getWidget ( 0 ) ) ) . listbox . getValues ( ) . size ( ) ) == 1 ) ) ; <END_BUG> ConfigurationSettingDataSource retrievedSetting = null ; try { retrievedSetting = ( ( ConfigurationSettingDataSource ) ( dataSourceWidget . getUpdatedSpecification ( ) . getSettings ( ) [ 0 ] ) ) ; } catch ( InputValidationException e ) { TestHelper . resetDatabaseSync ( ) ; e . printStackTrace ( ) ; fail ( ) ; } assertEquals ( aFileName , retrievedSetting . getValueAsString ( ) ) ; TestHelper . resetDatabaseSync ( ) ; } @ Override public String getModuleName ( ) { } }

Fix:
assertTrue ( ( ( ( ( RelationalInputInput ) ( dataSourceWidget . getWidget ( 0 ) ) ) . listbox . getValues ( ) . size ( ) ) == 2 ) ) ;
Buggy code:
public class GroupingSearchTest extends LuceneTestCase { public void testBasic ( ) throws Exception { } private void addGroupField ( Document doc , String groupField , String value , boolean canUseIDV ) { doc . add ( new Field ( groupField , value , TextField . TYPE_STORED ) ) ; if ( canUseIDV ) { <START_BUG> doc . add ( new DocValuesField ( groupField , new BytesRef ( value ) , Type . BYTES_VAR_SORTED ) ) ; <END_BUG> } } private void compareGroupValue ( String expected , GroupDocs < ? > group ) { } private GroupingSearch createRandomGroupingSearch ( String groupField , Sort groupSort , int docsInGroup , boolean canUseIDV ) throws IOException { } }

Fix:
doc . add ( new SortedBytesDocValuesField ( groupField , new BytesRef ( value ) ) ) ;
Buggy code:
public class CustomTextureUnpacker { private static final int NINEPATCH_PADDING = 1 ; private static final String OUTPUT_TYPE = "png" ; public void splitAtlas ( TextureAtlasData atlas , String outputDir ) { } private BufferedImage extractImage ( BufferedImage page , Region region , File outputDirFile , int padding ) { BufferedImage splitImage = null ; if ( region . rotate ) { BufferedImage srcImage = page . getSubimage ( region . left , region . top , region . height , region . width ) ; <START_BUG> splitImage = new BufferedImage ( region . height , region . width , page . getType ( ) ) ; <END_BUG> AffineTransform transform = new AffineTransform ( ) ; transform . rotate ( Math . toRadians ( 90.0 ) ) ; transform . translate ( 0 , ( - ( region . width ) ) ) ; AffineTransformOp op = new AffineTransformOp ( transform , AffineTransformOp . TYPE_BILINEAR ) ; op . filter ( srcImage , splitImage ) ; } else { splitImage = page . getSubimage ( region . left , region . top , region . width , region . height ) ; } if ( padding > 0 ) { BufferedImage paddedImage = new BufferedImage ( ( ( splitImage . getWidth ( ) ) + ( padding * 2 ) ) , ( ( splitImage . getHeight ( ) ) + ( padding * 2 ) ) , page . getType ( ) ) ; Graphics2D g2 = paddedImage . createGraphics ( ) ; g2 . drawImage ( splitImage , padding , padding , null ) ; g2 . dispose ( ) ; return paddedImage ; } else { return splitImage ; } } private BufferedImage extractNinePatch ( BufferedImage page , Region region , File outputDirFile ) { } private void printExceptionAndExit ( Exception e ) { } }

Fix:
splitImage = new BufferedImage ( region . width , region . height , page . getType ( ) ) ;
Buggy code:
public class BaseHREFScannerTest extends ParserTestCase { private BaseHrefScanner scanner ; public BaseHREFScannerTest ( String arg0 ) { } protected void setUp ( ) { } public void testRemoveLastSlash ( ) { } public void testEvaluate ( ) { } public void testScan ( ) throws ParserException { createParser ( "<html><head><TITLE>test<seq2seq4repair_space>page<//TITLE><BASE<seq2seq4repair_space>HREF=\"http:////www.abc.com//\"><a<seq2seq4repair_space>href=\"home.cfm\">Home<//a>...<//html>" , "http:////www.google.com//test//index.html" ) ; LinkScanner linkScanner = new LinkScanner ( "-l" ) ; parser . addScanner ( linkScanner ) ; parser . addScanner ( new TitleScanner ( "-t" ) ) ; parser . addScanner ( linkScanner . createBaseHREFScanner ( "-b" ) ) ; parseAndAssertNodeCount ( 7 ) ; assertTrue ( ( ( node [ 3 ] ) instanceof BaseHrefTag ) ) ; BaseHrefTag baseRefTag = ( ( BaseHrefTag ) ( node [ 3 ] ) ) ; <START_BUG> assertEquals ( "Base<seq2seq4repair_space>HREF<seq2seq4repair_space>Url" , "http:////www.abc.com//" , baseRefTag . getBaseUrl ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( "Base<seq2seq4repair_space>HREF<seq2seq4repair_space>Url" , "http:////www.abc.com" , baseRefTag . getBaseUrl ( ) ) ;
Buggy code:
public class ProjectConfigurationListener implements ArtifactInstaller { private static final Logger LOG = LoggerFactory . getLogger ( ProjectConfigurationListener . class ) ; private static final String packageName = "com.cibuddy.project.configuration.schema" ; Map < File , List < ServiceRegistration > > configuredFiles = new HashMap < File , List < ServiceRegistration > > ( ) ; @ Override public boolean canHandle ( File file ) { ProjectConfigurationListener . LOG . info ( ( "Handle:<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) ) ; if ( file == null ) { return false ; } else if ( file . getName ( ) . endsWith ( ".xml" ) ) { try { <START_BUG> JAXBContext jc = JAXBContext . newInstance ( ProjectConfigurationListener . packageName , this . getClass ( ) . getClassLoader ( ) ) ; <END_BUG> Unmarshaller unmarshaller = jc . createUnmarshaller ( ) ; Setup config = ( ( Setup ) ( unmarshaller . unmarshal ( file ) ) ) ; return true ; } catch ( Exception ex ) { ProjectConfigurationListener . LOG . debug ( "Problems<seq2seq4repair_space>setting<seq2seq4repair_space>up<seq2seq4repair_space>configuration<seq2seq4repair_space>file." , ex ) ; } return false ; } else { return false ; } } @ Override public void install ( File file ) throws Exception { } @ Override public void update ( File file ) throws Exception { } @ Override public void uninstall ( File file ) throws Exception { } private ServiceRegistration registerServer ( BuildTestConfiguration dbtc , File f ) { } private void safePut ( Dictionary dict , String key , Object value ) { } }

Fix:
JAXBContext jc = JAXBContext . newInstance ( ProjectConfigurationListener . packageName , BuildTestConfigurationType . class . getClass ( ) . getClassLoader ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class WeldModuleDeploymentTestCase { public static void doSetup ( ) throws Exception { } @ AfterClass public static void tearDown ( ) throws Exception { } private static void deleteRecursively ( File file ) { } private static void createTestModule ( File testModuleRoot ) throws IOException { } private static void copyFile ( File target , InputStream src ) throws IOException { } private static File getModulePath ( ) { String modulePath = System . getProperty ( "module.path" , null ) ; if ( modulePath == null ) { String jbossHome = System . getProperty ( "jboss.home" , null ) ; if ( jbossHome == null ) { throw new IllegalStateException ( "Neither<seq2seq4repair_space>-Dmodule.path<seq2seq4repair_space>nor<seq2seq4repair_space>-Djboss.home<seq2seq4repair_space>were<seq2seq4repair_space>set" ) ; } modulePath = ( jbossHome + ( File . separatorChar ) ) + "modules" ; } else { <START_BUG> modulePath = modulePath . split ( File . pathSeparator ) [ 0 ] ; <END_BUG> } File moduleDir = new File ( modulePath ) ; if ( ! ( moduleDir . exists ( ) ) ) { throw new IllegalStateException ( "Determined<seq2seq4repair_space>module<seq2seq4repair_space>path<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; } if ( ! ( moduleDir . isDirectory ( ) ) ) { throw new IllegalStateException ( "Determined<seq2seq4repair_space>module<seq2seq4repair_space>path<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>dir" ) ; } return moduleDir ; } @ Deployment public static Archive < ? > deploy2 ( ) throws Exception { } @ Inject private SimpleBean bean ; @ Test public void testSimpleBeanInjected ( ) throws Exception { } }

Fix:
modulePath = modulePath . split ( File . pathSeparator ) [ 1 ] ;
Buggy code:
public class FE { public static void main ( String [ ] args ) throws FileNotFoundException , AdapterInactive , ObjectNotActive , ServantAlreadyActive , WrongPolicy { ORB orb = ORB . init ( args , null ) ; try { POA rootpoa = POAHelper . narrow ( orb . resolve_initial_references ( "RootPOA" ) ) ; <START_BUG> InetSocketAddress testaddress = new InetSocketAddress ( "cecil" , 2018 ) ; <END_BUG> functionImpl FE = new functionImpl ( ) ; FE . start_FE ( testaddress ) ; byte [ ] id = rootpoa . activate_object ( FE ) ; Object ref = rootpoa . id_to_reference ( id ) ; String ior = orb . object_to_string ( ref ) ; System . out . println ( ref ) ; PrintWriter file = new PrintWriter ( "ior.txt" ) ; file . println ( ior ) ; file . close ( ) ; rootpoa . the_POAManager ( ) . activate ( ) ; orb . run ( ) ; } catch ( InvalidName e ) { e . printStackTrace ( ) ; } } }

Fix:
InetSocketAddress testaddress = new InetSocketAddress ( args [ 0 ] , Integer . valueOf ( args [ 1 ] ) ) ;
Buggy code:
public class FundForm extends FormBean { private int fund_id ; private String description ; private String name ; private String symbol ; private String action ; public String getAction ( ) { } public void setAction ( String action ) { } public int getFund_id ( ) { } public String getDescription ( ) { } public String getName ( ) { } public String getSymbol ( ) { } public void setFund_id ( int fund_id ) { } public void setDescription ( String description ) { } public void setName ( String name ) { } public void setSymbol ( String symbol ) { } public List < String > getValidationErrors ( ) { List < String > errors = new ArrayList < String > ( ) ; if ( ( ( name ) == null ) || ( ( name . length ( ) ) == 0 ) ) errors . add ( "Fund<seq2seq4repair_space>name<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; if ( ( ( symbol ) == null ) || ( ( symbol . length ( ) ) == 0 ) ) errors . add ( "Fund<seq2seq4repair_space>symbol<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; if ( ( action ) == null ) errors . add ( "Button<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; <START_BUG> if ( ! ( action . equals ( "Create<seq2seq4repair_space>Mutual<seq2seq4repair_space>Fund" ) ) ) <END_BUG> errors . add ( "Invalid<seq2seq4repair_space>button" ) ; return errors ; } }

Fix:
if ( ! ( action . equals ( "Create" ) ) )
Buggy code:
public abstract class RestartParentResourceHandlerBase implements OperationStepHandler { private final String parentKeyName ; protected RestartParentResourceHandlerBase ( String parentKeyName ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } protected boolean requiresRuntime ( OperationContext context ) { } protected boolean isResourceServiceRestartAllowed ( final OperationContext context , final ServiceController < ? > service ) { } protected void removeServices ( final OperationContext context , final ServiceName parentService , final ModelNode parentModel ) throws OperationFailedException { } protected abstract void updateModel ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } protected abstract void recreateParentService ( OperationContext context , PathAddress parentAddress , ModelNode parentModel , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } protected abstract ServiceName getParentServiceName ( PathAddress parentAddress ) { } protected PathAddress getParentAddress ( PathAddress address ) { } private void recoverServices ( final OperationContext context , final ModelNode operation , final ModelNode invalidatedParentModel ) { } private ModelNode getModel ( OperationContext ctx , PathAddress address ) { try { <START_BUG> Resource resource = ctx . getRootResource ( ) . navigate ( address ) ; <END_BUG> return Tools . readModel ( resource ) ; } catch ( NoSuchElementException e ) { return null ; } } private ModelNode getOriginalModel ( OperationContext ctx , PathAddress address ) { } }

Fix:
Resource resource = ctx . readResourceFromRoot ( address ) ;
Buggy code:
public class WhileControllerGui extends AbstractControllerGui implements ActionListener { private static final String CONDITION_LABEL = "while_controller_label" ; private JTextField theCondition ; private static final String CONDITION = "While_Condition" ; public WhileControllerGui ( ) { } public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement controller ) { } public void actionPerformed ( ActionEvent event ) { } public String getLabelResource ( ) { } private void init ( ) { } private JPanel createConditionPanel ( ) { JPanel conditionPanel = new JPanel ( new BorderLayout ( 5 , 0 ) ) ; JLabel conditionLabel = new JLabel ( JMeterUtils . getResString ( WhileControllerGui . CONDITION_LABEL ) ) ; conditionPanel . add ( conditionLabel , BorderLayout . WEST ) ; <START_BUG> theCondition = new JTextField ( "N//A" ) ; <END_BUG> theCondition . setName ( WhileControllerGui . CONDITION ) ; conditionLabel . setLabelFor ( theCondition ) ; conditionPanel . add ( theCondition , BorderLayout . CENTER ) ; theCondition . addActionListener ( this ) ; conditionPanel . add ( Box . createHorizontalStrut ( ( ( conditionLabel . getPreferredSize ( ) . width ) + ( theCondition . getPreferredSize ( ) . width ) ) ) , BorderLayout . NORTH ) ; return conditionPanel ; } }

Fix:
theCondition = new JTextField ( "" ) ;
Buggy code:
public class CopyMessageCommand extends FolderCommand { protected FolderCommandAdapter adapter ; protected Folder destFolder ; public CopyMessageCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { FolderCommandReference [ ] references = ( ( FolderCommandReference [ ] ) ( getReferences ( ) ) ) ; adapter = new FolderCommandAdapter ( references ) ; FolderCommandReference [ ] r = adapter . getSourceFolderReferences ( ) ; destFolder = adapter . getDestinationFolder ( ) ; for ( int i = 0 ; ( i < ( r . length ) ) && ( ! ( worker . cancelled ( ) ) ) ; i ++ ) { Object [ ] uids = r [ i ] . getUids ( ) ; Folder srcFolder = ( ( Folder ) ( r [ i ] . getFolder ( ) ) ) ; ( ( StatusObservableImpl ) ( srcFolder . getObservable ( ) ) ) . setWorker ( worker ) ; srcFolder . setLastSelection ( null ) ; <START_BUG> log . debug ( ( ( ( "src=" + srcFolder ) + "<seq2seq4repair_space>dest=" ) + ( destFolder ) ) ) ; <END_BUG> worker . setDisplayText ( MessageFormat . format ( MailResourceLoader . getString ( "statusbar" , "message" , "copy_messages" ) , new Object [ ] { destFolder . getName ( ) } ) ) ; worker . setProgressBarMaximum ( uids . length ) ; if ( srcFolder . getRootFolder ( ) . equals ( destFolder . getRootFolder ( ) ) ) { srcFolder . innerCopy ( destFolder , uids ) ; } else { for ( int j = 0 ; ( j < ( uids . length ) ) && ( ! ( worker . cancelled ( ) ) ) ; j ++ ) { if ( srcFolder . exists ( uids [ j ] ) ) { continue ; } try { destFolder . addMessage ( srcFolder . getMessageSourceStream ( uids [ j ] ) ) ; } catch ( IOException ioe ) { String [ ] options = new String [ ] { MailResourceLoader . getString ( "statusbar" , "message" , "err_copy_messages_retry" ) , MailResourceLoader . getString ( "statusbar" , "message" , "err_copy_messages_ignore" ) , MailResourceLoader . getString ( "" , "global" , "cancel" ) } ; switch ( JOptionPane . showOptionDialog ( null , MailResourceLoader . getString ( "statusbar" , "message" , "err_copy_messages_msg" ) , MailResourceLoader . getString ( "statusbar" , "message" , "err_copy_messages_title" ) , JOptionPane . YES_NO_CANCEL_OPTION , JOptionPane . ERROR_MESSAGE , null , options , options [ 0 ] ) ) { case JOptionPane . YES_OPTION : j -- ; break ; case JOptionPane . CANCEL_OPTION : worker . cancel ( ) ; default : continue ; } } worker . setProgressBarValue ( j ) ; } } worker . setProgressBarValue ( 0 ) ; } if ( worker . cancelled ( ) ) { worker . setDisplayText ( MailResourceLoader . getString ( "statusbar" , "message" , "copy_messages_cancelled" ) ) ; } else { worker . clearDisplayTextWithDelay ( ) ; } } }

Fix:
log . info ( ( ( ( "src=" + srcFolder ) + "<seq2seq4repair_space>dest=" ) + ( destFolder ) ) ) ;
Buggy code:
public abstract class JDBCTask extends Task { private static Hashtable loaderMap = new Hashtable ( 3 ) ; private boolean caching = true ; private Path classpath ; private AntClassLoader loader ; private boolean autocommit = false ; private String driver = null ; private String url = null ; private String userId = null ; private String password = null ; private String rdbms = null ; private String version = null ; public void setClasspath ( Path classpath ) { } public void setCaching ( boolean enable ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public void setDriver ( String driver ) { <START_BUG> this . driver = driver ; <END_BUG> } public void setUrl ( String url ) { } public void setPassword ( String password ) { } public void setAutocommit ( boolean autocommit ) { } public void setRdbms ( String rdbms ) { } public void setVersion ( String version ) { } protected boolean isValidRdbms ( Connection conn ) { } protected static Hashtable getLoaderMap ( ) { } protected AntClassLoader getLoader ( ) { } protected Connection getConnection ( ) throws BuildException { } private Driver getDriver ( ) throws BuildException { } public void isCaching ( boolean value ) { } public Path getClasspath ( ) { } public boolean isAutocommit ( ) { } public String getUrl ( ) { } public String getUserId ( ) { } public void setUserid ( String userId ) { } public String getPassword ( ) { } public String getRdbms ( ) { } public String getVersion ( ) { } }

Fix:
this . driver = driver . trim ( ) ;
Buggy code:
public class QualifiedTypeReference extends TypeReference { public char [ ] [ ] tokens ; public long [ ] sourcePositions ; public QualifiedTypeReference ( char [ ] [ ] sources , long [ ] poss ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding findNextTypeBinding ( int tokenIndex , Scope scope , PackageBinding packageBinding ) { try { if ( ( this . resolvedType ) == null ) { this . resolvedType = scope . getType ( this . tokens [ tokenIndex ] , packageBinding ) ; } else { this . resolvedType = scope . getMemberType ( this . tokens [ tokenIndex ] , ( ( ReferenceBinding ) ( this . resolvedType ) ) ) ; if ( ( this . resolvedType ) instanceof ProblemReferenceBinding ) { ProblemReferenceBinding problemBinding = ( ( ProblemReferenceBinding ) ( this . resolvedType ) ) ; <START_BUG> this . resolvedType = new ProblemReferenceBinding ( CharOperation . subarray ( this . tokens , 0 , ( tokenIndex + 1 ) ) , problemBinding . original , this . resolvedType . problemId ( ) ) ; <END_BUG> } } return this . resolvedType ; } catch ( AbortCompilation e ) { e . updateContext ( this , scope . referenceCompilationUnit ( ) . compilationResult ) ; throw e ; } } protected TypeBinding getTypeBinding ( Scope scope ) { } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
this . resolvedType = new ProblemReferenceBinding ( CharOperation . subarray ( this . tokens , 0 , ( tokenIndex + 1 ) ) , problemBinding . closestMatch , this . resolvedType . problemId ( ) ) ;
Buggy code:
public class KomodoErrorHandler implements KErrorHandler { private Set < KErrorHandler > errorHandlers = Collections . emptySet ( ) ; public void add ( KErrorHandler errorHandler ) { } public void remove ( KErrorHandler errorHandler ) { } @ Override public void warn ( String message ) { } @ Override public void error ( String message ) { } @ Override public void error ( Throwable ex ) { <START_BUG> org . komodo . utils . KLog . getLogger ( ) . error ( ex . getLocalizedMessage ( ) , ex ) ; <END_BUG> for ( KErrorHandler handler : errorHandlers ) { handler . error ( ex ) ; } } @ Override public void error ( String message , Throwable ex ) { } }

Fix:
org . komodo . utils . KLog . getLogger ( ) . error ( ( ex == null ? "<no<seq2seq4repair_space>message>" : ex . getLocalizedMessage ( ) ) , ex ) ;