nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class Border < T > extends WebMarkupContainerWithAssociatedMarkup < T > implements IAlternateParentProvider , IComponentResolver { private static final String BODY = "body" ; private static final String BORDER = "border" ; private MarkupContainer body ; public Border ( MarkupContainer parent , final String id ) { } public Border ( MarkupContainer parent , final String id , final IModel < T > model ) { } private void initBodyContainer ( final MarkupFragment markup , final MarkupContainer parent ) { } protected final MarkupContainer getBodyContainer ( ) { } public MarkupContainer getAlternateParent ( final Class childClass , final String childId ) { } protected final MarkupContainer setBorderBodyContainer ( final MarkupContainer parent ) { } @ Override public MarkupFragment getMarkupFragment ( final String id ) { } @ Override protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( tag . isWicketBodyTag ( ) ) { if ( ( this . body ) == null ) { <START_BUG> throw new wicket . markup . MarkupException ( markupStream , "Border<seq2seq4repair_space>body<seq2seq4repair_space>container<seq2seq4repair_space>not<seq2seq4repair_space>initialized.<seq2seq4repair_space>Did<seq2seq4repair_space>you<seq2seq4repair_space>forget<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>newBorderBodyContainer()<seq2seq4repair_space>??" ) ; <END_BUG> } if ( ( markupStream . get ( ) ) == ( this . body . getMarkupFragment ( ) . get ( 0 ) ) ) { this . body . render ( markupStream ) ; return true ; } } return false ; } private class BorderBody extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private transient boolean wasOpenClose = false ; public BorderBody ( final MarkupContainer parent , final String id ) { } @ Override public MarkupFragment getMarkupFragment ( ) { } @ Override public MarkupFragment getMarkupFragment ( final String id ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } @ Override protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } } }

