nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ServiceDeployer { private DeployedServicesRegistry registry ; public String deploy ( Service service ) throws MalformedURLException { RecipeFactory factory = new RecipeFactory ( ) ; Recipe serviceDeployRecipe = factory . createRecipe ( service ) ; RecipeDeployer deployer = new RecipeDeployer ( new NodePoolManagerHandler ( ) ) ; deployer . uploadRecipe ( serviceDeployRecipe ) ; String deployedHost = deployer . deployRecipe ( serviceDeployRecipe , service ) ; String serviceURL ; if ( deployedHost . contains ( "http:////" ) ) <START_BUG> serviceURL = ( ( ( ( ( service . getUri ( ) ) + ":" ) + ( service . getPort ( ) ) ) + "//" ) + ( service . getId ( ) ) ) + "//" ; <END_BUG> else serviceURL = ( ( ( ( ( "http:////" + ( service . getUri ( ) ) ) + ":" ) + ( service . getPort ( ) ) ) + "//" ) + ( service . getId ( ) ) ) + "//" ; return serviceURL ; } public Service getService ( String serviceID ) { } public Service updateService ( Service service ) { } public void deleteService ( String serviceID ) { } }

Fix:
serviceURL = ( ( ( ( ( ( service . getUri ( ) ) + ":" ) + ( service . getPort ( ) ) ) + "//" ) + "service" ) + ( service . getId ( ) ) ) + "Deploy//" ;
Buggy code:
public class POP3Server { private AccountItem accountItem ; private File file ; public POP3Protocol pop3Connection ; private boolean alreadyLoaded ; private POP3Store store ; protected POP3HeaderCache headerCache ; public POP3Server ( AccountItem accountItem ) { } public void save ( ) throws Exception { } public File getConfigFile ( ) { } public AccountItem getAccountItem ( ) { } public Folder getFolder ( ) { } public void logout ( ) throws Exception { } public void forceLogout ( ) throws Exception { } public List getUIDList ( int totalMessageCount ) throws Exception { } public List getMessageSizeList ( ) throws Exception { } protected boolean existsLocally ( Object uid , HeaderList list ) throws Exception { } protected boolean existsRemotely ( Object uid , List uidList ) throws Exception { } public List synchronize ( List newList ) throws Exception { } public void deleteMessages ( int [ ] indexes ) throws Exception { } public void deleteMessage ( int index ) throws Exception { } public int getMessageCount ( ) throws Exception { } public ColumbaMessage getMessage ( int index , Object uid ) throws Exception { ColumbaMessage message = getStore ( ) . fetchMessage ( index ) ; if ( message == null ) return null ; ColumbaHeader header = ( ( ColumbaHeader ) ( message . getHeader ( ) ) ) ; header . set ( "columba.pop3uid" , uid ) ; <START_BUG> header . set ( "columba.flags.recent" , Boolean . TRUE ) ; <END_BUG> String contentType = ( ( String ) ( header . get ( "Content-Type" ) ) ) ; if ( contentType != null ) { if ( ( contentType . indexOf ( "multipart" ) ) != ( - 1 ) ) header . set ( "columba.attachment" , Boolean . TRUE ) ; else header . set ( "columba.attachment" , Boolean . FALSE ) ; } headerCache . getHeaderList ( ) . add ( header , uid ) ; return message ; } public String getFolderName ( ) { } public POP3Store getStore ( ) { } public StatusObservable getObservable ( ) { } }

Fix:
header . getFlags ( ) . setRecent ( true ) ;
Buggy code:
public class HelpHandler extends CommandHandlerWithHelp { private final ArgumentWithoutValue commands = new ArgumentWithoutValue ( this , "--commands" ) ; public HelpHandler ( ) { } public HelpHandler ( String command ) { } @ Override public void handle ( CommandContext ctx ) { boolean printCommands ; try { printCommands = commands . isPresent ( ctx . getParsedCommandLine ( ) ) ; } catch ( CommandFormatException e ) { <START_BUG> ctx . printLine ( e . getLocalizedMessage ( ) ) ; <END_BUG> return ; } if ( printCommands ) { final List < String > commands = new ArrayList < String > ( ) ; ctx . getDefaultCommandCompleter ( ) . complete ( ctx , "" , 0 , commands ) ; ctx . printLine ( "Commands<seq2seq4repair_space>available<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>context:" ) ; ctx . printColumns ( commands ) ; ctx . printLine ( "To<seq2seq4repair_space>read<seq2seq4repair_space>a<seq2seq4repair_space>description<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>specific<seq2seq4repair_space>command<seq2seq4repair_space>execute<seq2seq4repair_space>'command_name<seq2seq4repair_space>--help'." ) ; } else { printHelp ( ctx ) ; } } @ Override protected void doHandle ( CommandContext ctx ) { } }

