nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Link extends Control { NSScrollView scrollView ; String text ; Point [ ] offsets ; Point selection ; String [ ] ids ; int [ ] mnemonics ; public Link ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } boolean textView_clickOnLink_atIndex ( int id , int sel , int textView , int link , int charIndex ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createWidget ( ) { } NSFont defaultNSFont ( ) { } void deregister ( ) { } void enableWidget ( boolean enabled ) { } String getNameText ( ) { } public String getText ( ) { } void register ( ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } String parse ( String string ) { } int parseMnemonics ( char [ ] buffer , int start , int end , StringBuffer result ) { } void setBackground ( float [ ] color ) { } void setFont ( NSFont font ) { } void setForeground ( float [ ] color ) { NSColor nsColor ; if ( color == null ) { <START_BUG> return ; <END_BUG> } else { nsColor = NSColor . colorWithDeviceRed ( color [ 0 ] , color [ 1 ] , color [ 2 ] , 1 ) ; } ( ( NSTextView ) ( view ) ) . setTextColor ( nsColor ) ; } public void setText ( String string ) { } void setZOrder ( ) { } NSView topView ( ) { } void updateCursorRects ( boolean enabled ) { } }

Fix:
nsColor = NSColor . textColor ( ) ;
Buggy code:
public class Component { protected Internals internals ; public ArrayList < Include > includes ( ) { } public void open ( JBActor . Internals internals , ResponseProcessor rp ) throws Exception { } public void close ( ) throws Exception { } protected final ConcurrentSkipListMap < String , Object > getData ( ) { } protected final boolean hasDataItem ( String name ) { } protected final boolean parentHasDataItem ( String name ) { } protected final boolean parentHasSameComponent ( ) { } protected final void bind ( String requestClassName , Binding binding ) { } protected final void send ( final Actor actor , final Object request , final ResponseProcessor rp ) throws Exception { internals . send ( actor , request , rp ) ; } protected final MailboxFactory getMailboxFactory ( ) { } protected final ExceptionHandler getExceptionHandler ( ) { } protected final void setExceptionHandler ( final ExceptionHandler exceptionHandler ) { } public final class SMBuilder extends _SMBuilder { @ Override public final void send ( Actor actor , Object request , ResponseProcessor rp ) throws Exception { <START_BUG> send ( actor , request , rp ) ; <END_BUG> } } protected final Actor getParent ( ) { } protected final JBActor getActor ( ) { } protected final Mailbox getMailbox ( ) { } }

Fix:
internals . send ( actor , request , rp ) ;
Buggy code:
public class CompressionInputStream extends InputStream { private final InputStream in ; private final Inflater inflater ; private byte [ ] compressedBuffer ; private byte [ ] buffer ; private int bufferIndex ; private boolean eos = false ; private boolean allDataRead = false ; private final byte [ ] fourByteBuffer = new byte [ 4 ] ; public CompressionInputStream ( final InputStream in ) { } private String toHex ( final byte [ ] array ) { } protected void readChunkHeader ( ) throws IOException { } private int toInt ( final byte [ ] data ) { } protected void bufferAndDecompress ( ) throws IOException { } private void fillBuffer ( final byte [ ] buffer ) throws IOException { } private boolean isBufferEmpty ( ) { } @ Override public int read ( ) throws IOException { if ( eos ) { return - 1 ; } if ( isBufferEmpty ( ) ) { bufferAndDecompress ( ) ; } if ( isBufferEmpty ( ) ) { eos = true ; return - 1 ; } <START_BUG> return buffer [ ( ( bufferIndex ) ++ ) ] ; <END_BUG> } @ Override public int read ( final byte [ ] b ) throws IOException { } @ Override public int read ( final byte [ ] b , final int off , final int len ) throws IOException { } @ Override public void close ( ) throws IOException { } }

Fix:
return ( buffer [ ( ( bufferIndex ) ++ ) ] ) & 255 ;
Buggy code:
public class TutorialFragment extends Fragment { public static final int TUTORIAL_PAGES = 4 ; private static final int TUTORIAL_REGISTER = 0 ; private static final int TUTORIAL_REGISTER_PAIR = 1 ; private static final int TUTORIAL_LOG_IN = 2 ; private static final int TUTORIAL_THOUGHT = 3 ; private static final int ANIMATION_POSITION_OFFSET = 50 ; private static final String ARG_PAGE = "arg_page" ; private View mViewTutorial ; private TextView mTextViewTutorial ; private int mTutorialPage ; private boolean mAnimationCompleted ; public static TutorialFragment newInstance ( int page ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } private void setupTutorialPageAndText ( ) { } private void setTutorialLayout ( RelativeLayout rootView ) { RelativeLayout . LayoutParams layoutParams ; rootView . removeAllViews ( ) ; if ( ( ( mTutorialPage ) % 2 ) == 0 ) { layoutParams = new RelativeLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . WRAP_CONTENT ) ; layoutParams . addRule ( ALIGN_PARENT_TOP ) ; rootView . addView ( mTextViewTutorial , layoutParams ) ; layoutParams = new RelativeLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . WRAP_CONTENT ) ; layoutParams . addRule ( BELOW , tv_tutorial ) ; rootView . addView ( mViewTutorial , layoutParams ) ; } else { Space emptySpace = new Space ( getActivity ( ) . getApplicationContext ( ) ) ; emptySpace . setId ( space_tutorial ) ; <START_BUG> layoutParams = new RelativeLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , getActivity ( ) . findViewById ( rl_splash_toolbar ) . getHeight ( ) ) ; <END_BUG> layoutParams . addRule ( ALIGN_PARENT_BOTTOM ) ; rootView . addView ( emptySpace , layoutParams ) ; layoutParams = new RelativeLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . WRAP_CONTENT ) ; layoutParams . addRule ( ABOVE , space_tutorial ) ; rootView . addView ( mTextViewTutorial , layoutParams ) ; layoutParams = new RelativeLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . WRAP_CONTENT ) ; layoutParams . addRule ( ABOVE , tv_tutorial ) ; rootView . addView ( mViewTutorial , layoutParams ) ; } } public void startAnimation ( ) { } }