Fix:
throw new wicket . markup . MarkupException ( markupStream , "Border<seq2seq4repair_space>body<seq2seq4repair_space>container<seq2seq4repair_space>not<seq2seq4repair_space>initialized.<seq2seq4repair_space>Did<seq2seq4repair_space>you<seq2seq4repair_space>forget<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>setBorderBodyContainer()<seq2seq4repair_space>??" ) ;
Buggy code:
public abstract class P4Base extends org . apache . tools . ant . Task { protected Perl5Util util = null ; protected String shell ; protected String P4Port = "" ; protected String P4Client = "" ; protected String P4User = "" ; protected String P4View = "" ; protected boolean failOnError = true ; protected String P4Opts = "" ; protected String P4CmdOpts = "" ; public void setPort ( String P4Port ) { } public void setClient ( String P4Client ) { } public void setUser ( String P4User ) { } public void setView ( String P4View ) { } public void setCmdopts ( String P4CmdOpts ) { } public void setFailonerror ( boolean fail ) { } public void init ( ) { } protected void execP4Command ( String command ) throws BuildException { } protected void execP4Command ( String command , P4Handler handler ) throws BuildException { try { Commandline commandline = new Commandline ( ) ; commandline . setExecutable ( "p4" ) ; if ( ( ( P4Port ) != null ) && ( ( P4Port . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Port ) ; } if ( ( ( P4User ) != null ) && ( ( P4User . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4User ) ; } if ( ( ( P4Client ) != null ) && ( ( P4Client . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Client ) ; } commandline . createArgument ( ) . setLine ( command ) ; String [ ] cmdline = commandline . getCommandline ( ) ; String cmdl = "" ; for ( int i = 0 ; i < ( cmdline . length ) ; i ++ ) { cmdl += ( cmdline [ i ] ) + "<seq2seq4repair_space>" ; } <START_BUG> log ( cmdl . describeCommand ( ) , MSG_VERBOSE ) ; <END_BUG> if ( handler == null ) { handler = new SimpleP4OutputHandler ( this ) ; } Execute exe = new Execute ( handler , null ) ; exe . setAntRun ( project ) ; exe . setCommandline ( commandline . getCommandline ( ) ) ; try { exe . execute ( ) ; } catch ( IOException e ) { throw new BuildException ( e ) ; } finally { try { handler . stop ( ) ; } catch ( Exception e ) { } } } catch ( Exception e ) { String failMsg = "Problem<seq2seq4repair_space>exec'ing<seq2seq4repair_space>P4<seq2seq4repair_space>command:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ; if ( failOnError ) { throw new BuildException ( failMsg ) ; } else { log ( failMsg , MSG_ERR ) ; } } } }

Fix:
log ( commandline . describeCommand ( ) , MSG_VERBOSE ) ;
Buggy code:
public class RPCID extends URIID { private static final long serialVersionUID = - 713344242499901489L ; public RPCID ( Namespace namespace , URI uri ) { } public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( "XmlRpcId[" ) ; <END_BUG> sb . append ( getName ( ) ) . append ( "]" ) ; return sb . toString ( ) ; } }

Fix:
StringBuffer sb = new StringBuffer ( "XMLRPCID[" ) ;
Buggy code:
public class Implication extends BinaryOperation { public Implication ( Formula left , Formula right ) { } public Implication ( Formula left , Formula right , LogicalValue value ) { } @ Override public Sequence [ ] expand ( Sequence sigma ) { } @ Override public Implication clone ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( "(" + ( right ) ) + ")<seq2seq4repair_space>-><seq2seq4repair_space>(" ) + ( left ) ) + ")" ; <END_BUG> } }

Fix:
return ( ( ( "(" + ( left ) ) + ")<seq2seq4repair_space>-><seq2seq4repair_space>(" ) + ( right ) ) + ")" ;
Buggy code:
public class HavingPropertiesTest extends AbstractHavingTest { @ BeforeClass public static void setUpBeforeClass ( ) throws Exception { } @ AfterClass public static void tearDownAfterClass ( ) { } @ Test public void should_get_only_files_by_name ( ) throws Exception { } @ Test public void should_get_only_files_by_path ( ) throws Exception { } @ Test public void should_get_only_files_by_parent_name ( ) throws Exception { } @ Test public void should_get_only_files_by_owner ( ) throws Exception { } @ Test public void should_get_only_files_by_size ( ) throws Exception { } @ Test public void should_get_only_files_by_creation_date ( ) throws Exception { } @ Test public void should_get_only_files_by_update_date ( ) throws Exception { } @ Test public void should_get_only_files_by_access_date ( ) throws Exception { } @ Test public void should_get_only_files_by_content ( ) throws Exception { } @ Test public void should_get_names_by_file_type ( ) throws Exception { } @ Test public void should_get_names_by_directory_type ( ) throws Exception { String query = ( "get<seq2seq4repair_space>name<seq2seq4repair_space>in<seq2seq4repair_space>('" + ( directory ) ) + "')<seq2seq4repair_space>having<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>'directory';" ; Query fileQuery = QueryFactory . newQuery ( query ) ; List < Comparable > results = fileQuery . execute ( ) ; <START_BUG> assertThat ( results ) . isNotNull ( ) . hasSize ( 2 ) . hasOnlyElementsOfType ( String . class ) ; <END_BUG> } @ Test public void should_get_names_by_status ( ) throws Exception { } }

Fix:
assertThat ( results ) . isNotNull ( ) . hasOnlyElementsOfType ( String . class ) ;
Buggy code:
public class MainController extends Controller { public static Result index ( ) { } public static Result tagcloud ( ) { } public static Result saveData ( String dataType ) { try { if ( dataType . equals ( "raw-data" ) ) { DataManager dataManager = ( ( DataManager ) ( Utils . loadObject ( ( ( session ( "ID" ) ) + "_data" ) ) ) ) ; File dataFile = dataManager . getDatainFile ( ) ; if ( dataFile != null ) response ( ) . setContentType ( "application//x-download" ) ; response ( ) . setHeader ( "Content-disposition" , "attachment;<seq2seq4repair_space>filename=collected_data.csv" ) ; return ok ( dataFile ) ; } else if ( dataType . equals ( "em-values" ) ) { EmotionMeasurementManager emManager = ( ( EmotionMeasurementManager ) ( Utils . loadObject ( ( ( session ( "ID" ) ) + "_emotion" ) ) ) ) ; File dataFile = emManager . saveResultsToFile ( ) ; response ( ) . setContentType ( "application//x-download" ) ; response ( ) . setHeader ( "Content-disposition" , "attachment;<seq2seq4repair_space>filename=Emotion_Measurement_Results.csv" ) ; return ok ( dataFile ) ; } else if ( dataType . equals ( "classified-data" ) ) { <START_BUG> ClassificationManager classificationManager = ( ( ClassificationManager ) ( Utils . loadObject ( ( ( session ( "ID" ) ) + "_class" ) ) ) ) ; <END_BUG> File dataFile = classificationManager . saveResultsToFile ( ) ; classificationManager . reset ( ) ; Utils . saveObject ( ( ( session ( "ID" ) ) + "_class" ) , classificationManager ) ; response ( ) . setContentType ( "application//x-download" ) ; response ( ) . setHeader ( "Content-disposition" , "attachment;<seq2seq4repair_space>filename=Classified_Data.csv" ) ; return ok ( dataFile ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; flash ( "error" , "Error<seq2seq4repair_space>downloading<seq2seq4repair_space>data" ) ; EmotionFormData emotionData = new EmotionFormData ( ) ; Form < EmotionFormData > formData = Form . form ( EmotionFormData . class ) . fill ( emotionData ) ; return ok ( emotion . render ( formData , PreprocessingChoice . makePreprocessingMap ( ) , false , false ) ) ; } return TODO ; } public static Result postIndex ( ) { } public static Result javascriptRoutes ( ) { } }

Fix:
ClassificationManager classificationManager = ( ( ClassificationManager ) ( Utils . loadObject ( ( ( session ( "ID" ) ) + "_class_plot" ) ) ) ) ;
Buggy code:
public class OperatingSystemMXBeanAttributeHandler extends AbstractPlatformMBeanAttributeHandler { public static OperatingSystemMXBeanAttributeHandler INSTANCE = new OperatingSystemMXBeanAttributeHandler ( ) ; private OperatingSystemMXBeanAttributeHandler ( ) { } @ Override protected void executeReadAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override protected void executeWriteAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override protected void register ( ManagementResourceRegistration registration ) { } static void storeResult ( final String name , final ModelNode store ) { if ( ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) && ( OBJECT_NAME . equals ( name ) ) ) { store . set ( ManagementFactory . OPERATING_SYSTEM_MXBEAN_NAME ) ; } else if ( NAME . equals ( name ) ) { store . set ( ManagementFactory . getOperatingSystemMXBean ( ) . getName ( ) ) ; } else if ( ARCH . equals ( name ) ) { store . set ( ManagementFactory . getOperatingSystemMXBean ( ) . getArch ( ) ) ; } else if ( VERSION . equals ( name ) ) { store . set ( ManagementFactory . getOperatingSystemMXBean ( ) . getVersion ( ) ) ; } else if ( AVAILABLE_PROCESSORS . equals ( name ) ) { store . set ( ManagementFactory . getOperatingSystemMXBean ( ) . getAvailableProcessors ( ) ) ; } else if ( SYSTEM_LOAD_AVERAGE . equals ( name ) ) { store . set ( ManagementFactory . getOperatingSystemMXBean ( ) . getSystemLoadAverage ( ) ) ; } else if ( ( OPERATING_SYSTEM_READ_ATTRIBUTES . contains ( name ) ) || ( OPERATING_SYSTEM_METRICS . contains ( name ) ) ) { <START_BUG> throw new IllegalStateException ( String . format ( "Read<seq2seq4repair_space>support<seq2seq4repair_space>for<seq2seq4repair_space>attribute<seq2seq4repair_space>%s<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>properly<seq2seq4repair_space>implemented" , name ) ) ; <END_BUG> } } }

Fix:
throw MESSAGES . badReadAttributeImpl8 ( name ) ;
Buggy code:
@ MessageBundle ( projectCode = "JBAS" ) public interface DomainControllerMessages { DomainControllerMessages MESSAGES = Messages . getBundle ( DomainControllerMessages . class ) ; @ Message ( id = 10975 , value = "Registration<seq2seq4repair_space>of<seq2seq4repair_space>remote<seq2seq4repair_space>hosts<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>on<seq2seq4repair_space>slave<seq2seq4repair_space>host<seq2seq4repair_space>controllers" ) String slaveControllerCannotAcceptOtherSlaves ( ) { } @ Message ( id = 10976 , value = "The<seq2seq4repair_space>master<seq2seq4repair_space>host<seq2seq4repair_space>controller<seq2seq4repair_space>cannot<seq2seq4repair_space>register<seq2seq4repair_space>slave<seq2seq4repair_space>host<seq2seq4repair_space>controllers<seq2seq4repair_space>as<seq2seq4repair_space>it's<seq2seq4repair_space>current<seq2seq4repair_space>running<seq2seq4repair_space>mode<seq2seq4repair_space>is<seq2seq4repair_space>'%s'" ) String adminOnlyModeCannotAcceptSlaves ( RunningMode runningMode ) { } @ Message ( id = 10977 , value = "There<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>a<seq2seq4repair_space>registered<seq2seq4repair_space>host<seq2seq4repair_space>named<seq2seq4repair_space>'%s'" ) String slaveAlreadyRegistered ( String slaveName ) { } @ Message ( id = 10978 , value = "%s<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>%s:<seq2seq4repair_space>%s" ) String requiredChildIsMissing ( String parent , String child , String parentSpec ) { } <START_BUG> @ Message ( id = 10979 , value = "%s<seq2seq4repair_space>recognized<seq2seq4repair_space>only<seq2seq4repair_space>%s<seq2seq4repair_space>as<seq2seq4repair_space>children:<seq2seq4repair_space>%s" ) <END_BUG> String unrecognizedChildren ( String parent , String children , String parentSpec ) ; @ Message ( id = 10980 , value = ( IN_SERIES ) + "<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>groups:<seq2seq4repair_space>%s" ) String inSeriesIsMissingGroups ( String rolloutPlan ) { } @ Message ( id = 10981 , value = ( SERVER_GROUP ) + "<seq2seq4repair_space>expects<seq2seq4repair_space>one<seq2seq4repair_space>and<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>child:<seq2seq4repair_space>%s" ) String serverGroupExpectsSingleChild ( String rolloutPlan ) { } @ Message ( id = 10982 , value = ( ( ( "One<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>groups<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>define<seq2seq4repair_space>neither<seq2seq4repair_space>" + ( SERVER_GROUP ) ) + "<seq2seq4repair_space>nor<seq2seq4repair_space>" ) + ( CONCURRENT_GROUPS ) ) + ":<seq2seq4repair_space>%s" ) String unexpectedInSeriesGroup ( String rolloutPlan ) { } }

Fix:
@ Message ( id = 10979 , value = "%s<seq2seq4repair_space>recognizes<seq2seq4repair_space>only<seq2seq4repair_space>%s<seq2seq4repair_space>as<seq2seq4repair_space>children:<seq2seq4repair_space>%s" )
Buggy code:
public class SelectionOnQualifiedSuperReference extends QualifiedSuperReference { public SelectionOnQualifiedSuperReference ( TypeReference name , int pos , int sourceEnd ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { TypeBinding binding = super . resolveType ( scope ) ; if ( ( binding == null ) || ( ! ( binding . isValidBinding ( ) ) ) ) throw new SelectionNodeFound ( ) ; else <START_BUG> throw new SelectionNodeFound ( this , binding ) ; <END_BUG> } }

Fix:
throw new SelectionNodeFound ( binding ) ;
Buggy code:
public class EmbededTomcat { ContextManager contextM = null ; Object application ; Vector requestInt = null ; Vector contextInt = null ; FacadeManager facadeM = null ; Vector connectors = new Vector ( ) ; String workDir ; Helper loghelper = new Logger . Helper ( "tc_log" , this ) ; int debug = 0 ; public EmbededTomcat ( ) { } public void setDebug ( int debug ) { } public void addApplicationAdapter ( Object adapter ) { } public void setApplication ( Object app ) { } public Object getApplication ( ) { } public void setWorkDir ( String dir ) { } public void addEndpoint ( int port , InetAddress addr , String hostname ) { } public void addSecureEndpoint ( int port , InetAddress addr , String hostname , String keyFile , String keyPass ) { } public ServletContext addContext ( String ctxPath , URL docRoot ) { } public void removeContext ( ServletContext sctx ) { } Hashtable extraClassPaths = new Hashtable ( ) ; public void addClassPath ( ServletContext context , String cpath ) { } public ServletContext getServletContext ( String host , String cpath ) { } public void initContext ( ServletContext sctx ) { } public void destroyContext ( ServletContext ctx ) { } public void start ( ) { } public void stop ( ) { } public void addRequestInterceptor ( RequestInterceptor ri ) { } public void addContextInterceptor ( ContextInterceptor ci ) { } private void initContextManager ( ) { } private void initDefaultInterceptors ( ) { WebXmlReader webXmlI = new WebXmlReader ( ) ; webXmlI . setValidate ( false ) ; addContextInterceptor ( webXmlI ) ; PolicyInterceptor polI = new PolicyInterceptor ( ) ; addContextInterceptor ( polI ) ; polI . setDebug ( 0 ) ; <START_BUG> LoaderInterceptor loadI = new LoaderInterceptor ( ) ; <END_BUG> addContextInterceptor ( loadI ) ; DefaultCMSetter defaultCMI = new DefaultCMSetter ( ) ; addContextInterceptor ( defaultCMI ) ; WorkDirInterceptor wdI = new WorkDirInterceptor ( ) ; addContextInterceptor ( wdI ) ; LoadOnStartupInterceptor loadOnSI = new LoadOnStartupInterceptor ( ) ; addContextInterceptor ( loadOnSI ) ; SessionInterceptor sessI = new SessionInterceptor ( ) ; addRequestInterceptor ( sessI ) ; SimpleMapper1 mapI = new SimpleMapper1 ( ) ; addRequestInterceptor ( mapI ) ; mapI . setDebug ( 0 ) ; InvokerInterceptor invI = new InvokerInterceptor ( ) ; addRequestInterceptor ( invI ) ; invI . setDebug ( 0 ) ; StaticInterceptor staticI = new StaticInterceptor ( ) ; addRequestInterceptor ( staticI ) ; mapI . setDebug ( 0 ) ; addRequestInterceptor ( new StandardSessionInterceptor ( ) ) ; AccessInterceptor accessI = new AccessInterceptor ( ) ; addRequestInterceptor ( accessI ) ; accessI . setDebug ( 0 ) ; Jdk12Interceptor jdk12I = new Jdk12Interceptor ( ) ; addRequestInterceptor ( jdk12I ) ; } private void log ( String s ) { } private void log ( String s , Throwable t ) { } private void log ( String s , int level ) { } private void log ( String s , Throwable t , int level ) { } public static void main ( String [ ] args ) { } }

Fix:
LoaderInterceptor12 loadI = new LoaderInterceptor12 ( ) ;
Buggy code:
public class DynamicClassLoader extends URLClassLoader { public DynamicClassLoader ( URL [ ] arg0 ) { } public DynamicClassLoader ( URL [ ] arg0 , ClassLoader arg1 ) { } public DynamicClassLoader ( URL [ ] arg0 , ClassLoader arg1 , URLStreamHandlerFactory arg2 ) { } public void addURL ( URL url ) { <START_BUG> this . addURL ( url ) ; <END_BUG> } }

Fix:
super . addURL ( url ) ;
Buggy code:
public class GtfsRealtimeLibrary { public static Builder createFeedMessageBuilder ( ) { long now = System . currentTimeMillis ( ) ; FeedHeader . Builder header = FeedHeader . newBuilder ( ) ; <START_BUG> header . setTimestamp ( now ) ; <END_BUG> header . setIncrementality ( FULL_DATASET ) ; header . setGtfsRealtimeVersion ( VERSION ) ; FeedMessage . Builder feedMessageBuilder = FeedMessage . newBuilder ( ) ; feedMessageBuilder . setHeader ( header ) ; return feedMessageBuilder ; } public static TranslatedString getTextAsTranslatedString ( String text ) { } }

Fix:
header . setTimestamp ( ( now // 1000 ) ) ;
Buggy code:
public class NavigationDrawerFragment extends Fragment { private static final String BUSLIST_SIZE = "buslist_size" ; private static final String MAX_CHECKED = "max_checked" ; private static final String STATE_SELECTED_POSITIONS = "selected_navigation_drawer_positions" ; private static final String PREF_USER_LEARNED_DRAWER = "navigation_drawer_learned" ; private static final String DRAWER_STATE = "drawer_state" ; private NavigationDrawerFragment . NavigationDrawerCallbacks mCallbacks ; private ActionBarDrawerToggle mDrawerToggle ; private DrawerLayout mDrawerLayout ; private ListView mDrawerListView ; private View mFragmentContainerView ; private boolean [ ] mSelected ; private int amountSelected ; private boolean mFromSavedInstanceState ; private boolean mUserLearnedDrawer ; private Toolbar toolbar ; public NavigationDrawerFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void restoreListView ( ) { } private ArrayList < Route > createRoutes ( ) { } public boolean isDrawerOpen ( ) { } public void setUp ( int fragmentId , DrawerLayout drawerLayout ) { } private void selectItem ( int position ) { } private void setFalse ( int position ) { } private void setTrue ( int position ) { } @ Override public void onAttach ( Activity activity ) { } public boolean closeDrawer ( ) { } public boolean openDrawer ( ) { } @ Override public void onDetach ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void clearSelection ( ) { ( ( SelectTransit ) ( getActivity ( ) ) ) . clearBuses ( ) ; mSelected = new boolean [ getResources ( ) . getStringArray ( buses ) . length ] ; mDrawerListView . clearChoices ( ) ; ( ( SelectTransit ) ( getActivity ( ) ) ) . clearAndAddToMap ( ) ; amountSelected = 0 ; File lineInfo = new File ( getActivity ( ) . getFilesDir ( ) , "//lineinfo" ) ; Log . i ( "clear-files" , lineInfo . getAbsolutePath ( ) ) ; if ( lineInfo . exists ( ) ) { File [ ] files = lineInfo . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { file . delete ( ) ; } } } SharedPreferences sp = PreferenceManager . getDefaultSharedPreferences ( getActivity ( ) ) ; sp . edit ( ) . putLong ( "lines_last_updated" , System . currentTimeMillis ( ) ) . apply ( ) ; <START_BUG> Toast . makeText ( getActivity ( ) , "Cleared<seq2seq4repair_space>buses." , LENGTH_SHORT ) . show ( ) ; <END_BUG> } private void showGlobalContextActionBar ( ) { } private ActionBar getActionBar ( ) { } @ Override public void onStop ( ) { } private void savePreferences ( ) { } public static interface NavigationDrawerCallbacks { void onNavigationDrawerItemSelected ( int position ) { } } }

Fix:
Toast . makeText ( getActivity ( ) , getString ( cleared ) , LENGTH_SHORT ) . show ( ) ;
Buggy code:
public class StepInterpolatorTestUtils { public static void checkDerivativesConsistency ( final FirstOrderIntegrator integrator , final TestProblemAbstract problem , final double threshold ) { integrator . addStepHandler ( new StepHandler ( ) { public void handleStep ( StepInterpolator interpolator , boolean isLast ) { final double h = 0.001 * ( ( interpolator . getCurrentTime ( ) ) - ( interpolator . getPreviousTime ( ) ) ) ; final double t = ( interpolator . getCurrentTime ( ) ) - ( 300 * h ) ; if ( ( FastMath . abs ( h ) ) < ( 10 * ( FastMath . ulp ( t ) ) ) ) { return ; } interpolator . setInterpolatedTime ( ( t - ( 4 * h ) ) ) ; final double [ ] yM4h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t - ( 3 * h ) ) ) ; final double [ ] yM3h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t - ( 2 * h ) ) ) ; final double [ ] yM2h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t - h ) ) ; final double [ ] yM1h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t + h ) ) ; final double [ ] yP1h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t + ( 2 * h ) ) ) ; final double [ ] yP2h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t + ( 3 * h ) ) ) ; final double [ ] yP3h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( ( t + ( 4 * h ) ) ) ; final double [ ] yP4h = interpolator . getInterpolatedState ( ) . clone ( ) ; interpolator . setInterpolatedTime ( t ) ; final double [ ] yDot = interpolator . getInterpolatedDerivatives ( ) ; for ( int i = 0 ; i < ( yDot . length ) ; ++ i ) { final double approYDot = ( ( ( ( ( - 3 ) * ( ( yP4h [ i ] ) - ( yM4h [ i ] ) ) ) + ( 32 * ( ( yP3h [ i ] ) - ( yM3h [ i ] ) ) ) ) + ( ( - 168 ) * ( ( yP2h [ i ] ) - ( yM2h [ i ] ) ) ) ) + ( 672 * ( ( yP1h [ i ] ) - ( yM1h [ i ] ) ) ) ) // ( 840 * h ) ; Assert . assertEquals ( approYDot , yDot [ i ] , threshold ) ; } } <START_BUG> public void reset ( ) { <END_BUG> } } ) ; integrator . integrate ( problem , problem . getInitialTime ( ) , problem . getInitialState ( ) , problem . getFinalTime ( ) , new double [ problem . getDimension ( ) ] ) ; } }

Fix:
public void init ( double t0 , double [ ] y0 , double t ) {
Buggy code:
public class StoreCopy { public static void main ( String [ ] args ) throws Exception { String sourceDir = args [ 0 ] ; String targetDir = args [ 1 ] ; String sourceConfigFile = args [ 2 ] ; <START_BUG> String targetConfigFile = args [ 2 ] ; <END_BUG> StoreCopy . copyStore ( new File ( sourceDir ) , new File ( targetDir ) , new File ( sourceConfigFile ) , new File ( targetConfigFile ) ) ; } private static void copyStore ( File sourceDir , File targetDir , File sourceConfigFile , File targetConfigFile ) throws Exception { } private static void copyNodes ( GraphDatabaseService sourceDb , BatchInserter targetDb ) { } private static void copyRelationships ( GraphDatabaseService sourceDb , BatchInserter targetDb ) { } private static Map < String , Object > getProperties ( PropertyContainer pc ) { } }

Fix:
String targetConfigFile = args [ 3 ] ;
Buggy code:
public final class ActionRouter implements ActionListener { private Map commands = new HashMap ( ) ; private static ActionRouter router ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private Map preActionListeners = new HashMap ( ) ; private Map postActionListeners = new HashMap ( ) ; private ActionRouter ( ) { } public void actionPerformed ( final ActionEvent e ) { } private void performAction ( final ActionEvent e ) { try { <START_BUG> GuiPackage . getInstance ( ) . updateCurrentNode ( ) ; <END_BUG> Set commandObjects = ( ( Set ) ( commands . get ( e . getActionCommand ( ) ) ) ) ; Iterator iter = commandObjects . iterator ( ) ; while ( iter . hasNext ( ) ) { try { Command c = ( ( Command ) ( iter . next ( ) ) ) ; preActionPerformed ( c . getClass ( ) , e ) ; c . doAction ( e ) ; postActionPerformed ( c . getClass ( ) , e ) ; } catch ( IllegalUserActionException err ) { JMeterUtils . reportErrorToUser ( err . toString ( ) ) ; } catch ( Exception err ) { ActionRouter . log . error ( "" , err ) ; } } } catch ( NullPointerException er ) { ActionRouter . log . error ( ( ( ( ( "performAction(" + ( e . getActionCommand ( ) ) ) + ")<seq2seq4repair_space>" ) + ( e . toString ( ) ) ) + "<seq2seq4repair_space>caused" ) , er ) ; JMeterUtils . reportErrorToUser ( ( ( "Sorry,<seq2seq4repair_space>this<seq2seq4repair_space>feature<seq2seq4repair_space>(" + ( e . getActionCommand ( ) ) ) + ")<seq2seq4repair_space>not<seq2seq4repair_space>yet<seq2seq4repair_space>implemented" ) ) ; } } public void doActionNow ( ActionEvent e ) { } public Set getAction ( String actionName ) { } public Command getAction ( String actionName , Class actionClass ) { } public Command getAction ( String actionName , String className ) { } public void addPreActionListener ( Class action , ActionListener listener ) { } public void removePreActionListener ( Class action , ActionListener listener ) { } public void addPostActionListener ( Class action , ActionListener listener ) { } public void removePostActionListener ( Class action , ActionListener listener ) { } protected void preActionPerformed ( Class action , ActionEvent e ) { } protected void postActionPerformed ( Class action , ActionEvent e ) { } private void populateCommandMap ( ) { } public static ActionRouter getInstance ( ) { } }

Fix:
GuiPackage . getInstance ( ) . updateCurrentGui ( ) ;
Buggy code:
public class FunctionMetadata { private final FunctionName functionName ; private final String signature ; private final String functionType ; public FunctionMetadata ( FunctionName functionName , String signature , String functionType ) { } public FunctionName getFunctionName ( ) { } public String getSignature ( ) { } public String getFunctionType ( ) { } public String getReturningType ( ) { <START_BUG> return signature . substring ( signature . indexOf ( ":" ) , signature . length ( ) ) ; <END_BUG> } }

Fix:
return signature . substring ( ( ( signature . indexOf ( ":" ) ) + 1 ) , signature . length ( ) ) ;
Buggy code:
public class MainActivity extends Activity { private Button createWorkoutButton ; private Button addFoodItemButton ; private Button viewWorkoutHistoryButton ; private LinearLayout root ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; setRequestedOrientation ( SCREEN_ORIENTATION_PORTRAIT ) ; SharedPreferences settings = getSharedPreferences ( "user_settings" , 0 ) ; TextView greeting = ( ( TextView ) ( findViewById ( userGreeting ) ) ) ; <START_BUG> greeting . setText ( settings . getString ( "greeting" , "Hello,<seq2seq4repair_space>user" ) ) ; <END_BUG> } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void onViewWorkoutHistoryClick ( View v ) { } public void onViewFoodHistoryClick ( View v ) { } public void onCreateWorkoutClick ( View v ) { } public void onAddFoodClick ( View v ) { } public void onViewProfileClick ( View v ) { } private void goToWorkoutActivity ( Class < ? > activity ) { } }

Fix:
greeting . setText ( settings . getString ( "greeting" , "Hi,<seq2seq4repair_space>user" ) ) ;
Buggy code:
public class ToolBar extends Composite { int itemCount ; ToolItem [ ] items ; NSArray accessibilityAttributes = null ; public ToolBar ( Composite parent , int style ) { } int accessibilityAttributeNames ( int id , int sel ) { } int accessibilityAttributeValue ( int id , int sel , int arg0 ) { } boolean accessibilityIsIgnored ( int id , int sel ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createItem ( ToolItem item , int index ) { } void createWidget ( ) { } void destroyItem ( ToolItem item ) { } void enableWidget ( boolean enabled ) { } Widget findTooltip ( NSPoint pt ) { } public ToolItem getItem ( int index ) { } public ToolItem getItem ( Point pt ) { } public int getItemCount ( ) { } public ToolItem [ ] getItems ( ) { } public int getRowCount ( ) { } public int indexOf ( ToolItem item ) { } int [ ] layoutHorizontal ( int width , int height , boolean resize ) { } int [ ] layoutVertical ( int width , int height , boolean resize ) { } int [ ] layout ( int nWidth , int nHeight , boolean resize ) { } void relayout ( ) { <START_BUG> if ( ( drawCount ) != 0 ) <END_BUG> return ; Rectangle rect = getClientArea ( ) ; layout ( rect . width , rect . height , true ) ; } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void removeControl ( Control control ) { } void resized ( ) { } void setFont ( NSFont font ) { } public void setRedraw ( boolean redraw ) { } }

Fix:
if ( ! ( getDrawing ( ) ) )
Buggy code:
public class ConnectHandler implements CommandHandler { @ Override public void handle ( CommandContext ctx ) { int port = 9999 ; String host = "localhost" ; String args = ctx . getCommandArguments ( ) ; if ( args != null ) { String portStr = null ; int colonIndex = args . indexOf ( ':' ) ; if ( colonIndex < 0 ) { host = args ; } else if ( colonIndex == 0 ) { portStr = args . substring ( 1 ) . trim ( ) ; } else { host = args . substring ( 0 , colonIndex ) . trim ( ) ; portStr = args . substring ( ( colonIndex + 1 ) ) . trim ( ) ; } if ( portStr != null ) { try { port = Integer . parseInt ( portStr ) ; } catch ( NumberFormatException e ) { <START_BUG> ctx . log ( ( ( "The<seq2seq4repair_space>port<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>non-negative<seq2seq4repair_space>integer:<seq2seq4repair_space>'" + args ) + "'" ) ) ; <END_BUG> port = - 1 ; } } } if ( port >= 0 ) { ctx . connectController ( host , port ) ; } } }

Fix:
ctx . printLine ( ( ( "The<seq2seq4repair_space>port<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>non-negative<seq2seq4repair_space>integer:<seq2seq4repair_space>'" + args ) + "'" ) ) ;
Buggy code:
public class MultiInvInventory implements Serializable { private static final long serialVersionUID = - 9100540910611570679L ; private final MultiInvItem [ ] [ ] storedInventory = new MultiInvItem [ 2 ] [ ] ; private String name = null ; private String regionName = null ; private String worldName = null ; private String pluginName = null ; public MultiInvInventory ( ) { } public MultiInvInventory ( Inventory inventory , String pluginName ) { } public MultiInvInventory ( Player player , String pluginName ) { } public MultiInvInventory ( Inventory inventory , String name , String pluginName ) { } public MultiInvInventory ( Player player , String name , String pluginName ) { } public void setInventory ( Inventory inventory ) { } public void getInventory ( Player player ) { } public boolean getInventory ( Block block ) { } public String getName ( ) { } public void setName ( String name ) { } public void setRegionName ( String name ) { } public String getRegionName ( ) { } public void setWorldName ( String name ) { } public String getWorldName ( ) { } public String getPluginName ( ) { } private void setContents ( ItemStack [ ] itemstacks ) { } private ItemStack [ ] getContents ( ) { } private void setArmourContents ( ItemStack [ ] itemstacks ) { } private ItemStack [ ] getArmourContents ( ) { } private MultiInvItem [ ] itemStackToObject ( ItemStack [ ] stacks ) { } private ItemStack [ ] objectToItemStack ( MultiInvItem [ ] itemArray ) { ItemStack [ ] items = new ItemStack [ itemArray . length ] ; int i = 0 ; for ( MultiInvItem item : itemArray ) { if ( ( item == null ) || ( ( item . getQuanitity ( ) ) == 0 ) ) { items [ i ] = null ; i ++ ; continue ; } int id = item . getId ( ) ; int amount = item . getQuanitity ( ) ; short damage = item . getDurability ( ) ; ItemStack stack = new ItemStack ( id , amount , damage ) ; HashMap < Enchantment , Integer > enchantments = item . getEnchantments ( ) ; if ( ( enchantments . size ( ) ) > 0 ) { Set < Enchantment > setenchantments = enchantments . keySet ( ) ; for ( Enchantment tench : setenchantments ) { <START_BUG> stack . addEnchantment ( tench , enchantments . get ( tench ) . intValue ( ) ) ; <END_BUG> } } items [ i ] = stack ; i ++ ; } return items ; } @ Override public String toString ( ) { } public void fromString ( String string ) { } }

Fix:
stack . addUnsafeEnchantment ( tench , enchantments . get ( tench ) . intValue ( ) ) ;
Buggy code:
public class TestQueryTemplateManager extends LuceneTestCase { private CoreParser builder ; private Analyzer analyzer ; private IndexSearcher searcher ; private IndexReader reader ; private Directory dir ; String [ ] docFieldValues = new String [ ] { "artist=Jeff<seq2seq4repair_space>Buckley<seq2seq4repair_space>\talbum=Grace<seq2seq4repair_space>\treleaseDate=1999<seq2seq4repair_space>\tgenre=rock" , "artist=Fugazi<seq2seq4repair_space>\talbum=Repeater<seq2seq4repair_space>\treleaseDate=1990<seq2seq4repair_space>\tgenre=alternative" , "artist=Fugazi<seq2seq4repair_space>\talbum=Red<seq2seq4repair_space>Medicine<seq2seq4repair_space>\treleaseDate=1995<seq2seq4repair_space>\tgenre=alternative" , "artist=Peeping<seq2seq4repair_space>Tom<seq2seq4repair_space>\talbum=Peeping<seq2seq4repair_space>Tom<seq2seq4repair_space>\treleaseDate=2006<seq2seq4repair_space>\tgenre=rock" , "artist=Red<seq2seq4repair_space>Snapper<seq2seq4repair_space>\talbum=Prince<seq2seq4repair_space>Blimey<seq2seq4repair_space>\treleaseDate=1996<seq2seq4repair_space>\tgenre=electronic" } ; String [ ] queryForms = new String [ ] { "artist=Fugazi<seq2seq4repair_space>\texpectedMatches=2<seq2seq4repair_space>\ttemplate=albumBooleanQuery" , "artist=Fugazi<seq2seq4repair_space>\treleaseDate=1990<seq2seq4repair_space>\texpectedMatches=1<seq2seq4repair_space>\ttemplate=albumBooleanQuery" , "artist=Buckley<seq2seq4repair_space>\tgenre=rock<seq2seq4repair_space>\texpectedMatches=1<seq2seq4repair_space>\ttemplate=albumFilteredQuery" , "artist=Buckley<seq2seq4repair_space>\tgenre=electronic<seq2seq4repair_space>\texpectedMatches=0<seq2seq4repair_space>\ttemplate=albumFilteredQuery" , "queryString=artist:buckly~<seq2seq4repair_space>NOT<seq2seq4repair_space>genre:electronic<seq2seq4repair_space>\texpectedMatches=1<seq2seq4repair_space>\ttemplate=albumLuceneClassicQuery" } ; public void testFormTransforms ( ) throws IOException , ParserConfigurationException , TransformerException , ParserException , SAXException { } Properties getPropsFromString ( String nameValuePairs ) { } Document getDocumentFromString ( String nameValuePairs ) { } @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; analyzer = new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ; dir = newDirectory ( ) ; IndexWriter w = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , analyzer ) ) ; for ( String docFieldValue : docFieldValues ) { w . addDocument ( getDocumentFromString ( docFieldValue ) ) ; } w . forceMerge ( 1 ) ; <START_BUG> w . close ( ) ; <END_BUG> reader = DirectoryReader . open ( dir ) ; searcher = newSearcher ( reader ) ; builder = new CorePlusExtensionsParser ( "artist" , analyzer ) ; } @ Override public void tearDown ( ) throws Exception { } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class InfinispanSubsystemDescribe implements OperationStepHandler , DescriptionProvider { @ Override public ModelNode getModelDescription ( Locale locale ) { <START_BUG> return LocalDescriptions . getSubsystemDescribeDescription ( locale ) ; <END_BUG> } public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } }

Fix:
return InfinispanDescriptions . getSubsystemDescribeDescription ( locale ) ;
Buggy code:
public class ServerRespondToDistributedInvitations extends ServerManager { private final String SQL_GET_INVITATIONS = "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>Event<seq2seq4repair_space>join<seq2seq4repair_space>InvitesToEvent<seq2seq4repair_space>on<seq2seq4repair_space>Event.eventId<seq2seq4repair_space>=<seq2seq4repair_space>InvitesToEvent.eventId<seq2seq4repair_space>where<seq2seq4repair_space>InvitesToEvent.userName<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>and<seq2seq4repair_space>Event.userName<seq2seq4repair_space>=<seq2seq4repair_space>?" ; private final String SQL_RESPONDTO_INVITATIONS = "update<seq2seq4repair_space>InvitesToEvent<seq2seq4repair_space>set<seq2seq4repair_space>status<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>where<seq2seq4repair_space>username<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>and<seq2seq4repair_space>eventId<seq2seq4repair_space>=<seq2seq4repair_space>?" ; public ServerInvitationsResult checkForInvitations ( String username , String selectedUsername ) { } public ServerInvitationsResult respontoInvitation ( int eventId , String response , String selectedUsername ) { ServerInvitationsResult theResult = new ServerInvitationsResult ( ) ; <START_BUG> try ( Connection connection = this . getDataBaseConnection ( ) ; PreparedStatement statement = connection . prepareStatement ( SQL_RESPONDTO_INVITATIONS ) ) { <END_BUG> statement . setString ( 1 , response ) ; statement . setString ( 2 , selectedUsername ) ; statement . setInt ( 3 , eventId ) ; int affected = statement . executeUpdate ( ) ; if ( affected == 1 ) { theResult . didSucceed = true ; } else { theResult . didSucceed = false ; theResult . errorMessage = "Unknown<seq2seq4repair_space>error<seq2seq4repair_space>while<seq2seq4repair_space>updating<seq2seq4repair_space>invitation" ; } } catch ( SQLException e ) { System . out . println ( "Got<seq2seq4repair_space>exception" ) ; ServerManager . processSQLException ( e ) ; theResult . didSucceed = false ; theResult . errorMessage = e . getMessage ( ) ; } return theResult ; } }