Fix:
ctx . error ( e . getLocalizedMessage ( ) ) ;
Buggy code:
public class WebIntegrationProcessor implements DeploymentUnitProcessor { private final ListenerMetaData WBL ; private final ListenerMetaData JIL ; private final FilterMetaData CPF ; private final FilterMappingMetaData CPFM ; private static final Logger log = Logger . getLogger ( "org.jboss.as.weld" ) ; public WebIntegrationProcessor ( ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) ) { return ; } <START_BUG> if ( ! ( WeldDeploymentMarker . isWeldDeployment ( deploymentUnit ) ) ) { <END_BUG> return ; } WarMetaData warMetaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; if ( warMetaData == null ) { WebIntegrationProcessor . log . info ( "Not<seq2seq4repair_space>installing<seq2seq4repair_space>Weld<seq2seq4repair_space>web<seq2seq4repair_space>tier<seq2seq4repair_space>integration<seq2seq4repair_space>as<seq2seq4repair_space>no<seq2seq4repair_space>war<seq2seq4repair_space>metadata<seq2seq4repair_space>found" ) ; return ; } WebMetaData webMetaData = warMetaData . getWebMetaData ( ) ; if ( webMetaData == null ) { WebIntegrationProcessor . log . info ( "Not<seq2seq4repair_space>installing<seq2seq4repair_space>Weld<seq2seq4repair_space>web<seq2seq4repair_space>tier<seq2seq4repair_space>integration<seq2seq4repair_space>as<seq2seq4repair_space>no<seq2seq4repair_space>web<seq2seq4repair_space>metadata<seq2seq4repair_space>found" ) ; return ; } List < ListenerMetaData > listeners = webMetaData . getListeners ( ) ; if ( listeners == null ) { listeners = new ArrayList < ListenerMetaData > ( ) ; webMetaData . setListeners ( listeners ) ; } listeners . add ( 0 , WBL ) ; listeners . add ( 1 , JIL ) ; FiltersMetaData filters = webMetaData . getFilters ( ) ; if ( filters == null ) { filters = new FiltersMetaData ( ) ; webMetaData . setFilters ( filters ) ; } filters . add ( CPF ) ; List < FilterMappingMetaData > filterMappings = webMetaData . getFilterMappings ( ) ; if ( filterMappings == null ) { filterMappings = new ArrayList < FilterMappingMetaData > ( ) ; webMetaData . setFilterMappings ( filterMappings ) ; } filterMappings . add ( CPFM ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( ! ( WeldDeploymentMarker . isPartOfWeldDeployment ( deploymentUnit ) ) ) {
Buggy code:
public class Jvc extends DefaultCompilerAdapter { public boolean execute ( ) throws TaskException { getLogger ( ) . debug ( "Using<seq2seq4repair_space>jvc<seq2seq4repair_space>compiler" ) ; Path classpath = new Path ( ) ; if ( ( m_bootclasspath ) != null ) { classpath . append ( m_bootclasspath ) ; } <START_BUG> classpath . addExtdirs ( m_extdirs ) ; <END_BUG> if ( ( ( m_bootclasspath ) == null ) || ( ( m_bootclasspath . size ( ) ) == 0 ) ) { m_includeJavaRuntime = true ; } else { } classpath . append ( getCompileClasspath ( ) ) ; classpath . append ( src ) ; Commandline cmd = new Commandline ( ) ; cmd . setExecutable ( "jvc" ) ; if ( ( m_destDir ) != null ) { cmd . createArgument ( ) . setValue ( "//d" ) ; cmd . createArgument ( ) . setFile ( m_destDir ) ; } cmd . createArgument ( ) . setValue ( "//cp:p" ) ; cmd . createArgument ( ) . setPath ( classpath ) ; cmd . createArgument ( ) . setValue ( "//x-" ) ; cmd . createArgument ( ) . setValue ( "//nomessage" ) ; cmd . createArgument ( ) . setValue ( "//nologo" ) ; if ( m_debug ) { cmd . createArgument ( ) . setValue ( "//g" ) ; } if ( m_optimize ) { cmd . createArgument ( ) . setValue ( "//O" ) ; } if ( m_verbose ) { cmd . createArgument ( ) . setValue ( "//verbose" ) ; } addCurrentCompilerArgs ( cmd ) ; int firstFileName = cmd . size ( ) ; logAndAddFilesToCompile ( cmd ) ; return ( executeExternalCompile ( cmd . getCommandline ( ) , firstFileName ) ) == 0 ; } }

Fix:
addExtdirs ( classpath ) ;
Buggy code:
public class BecomeWorkingCopyOperation extends JavaModelOperation { IPath path ; IProblemRequestor problemRequestor ; public BecomeWorkingCopyOperation ( CompilationUnit workingCopy , IPath path , IProblemRequestor problemRequestor ) { } protected void executeOperation ( ) throws JavaModelException { CompilationUnit workingCopy = getWorkingCopy ( ) ; JavaModelManager . getJavaModelManager ( ) . getPerWorkingCopyInfo ( workingCopy , this . path , true , true , this . problemRequestor ) ; workingCopy . openWhenClosed ( workingCopy . createElementInfo ( ) , fMonitor ) ; if ( ! ( workingCopy . isPrimary ( ) ) ) { JavaElementDelta delta = new JavaElementDelta ( this . getJavaModel ( ) ) ; delta . added ( workingCopy ) ; addDelta ( delta ) ; } else { if ( workingCopy . getResource ( ) . isAccessible ( ) ) { JavaElementDelta delta = new JavaElementDelta ( this . getJavaModel ( ) ) ; delta . changed ( workingCopy , IJavaElementDelta . F_PRIMARY_WORKING_COPY ) ; addDelta ( delta ) ; } else { JavaElementDelta delta = new JavaElementDelta ( this . getJavaModel ( ) ) ; <START_BUG> delta . added ( workingCopy ) ; <END_BUG> addDelta ( delta ) ; } } fResultElements = new IJavaElement [ ] { workingCopy } ; } protected CompilationUnit getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } }

Fix:
delta . added ( workingCopy , IJavaElementDelta . F_PRIMARY_WORKING_COPY ) ;
Buggy code:
public class CovMerge extends CovBase { private File tofile = null ; private Vector filesets = new Vector ( ) ; private boolean verbose ; public void setTofile ( File value ) { } public void setVerbose ( boolean flag ) { } public void addFileset ( FileSet fs ) { } public CovMerge ( ) { } public void execute ( ) throws BuildException { } protected void checkOptions ( ) throws BuildException { if ( ( tofile ) == null ) { throw new BuildException ( "'tofile'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set." ) ; } if ( ( ( getHome ( ) ) == null ) || ( ! ( getHome ( ) . isDirectory ( ) ) ) ) { throw new BuildException ( "Invalid<seq2seq4repair_space>home<seq2seq4repair_space>directory.<seq2seq4repair_space>Must<seq2seq4repair_space>point<seq2seq4repair_space>to<seq2seq4repair_space>JProbe<seq2seq4repair_space>home<seq2seq4repair_space>directory" ) ; } <START_BUG> File jar = findJar ( "coverage//coverage.jar" ) ; <END_BUG> if ( ! ( jar . exists ( ) ) ) { throw new BuildException ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>Coverage<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( getHome ( ) ) ) ) ; } } protected File [ ] getSnapshots ( ) { } protected File createParamFile ( ) throws BuildException { } }