Fix:
layoutParams = new RelativeLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , getActivity ( ) . findViewById ( ll_splash_toolbar ) . getHeight ( ) ) ;
Buggy code:
@ Path ( path = "//mobile//quit" ) public class QuitApi extends HandlerAdapter { private static final Logger logger = LoggerFactory . getLogger ( QuitApi . class ) ; public Object rpc ( RpcRequest req ) throws Exception { Map < Object , Object > r = new HashMap < Object , Object > ( ) ; r . put ( status , SYSERROR . toString ( ) ) ; String uId = CookieUtil . gotUserIdFromCookie ( req . getParameter ( "cookie" ) ) ; Jedis j = null ; try { j = DataHelper . getJedis ( ) ; String fId = j . hget ( "user:family" , uId ) ; if ( StringUtils . isBlank ( fId ) ) { r . put ( status , C0029 ) ; QuitApi . logger . debug ( "要退出的人:{},家庭:{}" , uId , fId ) ; return r ; } if ( StringUtils . equals ( fId , uId ) ) { QuitApi . logger . debug ( "要退出的人:{},家庭:{}" , uId , fId ) ; r . put ( status , "0020" ) ; return r ; } <START_BUG> j . hdel ( "user:fmaily" , uId ) ; <END_BUG> j . srem ( ( "family:" + fId ) , uId ) ; Set < String > members = j . smembers ( ( "family:" + fId ) ) ; for ( String m : members ) { Set < String > devices = j . smembers ( ( ( "u:" + m ) + ":devices" ) ) ; for ( String o : devices ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( o ) . append ( "|" ) . append ( uId ) . append ( "|" ) . append ( "0" ) ; j . publish ( "PubDeviceUsers" , sb . toString ( ) ) ; } } j . publish ( "PubCommonMsg:0x36" . getBytes ( ) , Utils . genMsg ( ( uId + "|" ) , 3 , Integer . parseInt ( uId ) , "" ) ) ; } catch ( Exception e ) { DataHelper . returnBrokenJedis ( j ) ; return r ; } finally { DataHelper . returnJedis ( j ) ; } r . put ( status , SUCCESS . toString ( ) ) ; return r ; } }

Fix:
j . hdel ( "user:family" , uId ) ;
Buggy code:
public class SentencePage extends WikiPage { private static final long serialVersionUID = - 1550505465878272821L ; private Sentence sentence ; public SentencePage ( Wiki wiki , Sentence sentence ) { } public boolean equals ( Object obj ) { } public String toString ( ) { <START_BUG> return sentence . getText ( "Default" ) ; <END_BUG> } }

Fix:
return sentence . getText ( getWiki ( ) . getEngine ( ) . getLanguages ( ) [ 0 ] ) ;
Buggy code:
public class SelectionRequestor implements ISelectionRequestor { protected NameLookup nameLookup ; protected Openable openable ; protected IJavaElement [ ] elements = JavaElement . NO_ELEMENTS ; protected int elementIndex = - 1 ; protected HandleFactory handleFactory = new HandleFactory ( ) ; public SelectionRequestor ( NameLookup nameLookup , Openable openable ) { } protected void acceptBinaryMethod ( IType type , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , String [ ] parameterSignatures , char [ ] uniqueKey , boolean isConstructor ) { } public void acceptType ( char [ ] packageName , char [ ] typeName , int modifiers , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } <START_BUG> public void acceptError ( IProblem error ) { <END_BUG> } public void acceptField ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] name , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } public void acceptLocalField ( FieldBinding fieldBinding ) { } public void acceptLocalMethod ( MethodBinding methodBinding ) { } public void acceptLocalType ( TypeBinding typeBinding ) { } public void acceptLocalTypeParameter ( TypeVariableBinding typeVariableBinding ) { } public void acceptLocalMethodTypeParameter ( TypeVariableBinding typeVariableBinding ) { } public void acceptLocalVariable ( LocalVariableBinding binding ) { } public void acceptMethod ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , String enclosingDeclaringTypeSignature , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , String [ ] parameterSignatures , boolean isConstructor , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } public void acceptPackage ( char [ ] packageName ) { } protected void acceptSourceMethod ( IType type , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , char [ ] uniqueKey ) { } protected void acceptMethodDeclaration ( IType type , char [ ] selector , int start , int end ) { } public void acceptTypeParameter ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] typeParameterName , boolean isDeclaration , int start , int end ) { } public void acceptMethodTypeParameter ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] selector , int selectorStart , int selectorEnd , char [ ] typeParameterName , boolean isDeclaration , int start , int end ) { } protected void addElement ( IJavaElement element ) { } protected IJavaElement findLocalElement ( int pos ) { } public IJavaElement [ ] getElements ( ) { } protected IType resolveType ( char [ ] packageName , char [ ] typeName , int acceptFlags ) { } protected IType resolveTypeByLocation ( char [ ] packageName , char [ ] typeName , int acceptFlags , int start , int end ) { } }

Fix:
public void acceptError ( CategorizedProblem error ) {
Buggy code:
public class Blob implements UserType , BinaryField { private String UUID ; private String type ; private File file ; public Blob ( ) { } private Blob ( String UUID , String type ) { } public InputStream get ( ) { } public void set ( InputStream is , String type ) { } public long length ( ) { } public String type ( ) { } public boolean exists ( ) { } public File getFile ( ) { } public int [ ] sqlTypes ( ) { } public Class returnedClass ( ) { } public boolean equals ( Object o , Object o1 ) throws HibernateException { } public int hashCode ( Object o ) throws HibernateException { } public Object nullSafeGet ( ResultSet rs , String [ ] names , Object o ) throws SQLException , HibernateException { } public void nullSafeSet ( PreparedStatement ps , Object o , int i ) throws SQLException , HibernateException { } public Object deepCopy ( Object o ) throws HibernateException { if ( o == null ) { return null ; } <START_BUG> return new Blob ( this . UUID , this . type ) ; <END_BUG> } public boolean isMutable ( ) { } public Serializable disassemble ( Object o ) throws HibernateException { } public Object assemble ( Serializable srlzbl , Object o ) throws HibernateException { } public Object replace ( Object o , Object o1 , Object o2 ) throws HibernateException { } public static String getUUID ( String dbValue ) { } public static File getStore ( ) { } }

Fix:
return new Blob ( ( ( Blob ) ( o ) ) . UUID , ( ( Blob ) ( o ) ) . type ) ;
Buggy code:
public class QueryStringUrlCodingStrategyTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( QueryStringUrlCodingStrategyTest . class ) ; public void testQS ( ) { IRequestTargetUrlCodingStrategy ucs = new QueryStringUrlCodingStrategy ( "//mount//point" , TestPage . class ) ; PageParameters params = new PageParameters ( ) ; params . add ( "a" , "1" ) ; params . add ( "a" , "2" ) ; params . add ( "b" , "1" ) ; IRequestTarget rt = new org . apache . wicket . request . target . component . BookmarkablePageRequestTarget ( TestPage . class , params ) ; String path = ucs . encode ( rt ) . toString ( ) ; QueryStringUrlCodingStrategyTest . log . debug ( path ) ; <START_BUG> assertEquals ( "mount//point?a=1&a=2&b=1" , path ) ; <END_BUG> } }

