nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ClassFile extends Openable implements IClassFile { protected BinaryType fBinaryType = null ; protected ClassFile ( IPackageFragment parent , String name ) { } public void codeComplete ( int offset , ICodeCompletionRequestor requestor ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } protected IJavaElement findElement ( IJavaElement elt , int position , SourceMapper mapper ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Hashtable newElements , IResource underlyingResource ) throws JavaModelException { } private IBinaryType getBinaryTypeInfo ( IFile file ) throws JavaModelException { } public IBuffer getBuffer ( ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } public String getSource ( ) throws JavaModelException { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public IType getType ( ) throws JavaModelException { } public WorkingCopy getWorkingCopy ( ) { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { SourceMapper mapper = getSourceMapper ( ) ; if ( mapper != null ) { char [ ] contents = mapper . findSource ( getType ( ) ) ; if ( contents != null ) { IBufferManager bufManager = getBufferManager ( ) ; IBuffer buf = bufManager . openBuffer ( contents , pm , this , isReadOnly ( ) ) ; mapper . mapSource ( getType ( ) , contents ) ; return buf ; } } else { String qualifiedName = getType ( ) . getFullyQualifiedName ( ) ; <START_BUG> INameLookup lookup = ( ( JavaProject ) ( getJavaProject ( ) ) ) . getNameLookup ( ) ; <END_BUG> ICompilationUnit cu = lookup . findCompilationUnit ( qualifiedName ) ; if ( cu != null ) { return cu . getBuffer ( ) ; } } return null ; } static char [ ] simpleName ( char [ ] className ) { } public static char [ ] translatedName ( char [ ] name ) { } static char [ ] [ ] translatedNames ( char [ ] [ ] names ) { } static char [ ] unqualifiedName ( char [ ] className ) { } }

Fix:
NameLookup lookup = ( ( JavaProject ) ( getJavaProject ( ) ) ) . getNameLookup ( ) ;
Buggy code:
final class CollectionToArrayGenericConverter implements GenericConverter { private final GenericConversionService conversionService ; public CollectionToArrayGenericConverter ( GenericConversionService conversionService ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { Collection sourceCollection = ( ( Collection ) ( source ) ) ; TypeDescriptor sourceElementType = sourceType . getElementTypeDescriptor ( ) ; if ( sourceElementType == ( TypeDescriptor . NULL ) ) { sourceElementType = getElementType ( sourceCollection ) ; } TypeDescriptor targetElementType = targetType . getElementTypeDescriptor ( ) ; Object array = Array . newInstance ( targetElementType . getType ( ) , sourceCollection . size ( ) ) ; int i = 0 ; if ( ( sourceElementType == ( TypeDescriptor . NULL ) ) || ( sourceElementType . isAssignableTo ( targetElementType ) ) ) { for ( Iterator it = sourceCollection . iterator ( ) ; it . hasNext ( ) ; i ++ ) { Array . set ( array , i , it . next ( ) ) ; } } else { GenericConverter converter = this . conversionService . getConverter ( sourceElementType , targetElementType ) ; if ( converter == null ) { <START_BUG> throw new org . springframework . core . convert . ConverterNotFoundException ( sourceType , targetType ) ; <END_BUG> } for ( Iterator it = sourceCollection . iterator ( ) ; it . hasNext ( ) ; i ++ ) { Array . set ( array , i , converter . convert ( it . next ( ) , sourceElementType , targetElementType ) ) ; } } return array ; } private TypeDescriptor getElementType ( Collection collection ) { } }

Fix:
throw new org . springframework . core . convert . ConverterNotFoundException ( sourceElementType , targetElementType ) ;
Buggy code:
public class XaDataSourcePropertyRemove extends AbstractRemoveStepHandler { public static final XaDataSourcePropertyRemove INSTANCE = new XaDataSourcePropertyRemove ( ) ; protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) { final ServiceRegistry registry = context . getServiceRegistry ( true ) ; final ModelNode address = operation . require ( OP_ADDR ) ; PathAddress path = PathAddress . pathAddress ( address ) ; final String jndiName = path . getElement ( ( ( path . size ( ) ) - 2 ) ) . getValue ( ) ; final String configPropertyName = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; <START_BUG> ServiceName serviceName = SERVICE_NAME_BASE . append ( jndiName ) . append ( configPropertyName ) ; <END_BUG> final ServiceController < ? > dataSourceConfigController = registry . getService ( serviceName ) ; if ( dataSourceConfigController != null ) { context . removeService ( serviceName ) ; } } protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) { } }

Fix:
ServiceName serviceName = SERVICE_NAME_BASE . append ( jndiName ) . append ( "xa-datasource-properties" ) . append ( configPropertyName ) ;
Buggy code:
public class TestRussianLightStemFilter extends BaseTokenStreamTestCase { private Analyzer analyzer = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } ; public void testVocabulary ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , analyzer , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , analyzer , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ThreadedContext extends ContextImpl { private EntityRunner entityRunner ; private boolean limitedContext = false ; public ThreadedContext ( DocBuilder . EntityRunner entityRunner , DocBuilder docBuilder ) { } @ Override public VariableResolver getVariableResolver ( ) { } @ Override public Context getParentContext ( ) { } @ Override public String currentProcess ( ) { } @ Override public EntityProcessor getEntityProcessor ( ) { } @ Override public DataSource getDataSource ( ) { } private void checkLimited ( ) { } @ Override public String getResolvedEntityAttribute ( String name ) { checkLimited ( ) ; <START_BUG> return super . getResolvedEntityAttribute ( name ) ; <END_BUG> } @ Override public void setSessionAttribute ( String name , Object val , String scope ) { } @ Override public Object resolve ( String var ) { } @ Override public String replaceTokens ( String template ) { } }

Fix:
return ( entity ) == null ? null : getVariableResolver ( ) . replaceTokens ( allAttributes . get ( name ) ) ;
Buggy code:
public class Spinner extends Composite { int textHandle ; int buttonHandle ; int textVisibleRgn ; int buttonVisibleRgn ; int increment = 1 ; int pageIncrement = 10 ; int digits = 0 ; public Spinner ( Composite parent , int style ) { } int actionProc ( int theControl , int partCode ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void addVerifyListener ( VerifyListener listener ) { } 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 ) { } public void copy ( ) { } void copy ( char [ ] buffer ) { } void createHandle ( ) { } public void cut ( ) { } void deregister ( ) { } void drawBackground ( int control , int context ) { } int focusHandle ( ) { } public int getDigits ( ) { } String getDecimalSeparator ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int getSelectionText ( ) { } int getVisibleRegion ( int control , boolean clipChildren ) { } void hookEvents ( ) { } Rect inset ( ) { <START_BUG> return display . spinnerInset ; <END_BUG> } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputUnicodeForKeyEvent ( int nextHandler , int theEvent , int userData ) { } public void paste ( ) { } public void redraw ( ) { } void register ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void removeVerifyListener ( VerifyListener listener ) { } void resetVisibleRegion ( int control ) { } void resizeClientArea ( ) { } boolean sendKeyEvent ( int type , Event event ) { } void setBackground ( float [ ] color ) { } public void setDigits ( int value ) { } void setFontStyle ( Font font ) { } void setForeground ( float [ ] color ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } void setSelection ( int value , boolean notify ) { } char [ ] setText ( String string , int start , int end , boolean notify ) { } void setZOrder ( ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } }

Fix:
return display . editTextInset ;
Buggy code:
public class JMSQueueRemove extends AbstractRemoveStepHandler implements DescriptionProvider { public static final JMSQueueRemove INSTANCE = new JMSQueueRemove ( ) ; protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) { } protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { <START_BUG> return MessagingDescriptions . getJmsQueueAdd ( locale ) ; <END_BUG> } }

