nus-yam/ex-repair huggingface dataset:
Buggy code:
@ ApplicationAnnotation ( name = ApplicationWithHDHT . APP_NAME ) public class ApplicationWithHDHT implements StreamingApplication { private static final Logger logger = LoggerFactory . getLogger ( ApplicationWithHDHT . class ) ; public static final String APP_NAME = "GenericAdsDimensionsDemoWithHDHTtest" ; public static final String PROP_STORE_PATH = ( "dt.application." + ( ApplicationWithHDHT . APP_NAME ) ) + ".operator.Store.fileStore.basePathPrefix" ; public static final String EVENT_SCHEMA = "adsGenericEventSchema.json" ; public static final String DIMENSIONAL_SCHEMA = "adsGenericDataSchema.json" ; @ Override public void populateDAG ( DAG dag , Configuration conf ) { InputItemGenerator input = dag . addOperator ( "InputGenerator" , InputItemGenerator . class ) ; AdsDimensionComputation dimensions = dag . addOperator ( "DimensionsComputation" , new AdsDimensionComputation ( ) ) ; dag . getMeta ( dimensions ) . getAttributes ( ) . put ( APPLICATION_WINDOW_COUNT , 4 ) ; AppDataDimensionStoreHDHT store = dag . addOperator ( "Store" , AppDataDimensionStoreHDHT . class ) ; String basePath = conf . get ( ApplicationWithHDHT . PROP_STORE_PATH ) ; TFileImpl hdsFile = new TFileImpl . DefaultTFileImpl ( ) ; if ( basePath != null ) { basePath += System . currentTimeMillis ( ) ; hdsFile . setBasePath ( basePath ) ; System . out . println ( ( "Setting<seq2seq4repair_space>basePath<seq2seq4repair_space>" + basePath ) ) ; } store . setFileStore ( hdsFile ) ; <START_BUG> store . getResultSerializerFactory ( ) . getAppDataFormatter ( ) . setDecimalFormatString ( "#.##" ) ; <END_BUG> dag . setAttribute ( store , COUNTERS_AGGREGATOR , new BasicCounters . LongAggregator < org . apache . commons . lang . mutable . MutableLong > ( ) ) ; String eventSchema = SchemaUtils . jarResourceFileToString ( ApplicationWithHDHT . EVENT_SCHEMA ) ; String dimensionalSchema = SchemaUtils . jarResourceFileToString ( ApplicationWithHDHT . DIMENSIONAL_SCHEMA ) ; dimensions . setEventSchemaJSON ( eventSchema ) ; store . setEventSchemaJSON ( eventSchema ) ; store . setDimensionalSchemaJSON ( dimensionalSchema ) ; Operator . OutputPort < String > queryPort ; Operator . InputPort < String > queryResultPort ; String gatewayAddress = dag . getValue ( GATEWAY_CONNECT_ADDRESS ) ; URI uri = URI . create ( ( ( "ws:////" + gatewayAddress ) + "//pubsub" ) ) ; PubSubWebSocketAppDataQuery wsIn = dag . addOperator ( "Query" , new PubSubWebSocketAppDataQuery ( ) ) ; wsIn . setUri ( uri ) ; queryPort = wsIn . outputPort ; PubSubWebSocketAppDataResult wsOut = dag . addOperator ( "QueryResult" , new PubSubWebSocketAppDataResult ( ) ) ; wsOut . setUri ( uri ) ; queryResultPort = wsOut . input ; dag . addStream ( "InputStream" , input . outputPort , dimensions . inputEvent ) ; dag . addStream ( "DimensionalData" , dimensions . aggregateOutput , store . input ) ; dag . addStream ( "Query" , queryPort , store . query ) ; dag . addStream ( "QueryResult" , store . queryResult , queryResultPort ) ; } }