Fix:
assertEquals ( "mount//point//?a=1&a=2&b=1" , path ) ;
Buggy code:
public class Permission { @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public static Set < Permission > loadFromString ( List < String > listPerms ) { Set < Permission > permissions = new HashSet ( ) ; if ( listPerms != null ) for ( String perm : listPerms ) if ( perm . startsWith ( "^" ) ) <START_BUG> permissions . add ( new Permission ( perm , false ) ) ; <END_BUG> else permissions . add ( new Permission ( perm , true ) ) ; return permissions ; } private final boolean isTrue ; private final String name ; Permission ( String name , boolean isTrue ) { } public int hashCode ( ) { } public boolean isTrue ( ) { } public String name ( ) { } public String toString ( ) { } }

Fix:
permissions . add ( new Permission ( perm . replace ( "^" , "" ) , false ) ) ;
Buggy code:
public class AjMethodDeclaration extends MethodDeclaration { private List attributes = new ArrayList ( ) ; public AjMethodDeclaration ( CompilationResult compilationResult ) { } protected void addAttribute ( EclipseAttributeAdapter eaa ) { } protected int generateInfoAttributes ( ClassFile classFile , boolean addAjSynthetic ) { } protected int generateInfoAttributes ( ClassFile classFile ) { } protected void addDeclarationStartLineAttribute ( List extraAttributeList , ClassFile classFile ) { if ( ! ( classFile . codeStream . generateLineNumberAttributes ) ) return ; int [ ] separators = compilationResult ( ) . lineSeparatorPositions ; int declarationStartLine = 1 ; for ( int i = 0 ; i < ( separators . length ) ; i ++ ) { if ( ( sourceStart ) < ( separators [ i ] ) ) break ; declarationStartLine ++ ; } <START_BUG> extraAttributeList . add ( new EclipseAttributeAdapter ( new AjAttribute . MethodDeclarationLineNumberAttribute ( declarationStartLine ) ) ) ; <END_BUG> } }

Fix:
extraAttributeList . add ( new EclipseAttributeAdapter ( new org . aspectj . weaver . AjAttribute . MethodDeclarationLineNumberAttribute ( declarationStartLine , this . sourceStart ( ) ) ) ) ;
Buggy code:
public class ReadMasterDomainModelHandler implements OperationStepHandler { public static final String OPERATION_NAME = "read-master-domain-model" ; private final Transformers transformers ; public ReadMasterDomainModelHandler ( final Transformers transformers ) { } private Resource transformResource ( final OperationContext context , Resource root ) throws OperationFailedException { <START_BUG> return transformers . transformResource ( Factory . getTransformationContext ( transformers , context ) , root ) ; <END_BUG> } public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private List < ModelNode > describeAsNodeList ( final Resource resource ) { } private void describe ( final PathAddress base , final Resource resource , List < ModelNode > nodes ) { } }

Fix:
return transformers . transformRootResource ( context , root ) ;
Buggy code:
public class ProblemHandler implements ProblemSeverities { public static final String [ ] NoArgument = new String [ 0 ] ; public final IErrorHandlingPolicy policy ; public final IProblemFactory problemFactory ; public final CompilerOptions options ; public ProblemHandler ( IErrorHandlingPolicy policy , CompilerOptions options , IProblemFactory problemFactory ) { } public int computeSeverity ( int problemId ) { } public IProblem createProblem ( char [ ] fileName , int problemId , String [ ] problemArguments , String [ ] messageArguments , int severity , int problemStartPosition , int problemEndPosition , int lineNumber ) { } public void handle ( int problemId , String [ ] problemArguments , String [ ] messageArguments , int severity , int problemStartPosition , int problemEndPosition , ReferenceContext referenceContext , CompilationResult unitResult ) { if ( severity == ( ProblemSeverities . Ignore ) ) return ; if ( referenceContext == null ) { if ( ( severity & ( ProblemSeverities . Error ) ) != 0 ) { IProblem problem = this . createProblem ( null , problemId , problemArguments , messageArguments , severity , 0 , 0 , 0 ) ; throw new org . eclipse . jdt . internal . compiler . problem . AbortCompilation ( null , problem ) ; } else { return ; } } <START_BUG> IProblem problem = this . createProblem ( unitResult . getFileName ( ) , problemId , problemArguments , messageArguments , severity , problemStartPosition , problemEndPosition , ( problemStartPosition >= 0 ? ProblemHandler . searchLineNumber ( unitResult . lineSeparatorPositions , problemStartPosition ) : 0 ) ) ; <END_BUG> if ( problem == null ) return ; switch ( severity & ( ProblemSeverities . Error ) ) { case ProblemSeverities . Error : this . record ( problem , unitResult , referenceContext ) ; referenceContext . tagAsHavingErrors ( ) ; int abortLevel ; if ( ( abortLevel = ( this . policy . stopOnFirstError ( ) ) ? ProblemSeverities . AbortCompilation : severity & ( ProblemSeverities . Abort ) ) != 0 ) { referenceContext . abort ( abortLevel , problem ) ; } break ; case ProblemSeverities . Warning : this . record ( problem , unitResult , referenceContext ) ; break ; } } public void handle ( int problemId , String [ ] problemArguments , String [ ] messageArguments , int problemStartPosition , int problemEndPosition , ReferenceContext referenceContext , CompilationResult unitResult ) { } public void record ( IProblem problem , CompilationResult unitResult , ReferenceContext referenceContext ) { } public static final int searchLineNumber ( int [ ] startLineIndexes , int position ) { } }