Fix:
File jar = findCoverageJar ( ) ;
Buggy code:
public class ModClusterAddProxy implements OperationStepHandler , DescriptionProvider { static final ModClusterAddProxy INSTANCE = new ModClusterAddProxy ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . isNormalServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "add-proxy:<seq2seq4repair_space>%s" , operation ) ; Proxy proxy = new Proxy ( operation ) ; modcluster . addProxy ( proxy . host , proxy . port ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( NAME ) ) != null ) ) {
Buggy code:
public class PersonResourceTest { private static ServerControls server ; private static GraphDatabaseService databaseService ; @ BeforeClass public static void setUp ( ) throws Exception { } @ AfterClass public static void tearDown ( ) throws Exception { } @ Test public void testFind ( ) throws Exception { } @ Test public void testFindNonExistingPerson ( ) throws Exception { } @ Test public void testCreate ( ) throws Exception { Device device = TestUtility . createDevice ( "c195442d1e65c922" , 20 , "125.0.12.2" , "127.0.12.2" , "GCM-123456777" , "HTC" , "Light" , "Temperature" ) ; UserDevice userDevice = new UserDevice ( ) ; userDevice . setUserID ( "+94770780211" ) ; userDevice . setDevice ( device ) ; HTTP . Response response = HTTP . POST ( PersonResourceTest . server . httpURI ( ) . resolve ( "//contra//person//create" ) . toString ( ) , userDevice ) ; <START_BUG> assertEquals ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>request." , HttpURLConnection . HTTP_OK , response . status ( ) ) ; <END_BUG> try ( Transaction transaction = PersonResourceTest . databaseService . beginTx ( ) ) { Node node = PersonResourceTest . databaseService . findNode ( Person , USER_ID , "+94770780211" ) ; transaction . success ( ) ; assertTrue ( "Person<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>created." , ( node != null ) ) ; } } @ Test public void testCreateWithDuplicateDevice ( ) throws Exception { } @ Test public void testUpdate ( ) throws Exception { } @ Test public void testCreateWithNullProperties ( ) throws Exception { } @ Test public void testKnows ( ) throws Exception { } @ Test public void testNearByKnownPeople ( ) throws Exception { } }

Fix:
assertEquals ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>request." , HttpURLConnection . HTTP_CREATED , response . status ( ) ) ;
Buggy code:
public class OrderStatusController extends AbstractController < OrderStatusView , OrderStatusModel > { private static OrderStatusController instance ; public OrderStatusController ( OrderStatusModel model , OrderStatusView view ) { } public static OrderStatusController getInstance ( ) { } @ Override public void handleEvent ( LocalUIEvent event ) { if ( ( event . getEventId ( ) ) == ( PUSH_BACK_BUTTON . ordinal ( ) ) ) { System . out . println ( "---<seq2seq4repair_space>Wechsle<seq2seq4repair_space>zum<seq2seq4repair_space>Hauptmenu" ) ; MainWindowController . getInstance ( ) ; } if ( ( event . getEventId ( ) ) == ( SEARCH . ordinal ( ) ) ) { System . out . println ( "starte<seq2seq4repair_space>suche..." ) ; ServiceWSImplService gsservice = new ServiceWSImplService ( ) ; ServiceWS gs = gsservice . getServiceWSImplPort ( ) ; OrderDAO orderdao = new OrderDAO ( ) ; String id = ( ( String ) ( event . getData ( ) ) ) ; if ( id . matches ( "[0-9]+" ) ) { System . out . println ( ( "ID:<seq2seq4repair_space>" + id ) ) ; Order order = orderdao . getById ( Long . parseLong ( id ) ) ; if ( order != null ) { try { String state = gs . getState ( order . getId ( ) ) ; <START_BUG> if ( state != "" ) { <END_BUG> registeredViews . get ( 0 ) . showStatus ( order . getId ( ) , state ) ; } else { registeredViews . get ( 0 ) . incorrectInput ( ) ; } } catch ( ClientTransportException e ) { System . out . println ( e . getMessage ( ) ) ; JOptionPane . showMessageDialog ( new JFrame ( ) , NO_CONNECTION_GS , ERROR_TITLE , JOptionPane . ERROR_MESSAGE ) ; registeredViews . get ( 0 ) . focus ( ) ; } } else { registeredViews . get ( 0 ) . incorrectInput ( ) ; } } else { registeredViews . get ( 0 ) . incorrectInputNumber ( ) ; } } } }

Fix:
if ( ! ( state . equals ( "" ) ) ) {
Buggy code:
public class PropertyColumn extends AbstractColumn { private static final long serialVersionUID = 1L ; private final String propertyExpression ; public PropertyColumn ( IModel displayModel , String sortProperty , String propertyExpression ) { } public PropertyColumn ( IModel displayModel , String propertyExpressions ) { } public void populateItem ( Item item , String componentId , IModel model ) { <START_BUG> item . add ( new wicket . markup . html . basic . Label ( componentId , createLabelModel ( model ) ) ) ; <END_BUG> } protected IModel createLabelModel ( IModel embeddedModel ) { } public String getPropertyExpression ( ) { } }

Fix:
item . add ( new wicket . markup . html . basic . Label ( item , componentId , createLabelModel ( model ) ) ) ;
Buggy code:
public class DefaultOperationRequestAddress implements OperationRequestAddress { private final List < DefaultOperationRequestAddress . NodeImpl > nodes = new ArrayList < DefaultOperationRequestAddress . NodeImpl > ( ) ; public DefaultOperationRequestAddress ( ) { } public DefaultOperationRequestAddress ( OperationRequestAddress initial ) { } @ Override public void toNodeType ( String nodeType ) { } @ Override public void toNode ( String nodeName ) { if ( nodes . isEmpty ( ) ) <START_BUG> throw new IllegalStateException ( "The<seq2seq4repair_space>prefix<seq2seq4repair_space>should<seq2seq4repair_space>end<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>node<seq2seq4repair_space>type<seq2seq4repair_space>before<seq2seq4repair_space>going<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>specific<seq2seq4repair_space>node<seq2seq4repair_space>name." ) ; <END_BUG> nodes . get ( ( ( nodes . size ( ) ) - 1 ) ) . name = nodeName ; } @ Override public void toNode ( String nodeType , String nodeName ) { } @ Override public String toNodeType ( ) { } @ Override public Node toParentNode ( ) { } @ Override public void reset ( ) { } @ Override public boolean endsOnType ( ) { } @ Override public boolean isEmpty ( ) { } @ Override public Iterator < Node > iterator ( ) { } @ Override public String getNodeType ( ) { } @ Override public String getNodeName ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } private static final class NodeImpl implements Node { String type ; String name ; NodeImpl ( String type , String name ) { } @ Override public String getType ( ) { } @ Override public String getName ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } } }

Fix:
throw new IllegalStateException ( ( ( "Node<seq2seq4repair_space>name<seq2seq4repair_space>'" + nodeName ) + "'<seq2seq4repair_space>should<seq2seq4repair_space>follow<seq2seq4repair_space>a<seq2seq4repair_space>node<seq2seq4repair_space>type." ) ) ;
Buggy code:
public class TestCaseRunner { private static final ILogger log = Logger . getLogger ( TestCaseRunner . class ) ; private final TestCase testCase ; private final Coordinator coordinator ; private final AgentsClient agentsClient ; private final TestSuite testSuite ; private final String prefix ; private final Set < Failure . Type > nonCriticalFailures ; public TestCaseRunner ( TestCase testCase , TestSuite testSuite , Coordinator coordinator , int maxTextCaseIdLength ) { } public boolean run ( ) throws Exception { } private void processProbeResults ( ) { } private < R extends Result < R > > void logProbesResultInHumanReadableFormat ( Map < String , R > combinedResults ) { for ( Map . Entry < String , R > entry : combinedResults . entrySet ( ) ) { String probeName = entry . getKey ( ) ; R result = entry . getValue ( ) ; <START_BUG> echo ( ( ( ( "Probe<seq2seq4repair_space>" + probeName ) + "<seq2seq4repair_space>result:<seq2seq4repair_space>" ) + ( result . toHumanString ( ) ) ) ) ; <END_BUG> } } private < R extends Result < R > > Map < String , R > getProbesResult ( ) { } private void logPerformance ( ) { } private void startTestCase ( ) throws TimeoutException { } public void sleepSeconds ( int seconds ) { } private boolean shouldTerminate ( ) { } private void echo ( String msg ) { } }

Fix:
echo ( ( ( ( "Probe<seq2seq4repair_space>" + probeName ) + "<seq2seq4repair_space>result:\n" ) + ( result . toHumanString ( ) ) ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { <START_BUG> JFrame frame = new JFrame ( "Editing<seq2seq4repair_space>Graph<seq2seq4repair_space>Viewer" ) ; <END_BUG> frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; ModeTabbedPane modeTabPane = new ModeTabbedPane ( ) ; modeTabPane . initialise ( ) ; frame . getContentPane ( ) . add ( modeTabPane ) ; JMenuBar menuBar = MyMenuBar . create ( modeTabPane . getModelList ( ) , modeTabPane . getCreationTab ( ) ) ; frame . setJMenuBar ( menuBar ) ; modeTabPane . addDisableComponent ( menuBar ) ; for ( int i = 0 ; i < ( menuBar . getMenuCount ( ) ) ; i ++ ) { modeTabPane . addDisableComponent ( menuBar . getMenu ( i ) ) ; } frame . pack ( ) ; frame . setResizable ( false ) ; frame . setVisible ( true ) ; } }

Fix:
JFrame frame = new JFrame ( "FSA<seq2seq4repair_space>animator" ) ;
Buggy code:
public class HtmlView { public static String createListHtml ( String baseUrl , Feed feed , DateTime dtnow , DateTime dt2weeks , String backUrl ) { StringBuilder sb = new StringBuilder ( ) ; if ( ( feed . author ) != null ) { sb . append ( "<span<seq2seq4repair_space>class=\"author\">Author:<seq2seq4repair_space>" ) ; if ( ( feed . author . name ) != null ) sb . append ( feed . author . name ) ; else sb . append ( "&lt;no<seq2seq4repair_space>name<seq2seq4repair_space>found&gt;" ) ; if ( ( ( feed . author . email ) != null ) && ( ! ( feed . author . email . equalsIgnoreCase ( feed . author . name ) ) ) ) sb . append ( ",<seq2seq4repair_space>" ) . append ( feed . author . email ) ; sb . append ( "<//span><br><br>\n" ) ; } CalendarFeed cf = null ; if ( feed instanceof CalendarFeed ) cf = ( ( CalendarFeed ) ( feed ) ) ; EventFeed ef = null ; if ( feed instanceof EventFeed ) ef = ( ( EventFeed ) ( feed ) ) ; if ( cf != null ) { sb . append ( "<p>Please<seq2seq4repair_space>select<seq2seq4repair_space>a<seq2seq4repair_space>calendar<seq2seq4repair_space>to<seq2seq4repair_space>see<seq2seq4repair_space>its<seq2seq4repair_space>events<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>next<seq2seq4repair_space>two<seq2seq4repair_space>weeks,<seq2seq4repair_space>from<seq2seq4repair_space>" ) ; sb . append ( dtnow . toString ( ) ) ; sb . append ( "<seq2seq4repair_space>until<seq2seq4repair_space>" ) ; sb . append ( dt2weeks . toString ( ) ) ; sb . append ( ".<//p>\n" ) ; } if ( ef != null ) { sb . append ( "<p>Please<seq2seq4repair_space>select<seq2seq4repair_space>the<seq2seq4repair_space>entry<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>via<seq2seq4repair_space>your<seq2seq4repair_space>Gmail<seq2seq4repair_space>account.<//p>\n" ) ; <START_BUG> sb . append ( "<p><a<seq2seq4repair_space>href='" ) . append ( backUrl ) . append ( "'>Back<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>previous<seq2seq4repair_space>page.<//p>" ) ; <END_BUG> } sb . append ( "<hr>" ) ; for ( Entry entry : feed . getEntries ( ) ) { sb . append ( HtmlView . createListEntryHtml ( baseUrl , entry ) ) ; sb . append ( "<br>" ) ; } return sb . toString ( ) ; } public static String createListEntryHtml ( String baseUrl , Entry entry ) { } private static String createUrlForCalendar ( String base , String calendarId ) { } }

Fix:
sb . append ( "<p><a<seq2seq4repair_space>href='" ) . append ( backUrl ) . append ( "'>Back<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>previous<seq2seq4repair_space>page.<//a><//p>" ) ;
Buggy code:
public class Vector3iTest { private Vector3i v1 ; private Vector3i v2 ; private Vector3i v3 ; public Vector3iTest ( ) { } @ BeforeClass public static void setUpClass ( ) throws Exception { } @ AfterClass public static void tearDownClass ( ) throws Exception { } @ Before public void setUp ( ) { } @ After public void tearDown ( ) { } @ Test public void emptyConstructor ( ) { } @ Test public void tripleConstructor ( ) { } @ Test public void offsetConstructor ( ) { } @ Test public void offsetConstructorWithNegatives ( ) { } @ Test public void copyConstructor ( ) { } @ Test public void testEquals ( ) { } @ Test public void testSetTriple ( ) { } @ Test public void testSetCopy ( ) { } @ Test public void testAdd ( ) { } @ Test public void testAddTriple ( ) { } @ Test public void testMin ( ) { } @ Test public void testMax ( ) { } @ Test public void testIsUnitVector ( ) { assertFalse ( Vector3i . zero ( ) . isUnitVector ( ) ) ; assertTrue ( Vector3i . unitX ( ) . isUnitVector ( ) ) ; assertTrue ( Vector3i . unitY ( ) . isUnitVector ( ) ) ; assertTrue ( Vector3i . unitZ ( ) . isUnitVector ( ) ) ; Vector3i v = Vector3i . unitX ( ) ; <START_BUG> v . negate ( ) ; <END_BUG> assertTrue ( v . isUnitVector ( ) ) ; assertFalse ( Vector3i . one ( ) . isUnitVector ( ) ) ; } @ Test public void testManhattanDistance ( ) { } @ Test public void testManhattanMagnitude ( ) { } @ Test public void testHash ( ) { } @ Test public void testHashCollisions ( ) { } }

Fix:
v . scale ( ( - 1 ) ) ;
Buggy code:
public class CreatePackageFragmentOperation extends JavaModelOperation { protected String [ ] pkgName ; public CreatePackageFragmentOperation ( IPackageFragmentRoot parentElement , String packageName , boolean force ) { } protected void executeOperation ( ) throws JavaModelException { try { JavaElementDelta delta = null ; PackageFragmentRoot root = ( ( PackageFragmentRoot ) ( getParentElement ( ) ) ) ; beginTask ( Messages . operation_createPackageFragmentProgress , this . pkgName . length ) ; IContainer parentFolder = ( ( IContainer ) ( root . resource ( ) ) ) ; String [ ] sideEffectPackageName = CharOperation . NO_STRINGS ; ArrayList results = new ArrayList ( this . pkgName . length ) ; char [ ] [ ] inclusionPatterns = root . fullInclusionPatternChars ( ) ; char [ ] [ ] exclusionPatterns = root . fullExclusionPatternChars ( ) ; int i ; for ( i = 0 ; i < ( this . pkgName . length ) ; i ++ ) { String subFolderName = this . pkgName [ i ] ; sideEffectPackageName = Util . arrayConcat ( sideEffectPackageName , subFolderName ) ; IResource subFolder = parentFolder . findMember ( subFolderName ) ; if ( subFolder == null ) { <START_BUG> createFolder ( parentFolder , subFolderName , force ) ; <END_BUG> parentFolder = parentFolder . getFolder ( new Path ( subFolderName ) ) ; IPackageFragment addedFrag = root . getPackageFragment ( sideEffectPackageName ) ; if ( ! ( Util . isExcluded ( parentFolder , inclusionPatterns , exclusionPatterns ) ) ) { if ( delta == null ) { delta = newJavaElementDelta ( ) ; } delta . added ( addedFrag ) ; } results . add ( addedFrag ) ; } else { parentFolder = ( ( IContainer ) ( subFolder ) ) ; } worked ( 1 ) ; } if ( ( results . size ( ) ) > 0 ) { this . resultElements = new IJavaElement [ results . size ( ) ] ; results . toArray ( this . resultElements ) ; if ( delta != null ) { addDelta ( delta ) ; } } } finally { done ( ) ; } } protected ISchedulingRule getSchedulingRule ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
createFolder ( parentFolder , subFolderName , this . force ) ;
Buggy code:
public class ChunkSpearman { private static class Holder { int startPos ; int endPos ; boolean isBaseline ; File file ; } private static void addFileOrNull ( ChunkSpearman . Holder h ) throws Exception { } private static List < ChunkSpearman . Holder > getComparisonMatrices ( ) throws Exception { List < ChunkSpearman . Holder > list = new ArrayList < ChunkSpearman . Holder > ( ) ; BufferedReader reader = new BufferedReader ( new FileReader ( new File ( "//nobackup//afodor_research//af_broad//chunks//pneuOnlyChunks_0.85_0.9.txt" ) ) ) ; reader . readLine ( ) ; String [ ] lastSplits = null ; for ( String s = reader . readLine ( ) ; s != null ; s = reader . readLine ( ) ) { String [ ] splits = s . split ( "\t" ) ; if ( ( splits . length ) != 4 ) throw new Exception ( "No" ) ; if ( lastSplits != null ) { ChunkSpearman . Holder h = new ChunkSpearman . Holder ( ) ; h . startPos = ( Integer . parseInt ( lastSplits [ 1 ] ) ) + 6000 ; h . endPos = ( Integer . parseInt ( splits [ 0 ] ) ) - 1000 ; h . isBaseline = true ; if ( ( ( h . endPos ) - ( h . startPos ) ) > 5000 ) { ChunkSpearman . addFileOrNull ( h ) ; if ( ( h . file ) != null ) list . add ( h ) ; } } ChunkSpearman . Holder h = new ChunkSpearman . Holder ( ) ; h . startPos = Integer . parseInt ( splits [ 0 ] ) ; <START_BUG> h . endPos = Integer . parseInt ( ( ( splits [ 1 ] ) + 5000 ) ) ; <END_BUG> h . isBaseline = false ; ChunkSpearman . addFileOrNull ( h ) ; if ( ( h . file ) != null ) list . add ( h ) ; } return list ; } public static void main ( String [ ] args ) throws Exception { } }

Fix:
h . endPos = ( Integer . parseInt ( splits [ 1 ] ) ) + 5000 ;
Buggy code:
public class ApplicationClientDependencyProcessor implements DeploymentUnitProcessor { public static ModuleIdentifier CORBA_ID = ModuleIdentifier . create ( "org.omg.api" ) ; public ApplicationClientDependencyProcessor ( ) { } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; final ModuleLoader loader = deploymentUnit . getAttachment ( SERVICE_MODULE_LOADER ) ; <START_BUG> moduleSpecification . addSystemDependency ( new ModuleDependency ( loader , ApplicationClientDependencyProcessor . CORBA_ID , false , true , true ) ) ; <END_BUG> final Set < ModuleIdentifier > moduleIdentifiers = new HashSet < ModuleIdentifier > ( ) ; final DeploymentUnit top = ( ( deploymentUnit . getParent ( ) ) == null ) ? deploymentUnit : deploymentUnit . getParent ( ) ; moduleIdentifiers . add ( top . getAttachment ( MODULE_IDENTIFIER ) ) ; for ( final DeploymentUnit module : top . getAttachmentList ( SUB_DEPLOYMENTS ) ) { moduleIdentifiers . add ( module . getAttachment ( MODULE_IDENTIFIER ) ) ; } final ListIterator < ModuleDependency > iterator = moduleSpecification . getMutableUserDependencies ( ) . listIterator ( ) ; while ( iterator . hasNext ( ) ) { final ModuleDependency dep = iterator . next ( ) ; final ModuleIdentifier identifier = dep . getIdentifier ( ) ; if ( ( identifier . getName ( ) . startsWith ( MODULE_PREFIX ) ) && ( ! ( identifier . getName ( ) . startsWith ( ExtensionIndexService . MODULE_PREFIX ) ) ) ) { if ( ! ( moduleIdentifiers . contains ( identifier ) ) ) { iterator . remove ( ) ; } } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new ModuleDependency ( loader , ApplicationClientDependencyProcessor . CORBA_ID , false , true , true , false ) ) ;
Buggy code:
public class EnclosureResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( ( tag instanceof WicketTag ) && ( ( ( WicketTag ) ( tag ) ) . isEnclosureTag ( ) ) ) { String id = "enclosure-" + ( container . getPage ( ) . getAutoIndex ( ) ) ; final Enclosure enclosure = new Enclosure ( id , tag . getString ( CHILD_ATTRIBUTE ) ) ; <START_BUG> container . autoAdd ( enclosure ) ; <END_BUG> return true ; } return false ; } }

Fix:
container . autoAdd ( enclosure , markupStream ) ;
Buggy code:
public class StatementEvaluatorTest extends TestCase { private XpandExecutionContextImpl execCtx ; private OutputStringImpl out ; @ Override protected void setUp ( ) throws Exception { } private XpandExecutionContextImpl createCtx ( Output out ) { final XpandExecutionContextImpl result = new XpandExecutionContextImpl ( out , null ) ; <START_BUG> result . setFileEncoding ( "iso-8859-1" ) ; <END_BUG> return result ; } private XpandResource parse ( final String expr ) throws Exception { } private final char LG = '«' ; private final char RG = '»' ; private String tag ( final String str ) { } public final void testEvaluation ( ) throws Exception { } public final void testIf ( ) throws Exception { } public final void testForeach ( ) throws Exception { } public final void testComment ( ) throws Exception { } public final void testMultiParams1 ( ) throws Exception { } public final void testMultiParams2 ( ) throws Exception { } public final void testForeach2 ( ) throws Exception { } @ SuppressWarnings ( "cast" ) public void testBug167428 ( ) throws Exception { } public void testExpandForeachNull ( ) throws Exception { } public void testExpandForNull ( ) throws Exception { } }

Fix:
result . getResourceManager ( ) . setFileEncoding ( "iso-8859-1" ) ;
Buggy code:
public class ChatSORobotApplication implements IPlatformRunnable , IMessageReceiver { private boolean running = false ; private String userName ; private XMPPChatClient client ; private String targetIMUser ; private TrivialSharedObject sharedObject = null ; public synchronized Object run ( Object args ) throws Exception { } private void runRobot ( String hostName , String password , String targetIMUser ) throws Exception , InterruptedException , ECFException { client = new XMPPChatClient ( this ) ; client . setupContainer ( ) ; client . setupPresence ( ) ; ISharedObjectContainer socontainer = ( ( ISharedObjectContainer ) ( client . getContainer ( ) . getAdapter ( ISharedObjectContainer . class ) ) ) ; createTrivialSharedObjectForContainer ( socontainer ) ; client . doConnect ( ( ( ( userName ) + "@" ) + hostName ) , password ) ; this . targetIMUser = targetIMUser ; <START_BUG> client . sendChatMessage ( targetIMUser , "Hi,<seq2seq4repair_space>I'm<seq2seq4repair_space>an<seq2seq4repair_space>IM<seq2seq4repair_space>robot" ) ; <END_BUG> running = true ; int count = 0 ; while ( ( running ) && ( ( count ++ ) < 10 ) ) { sendSOMessage ( ( count + "<seq2seq4repair_space>hello<seq2seq4repair_space>there" ) ) ; wait ( 10000 ) ; } } protected void sendSOMessage ( String msg ) { } protected void createTrivialSharedObjectForContainer ( ISharedObjectContainer soContainer ) throws ECFException { } public synchronized void handleMessage ( IChatMessage chatMessage ) { } }

Fix:
client . sendChat ( targetIMUser , "Hi,<seq2seq4repair_space>I'm<seq2seq4repair_space>an<seq2seq4repair_space>IM<seq2seq4repair_space>robot" ) ;
Buggy code:
public class ArrayAllocationExpression extends Expression { public TypeReference type ; public Expression [ ] dimensions ; public ArrayInitializer initializer ; public ArrayAllocationExpression ( ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { <START_BUG> TypeBinding referenceType = type . resolveType ( scope ) ; <END_BUG> constant = Constant . NotAConstant ; if ( referenceType == ( VoidBinding ) ) { scope . problemReporter ( ) . cannotAllocateVoidArray ( this ) ; referenceType = null ; } int explicitDimIndex = - 1 ; for ( int i = dimensions . length ; ( -- i ) >= 0 ; ) { if ( ( dimensions [ i ] ) != null ) { if ( explicitDimIndex < 0 ) explicitDimIndex = i ; } else if ( explicitDimIndex > 0 ) { scope . problemReporter ( ) . incorrectLocationForEmptyDimension ( this , i ) ; } } if ( ( initializer ) == null ) { if ( explicitDimIndex < 0 ) { scope . problemReporter ( ) . mustDefineDimensionsOrInitializer ( this ) ; } } else if ( explicitDimIndex >= 0 ) { scope . problemReporter ( ) . cannotDefineDimensionsAndInitializer ( this ) ; } for ( int i = 0 ; i <= explicitDimIndex ; i ++ ) { if ( ( dimensions [ i ] ) != null ) { TypeBinding dimensionType = dimensions [ i ] . resolveTypeExpecting ( scope , IntBinding ) ; if ( dimensionType != null ) { dimensions [ i ] . computeConversion ( scope , IntBinding , dimensionType ) ; } } } if ( referenceType != null ) { if ( ( dimensions . length ) > 255 ) { scope . problemReporter ( ) . tooManyDimensions ( this ) ; } if ( ( ( referenceType . isBoundParameterizedType ( ) ) || ( referenceType . isGenericType ( ) ) ) || ( referenceType . isTypeVariable ( ) ) ) { scope . problemReporter ( ) . illegalGenericArray ( referenceType , this ) ; } this . resolvedType = scope . createArrayType ( referenceType , dimensions . length ) ; if ( ( initializer ) != null ) { if ( ( initializer . resolveTypeExpecting ( scope , this . resolvedType ) ) != null ) initializer . binding = ( ( ArrayBinding ) ( this . resolvedType ) ) ; } } return this . resolvedType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
TypeBinding referenceType = type . resolveType ( scope , true ) ;
Buggy code:
public class ConversionUtils { private static final String CHARSET_EQ = "charset=" ; private static final int CHARSET_EQ_LEN = ConversionUtils . CHARSET_EQ . length ( ) ; private static final String SLASHDOTDOT = "//.." ; private static final String DOTDOT = ".." ; private static final String SLASH = "//" ; private static final String COLONSLASHSLASH = ":////" ; public static String getEncodingFromContentType ( String contentType ) { String charSet = null ; if ( contentType != null ) { int charSetStartPos = contentType . toLowerCase ( Locale . ENGLISH ) . indexOf ( ConversionUtils . CHARSET_EQ ) ; if ( charSetStartPos >= 0 ) { charSet = contentType . substring ( ( charSetStartPos + ( ConversionUtils . CHARSET_EQ_LEN ) ) ) ; if ( charSet != null ) { charSet = JOrphanUtils . replaceAllChars ( charSet , '"' , "" ) ; charSet = charSet . trim ( ) ; if ( ( charSet . length ( ) ) > 0 ) { <START_BUG> int semi = charSet . indexOf ( ";" ) ; <END_BUG> if ( semi == 0 ) { return null ; } if ( semi != ( - 1 ) ) { charSet = charSet . substring ( 0 , semi ) ; } if ( ! ( Charset . isSupported ( charSet ) ) ) { return null ; } return charSet ; } return null ; } } } return charSet ; } public static URL makeRelativeURL ( URL baseURL , String location ) throws MalformedURLException { } public static String removeSlashDotDot ( String url ) { } }

Fix:
int semi = charSet . indexOf ( ';' ) ;
Buggy code:
public class ProgressMonitorJobsDialog extends ProgressMonitorDialog { private ProgressTreeViewer viewer ; private int viewerHeight = - 1 ; Composite viewerComposite ; private Button detailsButton ; public ProgressMonitorJobsDialog ( Shell parent ) { } protected Control createDialogArea ( Composite parent ) { } void handleDetailsButtonSelect ( ) { Shell shell = getShell ( ) ; Point shellSize = shell . getSize ( ) ; Composite composite = ( ( Composite ) ( getDialogArea ( ) ) ) ; if ( ( viewer ) != null ) { viewer . getControl ( ) . dispose ( ) ; viewer = null ; composite . layout ( ) ; shell . setSize ( shellSize . x , ( ( shellSize . y ) - ( viewerHeight ) ) ) ; detailsButton . setText ( ProgressMessages . getString ( "ProgressMonitorJobsDialog.DetailsTitle" ) ) ; } else { if ( ProgressManagerUtil . useNewProgress ( ) ) viewer = new NewProgressViewer ( viewerComposite , ( ( ( ( SWT . MULTI ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) | ( SWT . BORDER ) ) ) ; else viewer = new ProgressTreeViewer ( viewerComposite , ( ( ( ( SWT . MULTI ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) | ( SWT . BORDER ) ) ) ; viewer . setUseHashlookup ( true ) ; viewer . setSorter ( new ViewerSorter ( ) { public int compare ( Viewer testViewer , Object e1 , Object e2 ) { return ( ( Comparable ) ( e1 ) ) . compareTo ( e2 ) ; } } ) ; <START_BUG> IContentProvider provider = new ProgressTreeContentProvider ( viewer ) ; <END_BUG> viewer . setContentProvider ( provider ) ; viewer . setInput ( provider ) ; viewer . setLabelProvider ( new ProgressLabelProvider ( ) ) ; GridData viewerData = new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . GRAB_VERTICAL ) ) | ( GridData . FILL_BOTH ) ) ) ; int heightHint = convertHeightInCharsToPixels ( 10 ) ; viewerData . heightHint = heightHint ; viewer . getControl ( ) . setLayoutData ( viewerData ) ; Point size = viewer . getControl ( ) . computeSize ( viewerComposite . getBounds ( ) . width , heightHint ) ; viewer . getControl ( ) . setSize ( size ) ; viewerComposite . layout ( ) ; viewer . getControl ( ) . setVisible ( true ) ; viewerHeight = viewer . getControl ( ) . getBounds ( ) . height ; detailsButton . setText ( ProgressMessages . getString ( "ProgressMonitorJobsDialog.HideTitle" ) ) ; shell . setSize ( shellSize . x , ( ( shellSize . y ) + ( viewerHeight ) ) ) ; } } protected void createButtonsForButtonBar ( Composite parent ) { } protected void createSpacer ( Composite parent ) { } protected void createDetailsButton ( Composite parent ) { } protected Control createButtonBar ( Composite parent ) { } protected void clearCursors ( ) { } protected void updateForSetBlocked ( IStatus reason ) { } }

Fix:
IContentProvider provider = new ProgressTreeContentProvider ( viewer , true ) ;
Buggy code:
public class ClosedOutputStreamTest extends TestCase { public void testRead ( ) { try { new ClosedOutputStream ( ) . write ( 'x' ) ; fail ( "write(b)" ) ; <START_BUG> } catch ( IOException e ) { <END_BUG> } } }

Fix:
} catch ( final IOException e ) {
Buggy code:
public class NullDecoder extends Decoder { public NullDecoder ( ) { } public String decode ( String input , String charset ) throws UnsupportedEncodingException { if ( charset != null ) { <START_BUG> return new String ( input . getBytes ( ) , charset ) ; <END_BUG> } return input ; } public void decode ( InputStream in , OutputStream out ) throws IOException { } }

Fix:
return new String ( input . getBytes ( charset ) , charset ) ;
Buggy code:
public class RoutingErrorDialogFragment extends BaseRoutingErrorDialogFragment { private static final String EXTRA_RESULT_CODE = "ResultCode" ; private int mResultCode ; private String mMessage ; @ Override void beforeDialogCreated ( AlertDialog . Builder builder ) { super . beforeDialogCreated ( builder ) ; Pair < String , String > titleMessage = ResultCodesHelper . getDialogTitleSubtitle ( mResultCode , mMissingMaps . size ( ) ) ; builder . setTitle ( titleMessage . first ) ; mMessage = titleMessage . second ; <START_BUG> if ( ResultCodesHelper . isDownloadable ( mResultCode ) ) <END_BUG> builder . setPositiveButton ( download , null ) ; } private View addMessage ( View frame ) { } @ Override View buildSingleMapView ( CountryItem map ) { } @ Override View buildMultipleMapView ( ) { } private void startDownload ( ) { } @ Override public void onStart ( ) { } @ Override public void onCancel ( DialogInterface dialog ) { } @ Override void parseArguments ( ) { } public static RoutingErrorDialogFragment create ( int resultCode , @ Nullable String [ ] missingMaps ) { } }

Fix:
if ( ResultCodesHelper . isDownloadable ( mResultCode , mMissingMaps . size ( ) ) )
Buggy code:
public class Team extends JavaPlugin { protected Logger log ; protected TeamHandler tdbh ; private final TeamPlayerListener playerListener = new TeamPlayerListener ( this ) ; @ Override public void onDisable ( ) { } @ Override public void onEnable ( ) { } private void initialize ( ) { try { Class . forName ( "com.mysql.jdbc.Driver" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; log . severe ( "Team:<seq2seq4repair_space>Couldn't<seq2seq4repair_space>find<seq2seq4repair_space>JDBC." ) ; getPluginLoader ( ) . disablePlugin ( this ) ; return ; } log . info ( "[Team]<seq2seq4repair_space>Initializing<seq2seq4repair_space>TeamHandler" ) ; try { <START_BUG> tdbh = new TeamHandler ( this , "teamdata" , "teamuser" , "teampass" ) ; <END_BUG> } catch ( SQLException e ) { e . printStackTrace ( ) ; log . severe ( "[Team]<seq2seq4repair_space>Initialization<seq2seq4repair_space>failed<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>SQLException!" ) ; getPluginLoader ( ) . disablePlugin ( this ) ; return ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; log . severe ( "[Team]<seq2seq4repair_space>Initialization<seq2seq4repair_space>failed<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>driver<seq2seq4repair_space>not<seq2seq4repair_space>being<seq2seq4repair_space>found!" ) ; getPluginLoader ( ) . disablePlugin ( this ) ; return ; } } }

Fix:
tdbh = new TeamHandler ( this , "localhost//teamdata" , "teamuser" , "teampass" ) ;
Buggy code:
public class ExplainPlanAPIManagerTest extends MetadataManagerTestHelper { private final Parser parser = new Parser ( ) ; private final Validator validator = new Validator ( ) ; private final Planner planner = new Planner ( ) ; private final APIManager manager = new APIManager ( parser , validator , planner ) ; private ConnectorMetadata connector1 = null ; private ClusterName clusterName = null ; private TableMetadata table1 = null ; private TableMetadata table2 = null ; private static final Logger LOG = Logger . getLogger ( ExplainPlanAPIManagerTest . class ) ; @ BeforeClass public void setUp ( ) throws ManifestException { super . setUp ( ) ; DataStoreName dataStoreName = createTestDatastore ( ) ; Set < Operations > operationsC1 = new HashSet < > ( ) ; operationsC1 . add ( CREATE_TABLE ) ; operationsC1 . add ( INSERT ) ; operationsC1 . add ( PROJECT ) ; operationsC1 . add ( SELECT_OPERATOR ) ; operationsC1 . add ( FILTER_PK_EQ ) ; operationsC1 . add ( SELECT_INNER_JOIN ) ; connector1 = createTestConnector ( "TestConnector1" , dataStoreName , new HashSet < ClusterName > ( ) , operationsC1 , "actorRef1" ) ; clusterName = createTestCluster ( "TestCluster1" , dataStoreName , connector1 . getName ( ) ) ; <START_BUG> CatalogName catalogName = createTestCatalog ( "demo" ) ; <END_BUG> String [ ] columnNames1 = new String [ ] { "id" , "user" } ; ColumnType [ ] columnTypes = new ColumnType [ ] { ColumnType . INT , ColumnType . TEXT } ; String [ ] partitionKeys = new String [ ] { "id" } ; String [ ] clusteringKeys = new String [ ] { } ; table1 = createTestTable ( clusterName , "demo" , "table1" , columnNames1 , columnTypes , partitionKeys , clusteringKeys ) ; String [ ] columnNames2 = new String [ ] { "id" , "email" } ; table2 = createTestTable ( clusterName , "demo" , "table2" , columnNames2 , columnTypes , partitionKeys , clusteringKeys ) ; } private Command getCommand ( String statement ) { } @ Test public void invalidExplainRequest ( ) { } @ Test public void explainQualifiedSelect ( ) { } @ Test public void explainNonQualifiedSelect ( ) { } @ Test public void explainInsert ( ) { } @ Test public void explainCreateTable ( ) { } @ Test public void explainNotSupportedSelect ( ) { } @ Test public void explainInvalidSelect ( ) { } @ Test public void explainUnrecognized ( ) { } }

Fix:
CatalogName catalogName = createTestCatalog ( "demo" ) . getName ( ) ;
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; ImageList imageList ; public TabFolder ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public void addSelectionListener ( SelectionListener listener ) { } int clientHandle ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( int index ) { } void createWidget ( int index ) { } void createItem ( TabItem item , int index ) { } void destroyItem ( TabItem item ) { } int eventHandle ( ) { } public TabItem getItem ( int index ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } int gtk_focus ( int widget , int directionType ) { } int gtk_switch_page ( int widget , int page , int page_num ) { } void hookEvents ( ) { super . hookEvents ( ) ; <START_BUG> OS . g_signal_connect ( handle , switch_page , windowProc4 , SWITCH_PAGE ) ; <END_BUG> } public int indexOf ( TabItem item ) { } Point minimumSize ( int wHint , int hHint , boolean flushCache ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } public void removeSelectionListener ( SelectionListener listener ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify ) { } public void setSelection ( TabItem [ ] items ) { } boolean traversePage ( boolean next ) { } }

Fix:
OS . g_signal_connect_closure ( handle , switch_page , display . closures [ SWITCH_PAGE ] , false ) ;