Fix:
return MessagingDescriptions . getJmsQueueRemove ( locale ) ;
Buggy code:
public class GraphBuilder { private GraphBuilder . GraphImpl builtGraph ; private List < IntSet > addedEdges = new ArrayList < > ( ) ; private int sz ; public GraphBuilder ( ) { } public GraphBuilder ( int sz ) { } public void clear ( ) { } public void addEdge ( int from , int to ) { } public Graph build ( ) { if ( ( builtGraph ) == null ) { IntSet [ ] incomingEdges = new IntSet [ sz ] ; for ( int i = 0 ; i < ( sz ) ; ++ i ) { incomingEdges [ i ] = new IntOpenHashSet ( ) ; } int [ ] [ ] outgoingEdgeList = new int [ sz ] [ ] ; for ( int i = 0 ; i < ( addedEdges . size ( ) ) ; ++ i ) { IntSet edgeList = addedEdges . get ( i ) ; outgoingEdgeList [ i ] = ( edgeList != null ) ? edgeList . toArray ( ) : new int [ 0 ] ; Arrays . sort ( outgoingEdgeList [ i ] ) ; for ( int j : outgoingEdgeList [ i ] ) { incomingEdges [ j ] . add ( i ) ; } } for ( int i = addedEdges . size ( ) ; i < ( sz ) ; ++ i ) { outgoingEdgeList [ i ] = new int [ 0 ] ; } int [ ] [ ] incomingEdgeList = new int [ sz ] [ ] ; for ( int i = 0 ; i < ( sz ) ; ++ i ) { incomingEdgeList [ i ] = incomingEdges [ i ] . toArray ( ) ; <START_BUG> Arrays . sort ( incomingEdgeList ) ; <END_BUG> } builtGraph = new GraphBuilder . GraphImpl ( incomingEdgeList , outgoingEdgeList ) ; } return builtGraph ; } private static class GraphImpl implements Graph { private final int [ ] [ ] incomingEdgeList ; private final int [ ] [ ] outgoingEdgeList ; public GraphImpl ( int [ ] [ ] incomingEdgeList , int [ ] [ ] outgoingEdgeList ) { } @ Override public int size ( ) { } @ Override public int [ ] incomingEdges ( int node ) { } @ Override public int copyIncomingEdges ( int node , int [ ] target ) { } @ Override public int [ ] outgoingEdges ( int node ) { } @ Override public int copyOutgoingEdges ( int node , int [ ] target ) { } @ Override public int incomingEdgesCount ( int node ) { } @ Override public int outgoingEdgesCount ( int node ) { } } }

Fix:
Arrays . sort ( incomingEdgeList [ i ] ) ;
Buggy code:
public class EventDetailLayout extends Layout { private PatternLayout patternLayout = new PatternLayout ( ) ; public EventDetailLayout ( ) { } public void setConversionPattern ( String conversionPattern ) { } public String getConversionPattern ( ) { } public String getFooter ( ) { } public String getHeader ( ) { } private static String escape ( String string ) { } private static LoggingEvent copyForHTML ( LoggingEvent event ) { String fqnCategory = EventDetailLayout . escape ( event . fqnOfCategoryClass ) ; Logger logger = Logger . getLogger ( event . getLoggerName ( ) ) ; String threadName = event . getThreadName ( ) ; Object msg = event . getMessage ( ) ; String ndc = event . getNDC ( ) ; Hashtable mdc = EventDetailLayout . formatMDC ( event ) ; String [ ] throwableStringRep = event . getThrowableStrRep ( ) ; LocationInfo li = null ; if ( event . locationInformationExists ( ) ) { <START_BUG> EventDetailLayout . formatLocationInfo ( event ) ; <END_BUG> } Hashtable properties = EventDetailLayout . formatProperties ( event ) ; LoggingEvent copy = new LoggingEvent ( fqnCategory , logger , event . timeStamp , event . getLevel ( ) , threadName , msg , ndc , mdc , throwableStringRep , li , properties ) ; return copy ; } private static Hashtable formatMDC ( LoggingEvent event ) { } private static LocationInfo formatLocationInfo ( LoggingEvent event ) { } private static Hashtable formatProperties ( LoggingEvent event ) { } public boolean ignoresThrowable ( ) { } public void activateOptions ( ) { } public void format ( Writer output , LoggingEvent event ) throws IOException { } }