Fix:
IProblem problem = this . createProblem ( unitResult . getFileName ( ) , problemId , problemArguments , messageArguments , severity , problemStartPosition , problemEndPosition , ( problemStartPosition >= 0 ? ProblemHandler . searchLineNumber ( unitResult . getLineSeparatorPositions ( ) , problemStartPosition ) : 0 ) ) ;
Buggy code:
public abstract class AjaxLazyLoadPanel extends Panel { private static final String LAZY_LOAD_COMPONENT_ID = "content" ; private static final long serialVersionUID = 1L ; private byte state = 0 ; public AjaxLazyLoadPanel ( final String id ) { } public AjaxLazyLoadPanel ( final String id , final IModel < ? > model ) { } protected void handleCallbackScript ( final IHeaderResponse response , final String callbackScript ) { } @ Override protected void onBeforeRender ( ) { } private void setState ( byte state ) { } public abstract Component getLazyLoadComponent ( String markupId ) { } public Component getLoadingComponent ( final String markupId ) { IRequestHandler handler = new org . apache . wicket . request . handler . resource . ResourceReferenceRequestHandler ( AbstractDefaultAjaxBehavior . INDICATOR ) ; <START_BUG> return new org . apache . wicket . markup . html . basic . Label ( markupId , ( ( "<img<seq2seq4repair_space>alt=\"Loading...\"<seq2seq4repair_space>src=\"" + ( org . apache . wicket . request . cycle . RequestCycle . get ( ) . renderUrlFor ( handler ) ) ) + "\"//>" ) ) . setEscapeModelStrings ( false ) ; <END_BUG> } }

Fix:
return new org . apache . wicket . markup . html . basic . Label ( markupId , ( ( "<img<seq2seq4repair_space>alt=\"Loading...\"<seq2seq4repair_space>src=\"" + ( org . apache . wicket . request . cycle . RequestCycle . get ( ) . urlFor ( handler ) ) ) + "\"//>" ) ) . setEscapeModelStrings ( false ) ;
Buggy code:
public final class InactiveResourceAdapterDeploymentService implements Service < InactiveResourceAdapterDeploymentService . InactiveResourceAdapterDeployment > { private static final DeployersLogger DEPLOYERS_LOGGER = Logger . getMessageLogger ( DeployersLogger . class , "org.jboss.as.connector.deployers.RaXmlInactiveDeployer" ) ; private final InactiveResourceAdapterDeploymentService . InactiveResourceAdapterDeployment value ; public InactiveResourceAdapterDeploymentService ( ConnectorXmlDescriptor connectorXmlDescriptor , Module module , final String deployment , final String deploymentUnitName , final ManagementResourceRegistration registration ) { } public InactiveResourceAdapterDeploymentService . InactiveResourceAdapterDeployment getValue ( ) { } @ Override public void start ( StartContext context ) throws StartException { <START_BUG> ConnectorLogger . ROOT_LOGGER . infof ( ( "starting<seq2seq4repair_space>Inactive:" + ( value . toString ( ) ) ) ) ; <END_BUG> } @ Override public void stop ( StopContext context ) { } public static class InactiveResourceAdapterDeployment { private final Module module ; private final ConnectorXmlDescriptor connectorXmlDescriptor ; private final String deployment ; private final String deploymentUnitName ; private final ManagementResourceRegistration registration ; public InactiveResourceAdapterDeployment ( final ConnectorXmlDescriptor connectorXmlDescriptor , final Module module , final String deployment , final String deploymentUnitName , final ManagementResourceRegistration registration ) { } public Module getModule ( ) { } public ConnectorXmlDescriptor getConnectorXmlDescriptor ( ) { } public String getDeployment ( ) { } public String getDeploymentUnitName ( ) { } public ManagementResourceRegistration getRegistration ( ) { } @ Override public String toString ( ) { } } }

Fix:
ConnectorLogger . ROOT_LOGGER . debugf ( ( "starting<seq2seq4repair_space>Inactive:" + ( value . toString ( ) ) ) ) ;
Buggy code:
public class SourceHttpMessageConverterTests { @ Test public void readDOMSource ( ) throws Exception { } @ Test public void readSAXSource ( ) throws Exception { } @ Test public void readStreamSource ( ) throws Exception { } @ Test public void readSource ( ) throws Exception { } @ Test public void write ( ) throws Exception { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; documentBuilderFactory . setNamespaceAware ( true ) ; Document document = documentBuilderFactory . newDocumentBuilder ( ) . newDocument ( ) ; Element rootElement = document . createElement ( "root" ) ; document . appendChild ( rootElement ) ; rootElement . setTextContent ( "Hello<seq2seq4repair_space>World" ) ; DOMSource domSource = new DOMSource ( document ) ; SourceHttpMessageConverter < Source > converter = new SourceHttpMessageConverter < Source > ( ) ; MockHttpOutputMessage outputMessage = new MockHttpOutputMessage ( ) ; <START_BUG> converter . write ( domSource , outputMessage ) ; <END_BUG> assertXMLEqual ( "Invalid<seq2seq4repair_space>result" , "<root>Hello<seq2seq4repair_space>World<//root>" , outputMessage . getBodyAsString ( Charset . forName ( "UTF-8" ) ) ) ; assertEquals ( "Invalid<seq2seq4repair_space>content-type" , new MediaType ( "application" , "xml" ) , outputMessage . getHeaders ( ) . getContentType ( ) ) ; } }

Fix:
converter . write ( domSource , null , outputMessage ) ;
Buggy code:
public class Event extends Post implements ListingSource { private Location location ; private int commentCount ; private boolean commented ; private ListingFromEvent listing ; public Event ( long postID , String message , Timestamp creationTime , int likeCount , User author , boolean likeStatus , Location location , int commentCount , boolean commented ) { } public Location getLocation ( ) { } public int getCommentCount ( ) { } public boolean isCommented ( ) { } public void setCommented ( boolean commented ) { } @ Override public void update ( ) { } @ Override public DatabaseRequest getDatabaseRequest ( ) { } @ Override public Predicate < Post > getFilter ( ) { } @ Override public ListingFromEvent getListing ( ) { if ( ( listing ) == null ) { <START_BUG> Listing listing = new ListingFromEvent ( this ) ; <END_BUG> } return listing ; } }