Fix:
store . getAppDataFormatter ( ) . setDecimalFormatString ( "#.##" ) ;
Buggy code:
public class LegendreGaussIntegratorTest { @ Test public void testSinFunction ( ) throws MathException { UnivariateRealFunction f = new SinFunction ( ) ; <START_BUG> UnivariateRealIntegrator integrator = new LegendreGaussIntegrator ( 5 , 64 ) ; <END_BUG> integrator . setAbsoluteAccuracy ( 1.0E-10 ) ; integrator . setRelativeAccuracy ( 1.0E-14 ) ; integrator . setMinimalIterationCount ( 2 ) ; integrator . setMaximalIterationCount ( 15 ) ; double min ; double max ; double expected ; double result ; double tolerance ; min = 0 ; max = FastMath . PI ; expected = 2 ; tolerance = FastMath . max ( integrator . getAbsoluteAccuracy ( ) , FastMath . abs ( ( expected * ( integrator . getRelativeAccuracy ( ) ) ) ) ) ; result = integrator . integrate ( f , min , max ) ; Assert . assertEquals ( expected , result , tolerance ) ; min = ( - ( FastMath . PI ) ) // 3 ; max = 0 ; expected = - 0.5 ; tolerance = FastMath . max ( integrator . getAbsoluteAccuracy ( ) , FastMath . abs ( ( expected * ( integrator . getRelativeAccuracy ( ) ) ) ) ) ; result = integrator . integrate ( f , min , max ) ; Assert . assertEquals ( expected , result , tolerance ) ; } @ Test public void testQuinticFunction ( ) throws MathException { } @ Test public void testExactIntegration ( ) throws ConvergenceException , MathUserException { } private double exactIntegration ( PolynomialFunction p , double a , double b ) { } }

Fix:
UnivariateRealIntegratorImpl integrator = new LegendreGaussIntegrator ( 5 , 64 ) ;
Buggy code:
public class PushMenu extends CompoundContributionItem implements IWorkbenchContribution { private IServiceLocator serviceLocator ; private IHandlerService handlerService ; public PushMenu ( ) { } public PushMenu ( String id ) { } @ Override public boolean isDynamic ( ) { } public void initialize ( IServiceLocator locator ) { } @ Override protected IContributionItem [ ] getContributionItems ( ) { List < IContributionItem > res = new ArrayList < IContributionItem > ( ) ; if ( ( this . handlerService ) != null ) { Repository repository = SelectionUtils . getRepository ( handlerService . getCurrentState ( ) ) ; if ( repository != null ) { try { String ref = repository . getFullBranch ( ) ; String menuLabel = UIText . PushMenu_PushHEAD ; <START_BUG> if ( ref . startsWith ( Constants . R_HEADS ) ) { <END_BUG> menuLabel = NLS . bind ( PushMenu_PushBranch , Repository . shortenRefName ( ref ) ) ; } CommandContributionItemParameter params = new CommandContributionItemParameter ( this . serviceLocator , getClass ( ) . getName ( ) , ActionCommands . PUSH_BRANCH_ACTION , CommandContributionItem . STYLE_PUSH ) ; params . label = menuLabel ; CommandContributionItem item = new CommandContributionItem ( params ) ; res . add ( item ) ; } catch ( IOException ex ) { Activator . handleError ( ex . getLocalizedMessage ( ) , ex , false ) ; } } } return res . toArray ( new IContributionItem [ res . size ( ) ] ) ; } }

Fix:
if ( ( ref != null ) && ( ref . startsWith ( Constants . R_HEADS ) ) ) {
Buggy code:
public class AllTestsAspectJ150 { public static Test suite ( ) { <START_BUG> TestSuite suite = new TestSuite ( "Java5//AspectJ5<seq2seq4repair_space>tests" ) ; <END_BUG> suite . addTestSuite ( MigrationTests . class ) ; suite . addTest ( Ajc150Tests . suite ( ) ) ; suite . addTestSuite ( SCCSFixTests . class ) ; suite . addTest ( AccBridgeMethods . suite ( ) ) ; suite . addTestSuite ( CovarianceTests . class ) ; suite . addTestSuite ( Enums . class ) ; suite . addTest ( AnnotationsBinaryWeaving . suite ( ) ) ; suite . addTest ( AnnotationPointcutsTests . suite ( ) ) ; suite . addTestSuite ( VarargsTests . class ) ; suite . addTestSuite ( StaticImports . class ) ; suite . addTest ( AnnotationRuntimeTests . suite ( ) ) ; suite . addTestSuite ( PerTypeWithinTests . class ) ; suite . addTest ( Autoboxing . suite ( ) ) ; suite . addTest ( Annotations . suite ( ) ) ; suite . addTest ( AnnotationBinding . suite ( ) ) ; suite . addTest ( RuntimeAnnotations . suite ( ) ) ; suite . addTest ( SuppressedWarnings . suite ( ) ) ; suite . addTest ( DeclareAnnotationTests . suite ( ) ) ; suite . addTest ( GenericsTests . suite ( ) ) ; suite . addTest ( GenericITDsDesign . suite ( ) ) ; suite . addTest ( AtAjSyntaxTests . suite ( ) ) ; suite . addTest ( AtAjMisuseTests . suite ( ) ) ; suite . addTest ( AtAjLTWTests . suite ( ) ) ; suite . addTest ( HasMember . suite ( ) ) ; suite . addTestSuite ( LTWTests . class ) ; return suite ; } }

Fix:
TestSuite suite = new TestSuite ( "AspectJ1.5.0<seq2seq4repair_space>tests" ) ;
Buggy code:
public class JarResourceFactory { final JarOutputStream jar ; final ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; ByteArrayResource resource ; public JarResourceFactory ( ) { } public void add ( final String path , final InputStream in ) { } public void addClassClosures ( final List classes ) { } public ByteArrayResource getResource ( ) { } private void checkWritable ( ) { } private void close ( ) { checkWritable ( ) ; try { jar . close ( ) ; out . close ( ) ; } catch ( IOException e ) { throw new WicketRuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>close<seq2seq4repair_space>JAR" , e ) ; } System . out . println ( ( "JAR:<seq2seq4repair_space>Size<seq2seq4repair_space>is<seq2seq4repair_space>" + ( Bytes . bytes ( out . size ( ) ) ) ) ) ; resource = new ByteArrayResource ( "application//x-compressed" , out . toByteArray ( ) ) ; <START_BUG> resource . setCacheable ( false ) ; <END_BUG> } private boolean isClosed ( ) { } }

Fix:
resource . setCacheable ( true ) ;
Buggy code:
public class ValueTools { public static Long toLong ( final Value value , final Long defaultValue ) { } public static long toLong ( final Value value , final long defaultValue ) { } public static Integer toInteger ( final Value value , final Integer defaultValue ) { } public static int toInteger ( final Value value , final int defaultValue ) { <START_BUG> return ValueTools . toInteger ( value , defaultValue ) ; <END_BUG> } public static ListValue toStringList ( final Iterable < ? > list ) { } public static List < String > fromStringList ( final ListValue list ) { } }

Fix:
return ValueTools . toInteger ( value , Integer . valueOf ( defaultValue ) ) ;
Buggy code:
public class ValidatorUtilsTest { String string ; StringProperty stringProperty = new SimpleStringProperty ( ) ; LocalDateTime nullTime = null ; Duration nullDuration = null ; @ Test public void testIsCorrectHour ( ) { string = "" ; stringProperty . set ( string ) ; assertFalse ( ValidatorUtils . isCorrectHour ( string ) ) ; assertFalse ( ValidatorUtils . isCorrectHour ( stringProperty ) ) ; string = "30" ; stringProperty . set ( string ) ; assertFalse ( ValidatorUtils . isCorrectHour ( string ) ) ; assertFalse ( ValidatorUtils . isCorrectHour ( stringProperty ) ) ; string = "25" ; stringProperty . set ( string ) ; assertFalse ( ValidatorUtils . isCorrectHour ( string ) ) ; assertFalse ( ValidatorUtils . isCorrectHour ( stringProperty ) ) ; string = "3" ; stringProperty . set ( string ) ; assertTrue ( ValidatorUtils . isCorrectHour ( string ) ) ; assertTrue ( ValidatorUtils . isCorrectHour ( stringProperty ) ) ; string = "13" ; stringProperty . set ( string ) ; assertTrue ( ValidatorUtils . isCorrectHour ( string ) ) ; assertTrue ( ValidatorUtils . isCorrectHour ( stringProperty ) ) ; <START_BUG> string = "24" ; <END_BUG> stringProperty . set ( string ) ; assertTrue ( ValidatorUtils . isCorrectHour ( string ) ) ; assertTrue ( ValidatorUtils . isCorrectHour ( stringProperty ) ) ; } @ Test public void testIsCorrectMinutes ( ) { } @ Test public void isCorrectLength ( ) { } @ Test public void testIsCorrectHeight ( ) { } @ Test public void testIsValidName ( ) { } }

Fix:
string = "23" ;
Buggy code:
class HTTPSampler3 extends HTTPSamplerBase implements Interruptible { private static final long serialVersionUID = 241L ; private final transient HTTPHC4Impl hc ; public HTTPSampler3 ( ) { } @ Override public boolean interrupt ( ) { } @ Override protected HTTPSampleResult sample ( URL u , String method , boolean areFollowingRedirect , int depth ) { } @ Override public void testIterationStart ( LoopIterationEvent event ) { <START_BUG> hc . testIterationStart ( event ) ; <END_BUG> } }

Fix:
hc . notifyFirstSampleAfterLoopRestart ( ) ;
Buggy code:
public class TestHungarianAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new HungarianAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new HungarianAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ProgressbarControl implements Controller { private Element progressBarElement ; public void bind ( final Nifty nifty , final Screen screenParam , final Element element , final Properties parameter , final Attributes controlDefinitionAttributes ) { } @ Override public void init ( final Properties parameter , final Attributes controlDefinitionAttributes ) { } public void onStartScreen ( ) { } public void onFocus ( final boolean getFocus ) { } public boolean inputEvent ( final NiftyInputEvent inputEvent ) { } public void setProgress ( final float progressValue ) { float progress = progressValue ; if ( progress < 0.0F ) { progress = 0.0F ; } else if ( progress > 1.0F ) { progress = 1.0F ; } final int MIN_WIDTH = 28 ; <START_BUG> int pixelWidth = ( ( int ) ( ( Math . max ( MIN_WIDTH , progressBarElement . getParent ( ) . getWidth ( ) ) ) * progress ) ) ; <END_BUG> progressBarElement . setConstraintWidth ( new SizeValue ( ( pixelWidth + "px" ) ) ) ; progressBarElement . getParent ( ) . layoutElements ( ) ; } }

Fix:
int pixelWidth = ( ( int ) ( Math . max ( MIN_WIDTH , ( ( progressBarElement . getParent ( ) . getWidth ( ) ) * progress ) ) ) ) ;
Buggy code:
public class EasyAIPlayer extends GameComputerPlayer { private LabyrinthGameState myState ; public EasyAIPlayer ( String name ) { } @ Override protected void initAfterReady ( ) { } @ Override protected void receiveInfo ( GameInfo info ) { } private double findDist ( int myX , int myY , int tarX , int tarY ) { <START_BUG> double dist = ( myX - tarY ) * ( myX - tarX ) ; <END_BUG> dist += ( myY - tarY ) * ( myY - tarY ) ; dist = Math . sqrt ( dist ) ; return dist ; } }

Fix:
double dist = ( myX - tarX ) * ( myX - tarX ) ;
Buggy code:
public abstract class Continuus extends Task { private String ccmDir = "" ; private String ccmAction = "" ; public String getCcmAction ( ) { } public void setCcmAction ( String v ) { } public final void setCcmDir ( String dir ) { <START_BUG> ccmDir = project . translatePath ( dir ) ; <END_BUG> } protected final String getCcmCommand ( ) { } protected int run ( Commandline cmd , ExecuteStreamHandler handler ) { } protected int run ( Commandline cmd ) { } private static final String CCM_EXE = "ccm" ; public static final String COMMAND_CREATE_TASK = "create_task" ; public static final String COMMAND_CHECKOUT = "co" ; public static final String COMMAND_CHECKIN = "ci" ; public static final String COMMAND_RECONFIGURE = "reconfigure" ; public static final String COMMAND_DEFAULT_TASK = "default_task" ; }

Fix:
ccmDir = getProject ( ) . translatePath ( dir ) ;
Buggy code:
public class WorldSystem extends GameSystem { static int leaderIndex = 0 ; Engine e ; Map map ; int encounterNum ; NPC leader ; Terrain currentTerrain ; DialogState dialogState ; ExploreState exploreState ; NPC activeNPC ; public WorldSystem ( ) { } public void start ( ) { } public void start ( Map m , int startX , int startY ) { } @ Override public void update ( ) { } @ Override public void setNextState ( ) { } @ Override public void keyPressed ( KeyEvent evt ) { } public void moveTo ( int x , int y ) { leader . move ( x , y ) ; if ( ( ( leader . getX ( ) ) == x ) && ( ( leader . getY ( ) ) == y ) ) { currentTerrain = map . getTerrain ( x , y ) ; if ( ( currentTerrain ) != null ) encounterNum += currentTerrain . getRate ( ) ; if ( ( encounterNum ) > 100 ) if ( ( currentTerrain . formations . size ( ) ) > 0 ) { encounterNum = 0 ; <START_BUG> Formation f = currentTerrain . formations . get ( ( ( int ) ( ( Math . random ( ) ) * ( currentTerrain . formations . size ( ) ) ) ) ) ; <END_BUG> Engine . getInstance ( ) . changeToBattle ( f , currentTerrain . getBackground ( ) ) ; } if ( ( map . eventMap . get ( ( ( x + "<seq2seq4repair_space>" ) + y ) ) ) != null ) map . eventMap . get ( ( ( x + "<seq2seq4repair_space>" ) + y ) ) . interact ( ) ; } } @ Override public void finish ( ) { } public NPC getLeader ( ) { } }

Fix:
Formation f = currentTerrain . getRandomFormation ( ) ;
Buggy code:
public class ConcurrentMergeScheduler extends MergeScheduler { private int mergeThreadPriority = - 1 ; private List mergeThreads = new ArrayList ( ) ; private int maxThreadCount = 3 ; private List exceptions = new ArrayList ( ) ; private Directory dir ; private boolean closed ; private IndexWriter writer ; public ConcurrentMergeScheduler ( ) { } public void setMaxThreadCount ( int count ) { } public int getMaxThreadCount ( ) { } public synchronized int getMergeThreadPriority ( ) { } public synchronized void setMergeThreadPriority ( int pri ) { } private void message ( String message ) { } private synchronized void initMergeThreadPriority ( ) { } public void close ( ) { } public synchronized void sync ( ) { } private synchronized int mergeThreadCount ( ) { } public void merge ( IndexWriter writer ) throws IOException , CorruptIndexException { } private class MergeThread extends Thread { IndexWriter writer ; OneMerge startMerge ; OneMerge runningMerge ; public MergeThread ( IndexWriter writer , MergePolicy . OneMerge startMerge ) throws IOException { } public synchronized void setRunningMerge ( MergePolicy . OneMerge merge ) { } public synchronized OneMerge getRunningMerge ( ) { } public void setThreadPriority ( int pri ) { } public void run ( ) { MergePolicy . OneMerge merge = this . startMerge ; try { message ( "<seq2seq4repair_space>merge<seq2seq4repair_space>thread:<seq2seq4repair_space>start" ) ; while ( true ) { setRunningMerge ( merge ) ; writer . merge ( merge ) ; merge = writer . getNextMerge ( ) ; if ( merge != null ) { writer . mergeInit ( merge ) ; message ( ( "<seq2seq4repair_space>merge<seq2seq4repair_space>thread:<seq2seq4repair_space>do<seq2seq4repair_space>another<seq2seq4repair_space>merge<seq2seq4repair_space>" + ( merge . segString ( dir ) ) ) ) ; } else break ; } message ( "<seq2seq4repair_space>merge<seq2seq4repair_space>thread:<seq2seq4repair_space>done" ) ; <START_BUG> } catch ( IOException exc ) { <END_BUG> if ( merge != null ) { merge . setException ( exc ) ; writer . addMergeException ( merge ) ; } if ( ! ( exc instanceof MergePolicy . MergeAbortedException ) ) { synchronized ( ConcurrentMergeScheduler . this ) { exceptions . add ( exc ) ; } if ( ! ( suppressExceptions ) ) { ConcurrentMergeScheduler . anyExceptions = true ; throw new MergePolicy . MergeException ( exc ) ; } } } finally { synchronized ( ConcurrentMergeScheduler . this ) { mergeThreads . remove ( this ) ; ConcurrentMergeScheduler . this . notifyAll ( ) ; } } } public String toString ( ) { } } static boolean anyExceptions = false ; public static boolean anyUnhandledExceptions ( ) { } private void addMyself ( ) { } private boolean suppressExceptions ; void setSuppressExceptions ( ) { } void clearSuppressExceptions ( ) { } private static List allInstances ; public static void setTestMode ( ) { } }

Fix:
} catch ( Throwable exc ) {
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; ImageList imageList ; static final int TabFolderProc ; static final TCHAR TabFolderClass = new TCHAR ( 0 , OS . WC_TABCONTROL , true ) ; static final int ID_UPDOWN = 1 ; public TabFolder ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createItem ( TabItem item , int index ) { } void createHandle ( ) { } void createWidget ( ) { } void destroyItem ( TabItem item ) { } void drawThemeBackground ( int hDC , int hwnd , RECT rect ) { } Control findThemeControl ( ) { } public Rectangle getClientArea ( ) { } public TabItem getItem ( int index ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } int imageIndex ( Image image ) { } 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 ) { } public void setSelection ( TabItem item ) { } public void setSelection ( TabItem [ ] items ) { } public void setFont ( Font font ) { checkWidget ( ) ; Rectangle oldRect = getClientArea ( ) ; super . setFont ( font ) ; Rectangle newRect = getClientArea ( ) ; if ( ! ( oldRect . equals ( newRect ) ) ) { <START_BUG> resize ( ) ; <END_BUG> int index = OS . SendMessage ( handle , TCM_GETCURSEL , 0 , 0 ) ; if ( index != ( - 1 ) ) { TabItem item = items [ index ] ; Control control = item . control ; if ( ( control != null ) && ( ! ( control . isDisposed ( ) ) ) ) { control . setBounds ( getClientArea ( ) ) ; } } } } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify ) { } String toolTipText ( NMTTDISPINFO hdr ) { } boolean traversePage ( boolean next ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_NCHITTEST ( int wParam , int lParam ) { } LRESULT WM_NOTIFY ( int wParam , int lParam ) { } LRESULT WM_PARENTNOTIFY ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGING ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( int wParam , int lParam ) { } }

Fix:
sendResize ( ) ;
Buggy code:
public final class ModelFactory { private final List < InvocableHandlerMethod > attributeMethods ; private final WebDataBinderFactory binderFactory ; private final SessionAttributesHandler sessionAttributesHandler ; public ModelFactory ( List < InvocableHandlerMethod > attributeMethods , WebDataBinderFactory binderFactory , SessionAttributesHandler sessionAttributesHandler ) { } public void initModel ( NativeWebRequest request , ModelAndViewContainer mavContainer , HandlerMethod handlerMethod ) throws Exception { } private void invokeModelAttributeMethods ( NativeWebRequest request , ModelAndViewContainer mavContainer ) throws Exception { } private void checkHandlerSessionAttributes ( NativeWebRequest request , ModelAndViewContainer mavContainer , HandlerMethod handlerMethod ) throws HttpSessionRequiredException { } public static String getNameForReturnValue ( Object returnValue , MethodParameter returnType ) { } public static String getNameForParameter ( MethodParameter parameter ) { } public void updateModel ( NativeWebRequest request , ModelAndViewContainer mavContainer , SessionStatus sessionStatus ) throws Exception { if ( sessionStatus . isComplete ( ) ) { this . sessionAttributesHandler . cleanupAttributes ( request ) ; } else { this . sessionAttributesHandler . storeAttributes ( request , mavContainer . getModel ( ) ) ; } <START_BUG> if ( mavContainer . isResolveView ( ) ) { <END_BUG> updateBindingResult ( request , mavContainer . getModel ( ) ) ; } } private void updateBindingResult ( NativeWebRequest request , ModelMap model ) throws Exception { } private boolean isBindingCandidate ( String attributeName , Object value ) { } }

Fix:
if ( ! ( mavContainer . isRequestHandled ( ) ) ) {
Buggy code:
public class MainActivity extends ActionBarActivity { private GridView mGridView ; private PictureWallAdapter mAdapter ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; <START_BUG> mGridView = ( ( GridView ) ( findViewById ( picture_wall_picure ) ) ) ; <END_BUG> mAdapter = new PictureWallAdapter ( this , 0 , Images . pictures , mGridView ) ; mGridView . setAdapter ( mAdapter ) ; } @ Override protected void onDestroy ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
mGridView = ( ( GridView ) ( findViewById ( photo_wall ) ) ) ;
Buggy code:
public class ProjectHelper { public static final String ANT_CORE_URI = "antlib:org.apache.tools.ant" ; public static final String ANT_CURRENT_URI = "ant:current" ; public static final String ANTLIB_URI = "antlib:" ; public static final String ANT_TYPE = "ant-type" ; public static final String HELPER_PROPERTY = "org.apache.tools.ant.ProjectHelper" ; public static final String SERVICE_ID = "META-INF//services//org.apache.tools.ant.ProjectHelper" ; public static final String PROJECTHELPER_REFERENCE = "ant.projectHelper" ; public static void configureProject ( Project project , File buildFile ) throws BuildException { } public ProjectHelper ( ) { } private Vector importStack = new Vector ( ) ; public Vector getImportStack ( ) { } public void parse ( Project project , Object source ) throws BuildException { } public static ProjectHelper getProjectHelper ( ) throws BuildException { } private static ProjectHelper newHelper ( String helperClass ) throws BuildException { } public static ClassLoader getContextClassLoader ( ) { } public static void configure ( Object target , AttributeList attrs , Project project ) throws BuildException { if ( target instanceof TypeAdapter ) { target = ( ( TypeAdapter ) ( target ) ) . getProxy ( ) ; } IntrospectionHelper ih = IntrospectionHelper . getHelper ( project , target . getClass ( ) ) ; <START_BUG> for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { <END_BUG> String value = ProjectHelper . replaceProperties ( project , attrs . getValue ( i ) , project . getProperties ( ) ) ; try { ih . setAttribute ( project , target , attrs . getName ( i ) . toLowerCase ( Locale . US ) , value ) ; } catch ( BuildException be ) { if ( ! ( attrs . getName ( i ) . equals ( "id" ) ) ) { throw be ; } } } } public static void addText ( Project project , Object target , char [ ] buf , int start , int count ) throws BuildException { } public static void addText ( Project project , Object target , String text ) throws BuildException { } public static void storeChild ( Project project , Object parent , Object child , String tag ) { } public static String replaceProperties ( Project project , String value ) throws BuildException { } public static String replaceProperties ( Project project , String value , Hashtable keys ) throws BuildException { } public static void parsePropertyString ( String value , Vector fragments , Vector propertyRefs ) throws BuildException { } public static String genComponentName ( String uri , String name ) { } public static String extractUriFromComponentName ( String componentName ) { } public static String extractNameFromComponentName ( String componentName ) { } public static BuildException addLocationToBuildException ( BuildException ex , Location newLocation ) { } }

Fix:
for ( int i = 0 , length = attrs . getLength ( ) ; i < length ; i ++ ) {
Buggy code:
public class ProjectReferencePage extends PropertyPage { private IProject project ; private boolean modified = false ; private CheckboxTableViewer listViewer ; private static final int PROJECT_LIST_MULTIPLIER = 30 ; public ProjectReferencePage ( ) { } protected Control createContents ( Composite parent ) { <START_BUG> WorkbenchHelp . setHelp ( parent , PROJECT_REFERENCE_PROPERTY_PAGE ) ; <END_BUG> Font font = parent . getFont ( ) ; Composite composite = new Composite ( parent , SWT . NONE ) ; GridLayout layout = new GridLayout ( ) ; composite . setLayout ( layout ) ; composite . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; composite . setFont ( font ) ; initialize ( ) ; createDescriptionLabel ( composite ) ; listViewer = CheckboxTableViewer . newCheckList ( composite , ( ( SWT . TOP ) | ( SWT . BORDER ) ) ) ; listViewer . getTable ( ) . setFont ( font ) ; GridData data = new GridData ( GridData . FILL_BOTH ) ; data . grabExcessHorizontalSpace = true ; if ( DialogUtil . inRegularFontMode ( parent ) ) data . heightHint = ProjectReferencePage . getDefaultFontHeight ( listViewer . getTable ( ) , ProjectReferencePage . PROJECT_LIST_MULTIPLIER ) ; listViewer . getTable ( ) . setLayoutData ( data ) ; listViewer . getTable ( ) . setFont ( font ) ; listViewer . setLabelProvider ( WorkbenchLabelProvider . getDecoratingWorkbenchLabelProvider ( ) ) ; listViewer . setContentProvider ( getContentProvider ( project ) ) ; listViewer . setSorter ( new ViewerSorter ( ) { } ) ; listViewer . setInput ( project . getWorkspace ( ) ) ; try { listViewer . setCheckedElements ( project . getReferencedProjects ( ) ) ; } catch ( CoreException e ) { } listViewer . addCheckStateListener ( new ICheckStateListener ( ) { public void checkStateChanged ( CheckStateChangedEvent event ) { modified = true ; } } ) ; return composite ; } protected IStructuredContentProvider getContentProvider ( final IProject project ) { } private static int getDefaultFontHeight ( Control control , int lines ) { } protected void handle ( InvocationTargetException e ) { } private void initialize ( ) { } public boolean performOk ( ) { } }

Fix:
WorkbenchHelp . setHelp ( getControl ( ) , PROJECT_REFERENCE_PROPERTY_PAGE ) ;
Buggy code:
public class ExactSpawn implements Listener { @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = false ) public void onPlayerLogin ( PlayerLoginEvent event ) { } <START_BUG> @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = false ) <END_BUG> public void onPlayerRespawn ( PlayerRespawnEvent event ) { if ( event . isBedSpawn ( ) ) return ; Location loc = instance . getServer ( ) . getWorld ( "world" ) . getSpawnLocation ( ) ; loc . setX ( ( ( loc . getX ( ) ) + 0.5 ) ) ; loc . setZ ( ( ( loc . getZ ( ) ) + 0.5 ) ) ; event . setRespawnLocation ( loc ) ; } }

Fix:
@ EventHandler ( priority = EventPriority . LOW , ignoreCancelled = false )
Buggy code:
public class DMILogger { public static String file = ( ( ( ( System . getProperty ( "user.dir" ) ) + ( File . separator ) ) + "log" ) + ( File . separator ) ) + "octave_log.txt" ; public static void error ( String err ) { } public static void warn ( String text ) { } public static void msg ( String text ) { <START_BUG> octavePanel . evaluate ( ( ( ( ( "Logger('" + ( DMILogger . file ) ) + "',0,'" ) + text ) + ");" ) ) ; <END_BUG> } public static void error ( String file , String text , String id ) { } public static void warn ( String file , String text , String id ) { } public static void msg ( String file , String text , String id ) { } }

Fix:
octavePanel . evaluate ( ( ( ( ( "Logger('" + ( DMILogger . file ) ) + "',0,'" ) + text ) + "');" ) ) ;
Buggy code:
public class BudgetAdapter extends BaseAdapter { public static final int TYPE_ITEM = 0 ; public static final int TYPE_SEPARATOR = 1 ; private ArrayList < Object > mData = new ArrayList < > ( ) ; private TreeSet < Integer > sectionHeader = new TreeSet < > ( ) ; public BudgetAdapter . ViewHolder holder = null ; private LayoutInflater mInflater ; public BudgetAdapter ( Context context ) { } public void addItem ( final BudgetCategory item ) { } public void addSectionHeaderItem ( final BudgetGroup item ) { } @ Override public int getItemViewType ( int position ) { } @ Override public int getViewTypeCount ( ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { int rowType = getItemViewType ( position ) ; if ( convertView == null ) { holder = new BudgetAdapter . ViewHolder ( ) ; switch ( rowType ) { case BudgetAdapter . TYPE_ITEM : convertView = mInflater . inflate ( item_budget , null ) ; holder . textViewBudgetName = ( ( TextView ) ( convertView . findViewById ( textview_budget_details ) ) ) ; holder . textViewBudgetCost = ( ( TextView ) ( convertView . findViewById ( textview_budget_cost ) ) ) ; break ; case BudgetAdapter . TYPE_SEPARATOR : convertView = mInflater . inflate ( item_budget_header , null ) ; holder . textViewBudgetName = ( ( TextView ) ( convertView . findViewById ( budget_separator ) ) ) ; break ; } convertView . setTag ( holder ) ; } else { holder = ( ( BudgetAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; } if ( ( getItemViewType ( position ) ) == ( BudgetAdapter . TYPE_SEPARATOR ) ) { BudgetGroup current = ( ( BudgetGroup ) ( mData . get ( position ) ) ) ; holder . textViewBudgetName . setText ( current . getName ( ) ) ; } else { BudgetCategory current = ( ( BudgetCategory ) ( mData . get ( position ) ) ) ; holder . textViewBudgetName . setText ( current . getName ( ) ) ; <START_BUG> if ( ( current . getSpent ( ) ) > ( current . getBudgeted ( ) ) ) { <END_BUG> holder . textViewBudgetCost . setTextColor ( Color . rgb ( 0 , 100 , 0 ) ) ; } else { holder . textViewBudgetCost . setTextColor ( Color . rgb ( 100 , 0 , 0 ) ) ; } holder . textViewBudgetCost . setText ( ( ( ( Utility . doubleToCurrency ( ( ( current . getBudgeted ( ) ) - ( current . getSpent ( ) ) ) ) ) + "<seq2seq4repair_space>//<seq2seq4repair_space>" ) + ( Utility . doubleToCurrency ( current . getBudgeted ( ) ) ) ) ) ; } return convertView ; } public static class ViewHolder { public TextView textViewBudgetName ; public TextView textViewBudgetCost ; } }

Fix:
if ( ( ( current . getBudgeted ( ) ) - ( current . getSpent ( ) ) ) > 0 ) {
Buggy code:
public class XMLReader extends DefaultHandler { private StringBuffer contentBuffer ; private List < VideoFile > videoList = new ArrayList < VideoFile > ( ) ; public List < VideoFile > getList ( String inputFile ) { } public void startElement ( String uri , String localName , String qName , Attributes attrs ) throws SAXException { String elementName = localName ; if ( "" . equals ( elementName ) ) { elementName = qName ; } if ( elementName == "video" ) { videoList . add ( new VideoFile ( ) ) ; } if ( attrs != null ) { for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { String attributeName = attrs . getLocalName ( 0 ) ; if ( "" . equals ( attributeName ) ) <START_BUG> attrs . getQName ( 0 ) ; <END_BUG> if ( attributeName == "id" ) videoList . get ( ( ( videoList . size ( ) ) - 1 ) ) . setID ( new String ( attrs . getValue ( 0 ) ) ) ; } } } public void endElement ( String uri , String localName , String qName ) throws SAXException { } public void characters ( char [ ] ch , int start , int length ) throws SAXException { } }

Fix:
attributeName = attrs . getQName ( 0 ) ;
Buggy code:
public class HelloWorld { public static void main ( String [ ] args ) throws ParsingException , UnknownIdentifierException { <START_BUG> SimpleConcreteBalanaService service = new SimpleConcreteBalanaService ( null , "resources" ) ; <END_BUG> AzServiceFactory . registerDefaultProvider ( service ) ; AzService azHandle = AzServiceFactory . getAzService ( ) ; AzRequestContext azReqCtx = azHandle . createAzRequestContext ( ) ; AzEntity < AzCategoryIdSubjectAccess > accSubj = azReqCtx . createAzEntity ( AZ_CATEGORY_ID_SUBJECT_ACCESS ) ; accSubj . createAzAttribute ( "AuthNSystem" , X_ATTR_SUBJECT_ID , accSubj . createAzAttributeValue ( AZ_DATATYPE_ID_STRING , "alice" ) ) ; azReqCtx . addAzEntity ( accSubj ) ; AzEntity < AzCategoryIdResource > azResource = azReqCtx . createAzEntity ( AZ_CATEGORY_ID_RESOURCE ) ; azResource . createAzAttribute ( "applicationName" , X_ATTR_RESOURCE_ID , azResource . createAzAttributeValue ( AZ_DATATYPE_ID_STRING , "bbb" ) ) ; azReqCtx . addAzEntity ( azResource ) ; AzEntity < AzCategoryIdAction > azAction = azReqCtx . createAzEntity ( AZ_CATEGORY_ID_ACTION ) ; azAction . createAzAttribute ( "applicationName" , X_ATTR_ACTION_ID , azAction . createAzAttributeValue ( AZ_DATATYPE_ID_STRING , "read" ) ) ; azReqCtx . addAzEntity ( azAction ) ; Set < AzEntity < AzCategoryIdAction > > azActions = new HashSet < AzEntity < AzCategoryIdAction > > ( ) ; azActions . add ( azAction ) ; azReqCtx . addResourceActionAssociation ( azResource , azActions ) ; AzResponseContext azRspCtx = azHandle . decide ( azReqCtx ) ; AzResult azResult = null ; Iterator < AzResult > itResults = azRspCtx . getResults ( ) . iterator ( ) ; if ( itResults . hasNext ( ) ) { azResult = itResults . next ( ) ; System . out . println ( azResult . getAzDecision ( ) ) ; } } }

Fix:
AzService service = new SimpleConcreteBalanaService ( null , "resources" ) ;
Buggy code:
public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool { private static final String TL_DTD_LOC = "http:////www.objectpeople.com//tlwl//dtd//toplink-cmp_2_5_1.dtd" ; private String toplinkDescriptor ; private String toplinkDTD ; public void setToplinkdescriptor ( String inString ) { } public void setToplinkdtd ( String inString ) { } protected DescriptorHandler getDescriptorHandler ( File srcDir ) { } protected void addVendorFiles ( Hashtable ejbFiles , String baseName ) { super . addVendorFiles ( ejbFiles , baseName ) ; <START_BUG> File toplinkDD = new File ( getDescriptorDir ( ) , toplinkDescriptor ) ; <END_BUG> if ( toplinkDD . exists ( ) ) { ejbFiles . put ( ( ( META_DIR ) + ( toplinkDescriptor ) ) , toplinkDD ) ; } } public void validateConfigured ( ) throws BuildException { } }

Fix:
File toplinkDD = new File ( getConfig ( ) . descriptorDir , toplinkDescriptor ) ;
Buggy code:
public class StepInterpolatorAbstractTest extends TestCase { protected StepInterpolatorAbstractTest ( String name ) { } protected void checkDerivativesConsistency ( final FirstOrderIntegrator integrator , final TestProblemAbstract problem , final double threshold ) throws DerivativeException , IntegratorException { <START_BUG> integrator . setStepHandler ( new StepHandler ( ) { <END_BUG> private static final long serialVersionUID = 2462564234755682953L ; public boolean requiresDenseOutput ( ) { return true ; } public void handleStep ( StepInterpolator interpolator , boolean isLast ) throws DerivativeException { final double h = 0.001 * ( ( interpolator . getCurrentTime ( ) ) - ( interpolator . getPreviousTime ( ) ) ) ; final double t = ( interpolator . getCurrentTime ( ) ) - ( 300 * h ) ; 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 ) ; assertEquals ( approYDot , yDot [ i ] , threshold ) ; } } public void reset ( ) { } } ) ; integrator . integrate ( problem , problem . getInitialTime ( ) , problem . getInitialState ( ) , problem . getFinalTime ( ) , new double [ problem . getDimension ( ) ] ) ; } }

Fix:
integrator . addStepHandler ( new StepHandler ( ) {
Buggy code:
public class CustomThread extends Thread { static final CustomThread t = new CustomThread ( ) ; WebClient client = new WebClient ( BrowserVersion . FIREFOX_24 ) ; String lastSearch = "" ; String search ; HistoryManager hm = new HistoryManager ( ) ; boolean isHistory = false ; public CustomThread ( ) { } public void run ( ) { } private HtmlAnchor getAnchor ( DomElement li ) { } private boolean isListingValues ( HtmlPage page ) { } private void finish ( ) { } private void setText ( String text , boolean error ) { pane . setViewportView ( data ) ; data . setForeground ( ( error ? Color . RED : Color . BLACK ) ) ; data . setText ( text ) ; <START_BUG> if ( ! ( text . equals ( "" ) ) ) <END_BUG> finish ( ) ; } private void setText ( String text ) { } private void setError ( String error ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( ( text . equals ( "" ) ) || ( ( lastSearch . equals ( "" ) ) && ( search . equals ( "" ) ) ) ) )
Buggy code:
public class StartServersHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "start-servers" ; private final ServerInventory serverInventory ; private final HostControllerEnvironment hostControllerEnvironment ; private final HostRunningModeControl runningModeControl ; public StartServersHandler ( final HostControllerEnvironment hostControllerEnvironment , final ServerInventory serverInventory , HostRunningModeControl runningModeControl ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( final Locale locale ) { } private void cleanStartServers ( final ModelNode servers , final ModelNode domainModel ) { } private void restartedHcStartOrReconnectServers ( final ModelNode servers , final ModelNode domainModel ) { Map < String , ProcessInfo > processInfos = serverInventory . determineRunningProcesses ( ) ; for ( final String serverName : servers . keys ( ) ) { ProcessInfo info = processInfos . get ( serverInventory . getServerProcessName ( serverName ) ) ; boolean auto = servers . get ( serverName , AUTO_START ) . asBoolean ( true ) ; if ( ( info == null ) && auto ) { try { serverInventory . startServer ( serverName , domainModel ) ; } catch ( Exception e ) { HostControllerLogger . ROOT_LOGGER . failedToStartServer ( e , serverName ) ; } } else if ( info != null ) { <START_BUG> serverInventory . reconnectServer ( serverName , domainModel , info . isRunning ( ) ) ; <END_BUG> } } } }

Fix:
serverInventory . reconnectServer ( serverName , domainModel , info . isRunning ( ) , info . isStopping ( ) ) ;
Buggy code:
public class AuthenticatedWebPage extends WicketExamplePage { public SignInSession getSignInSession ( ) { } protected boolean checkAccess ( ) { boolean signedIn = getSignInSession ( ) . isSignedIn ( ) ; if ( ! signedIn ) { <START_BUG> getRequestCycle ( ) . redirectToInterceptPage ( SignIn . class ) ; <END_BUG> } return signedIn ; } }

Fix:
redirectToInterceptPage ( newPage ( SignIn . class ) ) ;
Buggy code:
public class FieldValueParserFactory { public static FieldValueParser fromFieldType ( FieldType fieldType , boolean odk , boolean legacy ) { if ( fieldType instanceof BarcodeType ) return new BarcodeFieldValueParser ( ) ; if ( fieldType instanceof BooleanType ) return new BooleanFieldValueParser ( ) ; if ( fieldType instanceof EnumType ) { if ( odk ) { if ( legacy ) { return new LegacyEnumFieldValueParser ( ) ; } else { return new IdEnumFieldValueParser ( ) ; } } else { return new CodeEnumFieldValueParser ( ( ( EnumType ) ( fieldType ) ) ) ; } } if ( fieldType instanceof GeoPointType ) return new GeoPointFieldValueParser ( ) ; if ( fieldType instanceof AttachmentType ) <START_BUG> return new ImageFieldValueParser ( ) ; <END_BUG> if ( fieldType instanceof LocalDateType ) return new LocalDateFieldValueParser ( ) ; if ( fieldType instanceof NarrativeType ) { if ( legacy ) { return new TextFieldValueParser ( ) ; } else { return new NarrativeFieldValueParser ( ) ; } } if ( fieldType instanceof QuantityType ) return new QuantityFieldValueParser ( ( ( QuantityType ) ( fieldType ) ) ) ; if ( fieldType instanceof ReferenceType ) { if ( legacy ) { return new LegacyReferenceFieldValueParser ( ( ( ReferenceType ) ( fieldType ) ) . getRange ( ) ) ; } else { return new ReferenceFieldValueParser ( ) ; } } if ( fieldType instanceof TextType ) return new TextFieldValueParser ( ) ; throw new IllegalArgumentException ( "Unknown<seq2seq4repair_space>FieldType<seq2seq4repair_space>passed<seq2seq4repair_space>to<seq2seq4repair_space>FieldValueParserFactory.get()" ) ; } }

Fix:
return new AttachmentFieldValueParser ( ) ;
Buggy code:
public class EditorMenuBar extends JMenuBar { EditorService editorService ; FileService fileService ; JMenu fileMenu ; JMenuItem newMenuItem ; JMenuItem openMenuItem ; JMenuItem saveMenuItem ; JMenuItem saveAsMenuItem ; JMenu editMenu ; public EditorMenuBar ( EditorService editorService , FileService fileService ) { } private void initFileMenu ( ) { fileMenu = new JMenu ( "File" ) ; fileMenu . add ( ( newMenuItem = new JMenuItem ( "New" ) ) ) ; fileMenu . add ( ( openMenuItem = new JMenuItem ( "Open..." ) ) ) ; fileMenu . add ( ( saveMenuItem = new JMenuItem ( "Save" ) ) ) ; fileMenu . add ( ( saveAsMenuItem = new JMenuItem ( "Save<seq2seq4repair_space>As..." ) ) ) ; int menuShortcutKeyMask = Toolkit . getDefaultToolkit ( ) . getMenuShortcutKeyMask ( ) ; newMenuItem . setAccelerator ( KeyStroke . getKeyStroke ( KeyEvent . VK_N , menuShortcutKeyMask ) ) ; openMenuItem . setAccelerator ( KeyStroke . getKeyStroke ( KeyEvent . VK_O , menuShortcutKeyMask ) ) ; saveMenuItem . setAccelerator ( KeyStroke . getKeyStroke ( KeyEvent . VK_S , menuShortcutKeyMask ) ) ; saveAsMenuItem . setAccelerator ( KeyStroke . getKeyStroke ( KeyEvent . VK_S , ( menuShortcutKeyMask | ( Event . SHIFT_MASK ) ) ) ) ; newMenuItem . addActionListener ( ( e ) -> HoloEditor . makeNewWindow ( ) ) ; <START_BUG> openMenuItem . addActionListener ( ( e ) -> fileService . openFile ( this ) ) ; <END_BUG> saveMenuItem . addActionListener ( ( e ) -> fileService . saveFile ( this ) ) ; saveAsMenuItem . addActionListener ( ( e ) -> fileService . saveFileAs ( this ) ) ; } private void initEditMenu ( ) { } }

Fix:
openMenuItem . addActionListener ( ( e ) -> FileService . openFile ( this ) ) ;
Buggy code:
public class Datastore { public static int CIRCLE_SIZE = 256 ; public static final long TIMEOUT = 30 ; public static final long PROCESS_TIMEOUT = 5 ; private static Datastore instance = null ; private ConcurrentHashMap < Integer , NodeInfo > successors ; private Integer self ; private ArrayList < Packet > packetQueue ; private SimpleCache < Packet > cache ; private SimpleCache < Boolean > processCache ; private ArrayList < JSONObject > logs ; private Datastore ( ) { } public static Datastore getInstance ( ) { } public void queue ( Packet p ) { } public List < Packet > poll ( ) { } public NodeInfo find ( int location ) { } public List < Integer > findAllLocations ( ) { } public List < Integer > findAllActiveLocations ( ) { } public NodeInfo findRandomNode ( ) { } public NodeInfo getResponsibleNode ( byte keyByte ) { } public NodeInfo getResponsibleNode ( int key ) { } public NodeInfo forceTargetSelf ( NodeInfo target ) { } private int booleanSearch ( List < Integer > sortList , int searchNum ) { } public void setNodeStatus ( int id , boolean isOnline ) { } public Collection < NodeInfo > findAll ( ) { } public NodeInfo findThisNode ( ) { } private void setupNodes ( ) { } public boolean isThisNode ( NodeInfo n ) { } private boolean isNodeInfoMine ( NodeInfo nodeInfo ) throws IOException { } private boolean isPortFree ( int port ) { } private List < Integer > asSortedList ( Set < Integer > c ) { } public Packet getCache ( String uid ) { } public void storeCache ( String uid , Packet packet ) { } public Boolean getProcessCache ( String uid ) { } public void storeProcessCache ( String uid , boolean val ) { } @ SuppressWarnings ( "unchecked" ) public void addLog ( String type , String log ) { } @ SuppressWarnings ( "unchecked" ) public void addException ( String type , Exception e ) { } public ArrayList < JSONObject > getLogs ( ) { int count = 0 ; ArrayList < JSONObject > ret = new ArrayList < JSONObject > ( ) ; synchronized ( this . logs ) { ListIterator < JSONObject > itr = this . logs . listIterator ( ) ; while ( itr . hasNext ( ) ) { ret . add ( itr . next ( ) ) ; itr . remove ( ) ; count ++ ; <START_BUG> if ( count >= 50 ) { <END_BUG> break ; } } return ret ; } } public void sync ( String dataFeed ) { } public class IntComparable implements Comparator < Integer > { public int compare ( Integer o1 , Integer o2 ) { } } }

Fix:
if ( count >= 65 ) {