Fix:
li = EventDetailLayout . formatLocationInfo ( event ) ;
Buggy code:
public class PlayAgain extends ActionBarActivity implements View . OnClickListener { Button buttonAgain ; Button buttonHome ; Button buttonShare ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void PlayAgainClick ( ) { <START_BUG> Intent intentAgain2 = new Intent ( this , SinglePlayer . class ) ; <END_BUG> startActivity ( intentAgain2 ) ; finish ( ) ; } private void HomeClick ( ) { } private void ShareClick ( ) { } public void onClick ( View v ) { } public Bitmap takeScreenshot ( ) { } public Bitmap Share ( View v ) { } Builder builder = new TweetComposer . Builder ( this ) . text ( "just<seq2seq4repair_space>setting<seq2seq4repair_space>up<seq2seq4repair_space>my<seq2seq4repair_space>Fabric." ) . image ( Uri . parse ( new File ( "//drawable//cosby.png" ) . toString ( ) ) ) ; }

Fix:
Intent intentAgain2 = new Intent ( this , GameTest . class ) ;
Buggy code:
public class TransformedQueue < E > extends TransformedCollection < E > implements Queue < E > { private static final long serialVersionUID = - 7901091318986132033L ; public static < E > TransformedQueue < E > transformingQueue ( final Queue < E > queue , final Transformer < ? super E , ? extends E > transformer ) { } public static < E > TransformedQueue < E > transformedQueue ( final Queue < E > queue , final Transformer < ? super E , ? extends E > transformer ) { } protected TransformedQueue ( final Queue < E > queue , final Transformer < ? super E , ? extends E > transformer ) { } protected Queue < E > getQueue ( ) { } <START_BUG> public boolean offer ( E obj ) { <END_BUG> return getQueue ( ) . offer ( TransformedQueue . transform ( obj ) ) ; } public E poll ( ) { } public E peek ( ) { } public E element ( ) { } public E remove ( ) { } }

Fix:
public boolean offer ( final E obj ) {
Buggy code:
public enum Color { BLUE , GREEN , ORANGE , PURPLE , RED , YELLOW , MAROON , VOID ; static final String reset = new String ( new byte [ ] { 27 , '[' , '3' , '9' , 'm' } ) ; static final String resetBack = new String ( new byte [ ] { 27 , '[' , '4' , '9' , 'm' } ) ; static final String magenta = new String ( new byte [ ] { 27 , '[' , '3' , '5' , 'm' } ) ; static final String blue = new String ( new byte [ ] { 27 , '[' , '3' , '4' , 'm' } ) ; static final String yellow = new String ( new byte [ ] { 27 , '[' , '3' , '3' , 'm' } ) ; static final String green = new String ( new byte [ ] { 27 , '[' , '3' , '2' , 'm' } ) ; static final String red = new String ( new byte [ ] { 27 , '[' , '3' , '1' , 'm' } ) ; static final String orange = ( Color . red ) + ( new String ( new byte [ ] { 27 , '[' , '4' , '3' , 'm' } ) ) ; public boolean equals ( Color color ) { } public static Color getColorFromCode ( char code ) throws InvalidColorCodeException { } public static Color getColorFromString ( String code ) throws InvalidColorCodeException { } public static String getColorCode ( Color color ) throws InvalidColorCodeException { } public static String getColoredColorCode ( Color color ) throws InvalidColorCodeException { if ( System . getProperty ( "os.name" ) . equals ( "Linux" ) ) { String defaultCode = Color . getColorCode ( color ) ; <START_BUG> switch ( c ) { <END_BUG> case BLUE : return ( ( Color . blue ) + defaultCode ) + ( Color . reset ) ; case GREEN : return ( ( Color . green ) + defaultCode ) + ( Color . reset ) ; case PURPLE : return ( ( Color . magenta ) + defaultCode ) + ( Color . reset ) ; case ORANGE : return ( ( ( Color . orange ) + defaultCode ) + ( Color . resetBack ) ) + ( Color . reset ) ; case RED : return ( ( Color . red ) + defaultCode ) + ( Color . reset ) ; case YELLOW : return ( ( Color . yellow ) + defaultCode ) + ( Color . reset ) ; default : return defaultCode ; } } else { return Color . getColorCode ( color ) ; } } }

Fix:
switch ( color ) {
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "3.7" ; <END_BUG> } }

Fix:
return "@version@" ;
Buggy code:
public abstract class Evaluator { EvaluationContext context ; INameEnvironment environment ; Map options ; IRequestor requestor ; IProblemFactory problemFactory ; Evaluator ( EvaluationContext context , INameEnvironment environment , Map options , IRequestor requestor , IProblemFactory problemFactory ) { } protected abstract void addEvaluationResultForCompilationProblem ( Map resultsByIDs , IProblem problem , char [ ] cuSource ) { } protected EvaluationResult [ ] evaluationResultsForCompilationProblems ( CompilationResult result , char [ ] cuSource ) { <START_BUG> IProblem [ ] problems = result . getProblems ( ) ; <END_BUG> HashMap resultsByIDs = new HashMap ( 5 ) ; for ( int i = 0 ; i < ( problems . length ) ; i ++ ) { addEvaluationResultForCompilationProblem ( resultsByIDs , problems [ i ] , cuSource ) ; } int size = resultsByIDs . size ( ) ; EvaluationResult [ ] evalResults = new EvaluationResult [ size ] ; Iterator results = resultsByIDs . values ( ) . iterator ( ) ; for ( int i = 0 ; i < size ; i ++ ) { evalResults [ i ] = ( ( EvaluationResult ) ( results . next ( ) ) ) ; } return evalResults ; } ClassFile [ ] getClasses ( ) { } protected abstract char [ ] getClassName ( ) { } Compiler getCompiler ( ICompilerRequestor requestor ) { } protected abstract char [ ] getSource ( ) { } }