Fix:
listing = new ListingFromEvent ( this ) ;
Buggy code:
public class InfectionListener implements Listener { @ EventHandler public void onAuroraInfect ( PlayerDeathEvent e ) { } @ EventHandler public void onDemonInfect ( AsyncPlayerChatEvent e ) { } @ EventHandler public void onDwarfInfect ( PlayerInteractEvent e ) { } @ EventHandler public void onEnderBornInfect ( final PlayerInteractEntityEvent e ) { } private static ConcurrentMap < String , Integer > elfKills = Maps . newConcurrentMap ( ) ; @ EventHandler public void onElfInfect ( PlayerItemConsumeEvent e ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onAngelPowers ( PlayerDeathEvent e ) { if ( ! ( WorldCheck . isEnabled ( e . getEntity ( ) . getWorld ( ) ) ) ) return ; Player p = e . getEntity ( ) ; if ( ( Races . getRace ( p ) ) != ( RaceType . HUMAN ) ) return ; <START_BUG> if ( ( ( p . getLastDamageCause ( ) . getCause ( ) ) != null ) && ( ( p . getLastDamageCause ( ) . getCause ( ) ) != ( DamageCause . FALL ) ) ) <END_BUG> return ; if ( p . getInventory ( ) . containsAtLeast ( ANGELRECIPE . getResult ( ) , 1 ) ) { ItemUtil . removeOne ( p , ANGELRECIPE . getResult ( ) ) ; ChatUtil . sendString ( p , "You<seq2seq4repair_space>are<seq2seq4repair_space>now<seq2seq4repair_space>an<seq2seq4repair_space>Angel!" ) ; Races . setRace ( p , ANGEL ) ; } } @ EventHandler public void onElfBowKill ( EntityDeathEvent e ) { } @ EventHandler public void onWerewolfInfect ( PlayerInteractEntityEvent e ) { } }

Fix:
if ( ( ( p . getLastDamageCause ( ) . getCause ( ) ) == null ) || ( ( p . getLastDamageCause ( ) . getCause ( ) ) != ( DamageCause . FALL ) ) )
Buggy code:
public class UnInvertedField extends DocTermOrds { private static int TNUM_OFFSET = 2 ; static class TopTerm { BytesRef term ; int termNum ; long memSize ( ) { } } long memsz ; final AtomicLong use = new AtomicLong ( ) ; int [ ] maxTermCounts = new int [ 1024 ] ; final Map < Integer , UnInvertedField . TopTerm > bigTerms = new LinkedHashMap < Integer , UnInvertedField . TopTerm > ( ) ; private DocsEnumState deState ; private final SolrIndexSearcher searcher ; @ Override protected void visitTerm ( TermsEnum te , int termNum ) throws IOException { if ( termNum >= ( maxTermCounts . length ) ) { int [ ] newMaxTermCounts = new int [ ( maxTermCounts . length ) * 2 ] ; System . arraycopy ( maxTermCounts , 0 , newMaxTermCounts , 0 , termNum ) ; maxTermCounts = newMaxTermCounts ; } final BytesRef term = te . term ( ) ; if ( ( te . docFreq ( ) ) > ( maxTermDocFreq ) ) { UnInvertedField . TopTerm topTerm = new UnInvertedField . TopTerm ( ) ; <START_BUG> topTerm . term = new BytesRef ( term ) ; <END_BUG> topTerm . termNum = termNum ; bigTerms . put ( topTerm . termNum , topTerm ) ; if ( ( deState ) == null ) { deState = new SolrIndexSearcher . DocsEnumState ( ) ; deState . fieldName = field ; deState . termsEnum = te ; deState . docsEnum = docsEnum ; deState . minSetSizeCached = maxTermDocFreq ; } docsEnum = deState . docsEnum ; DocSet set = searcher . getDocSet ( deState ) ; maxTermCounts [ termNum ] = set . size ( ) ; } } @ Override protected void setActualDocFreq ( int termNum , int docFreq ) { } public long memSize ( ) { } public UnInvertedField ( String field , SolrIndexSearcher searcher ) throws IOException { } public int getNumTerms ( ) { } public NamedList < Integer > getCounts ( SolrIndexSearcher searcher , DocSet baseDocs , int offset , int limit , Integer mincount , boolean missing , String sort , String prefix ) throws IOException { } public StatsValues getStats ( SolrIndexSearcher searcher , DocSet baseDocs , String [ ] facet ) throws IOException { } String getReadableValue ( BytesRef termval , FieldType ft , CharsRef charsRef ) { } BytesRef getTermValue ( TermsEnum te , int termNum ) throws IOException { } @ Override public String toString ( ) { } public static UnInvertedField getUnInvertedField ( String field , SolrIndexSearcher searcher ) throws IOException { } }

Fix:
topTerm . term = BytesRef . deepCopyOf ( term ) ;
Buggy code:
public class BroadcastGroupControlHandler extends AbstractHornetQComponentControlHandler < BroadcastGroupControl > { public static final BroadcastGroupControlHandler INSTANCE = new BroadcastGroupControlHandler ( ) ; public static final String GET_CONNECTOR_PAIRS_AS_JSON = "get-connector-pairs-as-json" ; private BroadcastGroupControlHandler ( ) { } @ Override public void register ( ManagementResourceRegistration registry ) { super . register ( registry ) ; registry . registerOperationHandler ( BroadcastGroupControlHandler . GET_CONNECTOR_PAIRS_AS_JSON , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getNoArgSimpleReplyOperation ( locale , BroadcastGroupControlHandler . GET_CONNECTOR_PAIRS_AS_JSON , BROADCAST_GROUP , STRING , false ) ; } <START_BUG> } , EnumSet . of ( READ_ONLY ) ) ; <END_BUG> } @ Override protected BroadcastGroupControl getHornetQComponentControl ( HornetQServer hqServer , PathAddress address ) { } @ Override protected String getDescriptionPrefix ( ) { } @ Override protected Object handleOperation ( String operationName , OperationContext context , ModelNode operation ) throws OperationFailedException { } }

