nus-yam/ex-repair huggingface dataset:
Buggy code:
@ WebService ( endpointInterface = "edu.fudan.se.crowdservice.priceassessment.AssessPriceService" ) public class AssessPriceServiceImpl implements AssessPriceService { @ Override public String assessPrice ( double latitude , double longitude , String consumerId , int cost , int deadline , String compositeService , int resultNum , String brand , String series , String newness , String CPU , String memory , String hardDisk , String base64Image ) { String xmlDoc = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<Root><Description>Please<seq2seq4repair_space>access<seq2seq4repair_space>the<seq2seq4repair_space>price<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>second-hand<seq2seq4repair_space>" + ( "computer<seq2seq4repair_space>configuration<seq2seq4repair_space>based<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>photo<seq2seq4repair_space>given.<//Description>" + "<TextDisplay><Key>Brand<//Key><Value>" ) ) + brand ) + "<//Value><//TextDisplay><TextDisplay><Key>Series<//Key><Value>" ) + series ) + "<//Value><//TextDisplay><TextDisplay><Key>Newness<//Key><Value>" ) + newness ) + "<//Value><//TextDisplay><TextDisplay><Key>CPU<//Key><Value>" ) + CPU ) + "<//Value><//TextDisplay><TextDisplay><Key>Memory<//Key><Value>" ) + memory ) + "<//Value><//TextDisplay><TextDisplay><Key>Hard<seq2seq4repair_space>Disk<//Key><Value>" ) + hardDisk ) + "<//Value><//TextDisplay><ImageDisplay><Key>Photo<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>Second-hand<seq2seq4repair_space>Computer<//Key>" ) + "<Value>" ) + ( AssessPriceServiceImpl . saveByteArray ( ( ( new Date ( ) . getTime ( ) ) + ".jpg" ) , Base64 . decodeBase64 ( base64Image ) ) ) ) + "<//Value><//ImageDisplay><TextInput>" ) + "<Key>the<seq2seq4repair_space>Price<seq2seq4repair_space>of<seq2seq4repair_space>this<seq2seq4repair_space>computer<seq2seq4repair_space>You<seq2seq4repair_space>Assess<//Key><Value//><//TextInput><//Root>" ; <START_BUG> String crowdService = AssessPriceService . class . getName ( ) ; <END_BUG> long taskId = new InsertMicrotaskOperator ( xmlDoc , consumerId , cost , deadline , compositeService , crowdService , resultNum , latitude , longitude ) . getResult ( ) ; String result = new SelectedAverageResponseAggregator ( ) . aggregate ( taskId , deadline ) ; System . out . println ( result ) ; return result ; } private static String saveByteArray ( String bytePath , byte [ ] bytes ) { } }

Fix:
String crowdService = "service.shcomputer.cs.priceassessment.interfaces.PriceAssessmentService" ;
Buggy code:
public abstract class XtendXpandSearchQuery implements ISearchQuery { private final String identifier ; private final IXtendXpandProject project ; private XtendXpandSearchResult result ; public XtendXpandSearchQuery ( IXtendXpandProject project , String identifier ) { } public boolean canRerun ( ) { } public boolean canRunInBackground ( ) { <START_BUG> return false ; <END_BUG> } public String getLabel ( ) { } public String getResultLabel ( int matchCount ) { } public ISearchResult getSearchResult ( ) { } public IStatus run ( IProgressMonitor monitor ) throws OperationCanceledException { } protected abstract List < SearchMatch > performSearch ( ) { } public String getIdentifier ( ) { } public IXtendXpandProject getProject ( ) { } }

Fix:
return true ;
Buggy code:
public class ParserEventoEstablecimiento { public ParserEventoEstablecimiento ( ) { } public ArrayList < EventoEstablecimiento > parserEventoEstablecimiento ( JSONObject object ) { ArrayList < EventoEstablecimiento > arrayList = new ArrayList < EventoEstablecimiento > ( ) ; try { JSONArray jsonArray = object . getJSONArray ( "Value" ) ; JSONObject jsonObj = null ; for ( int i = 0 ; i < ( jsonArray . length ( ) ) ; i ++ ) { jsonObj = jsonArray . getJSONObject ( i ) ; int modalidadCredito = jsonObj . getInt ( "CliIModalidadCreditoId" ) ; int diasCredito = 0 ; switch ( modalidadCredito ) { case 1 : diasCredito = 3 ; break ; case 2 : diasCredito = 7 ; break ; case 3 : diasCredito = 15 ; break ; case 4 : diasCredito = 30 ; break ; case 5 : diasCredito = 0 ; break ; default : diasCredito = 0 ; break ; } <START_BUG> arrayList . add ( new EventoEstablecimiento ( jsonObj . getInt ( "EveeIEventoPorEstablecimientoId" ) , jsonObj . getInt ( "EstICatEstablecimientoId" ) , jsonObj . getInt ( "TdiTipoDocIdentidadId" ) , jsonObj . getInt ( "EveeIAtencionEstablecimientoId" ) , jsonObj . getString ( "EstVDescripcion" ) , jsonObj . getString ( "PerVNombres" ) , jsonObj . getString ( "CliVDocidentidad" ) , jsonObj . getInt ( "EstIOrden" ) , jsonObj . getInt ( "SurtidoStockAnterior" ) , jsonObj . getInt ( "SurtidoVentaAnterior" ) , jsonObj . getDouble ( "MocrIDescripcion" ) , diasCredito , 0 , null , jsonObj . getInt ( "LiqIAgenteVentaId" ) , Constants . _IMPORTADO ) ) ; <END_BUG> } } catch ( JSONException e ) { Log . d ( "JSONParser<seq2seq4repair_space>=><seq2seq4repair_space>parseEventoEstablecimiento" , e . getMessage ( ) ) ; } return arrayList ; } }

Fix:
arrayList . add ( new EventoEstablecimiento ( jsonObj . getInt ( "EveeIEstablecimientoId" ) , jsonObj . getInt ( "EstICatEstablecimientoId" ) , jsonObj . getInt ( "TdiTipoDocIdentidadId" ) , jsonObj . getInt ( "EveeIAtencionEstablecimientoId" ) , jsonObj . getString ( "EstVDescripcion" ) , jsonObj . getString ( "PerVNombres" ) , jsonObj . getString ( "CliVDocidentidad" ) , jsonObj . getInt ( "EstIOrden" ) , jsonObj . getInt ( "SurtidoStockAnterior" ) , jsonObj . getInt ( "SurtidoVentaAnterior" ) , jsonObj . getDouble ( "MocrIDescripcion" ) , diasCredito , 0 , null , jsonObj . getInt ( "LiqIAgenteVentaId" ) , Constants . _IMPORTADO ) ) ;
Buggy code:
public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodProcessor { public HttpEntityMethodProcessor ( List < HttpMessageConverter < ? > > messageConverters ) { } public boolean supportsParameter ( MethodParameter parameter ) { } public boolean supportsReturnType ( MethodParameter returnType ) { } public Object resolveArgument ( MethodParameter parameter , ModelAndViewContainer mavContainer , NativeWebRequest webRequest , WebDataBinderFactory binderFactory ) throws IOException , HttpMediaTypeNotSupportedException { } private Class < ? > getHttpEntityType ( MethodParameter parameter ) { } public void handleReturnValue ( Object returnValue , MethodParameter returnType , ModelAndViewContainer mavContainer , NativeWebRequest webRequest ) throws Exception { <START_BUG> mavContainer . setResolveView ( false ) ; <END_BUG> if ( returnValue == null ) { return ; } ServletServerHttpRequest inputMessage = createInputMessage ( webRequest ) ; ServletServerHttpResponse outputMessage = createOutputMessage ( webRequest ) ; Assert . isInstanceOf ( HttpEntity . class , returnValue ) ; HttpEntity < ? > responseEntity = ( ( HttpEntity < ? > ) ( returnValue ) ) ; if ( responseEntity instanceof ResponseEntity ) { outputMessage . setStatusCode ( ( ( ResponseEntity < ? > ) ( responseEntity ) ) . getStatusCode ( ) ) ; } HttpHeaders entityHeaders = responseEntity . getHeaders ( ) ; if ( ! ( entityHeaders . isEmpty ( ) ) ) { outputMessage . getHeaders ( ) . putAll ( entityHeaders ) ; } Object body = responseEntity . getBody ( ) ; if ( body != null ) { writeWithMessageConverters ( body , returnType , inputMessage , outputMessage ) ; } else { outputMessage . getBody ( ) ; } } }

Fix:
mavContainer . setRequestHandled ( true ) ;
Buggy code:
public abstract class BaseFilterReader extends FilterReader { private boolean initialized = false ; public BaseFilterReader ( ) { } public BaseFilterReader ( final Reader in ) { } public final int read ( final char [ ] cbuf , final int off , final int len ) throws IOException { } public final long skip ( final long n ) throws IOException { if ( n < 0L ) { throw new IllegalArgumentException ( "skip<seq2seq4repair_space>value<seq2seq4repair_space>is<seq2seq4repair_space>negative" ) ; } for ( long i = 0 ; i < n ; i ++ ) { <START_BUG> if ( ( in . read ( ) ) == ( - 1 ) ) { <END_BUG> return i ; } } return n ; } protected final void setInitialized ( final boolean initialized ) { } protected final boolean getInitialized ( ) { } protected final String readLine ( ) throws IOException { } }

Fix:
if ( ( read ( ) ) == ( - 1 ) ) {
Buggy code:
public class PackageResource extends AbstractResource { private static final Logger log = LoggerFactory . getLogger ( PackageResource . class ) ; private static final long serialVersionUID = 1L ; public static final class PackageResourceBlockedException extends WicketRuntimeException { private static final long serialVersionUID = 1L ; public PackageResourceBlockedException ( String message ) { } } private final String absolutePath ; private final Locale locale ; private final String path ; private final String scopeName ; private final String style ; private final String variation ; protected PackageResource ( final Class < ? > scope , final String name , final Locale locale , final String style , final String variation ) { } public final Class < ? > getScope ( ) { } public final String getStyle ( ) { } @ Override protected ResourceResponse newResourceResponse ( Attributes attributes ) { final ResourceResponse resourceResponse = new ResourceResponse ( ) ; if ( resourceResponse . dataNeedsToBeWritten ( attributes ) ) { final IResourceStream resourceStream = getResourceStream ( ) ; if ( resourceStream == null ) return sendResourceError ( resourceResponse , SC_NOT_FOUND , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>resource" ) ; resourceResponse . setContentType ( resourceStream . getContentType ( ) ) ; final Time lastModified = resourceStream . lastModifiedTime ( ) ; if ( lastModified != null ) resourceResponse . setLastModified ( lastModified . toDate ( ) ) ; try { final byte [ ] bytes ; try { bytes = IOUtils . toByteArray ( resourceStream . getInputStream ( ) ) ; } finally { resourceStream . close ( ) ; } resourceResponse . setContentLength ( bytes . length ) ; resourceResponse . setWriteCallback ( new WriteCallback ( ) { @ Override public void writeData ( Attributes attributes ) { attributes . getResponse ( ) . write ( bytes ) ; } } ) ; } catch ( IOException e ) { PackageResource . log . debug ( e . getMessage ( ) , e ) ; return sendResourceError ( resourceResponse , 500 , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>resource<seq2seq4repair_space>stream" ) ; } catch ( ResourceStreamNotFoundException e ) { PackageResource . log . debug ( e . getMessage ( ) , e ) ; return sendResourceError ( resourceResponse , 500 , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>open<seq2seq4repair_space>resource<seq2seq4repair_space>stream" ) ; } } <START_BUG> Application . get ( ) . getResourceSettings ( ) . getResourceCachingStrategy ( ) . processResponse ( resourceResponse ) ; <END_BUG> return resourceResponse ; } private ResourceResponse sendResourceError ( ResourceResponse resourceResponse , int errorCode , String errorMessage ) { } protected IResourceStream getResourceStream ( ) { } private boolean accept ( Class < ? > scope , String path ) { } public static boolean exists ( final Class < ? > scope , final String path , final Locale locale , final String style , final String variation ) { } @ Override public String toString ( ) { } }

Fix:
Application . get ( ) . getResourceSettings ( ) . getCachingStrategy ( ) . decorateResponse ( resourceResponse ) ;
Buggy code:
public abstract class AbstractDetachableModel implements IModel { private transient boolean attached = false ; public final void attach ( ) { } public final void detach ( ) { } <START_BUG> public abstract Object getNestedModel ( ) ; <END_BUG> public final Object getObject ( final Component component ) { } public boolean isAttached ( ) { } public final void setObject ( final Component component , final Object object ) { } protected abstract void onAttach ( ) { } protected abstract void onDetach ( ) { } protected abstract Object onGetObject ( final Component component ) { } protected abstract void onSetObject ( final Component component , final Object object ) { } }

Fix:
public abstract IModel getNestedModel ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) @ RunWith ( Parameterized . class ) public class TaskManagerProcessFailureBatchRecoveryITCase extends AbstractTaskManagerProcessFailureRecoveryTest { private final ExecutionMode executionMode ; public TaskManagerProcessFailureBatchRecoveryITCase ( ExecutionMode executionMode ) { } @ Parameterized . Parameters public static Collection < Object [ ] > executionMode ( ) { } @ Override public void testTaskManagerFailure ( int jobManagerPort , final File coordinateDir ) throws Exception { ExecutionEnvironment env = ExecutionEnvironment . createRemoteEnvironment ( "localhost" , jobManagerPort ) ; env . setParallelism ( PARALLELISM ) ; <START_BUG> env . setRestartStrategy ( RestartStrategies . fixedDelayRestart ( 1 , 1000 ) ) ; <END_BUG> env . getConfig ( ) . setExecutionMode ( executionMode ) ; env . getConfig ( ) . disableSysoutLogging ( ) ; final long NUM_ELEMENTS = 100000L ; final DataSet < Long > result = env . generateSequence ( 1 , NUM_ELEMENTS ) . rebalance ( ) . map ( new org . apache . flink . api . common . functions . RichMapFunction < Long , Long > ( ) { private final File proceedFile = new File ( coordinateDir , PROCEED_MARKER_FILE ) ; private boolean markerCreated = false ; private boolean checkForProceedFile = true ; @ Override public Long map ( Long value ) throws Exception { if ( ! ( markerCreated ) ) { int taskIndex = getRuntimeContext ( ) . getIndexOfThisSubtask ( ) ; touchFile ( new File ( coordinateDir , ( ( READY_MARKER_FILE_PREFIX ) + taskIndex ) ) ) ; markerCreated = true ; } if ( checkForProceedFile ) { if ( proceedFile . exists ( ) ) { checkForProceedFile = false ; } else { Thread . sleep ( 100 ) ; } } return value ; } } ) . reduce ( new org . apache . flink . api . common . functions . ReduceFunction < Long > ( ) { @ Override public Long reduce ( Long value1 , Long value2 ) { return value1 + value2 ; } } ) ; long sum = result . collect ( ) . get ( 0 ) ; assertEquals ( ( ( NUM_ELEMENTS * ( NUM_ELEMENTS + 1L ) ) // 2L ) , sum ) ; } }

Fix:
env . setRestartStrategy ( RestartStrategies . fixedDelayRestart ( 1 , 10000 ) ) ;
Buggy code:
public class ActionPermissionsTest extends TestCase { public ActionPermissionsTest ( ) { } public ActionPermissionsTest ( String arg0 ) { } public void testAdd1 ( ) throws Exception { ActionPermissions permissions = new ActionPermissions ( ) ; Action mambo = new Action ( "mambo" ) ; permissions . authorize ( mambo , "jonathan" ) ; permissions . authorize ( mambo , "johan" ) ; permissions . authorize ( mambo , "maurice" ) ; permissions . authorize ( mambo , "eelco" ) ; assertEquals ( 4 , permissions . rolesFor ( mambo ) . size ( ) ) ; permissions . unauthorize ( mambo , "maurice" ) ; assertEquals ( 3 , permissions . rolesFor ( mambo ) . size ( ) ) ; permissions . authorizeAll ( mambo ) ; <START_BUG> assertEquals ( 0 , permissions . rolesFor ( mambo ) ) ; <END_BUG> } }

Fix:
assertEquals ( null , permissions . rolesFor ( mambo ) ) ;
Buggy code:
public class WorkbenchPreview implements IThemePreview { private IPreferenceStore store ; private boolean disposed = false ; private CTabFolder folder ; private ITheme theme ; private ToolBar toolBar ; private CLabel viewMessage ; private ViewForm viewForm ; private IPropertyChangeListener fontAndColorListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; private IPropertyChangeListener preferenceListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; public void createControl ( Composite parent , ITheme currentTheme ) { } protected void setTabStyle ( ) { } protected void setTabPosition ( ) { } private void setColorsAndFonts ( ) { folder . setSelectionForeground ( theme . getColorRegistry ( ) . get ( ACTIVE_TAB_TEXT_COLOR ) ) ; folder . setForeground ( theme . getColorRegistry ( ) . get ( INACTIVE_TAB_TEXT_COLOR ) ) ; Color [ ] colors = new Color [ 2 ] ; colors [ 0 ] = theme . getColorRegistry ( ) . get ( INACTIVE_TAB_BG_START ) ; colors [ 1 ] = theme . getColorRegistry ( ) . get ( INACTIVE_TAB_BG_END ) ; <START_BUG> folder . setBackground ( colors , new int [ ] { theme . getInt ( INACTIVE_TAB_PERCENT ) } , theme . getBoolean ( INACTIVE_TAB_VERTICAL ) ) ; <END_BUG> toolBar . setBackground ( colors [ 1 ] ) ; viewMessage . setBackground ( colors [ 1 ] ) ; viewForm . setBackground ( colors [ 1 ] ) ; colors [ 0 ] = theme . getColorRegistry ( ) . get ( ACTIVE_TAB_BG_START ) ; colors [ 1 ] = theme . getColorRegistry ( ) . get ( ACTIVE_TAB_BG_END ) ; folder . setSelectionBackground ( colors , new int [ ] { theme . getInt ( ACTIVE_TAB_PERCENT ) } , theme . getBoolean ( ACTIVE_TAB_VERTICAL ) ) ; folder . setFont ( theme . getFontRegistry ( ) . get ( TAB_TEXT_FONT ) ) ; viewMessage . setFont ( theme . getFontRegistry ( ) . get ( VIEW_MESSAGE_TEXT_FONT ) ) ; } public void dispose ( ) { } }

Fix:
folder . setBackground ( colors , new int [ ] { 100 } , false ) ;
Buggy code:
public class ExportLink extends Link { private final List data ; private final BaseExportView exportView ; public ExportLink ( final String componentName , final List data , final BaseExportView exportView ) { } public void onClick ( ) { final RequestCycle cycle = getRequestCycle ( ) ; new Export ( ) . doExport ( cycle , exportView , data ) ; <START_BUG> cycle . setPage ( ( ( Page ) ( null ) ) ) ; <END_BUG> } }

Fix:
cycle . setResponsePage ( ( ( Page ) ( null ) ) ) ;
Buggy code:
@ SuppressWarnings ( { "JUnitTestMethodWithNoAssertions" , "ThrowableResultOfMethodCallIgnored" , "ErrorNotRethrown" } ) public class InmemoryCacheTest { private static final int THREAD_COUNT = 10 * ( Runtime . getRuntime ( ) . availableProcessors ( ) ) ; private static final int SLEEPING_THREAD_COUNT = 100 * ( Runtime . getRuntime ( ) . availableProcessors ( ) ) ; private static final int SECTION_COUNT = 50 ; private static final int KEY_PER_SECTION_COUNT = 50 ; private static final int TOTAL_KEY_COUNT = ( InmemoryCacheTest . SECTION_COUNT ) * ( InmemoryCacheTest . KEY_PER_SECTION_COUNT ) ; private static final long VALUE_LIFETIME_MILLIS = 350L ; private static final long VALUE_CHECK_INTERVAL_MILLIS = 250L ; private static final int VALUE_LENGTH = Ints . checkedCast ( BYTES_PER_KB ) ; @ Test public void testStoringOfValues ( ) throws Exception { } @ Test public void testOverridingOfValuesWithLifetime ( ) throws Exception { } @ Test public void testConcurrentStoringOfValues ( ) throws Exception { } private static void executeConcurrentStoringOfValues ( final Cache < String , byte [ ] > cache , final BlockingQueue < CachePath > cachePaths , final AtomicReference < AssertionError > assertionError , final AtomicReference < Throwable > unexpectedThrowable ) { } @ Test public void testConcurrentStoringOfValuesWithLifetime ( ) throws Exception { } private static void checkStoringOneValue ( Cache < String , byte [ ] > cache , CachePath cachePath ) { } private static void checkStoringOneValueWithLifetime ( Cache < String , byte [ ] > cache , CachePath cachePath ) { } private static BlockingQueue < CachePath > getCachePaths ( ) { <START_BUG> return CacheTestUtil . getCachePaths ( InmemoryCacheTest . KEY_PER_SECTION_COUNT , InmemoryCacheTest . KEY_PER_SECTION_COUNT , InmemoryCacheTest . TOTAL_KEY_COUNT ) ; <END_BUG> } }

Fix:
return CacheTestUtil . getCachePaths ( InmemoryCacheTest . SECTION_COUNT , InmemoryCacheTest . KEY_PER_SECTION_COUNT , InmemoryCacheTest . TOTAL_KEY_COUNT ) ;
Buggy code:
public class ContactChipSpan extends ReplacementSpan { private Paint mPaint ; private int mPaddingLeft ; private int mPaddingRight ; private int mBackgroundColor ; private int mHeight ; private int mWidth ; private CharSequence mContactName ; private BoringLayout mBoringLayout ; private Metrics mMetrics ; private TextPaint mTextPaint ; private RectF mRect ; private BitmapShader mBitmapShader ; private Bitmap mBitmap ; private Matrix mMatrix ; public ContactChipSpan ( CharSequence name , int height , int maxWidth , int paddingLeft , int paddingRight , Typeface typeface , int textColor , int textSize , int backgroundColor ) { } public void setImage ( Bitmap bm ) { } @ Override public int getSize ( Paint paint , CharSequence text , int start , int end , Paint . FontMetricsInt fm ) { } @ Override public void draw ( Canvas canvas , CharSequence text , int start , int end , float x , int top , int y , int bottom , Paint paint ) { canvas . save ( ) ; <START_BUG> canvas . translate ( x , 0 ) ; <END_BUG> float halfHeight = ( mHeight ) // 2.0F ; mPaint . setShader ( null ) ; mPaint . setColor ( mBackgroundColor ) ; mRect . set ( 1 , 0 , ( ( mHeight ) + 1 ) , mHeight ) ; canvas . drawArc ( mRect , 90 , 180 , true , mPaint ) ; mRect . set ( ( ( mWidth ) - ( mHeight ) ) , 0 , mWidth , mHeight ) ; canvas . drawArc ( mRect , 270 , 180 , true , mPaint ) ; mRect . set ( halfHeight , 0 , ( ( mWidth ) - halfHeight ) , mHeight ) ; canvas . drawRect ( mRect , mPaint ) ; if ( ( mBitmap ) != null ) { mPaint . setShader ( mBitmapShader ) ; canvas . drawCircle ( halfHeight , halfHeight , halfHeight , mPaint ) ; } if ( ( ( mContactName ) != null ) && ( ( mBoringLayout ) != null ) ) { canvas . translate ( ( ( mHeight ) + ( mPaddingLeft ) ) , ( ( ( mHeight ) - ( mBoringLayout . getHeight ( ) ) ) // 2.0F ) ) ; mBoringLayout . draw ( canvas ) ; } canvas . restore ( ) ; } }

Fix:
canvas . translate ( x , top ) ;
Buggy code:
public class ToolTip extends Widget { Shell parent ; String text ; String message ; TrayItem item ; int x ; int y ; int timerId ; int layoutText = 0 ; int layoutMessage = 0 ; int [ ] borderPolygon ; boolean spikeAbove ; boolean autohide ; static final int BORDER = 5 ; static final int PADDING = 5 ; static final int INSET = 4 ; static final int TIP_HEIGHT = 20 ; static final int IMAGE_SIZE = 16 ; static final int DELAY = 8000 ; public ToolTip ( Shell parent , int style ) { } static int checkStyle ( int style ) { } public void addSelectionListener ( SelectionListener listener ) { } void configure ( ) { } void createHandle ( int index ) { } void createWidget ( int index ) { } void deregister ( ) { } void destroyWidget ( ) { } public boolean getAutoHide ( ) { } Point getLocation ( ) { } public String getMessage ( ) { } String getNameText ( ) { } public Shell getParent ( ) { } Point getSize ( int maxWidth ) { } public String getText ( ) { } public boolean getVisible ( ) { } int gtk_button_press_event ( int widget , int event ) { <START_BUG> notifyListeners ( Selection , new Event ( ) ) ; <END_BUG> setVisible ( false ) ; return 0 ; } int gtk_expose_event ( int widget , int eventPtr ) { } int gtk_size_allocate ( int widget , int allocation ) { } void hookEvents ( ) { } public boolean isVisible ( ) { } void register ( ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAutoHide ( boolean autohide ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setMessage ( String string ) { } public void setText ( String string ) { } public void setVisible ( boolean visible ) { } int timerProc ( int widget ) { } }

Fix:
sendSelectionEvent ( Selection , null , true ) ;
Buggy code:
public abstract class FacetResultsHandler { protected final TaxonomyReader taxonomyReader ; protected final FacetRequest facetRequest ; public FacetResultsHandler ( TaxonomyReader taxonomyReader , FacetRequest facetRequest ) { } public abstract IntermediateFacetResult fetchPartitionResult ( FacetArrays arrays , int offset ) throws IOException { } public abstract IntermediateFacetResult mergeResults ( IntermediateFacetResult ... tmpResults ) throws IOException , ClassCastException , IllegalArgumentException { } public abstract FacetResult renderFacetResult ( IntermediateFacetResult tmpResult ) throws IOException { } public abstract FacetResult rearrangeFacetResult ( FacetResult facetResult ) { } public abstract void labelResult ( FacetResult facetResult ) throws IOException { } public final TaxonomyReader getTaxonomyReader ( ) { } public final FacetRequest getFacetRequest ( ) { } protected boolean isSelfPartition ( int ordinal , FacetArrays facetArrays , int offset ) { <START_BUG> int partitionSize = facetArrays . getArraysLength ( ) ; <END_BUG> return ( ordinal // partitionSize ) == ( offset // partitionSize ) ; } }

Fix:
int partitionSize = facetArrays . arrayLength ;
Buggy code:
public class LoginModulesAttributeDefinition extends ListAttributeDefinition { public static final ParameterValidator validator ; public static final ParameterValidator fieldValidator ; public LoginModulesAttributeDefinition ( String name , String xmlName ) { } @ Override protected void addValueTypeDescription ( ModelNode node , ResourceBundle bundle ) { } @ Override protected void addAttributeValueTypeDescription ( ModelNode node , ResourceDescriptionResolver resolver , Locale locale , ResourceBundle bundle ) { } @ Override protected void addOperationParameterValueTypeDescription ( ModelNode node , String operationName , ResourceDescriptionResolver resolver , Locale locale , ResourceBundle bundle ) { } public static ModelNode parseField ( String name , String value , XMLStreamReader reader ) throws XMLStreamException { } @ Override public void marshallAsElement ( ModelNode resourceModel , XMLStreamWriter writer ) throws XMLStreamException { } private ModelNode getNoTextValueTypeDescription ( final ModelNode parent ) { final ModelNode valueType = parent . get ( VALUE_TYPE ) ; final ModelNode code = valueType . get ( CODE ) ; code . get ( DESCRIPTION ) ; code . get ( TYPE ) . set ( STRING ) ; code . get ( NILLABLE ) . set ( false ) ; code . get ( MIN_LENGTH ) . set ( 1 ) ; final ModelNode flag = valueType . get ( FLAG ) ; flag . get ( DESCRIPTION ) ; flag . get ( TYPE ) . set ( STRING ) ; flag . get ( NILLABLE ) . set ( false ) ; for ( ModuleFlag value : ModuleFlag . values ( ) ) flag . get ( ALLOWED ) . add ( value . toString ( ) ) ; final ModelNode module = valueType . get ( MODULE ) ; module . get ( TYPE ) . set ( STRING ) ; <START_BUG> module . get ( NILLABLE ) . set ( false ) ; <END_BUG> final ModelNode moduleOptions = valueType . get ( MODULE_OPTIONS ) ; moduleOptions . get ( DESCRIPTION ) ; moduleOptions . get ( TYPE ) . set ( OBJECT ) ; moduleOptions . get ( VALUE_TYPE ) . set ( STRING ) ; moduleOptions . get ( NILLABLE ) . set ( true ) ; return valueType ; } }

Fix:
module . get ( NILLABLE ) . set ( true ) ;
Buggy code:
public class AklToussaintHeuristicTest extends ConvexHullGenerator2DAbstractTest { protected ConvexHullGenerator2D createConvexHullGenerator ( ) { <START_BUG> return new GrahamScan2D ( ) ; <END_BUG> } @ Override protected Collection < Vector2D > reducePoints ( Collection < Vector2D > points ) { } }

Fix:
return new GrahamScan ( ) ;
Buggy code:
@ With ( Common . class ) public class BlockSnapshots extends ResourceController { private static final String UNKNOWN = "resources.snapshot.unknown" ; private static BlockSnapshotsDataTable blockSnapshotsDataTable = new BlockSnapshotsDataTable ( ) ; public static void snapshots ( String projectId ) { } public static void snapshotsJson ( String projectId ) { } public static void snapshotDetails ( String snapshotId ) { } public static void snapshotExports ( String snapshotId ) { } @ FlashException ( referrer = { "snapshotDetails" } ) public static void deleteSnapshot ( String snapshotId ) { } @ FlashException ( "snapshots" ) public static void delete ( @ As ( "," ) String [ ] ids ) { } private static void delete ( List < URI > ids ) { if ( ids != null ) { ViPRCoreClient client = BourneUtil . getViprClient ( ) ; for ( URI id : ids ) { <START_BUG> Tasks < BlockSnapshotRestRep > task = client . blockSnapshots ( ) . deactivate ( id ) ; <END_BUG> } flash . put ( "info" , MessagesUtils . get ( "resources.snapshots.deactivate" , ids . size ( ) ) ) ; } BlockSnapshots . snapshots ( null ) ; } }

Fix:
Tasks < BlockSnapshotRestRep > task = client . blockSnapshots ( ) . deactivate ( id , FULL ) ;
Buggy code:
public class JavaSearchParticipant extends SearchParticipant { IndexSelector indexSelector ; public void beginSearching ( ) { } public void doneSearching ( ) { } public String getDescription ( ) { } public SearchDocument getDocument ( String documentPath ) { } public void indexDocument ( SearchDocument document , IPath indexPath ) { } public void locateMatches ( SearchDocument [ ] indexMatches , SearchPattern pattern , IJavaSearchScope scope , SearchRequestor requestor , IProgressMonitor monitor ) throws CoreException { } public IPath [ ] selectIndexes ( SearchPattern pattern , IJavaSearchScope scope ) { if ( ( this . indexSelector ) == null ) { this . indexSelector = new IndexSelector ( scope , pattern ) ; } <START_BUG> return this . indexSelector . getIndexKeys ( ) ; <END_BUG> } }

Fix:
return this . indexSelector . getIndexLocations ( ) ;
Buggy code:
public class Scale extends Control { static final int TrackBarProc ; static final TCHAR TrackBarClass = new TCHAR ( 0 , OS . TRACKBAR_CLASS , true ) ; public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultForeground ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void setBackgroundPixel ( int pixel ) { } public void setIncrement ( int increment ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int pageIncrement ) { } public void setSelection ( int value ) { } int widgetStyle ( ) { int bits = ( ( ( super . widgetStyle ( ) ) | ( OS . WS_TABSTOP ) ) | ( OS . TBS_BOTH ) ) | ( OS . TBS_AUTOTICKS ) ; if ( ( ( style ) & ( SWT . HORIZONTAL ) ) != 0 ) <START_BUG> return bits | ( OS . TBS_HORZ ) ; <END_BUG> return bits | ( OS . TBS_VERT ) ; } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT wmScrollChild ( int wParam , int lParam ) { } }

Fix:
return ( bits | ( OS . TBS_HORZ ) ) | ( OS . TBS_DOWNISLEFT ) ;
Buggy code:
public class BinaryVerbHandler implements IVerbHandler { private static Logger logger_ = Logger . getLogger ( BinaryVerbHandler . class ) ; private static ThreadLocal < RowMutationContext > tls_ = new InheritableThreadLocal < RowMutationContext > ( ) ; public void doVerb ( Message message ) { byte [ ] bytes = message . getMessageBody ( ) ; RowMutationContext rowMutationCtx = BinaryVerbHandler . tls_ . get ( ) ; if ( rowMutationCtx == null ) { rowMutationCtx = new RowMutationContext ( ) ; BinaryVerbHandler . tls_ . set ( rowMutationCtx ) ; } rowMutationCtx . buffer_ . reset ( bytes , bytes . length ) ; try { RowMutationMessage rmMsg = RowMutationMessage . serializer ( ) . deserialize ( rowMutationCtx . buffer_ ) ; RowMutation rm = rmMsg . getRowMutation ( ) ; <START_BUG> rowMutationCtx . row_ . key ( rm . key ( ) ) ; <END_BUG> rm . applyBinary ( rowMutationCtx . row_ ) ; } catch ( Exception e ) { BinaryVerbHandler . logger_ . debug ( LogUtil . throwableToString ( e ) ) ; } } }

Fix:
rowMutationCtx . row_ . setKey ( rm . key ( ) ) ;
Buggy code:
public class DynamicTagTests { private static final String PATH = "src//wyvern//tools//tests//tagTests//code//dynamic//" ; @ Test public void ecoop2015Artifact ( ) throws CopperParserException , IOException { } @ Test public void dynamicTagTest ( ) throws CopperParserException , IOException { } @ Test public void dynamicTagTest1 ( ) throws CopperParserException , IOException { } @ Test public void dynamicTagTest2 ( ) throws CopperParserException , IOException { } @ Test public void dynamicTagTest3 ( ) throws CopperParserException , IOException { } @ Test public void dynamicTagsWindowTest ( ) throws CopperParserException , IOException { } @ Test public void dynamicTagsWindowPaperTest ( ) throws CopperParserException , IOException { String program = TestUtil . readFile ( ( ( DynamicTagTests . PATH ) + "DynamicTagsWindowPaper.wyv" ) ) ; TypedAST ast = TestUtil . getAST ( program ) ; <START_BUG> TestUtil . evaluateExpecting ( ast , 42 ) ; <END_BUG> } @ Test public void dynamicTagsWindowSimpleTest ( ) throws CopperParserException , IOException { } @ Test public void nonDynamicTest ( ) throws CopperParserException , IOException { } @ Test public void thisTest ( ) throws CopperParserException , IOException { } No newline ; at end ; of file ; }

Fix:
TestUtil . evaluateExpecting ( ast , "big" ) ;
Buggy code:
public class WebSocketServlet extends HttpServlet { private static final long serialVersionUID = - 1773286872178450453L ; private WebSocketFactory factory ; @ Override public void init ( ) throws ServletException { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException { } abstract class OnTextMessage implements WebSocket . OnTextMessage { Connection cnn ; @ Override public void onOpen ( Connection connection ) { } @ Override public void onClose ( int closeCode , String message ) { } public void sendError ( Exception e ) { } } private class SourceAnimo extends WebSocketServlet . OnTextMessage { @ Override public void onMessage ( String data ) { if ( data . isEmpty ( ) ) return ; try { Relationship r = _ . get ( data ) ; if ( r != null ) { cnn . sendMessage ( PRETTY_ANIMO . serialize ( r ) ) ; } else { } } catch ( IOException e ) { sendError ( e ) ; } } } private class AnimoSubGraph extends WebSocketServlet . OnTextMessage { @ Override public void onMessage ( String data ) { if ( data . isEmpty ( ) ) return ; Relationship r = _ . get ( data ) ; if ( r == null ) return ; IndexHits < Relationship > hits = Order . queryDown ( r . getEndNode ( ) ) ; try { for ( Relationship rr : hits ) { cnn . sendMessage ( rr . getType ( ) . name ( ) ) ; } } catch ( IOException e ) { } finally { hits . close ( ) ; } } } private class AnimoIMS extends WebSocketServlet . OnTextMessage { @ Override public void onMessage ( String data ) { System . out . println ( ( "AnimoIMS<seq2seq4repair_space>" + data ) ) ; try { cnn . sendMessage ( HTML_PART . serialize ( new AnimoExpression ( data ) ) ) ; } catch ( IOException e ) { } } } private class SaveAnimo extends WebSocketServlet . OnTextMessage { @ Override public void onMessage ( String data ) { if ( data . isEmpty ( ) ) return ; try { Expression e = new AnimoExpression ( data ) ; cnn . sendMessage ( PRETTY_ANIMO . serialize ( e ) ) ; } catch ( IOException e ) { } } } private class SearchAnimo extends WebSocketServlet . OnTextMessage { private void sendThes ( Relationship r ) throws IOException { } @ Override public void onMessage ( String data ) { if ( data . isEmpty ( ) ) return ; data = data . trim ( ) ; try { long rid = Long . valueOf ( data ) ; sendThes ( AnimoGraph . getDb ( ) . getRelationshipById ( rid ) ) ; } catch ( NumberFormatException nfe ) { Relationship r = _ . get ( data ) ; try { Expression e ; if ( r != null ) { cnn . sendMessage ( PRETTY_ANIMO . serialize ( r ) ) ; e = new org . animotron . expression . JExpression ( _ ( ALL . _ , r ) ) ; } else { <START_BUG> e = new AnimoExpression ( ( ( data . indexOf ( "<seq2seq4repair_space>" ) ) > 0 ? data : null ) ) ; <END_BUG> } if ( e != null ) { for ( QCAVector v : Evaluator . _ . execute ( null , e ) ) { sendThes ( v . getClosest ( ) ) ; } } } catch ( IOException e ) { sendError ( e ) ; } } catch ( NotFoundException e ) { sendError ( e ) ; } catch ( IOException e ) { sendError ( e ) ; } } } }

Fix:
e = ( ( data . indexOf ( "<seq2seq4repair_space>" ) ) > 0 ) ? new AnimoExpression ( data ) : null ;
Buggy code:
public class ServiceProvider { public static void flushStorage ( ) { } public static void save ( String key , String data ) { } public static void saveLong ( String key , long data ) { } public static void save ( String key , int data ) { } public static void save ( String key , boolean data ) { } public static String load ( String key , String default_ ) { } public static boolean load ( String key , boolean default_ ) { } public static int load ( String key , int default_ ) { } public static long loadLong ( String key , long default_ ) { } public static InputStream readFile ( String name ) { } private static int play_mem = - 1 ; public static Sound loadSound ( String name ) { } public static Sound [ ] loadSoundArray ( String name ) { } public static void playOne ( Sound [ ] ss ) { } public static void play ( Sound s ) { } public static void play ( Sound s , float amp ) { <START_BUG> if ( s == null ) <END_BUG> return ; final float a = Math . max ( 0.9F , ( amp * 0.8F ) ) ; s . stop ( ) ; s . play ( a ) ; } public static Texture loadTexture ( String filename , boolean filter ) { } public static TextureRegion [ ] divideTexture ( Texture t , int w , int h ) { } public static BitmapFont loadFont ( String name ) { } public static NinePatch loadPatch ( String name , int l , int r , int t , int b ) { } public static ParticleEffectPool loadParticle ( String dir , String name ) { } public static float getRandom ( ) { } public static float getRandom ( float min , float max ) { } public static int getRandomInt ( int max ) { } public static boolean flipCoin ( ) { } public static Job addJob ( Job job ) { } public static Job addMessage ( MessageListener ml , long time , int msg ) { } public static Job addMessage ( MessageListener ml , long time , int msg , int data0 , Object data1 ) { } public static void service ( long dt ) { } }

Fix:
if ( ( s == null ) || ( ! ( Settings . sound ) ) )
Buggy code:
public class HandleFactory { private JavaModelManager manager ; private String lastPkgFragmentRootPath ; private IPackageFragmentRoot lastPkgFragmentRoot ; private Hashtable packageHandles ; private IWorkspaceRoot workspaceRoot ; public HandleFactory ( IWorkspaceRoot workspaceRoot , JavaModelManager manager ) { } public Openable createOpenable ( String resourcePath ) { } private IPackageFragmentRoot getJarPkgFragmentRoot ( String jarPathString ) { IPath jarPath = new Path ( jarPathString ) ; JavaModel javaModel = this . manager . getJavaModel ( this . workspaceRoot . getWorkspace ( ) ) ; IResource jarFile = this . workspaceRoot . findMember ( jarPath ) ; if ( jarFile != null ) { return javaModel . getJavaProject ( jarFile ) . getPackageFragmentRoot ( jarFile ) ; } else { IProject [ ] projects = this . workspaceRoot . getProjects ( ) ; for ( int i = 0 , projectCount = projects . length ; i < projectCount ; i ++ ) { try { IProject project = projects [ i ] ; if ( ( ! ( project . isAccessible ( ) ) ) || ( ! ( project . hasNature ( JavaCore . NATURE_ID ) ) ) ) continue ; IJavaProject javaProject = javaModel . getJavaProject ( project ) ; <START_BUG> IClasspathEntry [ ] classpathEntries = javaProject . getResolvedClasspath ( true ) ; <END_BUG> for ( int j = 0 , entryCount = classpathEntries . length ; j < entryCount ; j ++ ) { if ( classpathEntries [ j ] . getPath ( ) . equals ( jarPath ) ) { return javaProject . getPackageFragmentRoot ( jarPathString ) ; } } } catch ( CoreException e ) { } } return null ; } } private IPackageFragmentRoot getPkgFragmentRoot ( String pathString ) { } }

Fix:
IClasspathEntry [ ] classpathEntries = javaProject . getExpandedClasspath ( true ) ;
Buggy code:
public class CompareToBuilder implements Builder < Integer > { private int comparison ; public CompareToBuilder ( ) { } public static int reflectionCompare ( Object lhs , Object rhs ) { } public static int reflectionCompare ( Object lhs , Object rhs , boolean compareTransients ) { } public static int reflectionCompare ( Object lhs , Object rhs , Collection < String > excludeFields ) { } public static int reflectionCompare ( Object lhs , Object rhs , String [ ] excludeFields ) { } public static int reflectionCompare ( Object lhs , Object rhs , boolean compareTransients , Class < ? > reflectUpToClass ) { } public static int reflectionCompare ( Object lhs , Object rhs , boolean compareTransients , Class < ? > reflectUpToClass , String [ ] excludeFields ) { } private static void reflectionAppend ( Object lhs , Object rhs , Class < ? > clazz , CompareToBuilder builder , boolean useTransients , String [ ] excludeFields ) { } public CompareToBuilder appendSuper ( int superCompareTo ) { } public CompareToBuilder append ( Object lhs , Object rhs ) { } public CompareToBuilder append ( Object lhs , Object rhs , Comparator < ? > comparator ) { } public CompareToBuilder append ( long lhs , long rhs ) { } public CompareToBuilder append ( int lhs , int rhs ) { } public CompareToBuilder append ( short lhs , short rhs ) { } public CompareToBuilder append ( char lhs , char rhs ) { } public CompareToBuilder append ( byte lhs , byte rhs ) { } public CompareToBuilder append ( double lhs , double rhs ) { } public CompareToBuilder append ( float lhs , float rhs ) { } public CompareToBuilder append ( boolean lhs , boolean rhs ) { } public CompareToBuilder append ( Object [ ] lhs , Object [ ] rhs ) { } public CompareToBuilder append ( Object [ ] lhs , Object [ ] rhs , Comparator < ? > comparator ) { } public CompareToBuilder append ( long [ ] lhs , long [ ] rhs ) { } public CompareToBuilder append ( int [ ] lhs , int [ ] rhs ) { } public CompareToBuilder append ( short [ ] lhs , short [ ] rhs ) { } public CompareToBuilder append ( char [ ] lhs , char [ ] rhs ) { } public CompareToBuilder append ( byte [ ] lhs , byte [ ] rhs ) { } public CompareToBuilder append ( double [ ] lhs , double [ ] rhs ) { } public CompareToBuilder append ( float [ ] lhs , float [ ] rhs ) { } public CompareToBuilder append ( boolean [ ] lhs , boolean [ ] rhs ) { } public int toComparison ( ) { } public Integer build ( ) { <START_BUG> return toComparison ( ) ; <END_BUG> } }

Fix:
return Integer . valueOf ( toComparison ( ) ) ;
Buggy code:
public class AntPathMatcher implements PathMatcher { private static final Pattern VARIABLE_PATTERN = Pattern . compile ( "\\{[^//]+?\\}" ) ; public static final String DEFAULT_PATH_SEPARATOR = "//" ; private String pathSeparator = AntPathMatcher . DEFAULT_PATH_SEPARATOR ; public void setPathSeparator ( String pathSeparator ) { } public boolean isPattern ( String path ) { } public boolean match ( String pattern , String path ) { } public boolean matchStart ( String pattern , String path ) { } protected boolean doMatch ( String pattern , String path , boolean fullMatch , Map < String , String > uriTemplateVariables ) { } private boolean matchStrings ( String pattern , String str , Map < String , String > uriTemplateVariables ) { } public String extractPathWithinPattern ( String pattern , String path ) { } public Map < String , String > extractUriTemplateVariables ( String pattern , String path ) { } public String combine ( String pattern1 , String pattern2 ) { if ( ( ! ( StringUtils . hasText ( pattern1 ) ) ) && ( ! ( StringUtils . hasText ( pattern2 ) ) ) ) { return "" ; } else if ( ! ( StringUtils . hasText ( pattern1 ) ) ) { return pattern2 ; } else if ( ! ( StringUtils . hasText ( pattern2 ) ) ) { return pattern1 ; } else <START_BUG> if ( match ( pattern1 , pattern2 ) ) { <END_BUG> return pattern2 ; } else if ( pattern1 . endsWith ( "//*" ) ) { if ( pattern2 . startsWith ( "//" ) ) { return ( pattern1 . substring ( 0 , ( ( pattern1 . length ( ) ) - 1 ) ) ) + ( pattern2 . substring ( 1 ) ) ; } else { return ( pattern1 . substring ( 0 , ( ( pattern1 . length ( ) ) - 1 ) ) ) + pattern2 ; } } else if ( pattern1 . endsWith ( "//**" ) ) { if ( pattern2 . startsWith ( "//" ) ) { return pattern1 + pattern2 ; } else { return ( pattern1 + "//" ) + pattern2 ; } } else { int dotPos1 = pattern1 . indexOf ( '.' ) ; if ( dotPos1 == ( - 1 ) ) { if ( ( pattern1 . endsWith ( "//" ) ) || ( pattern2 . startsWith ( "//" ) ) ) { return pattern1 + pattern2 ; } else { return ( pattern1 + "//" ) + pattern2 ; } } String fileName1 = pattern1 . substring ( 0 , dotPos1 ) ; String extension1 = pattern1 . substring ( dotPos1 ) ; String fileName2 ; String extension2 ; int dotPos2 = pattern2 . indexOf ( '.' ) ; if ( dotPos2 != ( - 1 ) ) { fileName2 = pattern2 . substring ( 0 , dotPos2 ) ; extension2 = pattern2 . substring ( dotPos2 ) ; } else { fileName2 = pattern2 ; extension2 = "" ; } String fileName = ( fileName1 . endsWith ( "*" ) ) ? fileName2 : fileName1 ; String extension = ( extension1 . startsWith ( "*" ) ) ? extension2 : extension1 ; return fileName + extension ; } } public Comparator < String > getPatternComparator ( String path ) { } private static class AntPatternComparator implements Comparator < String > { private final String path ; private AntPatternComparator ( String path ) { } public int compare ( String pattern1 , String pattern2 ) { } private int getWildCardCount ( String pattern ) { } private int getPatternLength ( String pattern ) { } } }

Fix:
if ( ( ! ( pattern1 . contains ( "{" ) ) ) && ( match ( pattern1 , pattern2 ) ) ) {
Buggy code:
public class Tank { private boolean AI ; private String TEAM ; public int CENTER_X ; public int CENTER_Y ; public float AXIS_SLOPE ; public Tank ( boolean b , String s ) { } public void move ( boolean f , boolean b ) { } public void rotate ( boolean r , boolean l ) { } public void checkPos ( int x , int y ) { } public void auton ( int mode , int x , int y ) { } public int getX ( ) { } public int getY ( ) { } <START_BUG> public float checkSlope ( ) { <END_BUG> if ( ( this . AXIS_SLOPE ) >= 360 ) { this . AXIS_SLOPE -= 360 ; } } public void checkPos ( Map m ) { } public void die ( ) { } }

Fix:
public void checkSlope ( ) {
Buggy code:
public abstract class Viewport { private final int height_ = 40 ; private final int width_ = 80 ; private transient char [ ] [ ] view_contents_ ; private transient Color [ ] [ ] color_contents_ ; public int getHeight ( ) { } public int getWidth ( ) { } public abstract boolean getInput ( char c ) { } public Viewport ( ) { } public abstract void renderToDisplay ( IO_Bundle bundle ) { } public char [ ] [ ] getCharContents ( ) { } public Color [ ] [ ] getColorContents ( ) { } public ArrayList < String > getAsciiArtFromFile ( String input ) { } protected void clear ( ) { if ( ( view_contents_ ) == null ) { return ; } for ( int j = 0 ; j != ( height_ ) ; ++ j ) { for ( int i = 0 ; i != ( width_ ) ; ++ i ) { { view_contents_ [ i ] [ j ] = '<seq2seq4repair_space>' ; <START_BUG> color_contents_ [ i ] [ j ] = Color . black ; <END_BUG> } } } } private void initGuard ( ) { } protected String rightAlign ( int length , String text ) { } protected boolean writeStringToContents ( int x , int y , String in ) { } protected boolean writeStringToContents ( Vector2 coord , String in ) { } protected boolean makeSquare ( int x , int y , int length , int width ) { } protected boolean makeSquare ( Vector2 coord , Vector2 size ) { } }

Fix:
color_contents_ [ i ] [ j ] = null ;
Buggy code:
public class ActFmGoogleAuthActivity extends ListActivity { private static final String AUTH_TOKEN_TYPE = "oauth2:https:////www.googleapis.com//auth//userinfo.profile" ; public static final String RESULT_EMAIL = "email" ; public static final String RESULT_TOKEN = "token" ; private GoogleAccountManager accountManager ; private String [ ] nameArray ; private String authToken ; private String accountName ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onListItemClick ( ListView l , View v , int position , long id ) { super . onListItemClick ( l , v , position , id ) ; final ProgressDialog pd = DialogUtilities . progressDialog ( this , this . getString ( gtasks_GLA_authenticating ) ) ; pd . show ( ) ; <START_BUG> final Account a = accountManager . getAccountByName ( nameArray [ position ] ) ; <END_BUG> accountName = a . name ; getAuthToken ( a , pd ) ; } private void getAuthToken ( Account a , final ProgressDialog pd ) { } private void onAuthCancel ( ) { } private void onAuthTokenSuccess ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onStop ( ) { } private static final int REQUEST_AUTHENTICATE = 0 ; @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } No newline ; at end ; of file ; }

Fix:
final Account a = accountManager . getAccountByName ( nameArray [ ( position - 1 ) ] ) ;