nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractResource implements IResource { private static final long serialVersionUID = 1L ; public AbstractResource ( ) { } protected abstract AbstractResource . ResourceResponse newResourceResponse ( Attributes attributes ) { } public static class ResourceResponse { private Integer errorCode ; private String fileName = null ; private ContentDisposition contentDisposition = ContentDisposition . INLINE ; private String contentType = null ; private String textEncoding ; private long contentLength = - 1 ; private Date lastModified = null ; private AbstractResource . WriteCallback writeCallback ; private boolean cacheable = true ; private long cacheDuration ; public ResourceResponse ( ) { } public void setErrorCode ( Integer errorCode ) { } public Integer getErrorCode ( ) { } public void setFileName ( String fileName ) { } public String getFileName ( ) { } public void setContentDisposition ( ContentDisposition contentDisposition ) { } public ContentDisposition getContentDisposition ( ) { } public void setContentType ( String contentType ) { } public String getContentType ( ) { } public void setTextEncoding ( String textEncoding ) { } protected String getTextEncoding ( ) { } public void setContentLength ( long contentLength ) { } public long getContentLength ( ) { } public void setLastModified ( Date lastModified ) { } public Date getLastModified ( ) { } public boolean dataNeedsToBeWritten ( Attributes attributes ) { } public void setCacheable ( boolean cacheable ) { } public boolean isCacheable ( ) { } public void setCacheDuration ( long cacheDuration ) { } public long getCacheDuration ( ) { } public void setWriteCallback ( AbstractResource . WriteCallback writeCallback ) { } public AbstractResource . WriteCallback getWriteCallback ( ) { } } protected void configureCache ( WebRequest request , WebResponse response , AbstractResource . ResourceResponse data , Attributes attributes ) { } public final void respond ( Attributes attributes ) { } public abstract static class WriteCallback { public abstract void writeData ( Attributes attributes ) { } protected final void writeStream ( Attributes attributes , InputStream stream ) { final Response response = attributes . getResponse ( ) ; OutputStream s = new OutputStream ( ) { @ Override public void write ( int b ) throws IOException { response . write ( new byte [ ] { ( ( byte ) ( b ) ) } ) ; } @ Override public void write ( byte [ ] b ) throws IOException { response . write ( b ) ; } @ Override public void write ( byte [ ] b , int off , int len ) throws IOException { <START_BUG> if ( ( off == 0 ) || ( len == ( b . length ) ) ) { <END_BUG> write ( b ) ; } else { byte [ ] copy = new byte [ len ] ; System . arraycopy ( b , off , copy , 0 , len ) ; write ( copy ) ; } } } ; try { Streams . copy ( stream , s ) ; } catch ( IOException e ) { throw new WicketRuntimeException ( e ) ; } } } }