Fix:
} , EnumSet . of ( READ_ONLY , RUNTIME_ONLY ) ) ;
Buggy code:
public class PointcutResidueTestCase extends WeaveTestCase { public PointcutResidueTestCase ( String name ) { } String [ ] none = new String [ 0 ] ; public void testArgResidue1 ( ) throws IOException { } public void testArgResidue2 ( ) throws IOException { } public void testArgResidue3 ( ) throws IOException { } public void testMultiArgState ( ) throws IOException { } public void testAdd ( ) throws IOException { } public void testNot ( ) throws IOException { } public void testState ( ) throws IOException { } public void testNoResidueArgs ( ) throws IOException { } public void testCflowState ( ) throws IOException { } private void checkDynamicWeave ( String label , String pointcutSource ) throws IOException { } private void checkMultiArgWeave ( String label , String pointcutSource ) throws IOException { } private void checkWeave ( String label , String filename , String pointcutSource , String [ ] formalTypes , String [ ] formalNames ) throws IOException { } public void weaveTest ( String name , String outName , ShadowMunger planner ) throws IOException { } public void checkSerialize ( Pointcut p ) throws IOException { ByteArrayOutputStream bo = new ByteArrayOutputStream ( ) ; DataOutputStream out = new DataOutputStream ( bo ) ; p . write ( out ) ; out . close ( ) ; ByteArrayInputStream bi = new ByteArrayInputStream ( bo . toByteArray ( ) ) ; <START_BUG> DataInputStream in = new DataInputStream ( bi ) ; <END_BUG> Pointcut newP = Pointcut . read ( in , null ) ; assertEquals ( "write//read" , p , newP ) ; } }

Fix:
VersionedDataInputStream in = new VersionedDataInputStream ( bi ) ;
Buggy code:
public class PictureWordActivity extends Activity { private final String ACTIVITY = "PictureWordActivity" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_picture_word ) ; getActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; Intent intent = getIntent ( ) ; String word = intent . getStringExtra ( "word" ) ; Uri uri = Uri . parse ( intent . getStringExtra ( "uri" ) ) ; String path = getRealPathFromURI ( uri ) ; Log . d ( ACTIVITY , ( "The<seq2seq4repair_space>location<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>photo<seq2seq4repair_space>is:<seq2seq4repair_space>" + path ) ) ; int orientation = PictureWordActivity . getExifOrientation ( path ) ; <START_BUG> Bitmap bitmap = PictureWordActivity . decodeSampledBitmapFromResource ( path , 75 , 75 ) ; <END_BUG> int rotate ; switch ( orientation ) { case 90 : rotate = 90 ; break ; case 180 : rotate = 180 ; break ; case 270 : rotate = 270 ; break ; default : rotate = 0 ; break ; } if ( rotate != 0 ) { Matrix matrix = new Matrix ( ) ; matrix . postRotate ( 90 ) ; Bitmap bit = Bitmap . createBitmap ( bitmap , 0 , 0 , bitmap . getWidth ( ) , bitmap . getHeight ( ) , matrix , true ) ; ImageView image = ( ( ImageView ) ( findViewById ( picture ) ) ) ; image . setImageBitmap ( bit ) ; } else { ImageView image = ( ( ImageView ) ( findViewById ( picture ) ) ) ; image . setImageBitmap ( bitmap ) ; } TextView tv = ( ( TextView ) ( findViewById ( label ) ) ) ; tv . setText ( word ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static int getExifOrientation ( String filepath ) { } private String getRealPathFromURI ( Uri contentUri ) { } private static int calculateInSampleSize ( BitmapFactory . Options options , int reqWidth , int reqHeight ) { } private static Bitmap decodeSampledBitmapFromResource ( String uri , int reqWidth , int reqHeight ) { } }

Fix:
Bitmap bitmap = PictureWordActivity . decodeSampledBitmapFromResource ( path , 500 , 500 ) ;
Buggy code:
public class childGraphPanel extends JPanel { double [ ] [ ] coordinates ; private double xMin ; private double xMax ; private double yMin ; private double yMax ; public childGraphPanel ( ) { } @ Override public void paint ( Graphics g ) { } public void Graph ( double [ ] [ ] array ) { } public void drawGraph ( Graphics g ) { double ratioW = ( getWidth ( ) ) // ( ( xMax ) - ( xMin ) ) ; double ratioH = ( getHeight ( ) ) // ( ( yMax ) - ( yMin ) ) ; double originx = ( ( - 1.0 ) * ( xMin ) ) * ratioW ; <START_BUG> double originy = ( yMin ) * ratioH ; <END_BUG> g . drawLine ( getWidth ( ) , ( ( int ) ( originy ) ) , 0 , ( ( int ) ( originy ) ) ) ; g . drawLine ( ( ( int ) ( originx ) ) , 0 , ( ( int ) ( originx ) ) , getHeight ( ) ) ; if ( ( coordinates ) != null ) { for ( int x = 0 ; x < ( ( coordinates . length ) - 1 ) ; x ++ ) { g . drawLine ( ( ( int ) ( originx + ( ( coordinates [ x ] [ 0 ] ) * ratioW ) ) ) , ( ( int ) ( originy - ( ( coordinates [ x ] [ 1 ] ) * ratioH ) ) ) , ( ( int ) ( originx + ( ( coordinates [ ( x + 1 ) ] [ 0 ] ) * ratioW ) ) ) , ( ( int ) ( originy - ( ( coordinates [ ( x + 1 ) ] [ 1 ] ) * ratioH ) ) ) ) ; } } } public void DRAWGraph ( Double MinX , Double MaxX , Double MinY , Double MaxY , double [ ] [ ] xy ) { } }

Fix:
double originy = ( yMax ) * ratioH ;
Buggy code:
public class TestTermVectorsWriter extends LuceneTestCase { public void testDoubleOffsetCounting ( ) throws Exception { } public void testDoubleOffsetCounting2 ( ) throws Exception { } public void testEndOffsetPositionCharAnalyzer ( ) throws Exception { } public void testEndOffsetPositionWithCachingTokenFilter ( ) throws Exception { } public void testEndOffsetPositionStopFilter ( ) throws Exception { } public void testEndOffsetPositionStandard ( ) throws Exception { } public void testEndOffsetPositionStandardEmptyField ( ) throws Exception { } public void testEndOffsetPositionStandardEmptyField2 ( ) throws Exception { } public void testTermVectorCorruption ( ) throws IOException { Directory dir = newDirectory ( ) ; for ( int iter = 0 ; iter < 2 ; iter ++ ) { IndexWriter writer = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new MockAnalyzer ( ) ) . setMaxBufferedDocs ( 2 ) . setRAMBufferSizeMB ( DISABLE_AUTO_FLUSH ) . setMergeScheduler ( new SerialMergeScheduler ( ) ) . setMergePolicy ( new LogDocMergePolicy ( ) ) ) ; Document document = new Document ( ) ; Field storedField = newField ( "stored" , "stored" , YES , NO ) ; document . add ( storedField ) ; writer . addDocument ( document ) ; writer . addDocument ( document ) ; document = new Document ( ) ; document . add ( storedField ) ; Field termVectorField = newField ( "termVector" , "termVector" , Field . Store . NO , NOT_ANALYZED , WITH_POSITIONS_OFFSETS ) ; document . add ( termVectorField ) ; writer . addDocument ( document ) ; writer . optimize ( ) ; writer . close ( ) ; IndexReader reader = IndexReader . open ( dir , true ) ; for ( int i = 0 ; i < ( reader . numDocs ( ) ) ; i ++ ) { reader . document ( i ) ; reader . getTermFreqVectors ( i ) ; } reader . close ( ) ; writer = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new MockAnalyzer ( ) ) . setMaxBufferedDocs ( 2 ) . setRAMBufferSizeMB ( DISABLE_AUTO_FLUSH ) . setMergeScheduler ( new SerialMergeScheduler ( ) ) . setMergePolicy ( new LogDocMergePolicy ( ) ) ) ; <START_BUG> Directory [ ] indexDirs = new Directory [ ] { new MockDirectoryWrapper ( new org . apache . lucene . store . RAMDirectory ( dir ) ) } ; <END_BUG> writer . addIndexes ( indexDirs ) ; writer . optimize ( ) ; writer . close ( ) ; } dir . close ( ) ; } public void testTermVectorCorruption2 ( ) throws IOException { } public void testTermVectorCorruption3 ( ) throws IOException { } public void testNoTermVectorAfterTermVector ( ) throws IOException { } public void testNoTermVectorAfterTermVectorMerge ( ) throws IOException { } }