Fix:
IProblem [ ] problems = result . getAllProblems ( ) ;
Buggy code:
class PyBridge { public static final String BEAMPYUTIL_PY_FILENAME = "beampyutil.py" ; public static final String BEAMPYUTIL_LOG_FILENAME = "beampyutil.log" ; public static final String FORCE_PYTHON_CONFIG_PROPERTY = "snap.forcePythonConfig" ; public static final String PYTHON_EXECUTABLE_PROPERTY = "snap.pythonExecutable" ; public static final String PYTHON_MODULE_INSTALL_DIR_PROPERTY = "snap.pythonModuleDir" ; public static final String JPY_JAVA_API_CONFIG_FILENAME = "jpyconfig.properties" ; public static final String JPY_DEBUG_PROPERTY = "jpy.debug" ; public static final String JPY_CONFIG_PROPERTY = "jpy.config" ; private static final Path MODULE_CODE_BASE_PATH = PyBridge . findModuleCodeBasePath ( ) ; public static final String BEAMPY_DIR_NAME = "beampy" ; private static boolean established ; public static synchronized void establish ( ) throws IOException { } public static void installPythonModule ( String pythonExecutable , Path pythonModuleInstallDir , boolean forcePythonConfig ) throws IOException { } public static void extendSysPath ( String path ) { } private static void configureJpy ( String pythonExecutable , Path beampyDir ) throws IOException { } private static String toCommandLine ( List < String > command ) { } private static Path getResourcePath ( String resource ) { } private static Path findModuleCodeBasePath ( ) { } private static void unpackPythonModuleDir ( Path pythonModuleDir ) throws IOException { } private static void unpackPythonResources ( Path pythonModuleDir , String sourceName , String targetName ) { } private static boolean isForcePythonConfig ( ) { } private static String getPythonExecutable ( ) { } private static Path getPythonModuleInstallDir ( ) { } private static void startPython ( Path pythonModuleInstallDir ) { String pythonVersion = PyLib . getPythonVersion ( ) ; <START_BUG> LOG . info ( ( "Running<seq2seq4repair_space>Python<seq2seq4repair_space>" + pythonVersion ) ) ; <END_BUG> if ( ! ( PyLib . isPythonRunning ( ) ) ) { PyLib . startPython ( pythonModuleInstallDir . toString ( ) ) ; } else { PyBridge . extendSysPath ( pythonModuleInstallDir . toString ( ) ) ; } } }

Fix:
LOG . info ( ( "Starting<seq2seq4repair_space>Python<seq2seq4repair_space>" + pythonVersion ) ) ;
Buggy code:
@ Configuration @ ImportResource ( { "classpath:corelib-logging-context.xml" , "classpath:corelib-db-context.xml" , "classpath:corelib-solr-context.xml" , "classpath:corelib-utils-context.xml" , "classpath:corelib-web-context.xml" , "classpath:spring-sugarcrmclient.xml" } ) @ EnableScheduling @ PropertySource ( "classpath:europeana.properties" ) public class AppConfig { @ Value ( "${cachemongodb.host}" ) private String cacheHost ; @ Value ( "${cachemongodb.port}" ) private int cachePort ; @ Bean public static PropertySourcesPlaceholderConfigurer properties ( ) { } @ Bean public ControllerUtils controllerUtils ( ) { } <START_BUG> @ Bean ( name = "sugarCRMPoller" ) <END_BUG> public SugarCRMPollingScheduler sugarCRMPollingScheduler ( ) { return new SugarCRMPollingScheduler ( ) ; } @ Bean public SugarCRMCache sugarCRMCache ( ) { } @ Bean public SugarCRMImporter sugarCRMImporter ( ) { } @ Bean ( name = "api_db_mongo_cache" ) public Mongo ApiDbMongoCache ( ) throws UnknownHostException { } }