Fix:
if ( ( off == 0 ) && ( len == ( b . length ) ) ) {
Buggy code:
public class A6 extends TranslatorBlock { public A6 ( Long blockId , Translator translator , String codePrefix , String codeSuffix , String label ) { } @ Override public String toCode ( ) throws SocketNullException { <START_BUG> return ( ( codePrefix ) + "0" ) + ( codeSuffix ) ; <END_BUG> } }

Fix:
return ( ( codePrefix ) + "6" ) + ( codeSuffix ) ;
Buggy code:
public class RackUnawareStrategyTest extends SchemaLoader { @ Test public void tryBogusTable ( ) { } @ Test public void testBigIntegerEndpoints ( ) throws UnknownHostException { } @ Test public void testStringEndpoints ( ) throws UnknownHostException { TokenMetadata tmd = new TokenMetadata ( ) ; IPartitioner partitioner = new OrderPreservingPartitioner ( ) ; AbstractReplicationStrategy strategy = new RackUnawareStrategy ( tmd , null ) ; List < Token > endPointTokens = new ArrayList < Token > ( ) ; List < Token > keyTokens = new ArrayList < Token > ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { endPointTokens . add ( new StringToken ( String . valueOf ( ( ( char ) ( 'a' + ( i * 2 ) ) ) ) ) ) ; <START_BUG> keyTokens . add ( partitioner . getToken ( String . valueOf ( ( ( char ) ( ( 'a' + ( i * 2 ) ) + 1 ) ) ) ) ) ; <END_BUG> } for ( String table : DatabaseDescriptor . getNonSystemTables ( ) ) testGetEndpoints ( tmd , strategy , endPointTokens . toArray ( new Token [ 0 ] ) , keyTokens . toArray ( new Token [ 0 ] ) , table ) ; } private void testGetEndpoints ( TokenMetadata tmd , AbstractReplicationStrategy strategy , Token [ ] endPointTokens , Token [ ] keyTokens , String table ) throws UnknownHostException { } @ Test public void testGetEndpointsDuringBootstrap ( ) throws UnknownHostException { } }

Fix:
keyTokens . add ( partitioner . getToken ( String . valueOf ( ( ( char ) ( ( 'a' + ( i * 2 ) ) + 1 ) ) ) . getBytes ( ) ) ) ;
Buggy code:
public class ChatConnection implements ISynchAsynchConnection , IIMMessageSender { public static final String CLIENT_TYPE = "ECF_XMPP" ; public static final Trace trace = Trace . create ( "smackconnection" ) ; public static final Trace smack = Trace . create ( "smackdebug" ) ; protected static final String STRING_ENCODING = "UTF-8" ; public static final String OBJECT_PROPERTY_NAME = ( ChatConnection . class . getName ( ) ) + ".object" ; protected static final int XMPP_NORMAL_PORT = 5222 ; protected XMPPConnection connection = null ; protected IAsynchConnectionEventHandler handler = null ; protected ID localID = null ; protected boolean isStarted = false ; protected String serverName ; protected int serverPort = - 1 ; protected Map properties = null ; protected boolean isConnected = false ; protected void debug ( String msg ) { } protected void dumpStack ( String msg , Throwable t ) { } protected void logException ( String msg , Throwable t ) { } public Map getProperties ( ) { } public Object getAdapter ( Class clazz ) { } public XMPPConnection getXMPPConnection ( ) { } public ChatConnection ( IAsynchConnectionEventHandler h ) { } protected String getPasswordForObject ( Object data ) { } protected XMPPID getXMPPID ( ID remote ) throws IOException { } public synchronized Object connect ( ID remote , Object data , int timeout ) throws IOException { } public synchronized void disconnect ( ) throws IOException { } public synchronized boolean isConnected ( ) { } public synchronized ID getLocalID ( ) { if ( ! ( isConnected ( ) ) ) return null ; try { <START_BUG> return IDFactory . makeID ( PROTOCOL , new Object [ ] { connection . getConnectionID ( ) } ) ; <END_BUG> } catch ( Exception e ) { logException ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>getLocalID" , e ) ; return null ; } } public synchronized void start ( ) { } public boolean isStarted ( ) { } public synchronized void stop ( ) { } protected void handleConnectionClosed ( Exception e ) { } protected void handlePacket ( Packet arg0 ) { } protected void sendMessage ( ID receiver , Message msg ) throws IOException { } public synchronized void sendAsynch ( ID receiver , byte [ ] data ) throws IOException { } public synchronized Object sendSynch ( ID receiver , byte [ ] data ) throws IOException { } public void addCommEventListener ( IConnectionEventHandler listener ) { } public void removeCommEventListener ( IConnectionEventHandler listener ) { } public void sendMessage ( ID target , String message ) throws IOException { } public void sendPresenceUpdate ( ID target , Presence presence ) throws IOException { } public void sendRosterAdd ( String user , String name , String [ ] groups ) throws IOException { } public void sendRosterRemove ( String user ) throws IOException { } public Roster getRoster ( ) throws IOException { } }

Fix:
return IDFactory . getDefault ( ) . makeID ( PROTOCOL , new Object [ ] { connection . getConnectionID ( ) } ) ;
Buggy code:
public abstract class HierarchyBuilder { protected TypeHierarchy hierarchy ; protected NameLookup nameLookup ; protected HierarchyResolver hierarchyResolver ; protected Map infoToHandle ; protected String focusQualifiedName ; public HierarchyBuilder ( TypeHierarchy hierarchy ) throws JavaModelException { } public abstract void build ( boolean computeSubtypes ) throws CoreException , JavaModelException { } protected void buildSupertypes ( ) { } public void connect ( IGenericType type , IType typeHandle , IType superclassHandle , IType [ ] superinterfaceHandles ) { } protected IType getHandle ( IGenericType genericType , ReferenceBinding binding ) { } protected IType getType ( ) { } protected IType lookupBinaryHandle ( IBinaryType typeInfo ) { } protected void worked ( IProgressMonitor monitor , int work ) { } protected ICompilationUnit createCompilationUnitFromPath ( Openable handle , IFile file ) { final char [ ] elementName = handle . getElementName ( ) . toCharArray ( ) ; <START_BUG> return new ResourceCompilationUnit ( file ) { <END_BUG> public char [ ] getFileName ( ) { return elementName ; } } ; } protected IBinaryType createInfoFromClassFile ( Openable handle , IResource file ) { } protected IBinaryType createInfoFromClassFileInJar ( Openable classFile ) { } }

Fix:
return new ResourceCompilationUnit ( file , file . getLocationURI ( ) ) {
Buggy code:
class Shell { private final Logger logger = LoggerFactory . getLogger ( Shell . class ) ; private final Api api ; @ Inject public Shell ( final Api api ) { } public void repl ( ) { logger . trace ( "Starting<seq2seq4repair_space>REPL" ) ; IO io = new IO ( ) ; Binding binding = new Binding ( ) ; binding . setVariable ( "api" , api ) ; PShell shell = new PShell ( this . getClass ( ) . getClassLoader ( ) , binding , io ) ; <START_BUG> shell . run ( ) ; <END_BUG> } }

Fix:
shell . run ( "" ) ;
Buggy code:
public abstract class DefaultCompilerAdapter implements CompilerAdapter { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; protected Path src ; protected File destDir ; protected String encoding ; protected boolean debug = false ; protected boolean optimize = false ; protected boolean deprecation = false ; protected boolean depend = false ; protected boolean verbose = false ; protected String target ; protected Path bootclasspath ; protected Path extdirs ; protected Path compileClasspath ; protected Path compileSourcepath ; protected Project project ; protected Location location ; protected boolean includeAntRuntime ; protected boolean includeJavaRuntime ; protected String memoryInitialSize ; protected String memoryMaximumSize ; protected File [ ] compileList ; protected Javac attributes ; protected static final String lSep = StringUtils . LINE_SEP ; public void setJavac ( Javac attributes ) { } public Javac getJavac ( ) { } protected Project getProject ( ) { } protected Path getCompileClasspath ( ) { Path classpath = new Path ( project ) ; <START_BUG> if ( ( destDir ) != null ) { <END_BUG> classpath . setLocation ( destDir ) ; } Path cp = compileClasspath ; if ( cp == null ) { cp = new Path ( project ) ; } if ( includeAntRuntime ) { classpath . addExisting ( cp . concatSystemClasspath ( "last" ) ) ; } else { classpath . addExisting ( cp . concatSystemClasspath ( "ignore" ) ) ; } if ( includeJavaRuntime ) { classpath . addJavaRuntime ( ) ; } return classpath ; } protected Commandline setupJavacCommandlineSwitches ( Commandline cmd ) { } protected Commandline setupJavacCommandlineSwitches ( Commandline cmd , boolean useDebugLevel ) { } protected Commandline setupModernJavacCommandlineSwitches ( Commandline cmd ) { } protected Commandline setupModernJavacCommand ( ) { } protected Commandline setupJavacCommand ( ) { } protected Commandline setupJavacCommand ( boolean debugLevelCheck ) { } protected void logAndAddFilesToCompile ( Commandline cmd ) { } protected int executeExternalCompile ( String [ ] args , int firstFileName ) { } protected int executeExternalCompile ( String [ ] args , int firstFileName , boolean quoteFiles ) { } protected void addExtdirsToClasspath ( Path classpath ) { } protected void addCurrentCompilerArgs ( Commandline cmd ) { } protected boolean assumeJava11 ( ) { } protected boolean assumeJava12 ( ) { } protected boolean assumeJava13 ( ) { } protected boolean assumeJava14 ( ) { } protected boolean assumeJava15 ( ) { } protected boolean assumeJava16 ( ) { } protected Path getBootClassPath ( ) { } protected String getNoDebugArgument ( ) { } }

Fix:
if ( ( ( destDir ) != null ) && ( getJavac ( ) . isIncludeDestClasses ( ) ) ) {
Buggy code:
public class UploadPage extends WicketExamplePage { private static Log log = LogFactory . getLog ( UploadPage . class ) ; private File tempDir ; private final List files = new ArrayList ( ) ; private UploadPage . FileTable fileTable ; public UploadPage ( final PageParameters parameters ) { } private void refreshFiles ( ) { } private class UploadForm extends FileUploadForm { public UploadForm ( String name , IValidationFeedback validationErrorHandler , File targetDirectory ) { } protected void finishUpload ( ) { } } private class FileTable extends ListView { public FileTable ( String name , List object ) { } protected void populateItem ( ListItem listItem ) { final String fileName = ( ( String ) ( listItem . getModelObject ( ) ) ) ; listItem . add ( new Label ( "file" , fileName ) ) ; listItem . add ( new Link ( "delete" ) { <START_BUG> public void onLinkClicked ( ) { <END_BUG> File toDelete = new File ( tempDir , fileName ) ; UploadPage . log . info ( ( "delete<seq2seq4repair_space>" + toDelete ) ) ; toDelete . delete ( ) ; try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { } refreshFiles ( ) ; } } ) ; } } }

Fix:
public void onClick ( ) {
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 320 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 322 , LocalizedFormats . values ( ) . length ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class JaxrsMultipartProviderTestCase { @ Deployment public static Archive < ? > deploy ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "jaxrsnoap.war" ) ; war . addPackage ( HttpRequest . class . getPackage ( ) ) ; war . addPackage ( JaxrsMultipartProviderTestCase . class . getPackage ( ) ) ; <START_BUG> war . addAsWebResource ( WebXml . get ( ( "<servlet-mapping>\n" + ( ( ( "<seq2seq4repair_space><servlet-name>javax.ws.rs.core.Application<//servlet-name>\n" + "<seq2seq4repair_space><url-pattern>//myjaxrs//*<//url-pattern>\n" ) + "<seq2seq4repair_space><//servlet-mapping>\n" ) + "\n" ) ) ) , "web.xml" ) ; <END_BUG> return war ; } private static String performCall ( String urlPattern ) throws Exception { } @ Test public void testJaxRsWithNoApplication ( ) throws Exception { } }

Fix:
war . addAsWebInfResource ( WebXml . get ( ( "<servlet-mapping>\n" + ( ( ( "<seq2seq4repair_space><servlet-name>javax.ws.rs.core.Application<//servlet-name>\n" + "<seq2seq4repair_space><url-pattern>//myjaxrs//*<//url-pattern>\n" ) + "<seq2seq4repair_space><//servlet-mapping>\n" ) + "\n" ) ) ) , "web.xml" ) ;
Buggy code:
@ Singleton public class HistoryPresenter implements HistoryPanel , RunnerWidget . ActionDelegate { private final HistoryView view ; private final WidgetFactory widgetFactory ; private final Map < Runner , RunnerWidget > runnerWidgets ; private final SelectionManager selectionManager ; private final ConsoleContainer consolePresenter ; @ Inject public HistoryPresenter ( HistoryView view , WidgetFactory widgetFactory , SelectionManager selectionManager , ConsoleContainer consolePresenter ) { } @ Override public void addRunner ( @ Nonnull Runner runner ) { } @ Override public void update ( @ Nonnull Runner runner ) { } @ Override public void selectRunner ( @ Nonnull Runner runner ) { } @ Override public void clear ( ) { } @ Nonnull @ Override public IsWidget getView ( ) { } @ Override public void setVisible ( boolean visible ) { } @ Override public void go ( @ Nonnull AcceptsOneWidget container ) { } @ Override public void onRunnerCleanBtnClicked ( @ Nonnull Runner runner ) { RunnerWidget widget = runnerWidgets . get ( runner ) ; view . removeRunner ( widget ) ; runnerWidgets . remove ( runner ) ; <START_BUG> consolePresenter . deleteSelectedConsole ( ) ; <END_BUG> if ( runner . equals ( selectionManager . getRunner ( ) ) ) { selectFirst ( ) ; } } private void selectFirst ( ) { } No newline ; at end ; of file ; }

Fix:
consolePresenter . deleteConsoleByRunner ( runner ) ;
Buggy code:
public class ListMultipleChoice extends AbstractChoice { public ListMultipleChoice ( final String id ) { } public ListMultipleChoice ( final String id , final Collection choices ) { } public ListMultipleChoice ( final String id , final IChoiceList choices ) { } public ListMultipleChoice ( final String id , IModel object , final Collection choices ) { } public ListMultipleChoice ( final String id , IModel object , final IChoiceList choices ) { } public final String getModelValue ( ) { } public final void setModelValue ( final String value ) { Collection selectedValues = ( ( Collection ) ( getModelObject ( ) ) ) ; if ( selectedValues == null ) { selectedValues = new ArrayList ( ) ; setModelObject ( selectedValues ) ; } else { selectedValues . clear ( ) ; } final IChoiceList choices = getChoices ( ) ; for ( final StringTokenizer tokenizer = new StringTokenizer ( value , ";" ) ; tokenizer . hasMoreTokens ( ) ; ) { <START_BUG> selectedValues . add ( choices . choiceForId ( tokenizer . nextToken ( ) ) ) ; <END_BUG> } } protected final boolean isSelected ( IChoice choice ) { } protected final void onComponentTag ( final ComponentTag tag ) { } protected final void updateModel ( ) { } }

Fix:
selectedValues . add ( choices . choiceForId ( tokenizer . nextToken ( ) ) . getObject ( ) ) ;
Buggy code:
public class MyRoomFragment extends Fragment { private static final String TAG = MyRoomFragment . class . getSimpleName ( ) ; private ArrayList < CustomBitmap > arrayList ; private ArrayList < CustomListItem > horizontalListItems ; private ArrayList < CustomListItem > chosenItems ; private CanvasView customCanvas ; private TwoWayView twoWayView ; public static MyRoomFragment newInstance ( ) { } public static MyRoomFragment newInstance ( Bundle args ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onResume ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , @ Nullable ViewGroup container , @ Nullable Bundle savedInstanceState ) { Log . d ( MyRoomFragment . TAG , "onCreateView()" ) ; View rootView = inflater . inflate ( fragment_my_room , container , false ) ; customCanvas = ( ( CanvasView ) ( rootView . findViewById ( cv_room_canvas ) ) ) ; <START_BUG> customCanvas . setBackgroundResource ( floor ) ; <END_BUG> chosenItems = new ArrayList ( ) ; horizontalListItems = new ArrayList ( ) ; twoWayView = ( ( TwoWayView ) ( rootView . findViewById ( twv_furniture ) ) ) ; Bundle bundle = getArguments ( ) ; if ( savedInstanceState != null ) { arrayList = savedInstanceState . getParcelableArrayList ( "savedBitmaps" ) ; if ( ( getActivity ( ) . getResources ( ) . getConfiguration ( ) . orientation ) == ( Configuration . ORIENTATION_LANDSCAPE ) ) { } customCanvas . setAddedBitmaps ( arrayList ) ; chosenItems = savedInstanceState . getParcelableArrayList ( "chosenItems" ) ; horizontalListItems = savedInstanceState . getParcelableArrayList ( "horizontalListItems" ) ; Log . d ( MyRoomFragment . TAG , "got<seq2seq4repair_space>items<seq2seq4repair_space>from<seq2seq4repair_space>savedInstanceState" ) ; Log . d ( MyRoomFragment . TAG , ( "horizontalListItems.size()<seq2seq4repair_space>" + ( horizontalListItems . size ( ) ) ) ) ; if ( bundle != null ) { horizontalListItems = bundle . getParcelableArrayList ( "horizontalListItems" ) ; Log . d ( MyRoomFragment . TAG , "GOT<seq2seq4repair_space>items<seq2seq4repair_space>from<seq2seq4repair_space>bundle,<seq2seq4repair_space>overriding<seq2seq4repair_space>savedState" ) ; Log . d ( MyRoomFragment . TAG , ( "horizontalListItems.size()<seq2seq4repair_space>from<seq2seq4repair_space>bundle:<seq2seq4repair_space>" + ( horizontalListItems . size ( ) ) ) ) ; } } else { if ( bundle != null ) { horizontalListItems = bundle . getParcelableArrayList ( "horizontalListItems" ) ; Log . d ( MyRoomFragment . TAG , "GOT<seq2seq4repair_space>items<seq2seq4repair_space>from<seq2seq4repair_space>bundle" ) ; Log . d ( MyRoomFragment . TAG , ( "horizontalListItems.size()<seq2seq4repair_space>from<seq2seq4repair_space>bundle:<seq2seq4repair_space>" + ( horizontalListItems . size ( ) ) ) ) ; } } return rootView ; } private void recalculateCoordinates ( int oldw , int oldh , ArrayList < CustomBitmap > arrayList ) { } }

Fix:
customCanvas . setBackgroundResource ( room ) ;
Buggy code:
public class CheckDebugAttributes extends Task { private String file ; private String property ; public void execute ( ) throws BuildException { if ( ( this . file ) == null ) { throw new BuildException ( AntAdapterMessages . getString ( "checkDebugAttributes.file.argument.cannot.be.null" ) ) ; } if ( ( this . property ) == null ) { throw new BuildException ( AntAdapterMessages . getString ( "checkDebugAttributes.property.argument.cannot.be.null" ) ) ; } try { boolean hasDebugAttributes = false ; if ( Util . isArchiveFileName ( this . file ) ) { ZipFile jarFile = new ZipFile ( this . file ) ; for ( Enumeration entries = jarFile . entries ( ) ; ( ! hasDebugAttributes ) && ( entries . hasMoreElements ( ) ) ; ) { ZipEntry entry = ( ( ZipEntry ) ( entries . nextElement ( ) ) ) ; if ( Util . isClassFileName ( entry . getName ( ) ) ) { IClassFileReader classFileReader = ToolFactory . createDefaultClassFileReader ( this . file , entry . getName ( ) , IClassFileReader . ALL ) ; hasDebugAttributes = checkClassFile ( classFileReader ) ; } } } else if ( Util . isClassFileName ( this . file ) ) { IClassFileReader classFileReader = ToolFactory . createDefaultClassFileReader ( this . file , IClassFileReader . ALL ) ; hasDebugAttributes = checkClassFile ( classFileReader ) ; } else { throw new BuildException ( AntAdapterMessages . getString ( "checkDebugAttributes.file.argument.must.be.a.classfile.or.a.jarfile" ) ) ; } if ( hasDebugAttributes ) { <START_BUG> this . project . setUserProperty ( this . property , "has<seq2seq4repair_space>debug" ) ; <END_BUG> } } catch ( IOException e ) { throw new BuildException ( ( ( AntAdapterMessages . getString ( "checkDebugAttributes.ioexception.occured" ) ) + ( this . file ) ) ) ; } } private boolean checkClassFile ( IClassFileReader classFileReader ) { } public void setFile ( String value ) { } public void setProperty ( String value ) { } }

Fix:
getProject ( ) . setUserProperty ( this . property , "has<seq2seq4repair_space>debug" ) ;
Buggy code:
public class Ballistica { public ArrayList < Integer > path = new ArrayList < > ( ) ; public Integer sourcePos = null ; public Integer collisionPos = null ; public Integer dist = 0 ; public static final int STOP_TARGET = 1 ; public static final int STOP_CHARS = 2 ; public static final int STOP_TERRAIN = 4 ; public static final int PROJECTILE = ( ( Ballistica . STOP_TARGET ) | ( Ballistica . STOP_CHARS ) ) | ( Ballistica . STOP_TERRAIN ) ; public static final int THROWN_ITEM = ( Ballistica . STOP_TARGET ) | ( Ballistica . STOP_TERRAIN ) ; public static final int MAGIC_BOLT = ( Ballistica . STOP_CHARS ) | ( Ballistica . STOP_TERRAIN ) ; public static final int WONT_STOP = 0 ; public Ballistica ( int from , int to , int params ) { } private void build ( int from , int to , boolean stopTarget , boolean stopChars , boolean stopTerrain ) { } private void collide ( int cell ) { } public List < Integer > subPath ( int start , int end ) { try { <START_BUG> end = Math . max ( end , ( ( path . size ( ) ) - 1 ) ) ; <END_BUG> return path . subList ( start , ( end + 1 ) ) ; } catch ( Exception e ) { return new ArrayList < > ( ) ; } } }

Fix:
end = Math . min ( end , ( ( path . size ( ) ) - 1 ) ) ;
Buggy code:
@ Service ( "VariantService" ) public class VariantServiceImpl implements VariantService { @ Autowired private VariantRepository variantRepository ; @ Override public Variant addVariant ( Variant variant ) { } @ Override public void delete ( Long id ) { } @ Override public Variant getById ( Long id ) { <START_BUG> return variantRepository . getOne ( id ) ; <END_BUG> } @ Override public Variant editVariant ( Variant variant ) { } @ Override public List < Variant > getAll ( ) { } @ Override public List < Variant > findByIdQuestion ( Long id ) { } }

Fix:
return variantRepository . findOne ( id ) ;
Buggy code:
public class BindingRemoveHandler extends SocketBindingRemoveHandler { public static final BindingRemoveHandler INSTANCE = new BindingRemoveHandler ( ) ; private BindingRemoveHandler ( ) { } @ Override protected boolean requiresRuntime ( OperationContext context ) { } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) { } protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; String name = address . getLastElement ( ) . getValue ( ) ; ServiceName svcName = JBOSS_BINDING_NAME . append ( name ) ; ServiceRegistry registry = context . getServiceRegistry ( true ) ; ServiceController < ? > controller = registry . getService ( svcName ) ; if ( controller != null ) { context . revertReloadRequired ( ) ; } else { try { <START_BUG> BindingAddHandler . installBindingService ( context , model , name ) ; <END_BUG> } catch ( UnknownHostException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . toString ( ) ) ) ; } } } }

Fix:
BindingAddHandler . installBindingService ( context , model , name , null ) ;
Buggy code:
public class LoginActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void signUp ( View view ) { } public void submit ( View view ) { Button signUp = ( ( Button ) ( findViewById ( btn_sign ) ) ) ; EditText username = ( ( EditText ) ( findViewById ( txt_user_name ) ) ) ; EditText password = ( ( EditText ) ( findViewById ( txt_password ) ) ) ; String user = username . getText ( ) . toString ( ) ; String pass = password . getText ( ) . toString ( ) ; Bundle userParams = new Bundle ( ) ; if ( signUp . getText ( ) . toString ( ) . equals ( getResources ( ) . getString ( sign_up ) ) ) { if ( ! ( user . equals ( "" ) ) ) { if ( ! ( pass . equals ( "" ) ) ) { Employee employee = new Manager ( user , pass , 1 ) ; TaskDAO . getInstance ( this ) . addTeamMember ( employee ) ; Intent intent = new Intent ( this , TeamActivity . class ) ; userParams . putString ( "userName" , employee . getUserName ( ) ) ; userParams . putBoolean ( "isManager" , true ) ; intent . putExtras ( userParams ) ; startActivity ( intent ) ; } else { Toast . makeText ( this , "Please<seq2seq4repair_space>enter<seq2seq4repair_space>password" , LENGTH_SHORT ) . show ( ) ; } } else { Toast . makeText ( this , "Please<seq2seq4repair_space>enter<seq2seq4repair_space>user<seq2seq4repair_space>name" , LENGTH_SHORT ) . show ( ) ; } } else { if ( ! ( user . equals ( "" ) ) ) { if ( ! ( pass . equals ( "" ) ) ) { Employee member = TaskDAO . getInstance ( this ) . getTeamMember ( user ) ; if ( member != null ) { if ( pass . equals ( member . getPassword ( ) ) ) { if ( ( member . getIsManager ( ) ) == 1 ) { <START_BUG> if ( TaskDAO . getInstance ( this ) . hasMembers ( member . getName ( ) ) ) { <END_BUG> Intent intent = new Intent ( this , TasksActivity . class ) ; userParams . putString ( "userName" , member . getUserName ( ) ) ; userParams . putBoolean ( "isManager" , true ) ; intent . putExtras ( userParams ) ; startActivity ( intent ) ; } else { Intent intent = new Intent ( this , TeamActivity . class ) ; userParams . putString ( "userName" , member . getUserName ( ) ) ; userParams . putBoolean ( "isManager" , true ) ; intent . putExtras ( userParams ) ; startActivity ( intent ) ; } } else { Intent intent = new Intent ( this , TasksActivity . class ) ; userParams . putString ( "userName" , member . getUserName ( ) ) ; userParams . putBoolean ( "isManager" , false ) ; intent . putExtras ( userParams ) ; startActivity ( intent ) ; } } else { Toast . makeText ( this , "Wrong<seq2seq4repair_space>password" , LENGTH_SHORT ) . show ( ) ; } } else { Toast . makeText ( this , "User<seq2seq4repair_space>not<seq2seq4repair_space>found" , LENGTH_SHORT ) . show ( ) ; } } else { Toast . makeText ( this , "Please<seq2seq4repair_space>enter<seq2seq4repair_space>password" , LENGTH_SHORT ) . show ( ) ; } } else { Toast . makeText ( this , "Please<seq2seq4repair_space>enter<seq2seq4repair_space>user<seq2seq4repair_space>name" , LENGTH_SHORT ) . show ( ) ; } } } }