Fix:
try ( Connection connection = this . getDataBaseConnection ( ) ; PreparedStatement statement = connection . prepareStatement ( SQL_RESPONDTO_INVITATIONS , ResultSet . TYPE_SCROLL_INSENSITIVE , ResultSet . CONCUR_READ_ONLY ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) public class StatelessBeanIntegrationTestCase { static final String EJB3_DEPLOYMENT_NAME = "ejb3-osgi.jar" ; @ Inject public Bundle bundle ; @ ArquillianResource public Deployer deployer ; @ Deployment public static JavaArchive createDeployment ( ) { } @ Test public void testTargetBundle ( ) throws Exception { } @ Test public void testStatelessBean ( ) throws Exception { } @ Deployment ( name = StatelessBeanIntegrationTestCase . EJB3_DEPLOYMENT_NAME , managed = false , testable = false ) public static JavaArchive getTestArchive ( ) { final JavaArchive archive = ShrinkWrap . create ( JavaArchive . class , StatelessBeanIntegrationTestCase . EJB3_DEPLOYMENT_NAME ) ; archive . addClass ( SimpleStatelessSessionBean . class ) ; archive . setManifest ( new Asset ( ) { public InputStream openStream ( ) { ManifestBuilder builder = ManifestBuilder . newInstance ( ) ; <START_BUG> builder . addManifestHeader ( "Dependencies" , "org.osgi.core,deployment.ejb3-osgi-target:0.0.0" ) ; <END_BUG> return builder . openStream ( ) ; } } ) ; return archive ; } }

Fix:
builder . addManifestHeader ( "Dependencies" , "org.osgi.core,deployment.ejb3-osgi-target" ) ;
Buggy code:
public class BuildNumber extends Task { private static final String DEFAULT_PROPERTY_NAME = "build.number" ; private static final String DEFAULT_FILENAME = BuildNumber . DEFAULT_PROPERTY_NAME ; private File myFile ; public void setFile ( final File file ) { } public void execute ( ) throws BuildException { File savedFile = myFile ; validate ( ) ; final Properties properties = loadProperties ( ) ; final int buildNumber = getBuildNumber ( properties ) ; properties . put ( BuildNumber . DEFAULT_PROPERTY_NAME , String . valueOf ( ( buildNumber + 1 ) ) ) ; FileOutputStream output = null ; try { output = new FileOutputStream ( myFile ) ; final String header = "Build<seq2seq4repair_space>Number<seq2seq4repair_space>for<seq2seq4repair_space>ANT.<seq2seq4repair_space>Do<seq2seq4repair_space>not<seq2seq4repair_space>edit!" ; <START_BUG> properties . save ( output , header ) ; <END_BUG> } catch ( final IOException ioe ) { final String message = "Error<seq2seq4repair_space>while<seq2seq4repair_space>writing<seq2seq4repair_space>" + ( myFile ) ; throw new BuildException ( message , ioe ) ; } finally { if ( null != output ) { try { output . close ( ) ; } catch ( final IOException ioe ) { getProject ( ) . log ( ( "error<seq2seq4repair_space>closing<seq2seq4repair_space>output<seq2seq4repair_space>stream<seq2seq4repair_space>" + ioe ) , MSG_ERR ) ; } } myFile = savedFile ; } getProject ( ) . setNewProperty ( BuildNumber . DEFAULT_PROPERTY_NAME , String . valueOf ( buildNumber ) ) ; } private int getBuildNumber ( final Properties properties ) throws BuildException { } private Properties loadProperties ( ) throws BuildException { } private void validate ( ) throws BuildException { } }

Fix:
properties . store ( output , header ) ;
Buggy code:
class FilterListTableModel extends AbstractTableModel { final String [ ] columnNames = new String [ ] { "Name" , "Enabled" } ; private XmlElement filterList ; public FilterListTableModel ( XmlElement list ) { } public int getColumnCount ( ) { } public int getRowCount ( ) { } public String getColumnName ( int col ) { } public Object getValueAt ( int row , int col ) { XmlElement filter = filterList . getElement ( row ) ; if ( filter == null ) { return "" ; } if ( col == 0 ) { String description = filter . getAttribute ( "name" ) ; if ( description == null ) { <START_BUG> return new String ( ) ; <END_BUG> } return description ; } else { return Boolean . valueOf ( filter . getAttribute ( "enabled" ) ) ; } } public Class getColumnClass ( int c ) { } public boolean isCellEditable ( int row , int col ) { } public void setValueAt ( Object value , int row , int col ) { } }

Fix:
return "" ;
Buggy code:
public class BasicHttpSolrServerTest extends SolrJettyTestBase { public static class RedirectServlet extends HttpServlet { @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } } public static class SlowServlet extends HttpServlet { @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } } public static class DebugServlet extends HttpServlet { public static void clear ( ) { } public static Integer errorCode = null ; public static String lastMethod = null ; public static HashMap < String , String > headers = null ; public static Map < String , String [ ] > parameters = null ; public static void setErrorCode ( Integer code ) { } @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } private void setHeaders ( HttpServletRequest req ) { } private void setParameters ( HttpServletRequest req ) { } @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } private void recordRequest ( HttpServletRequest req , HttpServletResponse resp ) { } } @ BeforeClass public static void beforeTest ( ) throws Exception { } @ Test public void testConnectionRefused ( ) throws MalformedURLException { int unusedPort = findUnusedPort ( ) ; <START_BUG> HttpSolrServer server = new HttpSolrServer ( ( ( "http:////127.0.0.1:" + unusedPort ) + "//solr" ) ) ; <END_BUG> server . setConnectionTimeout ( 500 ) ; SolrQuery q = new SolrQuery ( "*:*" ) ; try { QueryResponse response = server . query ( q ) ; fail ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>thrown<seq2seq4repair_space>an<seq2seq4repair_space>exception." ) ; } catch ( SolrServerException e ) { assumeFalse ( "blackholed!" , e . getMessage ( ) . contains ( "IOException<seq2seq4repair_space>occured<seq2seq4repair_space>when<seq2seq4repair_space>talking<seq2seq4repair_space>to<seq2seq4repair_space>server" ) ) ; assertTrue ( e . getMessage ( ) . contains ( "refused" ) ) ; } finally { server . shutdown ( ) ; } } @ Test public void testTimeout ( ) throws Exception { } public void testSolrExceptionCodeNotFromSolr ( ) throws IOException , SolrServerException { } @ Test public void testQuery ( ) { } @ Test public void testDelete ( ) { } @ Test public void testUpdate ( ) { } @ Test public void testRedirect ( ) throws Exception { } @ Test public void testCompression ( ) throws Exception { } @ Test public void testSetParametersExternalClient ( ) { } @ Test public void testGetRawStream ( ) throws IOException , SolrServerException { } public void testExampleKeystorePath ( ) { } private int findUnusedPort ( ) { } }

Fix:
HttpSolrServer server = new HttpSolrServer ( ( ( ( ( "http" + ( isSSLMode ( ) ? "s" : "" ) ) + ":////127.0.0.1:" ) + unusedPort ) + "//solr" ) ) ;
Buggy code:
public class SeccionHTML implements ElementoTransformadoHTML { private List < ElementoHTML > contenido ; public SeccionHTML ( ) { } public void agregarElemento ( ElementoHTML elementoHTML ) { } @ Override public String getContenido ( ) { <START_BUG> return ( "<section>\n" + ( this . construirStringDeContenidos ( ) ) ) + "<//section>\n\n" ; <END_BUG> } private String construirStringDeContenidos ( ) { } No newline ; at end ; of file ; }

Fix:
return ( "<section>\n" + ( this . construirStringDeContenidos ( ) ) ) + "<//section>\n" ;