Fix:
Directory [ ] indexDirs = new Directory [ ] { new org . apache . lucene . store . MockDirectoryWrapper ( random , new org . apache . lucene . store . RAMDirectory ( dir ) ) } ;
Buggy code:
@ Repository @ Primary public class RaceJdbcDao implements RaceDao { private static final Logger logger = LoggerFactory . getLogger ( RaceJdbcDao . class ) ; private NamedParameterJdbcTemplate jdbcTemplate ; @ Autowired @ Override public void setDataSource ( DataSource dataSource ) { } @ Override public List < Race > fetchRaces ( ) { } private static final class RaceMapper implements RowMapper < Race > { public Race mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } @ Override public void saveRaces ( List < Race > races ) { int updateCount = 0 ; String sql = "insert<seq2seq4repair_space>into<seq2seq4repair_space>races<seq2seq4repair_space>(id,<seq2seq4repair_space>name,<seq2seq4repair_space>date,<seq2seq4repair_space>city,<seq2seq4repair_space>state,<seq2seq4repair_space>race_type)<seq2seq4repair_space>values<seq2seq4repair_space>(:id,<seq2seq4repair_space>:name,<seq2seq4repair_space>:date,<seq2seq4repair_space>:city,<seq2seq4repair_space>:state,<seq2seq4repair_space>:raceType)" ; for ( Race race : races ) { MapSqlParameterSource namedParameters = new MapSqlParameterSource ( "id" , race . getId ( ) ) ; namedParameters . addValue ( "name" , race . getName ( ) ) ; namedParameters . addValue ( "date" , race . getDate ( ) . toString ( ) ) ; namedParameters . addValue ( "city" , race . getCity ( ) ) ; namedParameters . addValue ( "state" , race . getState ( ) ) ; <START_BUG> namedParameters . addValue ( "raceType" , race . getRaceType ( ) . toString ( ) ) ; <END_BUG> updateCount += jdbcTemplate . update ( sql , namedParameters ) ; } RaceJdbcDao . logger . info ( "Inserted<seq2seq4repair_space>{}<seq2seq4repair_space>races" , updateCount ) ; } }

Fix:
namedParameters . addValue ( "raceType" , race . getRaceType ( ) . name ( ) ) ;
Buggy code:
public class ItemDetailActivity extends AppCompatActivity { private Toolbar toolbar ; private ImageView img ; private String title ; public static final String TITLE_TO_SHOW = "title" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; Intent intent = getIntent ( ) ; title = intent . getStringExtra ( ItemDetailActivity . TITLE_TO_SHOW ) ; setContentView ( item_detail_activity ) ; toolbar = ( ( Toolbar ) ( findViewById ( R . id . toolbar ) ) ) ; img = ( ( ImageView ) ( findViewById ( R . id . img ) ) ) ; setSupportActionBar ( toolbar ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; toolbar . setNavigationOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { onBackPressed ( ) ; } } ) ; CollapsingToolbarLayout mCollapsingToolbarLayout = ( ( CollapsingToolbarLayout ) ( findViewById ( collapsing_toolbar_layout ) ) ) ; mCollapsingToolbarLayout . setTitle ( title ) ; mCollapsingToolbarLayout . setExpandedTitleColor ( WHITE ) ; <START_BUG> mCollapsingToolbarLayout . setCollapsedTitleTextColor ( YELLOW ) ; <END_BUG> RequestQueue queue = Volley . newRequestQueue ( getApplicationContext ( ) ) ; ImageLoader imageLoader = new ImageLoader ( queue , new BitmapLruCache ( ) ) ; ImageLoader . ImageListener listener = ImageLoader . getImageListener ( img , ic_menu_rotate , ic_delete ) ; imageLoader . get ( "http:////img008.hc360.cn//g6//M04//2C//C8//wKhQsFMx9uCEcqgyAAAAAOyuQ1g828.jpg" , listener ) ; } }

Fix:
mCollapsingToolbarLayout . setCollapsedTitleTextColor ( WHITE ) ;
Buggy code:
public class TimeoutSettings { public int currentTimeoutSec ; public int waitElementSec = 20 ; public int waitPageLoadSec = 20 ; public int retryMSec = 100 ; public void setCurrentTimeoutSec ( int timeoutSec ) { currentTimeoutSec = timeoutSec ; <START_BUG> BaseChecker . defaultWaitTimeout = timeoutSec ; <END_BUG> } public TimeoutSettings ( ) { } public void dropTimeouts ( ) { } }