Fix:
if ( TaskDAO . getInstance ( this ) . hasMembers ( member . getUserName ( ) ) ) {
Buggy code:
public class IdentityProcessor extends AbstractSampleProcessor { private final AtomicLong m_processed ; private volatile SampleQueue m_queue ; private volatile DataStore m_store ; public IdentityProcessor ( ) { } @ Override public void processSamples ( ) { } @ Override protected double calculateThroughput ( long time ) { <START_BUG> return ( 1000 * ( m_processed . get ( ) ) ) // time ; <END_BUG> } }

Fix:
return time == 0 ? 0 : ( 1000 * ( m_processed . get ( ) ) ) // time ;
Buggy code:
public class ModelManagerImp implements ModelManager { private final Table table ; private final PlayerManager playerManager ; private final DeckManager deckManager ; public ModelManagerImp ( ) { } public void addCommunityCard ( ) { } public void addPlayer ( Player player ) { } public int getBigBlind ( ) { } public List < Card > getCommunityCards ( ) { } public Deck getDeck ( ) { } public List < Card > getHoleCards ( Player player ) { } public List < Player > getPlayerList ( ) { } public int getPot ( ) { } public int getSmallBlind ( ) { } public String getTableString ( ) { } public boolean hasMoney ( Player player ) { } public void resetGame ( ) { deckManager . createShuffledDeck ( ) ; table . clearCommunityCards ( ) ; for ( Player p : playerManager . getPlayerList ( ) ) { p . clearHoleCards ( ) ; } <START_BUG> table . setPot ( 0 ) ; <END_BUG> } public void setHoleCards ( Player player ) { } public void setPlayerMoney ( Player player , int money ) { } public void setPot ( int potValue ) { } public void setSmallBlind ( int smallBlind ) { } public Player getNextPlayer ( Player player ) { } public void setDealer ( Player dealer ) { } public Player getDealer ( ) { } }

Fix:
table . clearPot ( ) ;
Buggy code:
public class Move { int row ; int col ; int PrevScore ; int CurrScore ; int player ; List < String > BoardChanges ; public TreeMap < Move . Direction , Integer > flips ; public static enum Direction { N ( 0 ) , NE ( 1 ) , E ( 2 ) , SE ( 3 ) , S ( 4 ) , SW ( 5 ) , W ( 6 ) , NW ( 7 ) ; public int dir ; Direction ( int n ) { } public static Move . Direction getDir ( int i ) { } } public Move ( int p , int r , int c ) { } public void addFlips ( Move . Direction dir , int num ) { } public void addBoardChange ( int r , int c , int sc1 , int sc2 ) { } private void flip ( ) { } public void Execute ( ) { } public void Undo ( ) { Disk oldDisk = Board . board [ row ] [ col ] ; Board . board [ row ] [ col ] = null ; if ( ( player ) == 1 ) { blackDisks . remove ( oldDisk ) ; } else { <START_BUG> blackDisks . remove ( oldDisk ) ; <END_BUG> } flip ( ) ; } public int getConvertedRow ( ) { } public int getConvertedCol ( ) { } public void printMove ( ) { } public int getFlipScore ( ) { } public boolean equals ( Object o ) { } public String toString ( ) { } }

Fix:
whiteDisks . remove ( oldDisk ) ;
Buggy code:
public class ProfileManager { private static String profileFileNameSuffix = "-comm-aid.txt" ; private static String profileNameStr = "name" ; private static String profileInputTypeStr = "inputType" ; private static String profileExperienceLevelStr = "expLevel" ; private String startDir = "" ; class ProfileFileFilter implements FileFilter { public boolean accept ( File file ) { } } private Profile currentProfile = null ; private ArrayList < Profile > profiles = new ArrayList < Profile > ( ) ; public ProfileManager ( ) throws IOException { } public ProfileManager ( String path ) throws IOException { } private void readProfiles ( ) throws IOException { } public void processProfileFile ( File file ) throws IOException { } private String getFileName ( Profile profile ) { } public void createProfile ( String name , String inputType , String expLevel ) throws IOException { } public void createAndSetProfile ( String name , String inputType , String expLevel ) throws IOException { } private void writeProfile ( Profile profile ) throws IOException { <START_BUG> File file = new File ( ( ( startDir ) + ( getFileName ( profile ) ) ) ) ; <END_BUG> if ( file . exists ( ) ) { boolean result = file . delete ( ) ; if ( ! result ) { } } file . createNewFile ( ) ; FileWriter fw = new FileWriter ( file ) ; BufferedWriter bw = new BufferedWriter ( fw ) ; bw . write ( ( ( ( ( ProfileManager . profileNameStr ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( profile . getName ( ) ) ) + ( Utils . getLineEnding ( ) ) ) ) ; bw . write ( ( ( ( ( ProfileManager . profileInputTypeStr ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( profile . getInputType ( ) . toString ( ) ) ) + ( Utils . getLineEnding ( ) ) ) ) ; bw . write ( ( ( ( ProfileManager . profileExperienceLevelStr ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( profile . getLevel ( ) . toString ( ) ) ) ) ; bw . close ( ) ; fw . close ( ) ; } private void exportProfiles ( ) throws IOException { } public void clearCurrentProfile ( ) throws IOException { } public Profile getCurrentProfile ( ) { } public void setCurrentProfile ( String name ) { } public void deleteProfile ( String name ) { } public void updateCurrentProfile ( String name , String inputType , String level ) throws IOException { } public ArrayList < Profile > getProfiles ( ) { } public String [ ] getProfileNames ( ) { } }

Fix:
File file = new File ( ( ( ( startDir ) + "//" ) + ( getFileName ( profile ) ) ) ) ;
Buggy code:
public final class Printer extends Device { static PrinterData [ ] printerList ; PrinterData data ; int printer ; int printJob ; int settings ; int pageSetup ; int surface ; int cairo ; boolean isGCCreated = false ; Font systemFont ; byte [ ] settingsData ; int start ; int end ; static final String GTK_LPR_BACKEND = "GtkPrintBackendLpr" ; static boolean disablePrinting = ( System . getProperty ( "org.eclipse.swt.internal.gtk.disablePrinting" ) ) != null ; public static PrinterData [ ] getPrinterList ( ) { } static int GtkPrinterFunc_List ( int printer , int user_data ) { } public static PrinterData getDefaultPrinterData ( ) { } static int GtkPrinterFunc_Default ( int printer , int user_data ) { } int gtkPrinterFromPrinterData ( ) { } int GtkPrinterFunc_FindNamedPrinter ( int printer , int user_data ) { } static PrinterData printerDataFromGtkPrinter ( int printer ) { } static void setScope ( int settings , int scope , int startPage , int endPage ) { } static DeviceData checkNull ( PrinterData data ) { } public Printer ( ) { } public Printer ( PrinterData data ) { } int restoreInt ( String key ) { } double restoreDouble ( String key ) { } boolean restoreBoolean ( String key ) { } byte [ ] restoreBytes ( String key , boolean nullTerminate ) { } public Font getSystemFont ( ) { } public int internal_new_GC ( GCData data ) { int drawable = OS . gdk_pixmap_new ( OS . GDK_ROOT_PARENT ( ) , 1 , 1 , 1 ) ; int gdkGC = OS . gdk_gc_new ( drawable ) ; if ( gdkGC == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; if ( data != null ) { if ( isGCCreated ) SWT . error ( ERROR_INVALID_ARGUMENT ) ; int mask = ( SWT . LEFT_TO_RIGHT ) | ( SWT . RIGHT_TO_LEFT ) ; if ( ( ( data . style ) & mask ) == 0 ) { data . style |= SWT . LEFT_TO_RIGHT ; } data . device = this ; data . drawable = drawable ; data . background = getSystemColor ( COLOR_WHITE ) . handle ; data . foreground = getSystemColor ( COLOR_BLACK ) . handle ; <START_BUG> data . font = getSystemFont ( ) . handle ; <END_BUG> if ( ( cairo ) == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; data . cairo = cairo ; isGCCreated = true ; } return gdkGC ; } public void internal_dispose_GC ( int gdkGC , GCData data ) { } protected void release ( ) { } public boolean startJob ( String jobName ) { } protected void destroy ( ) { } public void endJob ( ) { } public void cancelJob ( ) { } public boolean startPage ( ) { } public void endPage ( ) { } public Point getDPI ( ) { } public Rectangle getBounds ( ) { } public Rectangle getClientArea ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } protected void create ( DeviceData deviceData ) { } protected void init ( ) { } public PrinterData getPrinterData ( ) { } }

Fix:
data . font = getSystemFont ( ) ;
Buggy code:
public class WaitForAckFromClientTask implements IPieTask { private IUdpMessage msgToSend ; private UdpAddress udpAddress ; private boolean ackArrived = false ; private ILoopHoleService loopHoleService ; public void setUdpAddress ( UdpAddress udpAddress ) { } public void setLoopHoleService ( ILoopHoleService loopHoleService ) { } public IUdpMessage getMmsgToSend ( ) { } public void setMmsgToSend ( IUdpMessage msgToSend ) { } @ Override public void run ( ) { try { PieLogger . info ( this . getClass ( ) , String . format ( "WaitForAck.<seq2seq4repair_space>ID:<seq2seq4repair_space>%s" , msgToSend . getSenderID ( ) ) ) ; <START_BUG> Thread . sleep ( 10000 ) ; <END_BUG> } catch ( InterruptedException ex ) { PieLogger . debug ( this . getClass ( ) , "Error<seq2seq4repair_space>while<seq2seq4repair_space>thread<seq2seq4repair_space>sleep." , ex ) ; } if ( ! ( ackArrived ) ) { loopHoleService . send ( msgToSend , udpAddress ) ; } } public void ackArrived ( ) { } }

Fix:
Thread . sleep ( 20000 ) ;
Buggy code:
public class WorkingCopy extends CompilationUnit { protected IBufferFactory bufferFactory ; protected IProblemRequestor problemRequestor ; protected int useCount = 1 ; protected WorkingCopy ( IPackageFragment parent , String name , IBufferFactory bufferFactory ) { } protected WorkingCopy ( IPackageFragment parent , String name , IBufferFactory bufferFactory , IProblemRequestor problemRequestor ) { } public void commit ( boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } public void destroy ( ) { } public boolean exists ( ) { } public IBufferFactory getBufferFactory ( ) { } public boolean equals ( Object o ) { } public IJavaElement getOriginal ( IJavaElement workingCopyElement ) { } public IJavaElement getOriginalElement ( ) { } protected IType getOriginalType ( ArrayList hierarchy ) { } public IProblemRequestor getProblemRequestor ( ) { } public IResource getResource ( ) { } public IJavaElement getSharedWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory , IProblemRequestor problemRequestor ) throws JavaModelException { } public IResource getUnderlyingResource ( ) throws JavaModelException { } public IJavaElement getWorkingCopy ( ) throws JavaModelException { } public IJavaElement getWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory , IProblemRequestor problemRequestor ) throws JavaModelException { } public boolean isBasedOn ( IResource resource ) { } public boolean isWorkingCopy ( ) { } public void open ( IProgressMonitor pm ) throws JavaModelException { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { } public IMarker [ ] reconcile ( ) throws JavaModelException { } public void reconcile ( boolean forceProblemDetection , IProgressMonitor monitor ) throws JavaModelException { } public void restore ( ) throws JavaModelException { } public IJavaElement rootedAt ( IJavaProject project ) { } public void save ( IProgressMonitor pm , boolean force ) throws JavaModelException { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } protected void updateTimeStamp ( CompilationUnit original ) throws JavaModelException { <START_BUG> long timeStamp = ( ( IFile ) ( original . getUnderlyingResource ( ) ) ) . getModificationStamp ( ) ; <END_BUG> if ( timeStamp == ( IResource . NULL_STAMP ) ) { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . INVALID_RESOURCE ) ) ; } ( ( CompilationUnitElementInfo ) ( getElementInfo ( ) ) ) . fTimestamp = timeStamp ; } }

Fix:
long timeStamp = ( ( IFile ) ( original . getResource ( ) ) ) . getModificationStamp ( ) ;
Buggy code:
public class ConfigParser { ConfigParser . Location location ; protected File relativeDirectory = null ; protected List files = new LinkedList ( ) ; private boolean fileParsed = false ; protected static String CONFIG_MSG = "build<seq2seq4repair_space>config<seq2seq4repair_space>error:<seq2seq4repair_space>" ; public List getFiles ( ) { } public void parseCommandLine ( String [ ] argsArray ) throws ConfigParser . ParseException { } public void parseConfigFile ( File configFile ) throws ConfigParser . ParseException { } private void parseConfigFileHelper ( File configFile ) { } File getCurrentDir ( ) { } String stripSingleLineComment ( String s , String commentString ) { } String stripWhitespaceAndComments ( String s ) { } protected void addFile ( File sourceFile ) { } void addFileOrPattern ( File sourceFile ) { } void addFiles ( File dir , FileFilter filter ) { } protected void parseOption ( String arg , LinkedList args ) { } protected void showWarning ( String message ) { } protected void showError ( String message ) { } void parseArgs ( LinkedList args ) { } protected ConfigParser . Arg removeArg ( LinkedList args ) { } protected String removeStringArg ( LinkedList args ) { } boolean isSourceFileName ( String s ) { } void parseOneArg ( LinkedList args ) { } protected void parseImportedConfigFile ( String relativeFilePath ) { } public File makeFile ( String name ) { } private File makeFile ( File dir , String name ) { name = name . replace ( '//' , File . separatorChar ) ; File ret = new File ( name ) ; <START_BUG> if ( ( dir != null ) && ( ! ( ret . isAbsolute ( ) ) ) ) { <END_BUG> ret = new File ( dir , name ) ; } try { ret = ret . getCanonicalFile ( ) ; } catch ( IOException ioEx ) { } return ret ; } protected static class Arg { private ConfigParser . Location location ; private String value ; public Arg ( String value , ConfigParser . Location location ) { } public void setValue ( String value ) { } public void setLocation ( ConfigParser . Location location ) { } public String getValue ( ) { } public ConfigParser . Location getLocation ( ) { } } abstract static class Location { public abstract File getFile ( ) { } public abstract File getDirectory ( ) { } public abstract int getLine ( ) { } public abstract String toString ( ) { } } static class SourceLocation extends ConfigParser . Location { private int line ; private File file ; public SourceLocation ( File file , int line ) { } public File getFile ( ) { } public File getDirectory ( ) { } public int getLine ( ) { } public String toString ( ) { } } static class CommandLineLocation extends ConfigParser . Location { public File getFile ( ) { } public File getDirectory ( ) { } public int getLine ( ) { } public String toString ( ) { } } public static class ParseException extends RuntimeException { private ConfigParser . Location location ; public ParseException ( String message , ConfigParser . Location location ) { } public int getLine ( ) { } public File getFile ( ) { } } }

Fix:
if ( ( ( ! ( ret . exists ( ) ) ) && ( dir != null ) ) && ( ! ( ret . isAbsolute ( ) ) ) ) {
Buggy code:
public class SavePropertyDialog extends JDialog implements ActionListener { protected static transient Logger log = LoggingManager . getLoggerForClass ( ) ; static Map functors = new HashMap ( ) ; static final long serialVersionUID = 1 ; SampleSaveConfiguration saveConfig ; public SavePropertyDialog ( Frame owner , String title , boolean modal , SampleSaveConfiguration s ) { } private int countMethods ( Method [ ] m ) { } protected void dialogInit ( ) { if ( ( saveConfig ) != null ) { super . dialogInit ( ) ; this . getContentPane ( ) . setLayout ( new BorderLayout ( ) ) ; Method [ ] methods = SampleSaveConfiguration . class . getMethods ( ) ; int x = ( ( countMethods ( methods ) ) // 3 ) + 1 ; SavePropertyDialog . log . info ( ( ( ( "grid<seq2seq4repair_space>panel<seq2seq4repair_space>is<seq2seq4repair_space>" + 3 ) + "<seq2seq4repair_space>by<seq2seq4repair_space>" ) + x ) ) ; JPanel checkPanel = new JPanel ( new GridLayout ( x , 3 ) ) ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) { String name = methods [ i ] . getName ( ) ; <START_BUG> if ( name . startsWith ( "save" ) ) { <END_BUG> try { name = name . substring ( 4 ) ; JCheckBox check = new JCheckBox ( JMeterUtils . getResString ( ( "save<seq2seq4repair_space>" + name ) ) , ( ( Boolean ) ( methods [ i ] . invoke ( saveConfig , new Object [ 0 ] ) ) ) . booleanValue ( ) ) ; checkPanel . add ( check , BorderLayout . NORTH ) ; check . addActionListener ( this ) ; check . setActionCommand ( ( "set" + name ) ) ; if ( ! ( SavePropertyDialog . functors . containsKey ( check . getActionCommand ( ) ) ) ) { SavePropertyDialog . functors . put ( check . getActionCommand ( ) , new Functor ( check . getActionCommand ( ) ) ) ; } } catch ( Exception e ) { SavePropertyDialog . log . warn ( "Problem<seq2seq4repair_space>creating<seq2seq4repair_space>save<seq2seq4repair_space>config<seq2seq4repair_space>dialog" , e ) ; } } } getContentPane ( ) . add ( checkPanel , BorderLayout . NORTH ) ; JButton exit = new JButton ( JMeterUtils . getResString ( "done" ) ) ; this . getContentPane ( ) . add ( exit , BorderLayout . SOUTH ) ; exit . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { dispose ( ) ; } } ) ; } } public void actionPerformed ( ActionEvent e ) { } public SampleSaveConfiguration getSaveConfig ( ) { } public void setSaveConfig ( SampleSaveConfiguration saveConfig ) { } }

Fix:
if ( ( name . startsWith ( "save" ) ) && ( ( methods [ i ] . getParameterTypes ( ) . length ) == 0 ) ) {
Buggy code:
public class GradeShapeGroup { private ArrayList < Node > grades ; public GradeShapeGroup ( ) { } public void add ( GradeShape grade ) { } public Collection < Node > get ( ) { } private double getStartingLocation ( Grade grade ) { <START_BUG> return ( ( ( ( Histogram . NUM_TICKS ) - ( grade . value ( ) ) ) * ( Histogram . BAR_WIDTH ) ) + ( Histogram . TOP_BUFFER ) ) - ( ( Histogram . BAR_WIDTH ) // 2 ) ; <END_BUG> } }

Fix:
return ( ( ( ( ( Histogram . NUM_TICKS ) - ( grade . value ( ) ) ) * ( Histogram . BAR_WIDTH ) ) + ( Histogram . TOP_BUFFER ) ) - ( ( Histogram . BAR_WIDTH ) // 2 ) ) - ( 2 * ( Histogram . BAR_WIDTH ) ) ;
Buggy code:
public class TestCapitalizationFilter extends BaseTokenStreamTestCase { public void testCapitalization ( ) throws Exception { } static void assertCapitalizesTo ( Tokenizer tokenizer , String [ ] expected , boolean onlyFirstWord , CharArraySet keep , boolean forceFirstLetter , Collection < char [ ] > okPrefix , int minWordLength , int maxWordCount , int maxTokenLength ) throws IOException { } static void assertCapitalizesTo ( String input , String [ ] expected , boolean onlyFirstWord , CharArraySet keep , boolean forceFirstLetter , Collection < char [ ] > okPrefix , int minWordLength , int maxWordCount , int maxTokenLength ) throws IOException { } static void assertCapitalizesToKeyword ( String input , String expected , boolean onlyFirstWord , CharArraySet keep , boolean forceFirstLetter , Collection < char [ ] > okPrefix , int minWordLength , int maxWordCount , int maxTokenLength ) throws IOException { } public void testRandomString ( ) throws Exception { Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; return new TokenStreamComponents ( tokenizer , new CapitalizationFilter . CapitalizationFilter ( tokenizer ) ) ; } } ; <START_BUG> checkRandomData ( random ( ) , a , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , a , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;