Fix:
@ Bean
Buggy code:
public class AFPlayerAdapter extends BaseAdapter { private AFGame afGame ; private LayoutInflater layoutInflater ; public AFPlayerAdapter ( AFGame afGame , LayoutInflater layoutInflater ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public boolean hasStableIds ( ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { if ( convertView == null ) { int rowId = ( ( position % 2 ) == 0 ) ? layout . afplayer_even : layout . afplayer_odd ; convertView = layoutInflater . inflate ( rowId , null ) ; } ImageView ballImage = ( ( ImageView ) ( convertView . findViewById ( ballImage ) ) ) ; TextView nameText = ( ( TextView ) ( convertView . findViewById ( nameText ) ) ) ; TextView afText = ( ( TextView ) ( convertView . findViewById ( afText ) ) ) ; AFPlayer player = ( ( AFPlayer ) ( getItem ( position ) ) ) ; ballImage . setImageResource ( Utils . POOL_BALL_IMAGES [ position ] ) ; nameText . setText ( player . getName ( ) ) ; <START_BUG> if ( ( afGame . getRound ( ) ) == 0 ) { <END_BUG> afText . setText ( "-" ) ; } else { double roundsFinished = ( afGame . getRound ( ) ) - 1 ; double af = ( player . getTotal ( ) ) // roundsFinished ; afText . setText ( new DecimalFormat ( "#.##" ) . format ( af ) ) ; } return convertView ; } @ Override public int getItemViewType ( int position ) { } @ Override public int getViewTypeCount ( ) { } @ Override public boolean areAllItemsEnabled ( ) { } @ Override public boolean isEnabled ( int position ) { } }

Fix:
if ( ( afGame . getRound ( ) ) == 1 ) {
Buggy code:
public class ResultActivity extends BaseActivity implements IHandleConnect { @ InjectView ( id . blood_check_bar ) Toolbar mToolbar ; @ InjectView ( id . btn_record ) Button mBtnRecord ; @ InjectView ( id . waiting_record ) ProgressBar mProgressBar ; private Context mContext ; private BaseResultFragment mFragment ; private String mType ; private BluetoothLeService mBluetoothLeService ; private DeviceInfo mDevice ; private BroadcastReceiver mReceiver ; private ServiceConnection mServiceConnection = new ServiceConnection ( ) { @ Override public void onServiceDisconnected ( ComponentName name ) { } @ Override public void onServiceConnected ( ComponentName name , IBinder service ) { } } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_result ) ; ButterKnife . inject ( this ) ; mContext = this ; mType = getIntent ( ) . getStringExtra ( INTENT_TYPE ) ; <START_BUG> mFragment = TypeFactory . getResultFragment ( mType , mBluetoothLeService ) ; <END_BUG> mToolbar . setTitle ( TypeFactory . getTitleByType ( mContext , mType ) ) ; setSupportActionBar ( mToolbar ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; mToolbar . setNavigationIcon ( ic_action_previous_item ) ; mDevice = getIntent ( ) . getParcelableExtra ( KEY_DEVICE_INFO ) ; getSupportFragmentManager ( ) . beginTransaction ( ) . add ( result_container , mFragment ) . commit ( ) ; Intent gattServiceIntent = new Intent ( this , BluetoothLeService . class ) ; bindService ( gattServiceIntent , mServiceConnection , BIND_AUTO_CREATE ) ; } @ Override protected void onResume ( ) { } @ Override protected void onDestroy ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ OnClick ( id . btn_record ) public void record ( View v ) { } @ Override public void onBackPressed ( ) { } @ Override protected void onPause ( ) { } @ Override public void handleConnect ( ) { } @ Override public void handleDisconnect ( ) { } @ Override public void handleGetData ( String data ) { } @ Override public void handleServiceDiscover ( ) { } }

Fix:
mFragment = TypeFactory . getResultFragment ( mType ) ;
Buggy code:
public class ServerConfigDetails { private ServerConfigPresenter presenter ; private Form < Server > form ; private ComboBoxItem socketItem ; private ComboBoxItem groupItem ; public ServerConfigDetails ( ServerConfigPresenter presenter ) { } Widget asWidget ( ) { VerticalPanel layout = new VerticalPanel ( ) ; layout . setStyleName ( "fill-layout-width" ) ; form = new Form < Server > ( Server . class ) ; form . setNumColumns ( 2 ) ; FormToolStrip < Server > toolStrip = new FormToolStrip < Server > ( form , new FormToolStrip . FormCallback < Server > ( ) { @ Override public void onSave ( Map < String , Object > changeset ) { <START_BUG> presenter . onSaveChanges ( form . getEditedEntity ( ) , changeset ) ; <END_BUG> } @ Override public void onDelete ( Server entity ) { Feedback . confirm ( Console . MESSAGES . deleteServerConfig ( ) , Console . MESSAGES . deleteServerConfigConfirm ( form . getEditedEntity ( ) . getName ( ) ) , new Feedback . ConfirmationHandler ( ) { @ Override public void onConfirmation ( boolean isConfirmed ) { if ( isConfirmed ) presenter . tryDelete ( form . getEditedEntity ( ) ) ; } } ) ; } } ) ; toolStrip . providesDeleteOp ( false ) ; layout . add ( toolStrip . asWidget ( ) ) ; TextItem nameItem = new TextItem ( "name" , "Name" ) ; CheckBoxItem startedItem = new CheckBoxItem ( "autoStart" , CONSTANTS . common_label_autoStart ( ) ) ; groupItem = new ComboBoxItem ( "group" , "Server<seq2seq4repair_space>Group" ) ; final NumberBoxItem portOffset = new NumberBoxItem ( "portOffset" , CONSTANTS . common_label_portOffset ( ) ) ; socketItem = new ComboBoxItem ( "socketBinding" , CONSTANTS . common_label_socketBinding ( ) ) { @ Override public boolean validate ( String value ) { boolean parentValid = super . validate ( value ) ; return parentValid ; } @ Override public String getErrMessage ( ) { return MESSAGES . common_validation_portOffsetUndefined ( super . getErrMessage ( ) ) ; } } ; form . setFields ( nameItem , groupItem , socketItem , portOffset , startedItem ) ; final FormHelpPanel helpPanel = new FormHelpPanel ( new FormHelpPanel . AddressCallback ( ) { @ Override public ModelNode getAddress ( ) { ModelNode address = new ModelNode ( ) ; address . add ( "host" , presenter . getSelectedHost ( ) ) ; address . add ( "server-config" , "*" ) ; return address ; } } , form ) ; layout . add ( helpPanel . asWidget ( ) ) ; form . setEnabled ( false ) ; layout . add ( form . asWidget ( ) ) ; return layout ; } public void setAvailableSockets ( List < String > result ) { } public void bind ( DefaultCellTable table ) { } public void setAvailableGroups ( List < ServerGroupRecord > result ) { } }

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

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public class SvgNamespace { public static final String svgElement = "svg" ; public static final String imageElement = "image" ; public static final String useElement = "use" ; public static final String attributeId = "id" ; public static final String attributeWidth = "width" ; public static final String attributeHeight = "height" ; public static final String attributeTransform = "transform" ; public static final String attributeXlinkHref = "xlink:href" ; public static boolean isSvg ( Element element ) { } public static boolean isImage ( Element element ) { } public static boolean isUse ( Element element ) { } public static boolean isType ( String type , Element element ) { } public static String getId ( Element element ) { } public static float getWidth ( Element element ) { } public static float getHeight ( Element element ) { } public static Matrix3f getTransform ( Element element ) { String transformAttribute = element . getAttribute ( SvgNamespace . attributeTransform ) ; Matrix3f m = new Matrix3f ( ) ; m . setIdentity ( ) ; <START_BUG> return SvgInkscapeUtils . parseTransformAttribute ( transformAttribute , m ) ; <END_BUG> } public static String getXlinkHref ( Element element ) { } }

Fix:
return SvgTransformUtils . parseTransform ( transformAttribute , m ) ;
Buggy code:
public class GuiMain { private static Image jbossIcon ; private static final Preferences PREFERENCES = Preferences . userNodeForPackage ( GuiMain . class ) ; private static String LOOK_AND_FEEL_KEY = "cli-gui-laf" ; private GuiMain ( ) { } public static void start ( CommandContext cmdCtx ) { } public static CliGuiContext startEmbedded ( CommandContext cmdCtx ) { } private static CliGuiContext makeGuiContext ( CommandContext cmdCtx ) { } private static JPanel makeMainPanel ( JTabbedPane tabs , CommandLine cmdLine ) { } public static Image getJBossIcon ( ) { } private static synchronized void initJFrame ( CliGuiContext cliGuiCtx ) { } public static JMenuBar makeMenuBar ( CliGuiContext cliGuiCtx ) { } private static JMenu makeLookAndFeelMenu ( CliGuiContext cliGuiCtx ) { } private static class ChangeLookAndFeelAction extends AbstractAction { private static final String errorTitle = "Look<seq2seq4repair_space>&<seq2seq4repair_space>Feel<seq2seq4repair_space>Not<seq2seq4repair_space>Set" ; private CliGuiContext cliGuiCtx ; private UIManager . LookAndFeelInfo lookAndFeelInfo ; ChangeLookAndFeelAction ( CliGuiContext cliGuiCtx , UIManager . LookAndFeelInfo lookAndFeelInfo ) { } @ Override public void actionPerformed ( final ActionEvent e ) { } } private static JMenu makeDeploymentsMenu ( CliGuiContext cliGuiCtx ) { } private static JTabbedPane makeTabbedPane ( CliGuiContext cliGuiCtx , JPanel output ) { JTabbedPane tabs = new JTabbedPane ( ) ; <START_BUG> tabs . addTab ( "Command<seq2seq4repair_space>Builder" , new JScrollPane ( new ManagementModel ( cliGuiCtx ) ) ) ; <END_BUG> tabs . addTab ( "Output" , output ) ; return tabs ; } private static JPanel makeOutputDisplay ( CLIOutput output ) { } public static void setUpLookAndFeel ( Window mainWindow ) { } private static void showErrorDialog ( Window window , final String title , final Throwable t ) { } }

Fix:
tabs . addTab ( "Command<seq2seq4repair_space>Builder" , new ManagementModel ( cliGuiCtx ) ) ;
Buggy code:
@ Controller public class AssignmentController { public static class AssignmentWithAttach extends Assignment { public AssignmentWithAttach ( ) { } public AssignmentWithAttach ( Assignment assignment ) { } String [ ] attachments ; } @ POST ( "//{lid}//assignments" ) public static Result createAssignments ( @ INP ( "lid" ) String lidStr , Request req ) throws SQLException { if ( ! ( UserController . isPrefessorUser ( req ) ) ) return Forbidden . plainText ( "only<seq2seq4repair_space>prof<seq2seq4repair_space>can<seq2seq4repair_space>create<seq2seq4repair_space>assignment" ) ; ProfessorUser user = UserController . getProfLoginData ( req ) ; AssignmentController . AssignmentWithAttach assign = req . body ( ) . asJson ( ) . mapping ( AssignmentController . AssignmentWithAttach . class ) ; assign . lid = Integer . parseInt ( lidStr ) ; DBConnection db = req . getDBConnection ( ) ; db . transaction ( ) ; <START_BUG> Integer aid = AssignmentTable . getQuery ( ) . insertRetunningGenKey ( db , assign ) ; <END_BUG> if ( aid == null ) return Forbidden . plainText ( "no<seq2seq4repair_space>such<seq2seq4repair_space>lectures" ) ; if ( ( ( assign . attachments ) != null ) && ( ( assign . attachments . length ) > 0 ) ) { AssignmentAttachment [ ] atts = new AssignmentAttachment [ assign . attachments . length ] ; for ( int i = 0 ; i < ( atts . length ) ; i ++ ) { atts [ i ] = new AssignmentAttachment ( ) ; atts [ i ] . aid = aid ; atts [ i ] . hashcode = assign . attachments [ i ] ; atts [ i ] . owner = user . uid ; } int rows = AssignmentAttachmentTable . getQuery ( ) . insert ( db , atts ) ; if ( rows < ( atts . length ) ) { db . rollBack ( ) ; return BadRequest . plainText ( "bad<seq2seq4repair_space>attachments." ) ; } } return Ok . plainText ( "successfully" ) ; } @ GET ( "//{lid}//assignments" ) public static Result assignmentList ( @ INP ( "lid" ) String lidStr , Request req ) throws SQLException { } private static AbstractQuery < LectureAssignmentJoin > getProfAssignQuery ( ProfessorUser prof , int lid ) { } private static AbstractQuery < LectureRegistrationAssignmentJoin > getStuAssignQuery ( StudentUser stu , int lid ) { } private static Result getProfessorAssignment ( Request req , int lid ) throws SQLException { } private static Result getStudentAssignment ( Request req , int lid ) throws SQLException { } @ GET ( "//{lid}//{aid}" ) public static Result assignmentInfo ( @ INP ( "lid" ) String lidStr , @ INP ( "aid" ) String aidStr , Request req ) throws SQLException { } private static Result getFristProfessorAssignment ( Request req , int lid , int aid ) throws SQLException { } private static Result getFirstStudentAssignment ( Request req , int lid , int aid ) throws SQLException { } private static AssignmentController . AssignmentWithAttach addAttachments ( Request req , Assignment assign ) throws SQLException { } }

Fix:
Integer aid = AssignmentTable . getQuery ( ) . insertReturningGenKey ( db , assign ) ;
Buggy code:
public class Measurement implements BaseModel { private String deviceId ; private Device device ; private Battery battery ; private Network network ; private Sim sim ; private Usage usage ; private Wifi wifi ; private String time ; private String localTime ; private List < Ping > pings ; private List < Traceroute > traceroutes ; private Throughput throughput ; private State state ; private boolean isManual ; private Context context ; public Measurement ( Context context , boolean isManual ) { } public Network getNetwork ( ) { } public void setNetwork ( Network network ) { } public Usage getUsage ( ) { } public void setUsage ( Usage usage ) { } public void setTraceroutes ( List < Traceroute > traceroutes ) { } public void setPings ( List < Ping > pings ) { } public void setThroughput ( Throughput throughput ) { } @ Override public JSONObject toJSON ( ) { } private String findDeviceId ( ) { String serviceName = Context . TELEPHONY_SERVICE ; TelephonyManager tm = ( ( TelephonyManager ) ( context . getSystemService ( serviceName ) ) ) ; if ( ( tm . getDeviceId ( ) ) != null ) { <START_BUG> return HashUtil . SHA1 ( tm . getDeviceId ( ) ) ; <END_BUG> } else { return Secure . getString ( context . getContentResolver ( ) , ANDROID_ID ) ; } } private String findTime ( ) { } private String findLocalTime ( ) { } }

Fix:
return tm . getDeviceId ( ) ;
Buggy code:
public class XtendTypeDeclarationImplCustom extends XtendTypeDeclarationImpl { @ Override public boolean isAnonymous ( ) { <START_BUG> return ( name ) == null ; <END_BUG> } @ Override public boolean isLocal ( ) { } }

Fix:
return false ;
Buggy code:
public class ClusterIdFactory { private static byte [ ] localIdArray ; private static ClusterId localId ; private static long date ; private static ServerSocket ss ; private ClusterIdFactory ( ) { } public static synchronized void generate ( ) throws ClusterException { } private static void startType0 ( ) throws ClusterException { } private static void startTypeIp ( InetAddress a ) throws ClusterException { byte [ ] aa = a . getAddress ( ) ; if ( ( aa . length ) != 4 ) { throw new ClusterException ( ( ( "Address<seq2seq4repair_space>size<seq2seq4repair_space>is<seq2seq4repair_space>" + ( aa . length ) ) + "<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>4" ) ) ; } if ( ( aa [ 0 ] ) == 127 ) { throw new ClusterException ( "Loopback<seq2seq4repair_space>IP<seq2seq4repair_space>address<seq2seq4repair_space>not<seq2seq4repair_space>allowed<seq2seq4repair_space>for<seq2seq4repair_space>unique<seq2seq4repair_space>number<seq2seq4repair_space>generator" ) ; } try { ClusterIdFactory . ss = new ServerSocket ( 0 , 1 , a ) ; } catch ( Exception e ) { throw new ClusterException ( e . toString ( ) ) ; } int p = ClusterIdFactory . ss . getLocalPort ( ) ; if ( ( p & 65535 ) != p ) { throw new ClusterException ( "Invalid<seq2seq4repair_space>port<seq2seq4repair_space>number<seq2seq4repair_space>(more<seq2seq4repair_space>than<seq2seq4repair_space>16<seq2seq4repair_space>bits)" ) ; } ClusterIdFactory . date = ( System . currentTimeMillis ( ) ) // 1000 ; if ( ( ClusterIdFactory . date ) >= ( 128L << 24 ) ) { throw new ClusterException ( "Invalid<seq2seq4repair_space>date<seq2seq4repair_space>(too<seq2seq4repair_space>high)" ) ; } ClusterIdFactory . localIdArray = new byte [ 10 ] ; ClusterIdFactory . localIdArray [ 0 ] = ( ( byte ) ( p & 255 ) ) ; ClusterIdFactory . localIdArray [ 1 ] = ( ( byte ) ( p > > 8 ) ) ; ClusterIdFactory . localIdArray [ 2 ] = aa [ 3 ] ; ClusterIdFactory . localIdArray [ 3 ] = aa [ 2 ] ; ClusterIdFactory . localIdArray [ 4 ] = aa [ 1 ] ; ClusterIdFactory . localIdArray [ 5 ] = aa [ 0 ] ; int n = 4 ; long d = ClusterIdFactory . date ; while ( n > 0 ) { n -- ; ClusterIdFactory . localIdArray [ ( 9 - n ) ] = ( ( byte ) ( d & 255 ) ) ; d >>= 8 ; } <START_BUG> ClusterIdFactory . localId = new ClusterId ( ClusterIdFactory . localIdArray ) ; <END_BUG> SecureRandom . setSeed ( ClusterIdFactory . localIdArray ) ; } public static synchronized ClusterId getLocalId ( ) { } }

Fix:
ClusterIdFactory . localId = ClusterId . toClusterId ( ClusterIdFactory . localIdArray ) ;
Buggy code:
public abstract class Link < T > extends AbstractLink < T > implements ILinkListener { private final class AnchorChange extends Change { private static final long serialVersionUID = 1L ; private Component anchor ; public AnchorChange ( Component anchor ) { } @ Override public final void undo ( ) { } } private static final long serialVersionUID = 1L ; private Component anchor ; private boolean autoEnable = false ; private PopupSettings popupSettings = null ; public Link ( MarkupContainer parent , final String id ) { } public Link ( MarkupContainer parent , final String id , IModel < T > object ) { } public Component getAnchor ( ) { } public final boolean getAutoEnable ( ) { } public PopupSettings getPopupSettings ( ) { } @ Override public boolean isEnabled ( ) { } @ Override protected boolean getStatelessHint ( ) { } public abstract void onClick ( ) { } public final void onLinkClicked ( ) { } public void setAnchor ( Component anchor ) { } public final Link setAutoEnable ( final boolean autoEnable ) { } public final Link setPopupSettings ( final PopupSettings popupSettings ) { } protected CharSequence appendAnchor ( final ComponentTag tag , CharSequence url ) { } protected CharSequence getOnClickScript ( final CharSequence url ) { } protected CharSequence getURL ( ) { } protected boolean linksTo ( final Page page ) { } @ Override protected final void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; CharSequence url = getURL ( ) ; url = appendAnchor ( tag , url ) ; if ( Link . isLinkEnabled ( ) ) { if ( ( ( tag . getName ( ) . equalsIgnoreCase ( "a" ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "link" ) ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "area" ) ) ) { tag . put ( "href" , Strings . replaceAll ( url , "&" , "&amp;" ) ) ; if ( ( popupSettings ) != null ) { tag . put ( "onclick" , popupSettings . getPopupJavaScript ( ) ) ; } } else { if ( ( popupSettings ) != null ) { popupSettings . setTarget ( ( ( "'" + url ) + "'" ) ) ; String popupScript = popupSettings . getPopupJavaScript ( ) ; tag . put ( "onclick" , popupScript ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( "location.href='" + url ) + "';" ) ) ; <END_BUG> } } final CharSequence onClickJavaScript = getOnClickScript ( url ) ; if ( onClickJavaScript != null ) { tag . put ( "onclick" , onClickJavaScript ) ; } } else { disableLink ( tag ) ; } } }

Fix:
tag . put ( "onclick" , ( ( "window.location.href='" + url ) + "';" ) ) ;
Buggy code:
final class MuninnWritePageCursor extends MuninnPageCursor { @ Override protected void unpinCurrentPage ( ) { } @ Override public boolean next ( ) throws IOException { } private void pin ( long filePageId ) throws IOException { int stripe = ( ( int ) ( filePageId & ( MuninnPagedFile . translationTableStripeMask ) ) ) ; StampedLock translationTableLock = pagedFile . translationTableLocks [ stripe ] ; PrimitiveLongObjectMap < MuninnPage > translationTable = pagedFile . translationTables [ stripe ] ; PageSwapper swapper = pagedFile . swapper ; <START_BUG> pinEvent = monitor . beginPin ( false , filePageId , swapper ) ; <END_BUG> MuninnPage page ; long stamp = translationTableLock . tryOptimisticRead ( ) ; page = translationTable . get ( filePageId ) ; if ( ! ( translationTableLock . validate ( stamp ) ) ) { stamp = translationTableLock . readLock ( ) ; try { page = translationTable . get ( filePageId ) ; } finally { translationTableLock . unlockRead ( stamp ) ; } } if ( page == null ) { stamp = translationTableLock . writeLock ( ) ; page = translationTable . get ( filePageId ) ; if ( page == null ) { pageFault ( filePageId , translationTable , translationTableLock , stamp , swapper ) ; return ; } translationTableLock . unlockWrite ( stamp ) ; } lockStamp = page . writeLock ( ) ; if ( page . isBoundTo ( swapper , filePageId ) ) { pinCursorToPage ( page , filePageId , swapper ) ; return ; } page . unlockWrite ( lockStamp ) ; stamp = translationTableLock . writeLock ( ) ; page = translationTable . get ( filePageId ) ; if ( page != null ) { lockStamp = page . writeLock ( ) ; if ( page . isBoundTo ( swapper , filePageId ) ) { translationTableLock . unlockWrite ( stamp ) ; pinCursorToPage ( page , filePageId , swapper ) ; return ; } page . unlockWrite ( lockStamp ) ; } pageFault ( filePageId , translationTable , translationTableLock , stamp , swapper ) ; } @ Override protected void pinCursorToPage ( MuninnPage page , long filePageId , PageSwapper swapper ) { } @ Override protected void convertPageFaultLock ( MuninnPage page , long stamp ) { } @ Override public final boolean shouldRetry ( ) { } }

Fix:
pinEvent = monitor . beginPin ( true , filePageId , swapper ) ;
Buggy code:
public final class SourcecodeCompiler { @ TruffleBoundary public static ClassDefinition compileModule ( final String path , final String file , final SClass systemClass , final Universe universe ) throws IOException { String fname = ( path + ( File . separator ) ) + file ; FileReader stream = new FileReader ( fname ) ; Source source = Source . fromFileName ( fname ) ; Parser parser = new Parser ( stream , new File ( fname ) . length ( ) , source , universe ) ; ClassDefinition result = SourcecodeCompiler . compile ( parser , systemClass , universe ) ; SSymbol cname = result . getName ( ) ; String cnameC = cname . getString ( ) ; <START_BUG> if ( file != cnameC ) { <END_BUG> throw new IllegalStateException ( ( ( ( "File<seq2seq4repair_space>name<seq2seq4repair_space>" + file ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>class<seq2seq4repair_space>name<seq2seq4repair_space>" ) + cnameC ) ) ; } return result ; } @ TruffleBoundary public static SClass compileClass ( final String stmt , final SClass systemClass , final Universe universe ) { } private static ClassDefinition compile ( final Parser parser , final SClass systemClass , final Universe universe ) { } }

Fix:
if ( file . equals ( cnameC ) ) {
Buggy code:
public class MinaClientModeTcpTextlineDelimiterTest extends BaseMinaTest { @ Test public void testMinaRoute ( ) throws Exception { } protected RouteBuilder createRouteBuilder ( ) { } private class Server { private final int port ; private IoAcceptor acceptor ; public Server ( int port ) { } public void startup ( ) throws Exception { acceptor = new SocketAcceptor ( ) ; TextLineCodecFactory codecFactory = new TextLineCodecFactory ( Charset . forName ( "UTF-8" ) , LineDelimiter . UNIX ) ; acceptor . getFilterChain ( ) . addLast ( "codec" , new org . apache . mina . filter . codec . ProtocolCodecFilter ( codecFactory ) ) ; <START_BUG> acceptor . bind ( new InetSocketAddress ( "127.0.0.1," , port ) , new MinaClientModeTcpTextlineDelimiterTest . ServerHandler ( ) ) ; <END_BUG> } public void shutdown ( ) throws Exception { } } private class ServerHandler extends IoHandlerAdapter { public void sessionOpened ( IoSession session ) throws Exception { } } No newline ; at end ; of file ; }

Fix:
acceptor . bind ( new InetSocketAddress ( "127.0.0.1" , port ) , new MinaClientModeTcpTextlineDelimiterTest . ServerHandler ( ) ) ;