Fix:
BaseChecker . defaultWaitTimeout = timeoutSec * 1000 ;
Buggy code:
public final class Region extends Resource { public int handle ; public Region ( ) { } public Region ( Device device ) { } Region ( Device device , int handle ) { } public void add ( int [ ] pointArray ) { } public void add ( Rectangle rect ) { } public void add ( int x , int y , int width , int height ) { } public void add ( Region region ) { } void combine ( int [ ] pointArray , int mode ) { if ( ( pointArray . length ) < 4 ) return ; int list = OS . gcnew_PointCollection ( ( ( pointArray . length ) // 2 ) ) ; <START_BUG> for ( int i = 0 ; i < ( pointArray . length ) ; i += 2 ) { <END_BUG> int point = OS . gcnew_Point ( pointArray [ i ] , pointArray [ ( i + 1 ) ] ) ; OS . PointCollection_Add ( list , point ) ; OS . GCHandle_Free ( point ) ; } int poly = OS . gcnew_PolyLineSegment ( list , true ) ; OS . GCHandle_Free ( list ) ; int figure = OS . gcnew_PathFigure ( ) ; int startPoint = OS . gcnew_Point ( pointArray [ 0 ] , pointArray [ 1 ] ) ; OS . PathFigure_StartPoint ( figure , startPoint ) ; OS . PathFigure_IsClosed ( figure , true ) ; int segments = OS . PathFigure_Segments ( figure ) ; OS . PathSegmentCollection_Add ( segments , poly ) ; int path = OS . gcnew_PathGeometry ( ) ; int figures = OS . PathGeometry_Figures ( path ) ; OS . PathFigureCollection_Add ( figures , figure ) ; int geometries = OS . GeometryGroup_Children ( handle ) ; if ( ( OS . GeometryCollection_Count ( geometries ) ) == 0 ) { if ( mode == ( OS . GeometryCombineMode_Union ) ) OS . GeometryCollection_Add ( geometries , path ) ; } else { int geometry2 = OS . GeometryGroup_Children ( handle , 0 ) ; int geometry3 = OS . gcnew_CombinedGeometry ( mode , geometry2 , path ) ; OS . GeometryCollection_Remove ( geometries , geometry2 ) ; OS . GeometryCollection_Add ( geometries , geometry3 ) ; OS . GCHandle_Free ( geometry2 ) ; OS . GCHandle_Free ( geometry3 ) ; } OS . GCHandle_Free ( geometries ) ; OS . GCHandle_Free ( figures ) ; OS . GCHandle_Free ( path ) ; OS . GCHandle_Free ( segments ) ; OS . GCHandle_Free ( figure ) ; OS . GCHandle_Free ( startPoint ) ; OS . GCHandle_Free ( poly ) ; } public boolean contains ( int x , int y ) { } public boolean contains ( Point pt ) { } public void dispose ( ) { } public boolean equals ( Object object ) { } public Rectangle getBounds ( ) { } public int hashCode ( ) { } public void intersect ( Rectangle rect ) { } public void intersect ( int x , int y , int width , int height ) { } public void intersect ( Region region ) { } public boolean intersects ( int x , int y , int width , int height ) { } public boolean intersects ( Rectangle rect ) { } public boolean isDisposed ( ) { } public boolean isEmpty ( ) { } public void subtract ( int [ ] pointArray ) { } public void subtract ( Rectangle rect ) { } public void subtract ( int x , int y , int width , int height ) { } public void subtract ( Region region ) { } public void translate ( int x , int y ) { } public void translate ( Point pt ) { } public String toString ( ) { } public static Region wpf_new ( Device device , int handle ) { } }

Fix:
for ( int i = 2 ; i < ( pointArray . length ) ; i += 2 ) {
Buggy code:
public interface ProjectBuilder extends Component { String ROLE = "org.apache.myrmidon.components.builder.ProjectBuilder" ; <START_BUG> Project build ( File source ) throws Exception ; <END_BUG> }

Fix:
Project build ( String source ) throws Exception ;
Buggy code:
public class WidgetsDirective extends Directive { private static final Logger logger = LoggerFactory . getLogger ( WidgetsDirective . class ) ; public static final String KEY_WIDGETS = "widgets" ; private static final String PATH_PREFIX = "widgets" ; private HashMap < String , List < String > > widgetLists = new HashMap < String , List < String > > ( ) ; private VelocityConfig viewConfig ; private static final String [ ] widgetExtensions = new String [ ] { ".html" , ".vm" , ".htm" , ".widget" } ; @ Override public String getName ( ) { } @ Override public int getType ( ) { } @ Override public boolean render ( InternalContextAdapter context , Writer writer , Node node ) throws IOException , MethodInvocationException , ParseErrorException , ResourceNotFoundException { } private boolean doRender ( InternalContextAdapter context , Writer writer , Node node , List < String > widgets ) throws IOException , MethodInvocationException , ParseErrorException , ResourceNotFoundException { } private List < String > widgetList ( InternalContextAdapter context , String key ) { } private List < String > classpathWidgetList ( InternalContextAdapter context , String key ) { } private void loadClasspathWidgets ( List < String > loaded , String key ) { WidgetsDirective . logger . trace ( "Loading<seq2seq4repair_space>classpath<seq2seq4repair_space>widgets..." ) ; String prefix = ( WidgetsDirective . PATH_PREFIX ) + ( ( key == null ) || ( key . isEmpty ( ) ) ? "" : "//" + key ) ; <START_BUG> for ( NutResource res : Scans . me ( ) . scan ( prefix ) ) { <END_BUG> String n = res . getName ( ) ; if ( isWidget ( n ) ) { WidgetsDirective . logger . trace ( "Classpath<seq2seq4repair_space>widget:<seq2seq4repair_space>//{}//{}//{}" , WidgetsDirective . PATH_PREFIX , key , n ) ; loaded . add ( ( ( ( "//" + prefix ) + "//" ) + n ) ) ; } } } private List < String > mixedWidgetList ( InternalContextAdapter context , String key , File [ ] repos ) { } private void loadRepoWidgets ( List < String > loaded , String key , File [ ] repos ) { } private boolean isWidget ( String n ) { } private String getWidgetListKey ( InternalContextAdapter context , Node node ) { } }

Fix:
for ( NutResource res : Scans . me ( ) . scan ( ( ( ( viewConfig . getResourceLocation ( ) ) + "//" ) + prefix ) ) ) {