nus-yam/ex-repair huggingface dataset:
Buggy code:
public class URLCodec implements BinaryDecoder , BinaryEncoder , StringDecoder , StringEncoder { private static final int RADIX = 16 ; protected String charset ; protected static byte ESCAPE_CHAR = '%' ; protected static final BitSet WWW_FORM_URL = new BitSet ( 256 ) ; public URLCodec ( ) { } public URLCodec ( String charset ) { } public static final byte [ ] encodeUrl ( BitSet urlsafe , byte [ ] bytes ) { } public static final byte [ ] decodeUrl ( byte [ ] bytes ) throws DecoderException { } private static int toCharacterDigit ( byte b ) throws DecoderException { } public byte [ ] encode ( byte [ ] bytes ) { } public byte [ ] decode ( byte [ ] bytes ) throws DecoderException { } public String encode ( String pString , String charset ) throws UnsupportedEncodingException { } public String encode ( String pString ) throws EncoderException { } public String decode ( String pString , String charset ) throws UnsupportedEncodingException , DecoderException { } public String decode ( String pString ) throws DecoderException { if ( pString == null ) { return null ; } try { return decode ( pString , getDefaultCharset ( ) ) ; } catch ( UnsupportedEncodingException e ) { <START_BUG> throw new DecoderException ( e . getMessage ( ) ) ; <END_BUG> } } public Object encode ( Object pObject ) throws EncoderException { } public Object decode ( Object pObject ) throws DecoderException { } public String getEncoding ( ) { } public String getDefaultCharset ( ) { } }

Fix:
throw new DecoderException ( e . getMessage ( ) , e ) ;
Buggy code:
interface UnMarshaller { <START_BUG> void start ( DataInput input , ClassLoader classLoader ) throws IOException ; <END_BUG> Object readObject ( ) throws IOException , ClassNotFoundException { } void finish ( ) throws IOException { } }

Fix:
void start ( DataInput input , ClassLoaderProvider classLoaderProvider ) throws IOException ;
Buggy code:
public class RasterSlideImpl extends AbstractSlide { private URL url ; public RasterSlideImpl ( URL url ) { } public RasterSlideImpl ( URL url , String title , String description ) { } @ Override public Image createPreview ( Double width , Double height ) { } @ Override public URL getUrl ( ) { <START_BUG> return null ; <END_BUG> } }

Fix:
return url ;
Buggy code:
public abstract class PatchOperationTarget { static final PathElement CORE_SERVICES = PathElement . pathElement ( CORE_SERVICE , "patching" ) ; public static final PatchOperationTarget createLocal ( final File jbossHome ) throws IOException { <START_BUG> final PatchTool tool = Factory . create ( jbossHome ) ; <END_BUG> return new PatchOperationTarget . LocalPatchOperationTarget ( tool ) ; } public static final PatchOperationTarget createStandalone ( final ModelControllerClient controllerClient ) { } public static final PatchOperationTarget createHost ( final String hostName , final ModelControllerClient client ) { } protected abstract ModelNode info ( ) throws IOException { } protected abstract ModelNode applyPatch ( final File file , final ContentPolicyBuilderImpl builder ) throws IOException { } protected abstract ModelNode rollback ( final String patchId , final ContentPolicyBuilderImpl builder , boolean rollbackTo , final boolean restoreConfiguration ) throws IOException { } protected static class LocalPatchOperationTarget extends PatchOperationTarget { private final PatchTool tool ; public LocalPatchOperationTarget ( PatchTool tool ) { } @ Override protected ModelNode info ( ) throws IOException { } @ Override protected ModelNode applyPatch ( final File file , final ContentPolicyBuilderImpl builder ) { } @ Override protected ModelNode rollback ( final String patchId , final ContentPolicyBuilderImpl builder , boolean rollbackTo , boolean restoreConfiguration ) { } } protected static class RemotePatchOperationTarget extends PatchOperationTarget { private final PathAddress address ; private final ModelControllerClient client ; public RemotePatchOperationTarget ( PathAddress address , ModelControllerClient client ) { } @ Override protected ModelNode info ( ) throws IOException { } @ Override protected ModelNode applyPatch ( final File file , final ContentPolicyBuilderImpl policyBuilder ) throws IOException { } @ Override protected ModelNode rollback ( String patchId , ContentPolicyBuilderImpl builder , boolean rollbackTo , boolean restoreConfiguration ) throws IOException { } } static ModelNode formatFailedResponse ( final PatchingException e ) { } static ModelNode createOperation ( final String operationName , final ModelNode addr , final ContentPolicyBuilderImpl builder ) { } }

Fix:
final PatchTool tool = Factory . loadFromRoot ( jbossHome ) ;
Buggy code:
public class ViewMainFrame extends JFrame { private static final long serialVersionUID = 1L ; public static final Color COLOR1 = Color . decode ( "#ead177" ) ; public static final Color COLOR2 = Color . decode ( "#d95b45" ) ; public static final Color COLOR3 = Color . decode ( "#c12940" ) ; public static final Color COLOR4 = Color . decode ( "#552437" ) ; public static final Color COLOR5 = Color . decode ( "#52787b" ) ; public static final Font FONT1 = new Font ( "LucidaBright" , Font . BOLD , 20 ) ; public static String languageCode = "de" ; private ViewStartPanel startPanel ; private ViewCardFilePanel cardFilePanel ; private ViewEditCardFilePanel editCardFilePanel ; private ViewDiagramm statsPanel ; private Container container ; private CardLayout cardLayout ; private Strings strings ; private MainHandler mainHandler ; private HelpCardFile helpCardFile ; private ViewLearnPanel learnPanel ; private ViewSettingsPanel settingsPanel ; public ViewMainFrame ( ) { } public void save ( ) { } private void addPanel ( JPanel panel , String panelName ) { } public Strings getStrings ( ) { } public MainHandler getMainHandler ( ) { } public void changeLearnPaneltoCardFile ( CardFile cardfile ) { <START_BUG> learnPanel . fillCardFile ( cardfile ) ; <END_BUG> } public void refreshCardFilePanel ( ) { } public void changeEditCardFilePaneltoCardFile ( CardFile cardfile ) { } public void changeFrameTo ( String buttonName ) throws Exception { } }

Fix:
learnPanel . fillCardFile ( cardfile , true ) ;
Buggy code:
public class RemoteServiceImpl implements InvocationHandler , IRemoteService { protected static final long DEFAULT_TIMEOUT = 30000 ; protected RemoteServiceRegistrationImpl registration = null ; protected RegistrySharedObject sharedObject = null ; public RemoteServiceImpl ( RegistrySharedObject sharedObject , RemoteServiceRegistrationImpl registration ) { } public void callAsynch ( IRemoteCall call , IRemoteCallListener listener ) { } public IFuture callAsynch ( IRemoteCall call ) { <START_BUG> final FutureStatus result = new FutureStatus ( ) ; <END_BUG> final IRemoteCallListener listener = new IRemoteCallListener ( ) { public void handleEvent ( IRemoteCallEvent event ) { if ( event instanceof IRemoteCallCompleteEvent ) { IRemoteCallCompleteEvent cce = ( ( IRemoteCallCompleteEvent ) ( event ) ) ; if ( cce . hadException ( ) ) result . setException ( cce . getException ( ) ) ; else result . set ( cce . getResponse ( ) ) ; } } } ; callAsynch ( call , listener ) ; return result ; } public Object callSynch ( IRemoteCall call ) throws ECFException { } public void fireAsynch ( IRemoteCall call ) throws ECFException { } public Object getProxy ( ) throws ECFException { } public Object invoke ( Object proxy , final Method method , final Object [ ] args ) throws Throwable { } }

Fix:
final SingleOperationFuture result = new SingleOperationFuture ( ) ;
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 errorMessage ; private String fileName = null ; private ContentDisposition contentDisposition = ContentDisposition . INLINE ; private String contentType = null ; private String textEncoding ; private long contentLength = - 1 ; private Time lastModified = null ; private AbstractResource . WriteCallback writeCallback ; private Duration cacheDuration ; private CacheScope cacheScope ; public ResourceResponse ( ) { } public void setError ( Integer errorCode ) { } public void setError ( Integer errorCode , String errorMessage ) { } public Integer getErrorCode ( ) { } public String getErrorMessage ( ) { } 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 ( Time lastModified ) { } public Time getLastModified ( ) { } public boolean dataNeedsToBeWritten ( Attributes attributes ) { } public void disableCaching ( ) { } public void setCacheDurationToMaximum ( ) { } public void setCacheDuration ( Duration duration ) { } public Duration getCacheDuration ( ) { Duration duration = cacheDuration ; if ( ( duration == null ) && ( Application . exists ( ) ) ) { duration = Application . get ( ) . getResourceSettings ( ) . getDefaultCacheDuration ( ) ; } <START_BUG> return cacheDuration ; <END_BUG> } public CacheScope getCacheScope ( ) { } public void setCacheScope ( WebResponse . CacheScope scope ) { } public void setWriteCallback ( final AbstractResource . WriteCallback writeCallback ) { } public AbstractResource . WriteCallback getWriteCallback ( ) { } } protected void configureCache ( final AbstractResource . ResourceResponse data , final Attributes attributes ) { } public final void respond ( final Attributes attributes ) { } public abstract static class WriteCallback { public abstract void writeData ( Attributes attributes ) { } protected final void writeStream ( Attributes attributes , InputStream stream ) { } } }

Fix:
return duration ;
Buggy code:
public class BookmarkablePageLinkPage extends WicketExamplePage { public BookmarkablePageLinkPage ( ) { } @ Override protected void explain ( ) { String html = "<a<seq2seq4repair_space>wicket:id=\"pageLinkWithArgs\">go<seq2seq4repair_space>to<seq2seq4repair_space>our<seq2seq4repair_space>bookmarkable<seq2seq4repair_space>page<seq2seq4repair_space>passing<seq2seq4repair_space>a<seq2seq4repair_space>message<seq2seq4repair_space>argument<//a>" ; <START_BUG> String code = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;////<seq2seq4repair_space>Note<seq2seq4repair_space>that<seq2seq4repair_space>any<seq2seq4repair_space>arguments<seq2seq4repair_space>are<seq2seq4repair_space>passed<seq2seq4repair_space>as<seq2seq4repair_space>request<seq2seq4repair_space>parameters,<seq2seq4repair_space>and<seq2seq4repair_space>should<seq2seq4repair_space>thus<seq2seq4repair_space>be<seq2seq4repair_space>strings\n" + ( ( "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PageParameters<seq2seq4repair_space>parameters<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>PageParameters();\n" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters.put(\"message\",<seq2seq4repair_space>\"This<seq2seq4repair_space>message<seq2seq4repair_space>was<seq2seq4repair_space>passed<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>page<seq2seq4repair_space>parameter<seq2seq4repair_space>argument\");\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add(new<seq2seq4repair_space>BookmarkablePageLink(\"pageLinkWithArgs\",<seq2seq4repair_space>BookmarkablePage.class,<seq2seq4repair_space>parameters));" ) ; <END_BUG> add ( new ExplainPanel ( html , code ) ) ; } }

Fix:
String code = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;////<seq2seq4repair_space>Note<seq2seq4repair_space>that<seq2seq4repair_space>any<seq2seq4repair_space>arguments<seq2seq4repair_space>are<seq2seq4repair_space>passed<seq2seq4repair_space>as<seq2seq4repair_space>request<seq2seq4repair_space>parameters,<seq2seq4repair_space>and<seq2seq4repair_space>should<seq2seq4repair_space>thus<seq2seq4repair_space>be<seq2seq4repair_space>strings\n" + ( ( "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PageParameters<seq2seq4repair_space>parameters<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>PageParameters();\n" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters.put(\"message\",<seq2seq4repair_space>\"This<seq2seq4repair_space>message<seq2seq4repair_space>was<seq2seq4repair_space>passed<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>page<seq2seq4repair_space>parameter<seq2seq4repair_space>argument\");\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add(new<seq2seq4repair_space>BookmarkablePageLink<Void>(\"pageLinkWithArgs\",<seq2seq4repair_space>BookmarkablePage.class,<seq2seq4repair_space>parameters));" ) ;
Buggy code:
public abstract class A_CmsDirectEditProvider implements I_CmsDirectEditProvider { protected static final String INCLUDE_FILE_DEFAULT = "//system//workplace//editors//direct_edit_include.txt" ; private static final Log LOG = CmsLog . getLog ( A_CmsDirectEditProvider . class ) ; protected CmsObject m_cms ; protected CmsParameterConfiguration m_configurationParameters ; protected int m_editButtonStyle ; protected String m_fileName ; protected CmsMessages m_messages ; protected CmsDirectEditMode m_mode ; protected Random m_rnd ; public void addConfigurationParameter ( String paramName , String paramValue ) { } public CmsParameterConfiguration getConfiguration ( ) { } public CmsDirectEditResourceInfo getResourceInfo ( String resourceName ) { } public void init ( CmsObject cms , CmsDirectEditMode mode , String fileName ) { m_cms = cms ; m_fileName = fileName ; if ( CmsStringUtil . isEmpty ( m_fileName ) ) { m_fileName = A_CmsDirectEditProvider . INCLUDE_FILE_DEFAULT ; } m_mode = ( mode != null ) ? mode : CmsDirectEditMode . AUTO ; m_rnd = new Random ( ) ; CmsUserSettings settings = new CmsUserSettings ( cms ) ; <START_BUG> m_messages = new CmsMessages ( Messages . get ( ) . getBundleName ( ) , settings . getLocale ( ) ) ; <END_BUG> m_editButtonStyle = settings . getEditorButtonStyle ( ) ; } public void initConfiguration ( ) throws CmsConfigurationException { } public void insertDirectEditEmptyList ( PageContext context , CmsDirectEditParams params ) throws JspException { } @ SuppressWarnings ( "unused" ) public void insertDirectEditListMetadata ( PageContext context , I_CmsContentLoadCollectorInfo info ) throws JspException { } public boolean isManual ( CmsDirectEditMode mode ) { } protected String getLink ( String target ) { } protected String getNextDirectEditId ( ) { } protected void print ( PageContext context , String content ) throws JspException { } No newline ; at end ; of file ; }

Fix:
m_messages = new CmsMessages ( org . opencms . workplace . editors . Messages . get ( ) . getBundleName ( ) , settings . getLocale ( ) ) ;
Buggy code:
public class MangaOnWebChapter extends Chapter { private String ctsn ; private URL url ; private transient Map < String , String > cookies ; private transient String cdn ; private transient String crcod ; private transient ArrayList < String > paths ; public MangaOnWebChapter ( URL _url ) { } public ArrayList < DownloadJob > init ( ) throws Exception { } public ArrayList < DownloadJob > download ( File directory ) throws Exception { ArrayList < DownloadJob > list = new ArrayList < DownloadJob > ( ) ; byte [ ] keyBytes = new byte [ ] { 99 , 49 , 51 , 53 , 100 , 54 , 56 , 56 , 57 , 57 , 99 , 56 , 50 , 54 , 99 , 101 , 100 , 55 , 99 , 52 , 57 , 98 , 99 , 55 , 54 , 97 , 97 , 57 , 52 , 56 , 57 , 48 } ; final BlowfishKey bfkey = new BlowfishKey ( keyBytes ) ; for ( int i = 0 ; i < ( paths . size ( ) ) ; i ++ ) { <START_BUG> final File f = DownloaderUtils . fileName ( directory , ctsn , i , "jpg" ) ; <END_BUG> if ( f . exists ( ) ) continue ; ByteArrayDownloadJob page = new ByteArrayDownloadJob ( ( "Page<seq2seq4repair_space>" + i ) , new URL ( ( ( ( ( ( ( ( "http:////mangaonweb.com//page.do?cdn=" + ( cdn ) ) + "&cpn=" ) + ( paths . get ( i ) ) ) + "&crcod=" ) + ( crcod ) ) + "&rid=" ) + ( ( int ) ( ( Math . random ( ) ) * 10000 ) ) ) ) ) { @ Override public void run ( ) throws Exception { super . run ( ) ; byte [ ] bytes = getBytes ( ) ; bfkey . decrypt ( bytes , 0 ) ; DownloaderUtils . safeWrite ( bytes , f ) ; } } ; page . setCookies ( cookies ) ; list . add ( page ) ; } return list ; } private static String param ( String page , String param ) { } }

Fix:
final File f = DownloaderUtils . fileName ( directory , ctsn , i , "png" ) ;
Buggy code:
public class DRPCSpout implements IRichSpout { public static Logger LOG = Logger . getLogger ( DRPCSpout . class ) ; SpoutOutputCollector _collector ; List < DRPCInvocationsClient > _clients = new ArrayList < DRPCInvocationsClient > ( ) ; String _function ; String _local_drpc_id = null ; private static class DRPCMessageId { String id ; int index ; public DRPCMessageId ( String id , int index ) { } } public DRPCSpout ( String function ) { } public DRPCSpout ( String function , ILocalDRPC drpc ) { } @ Override public void open ( Map conf , TopologyContext context , SpoutOutputCollector collector ) { _collector = collector ; if ( ( _local_drpc_id ) == null ) { int numTasks = context . getComponentTasks ( context . getThisComponentId ( ) ) . size ( ) ; int index = context . getThisTaskIndex ( ) ; int port = Utils . getInt ( conf . get ( DRPC_INVOCATIONS_PORT ) ) ; List < String > servers = ( ( List < String > ) ( conf . get ( DRPC_SERVERS ) ) ) ; <START_BUG> if ( servers . isEmpty ( ) ) { <END_BUG> throw new RuntimeException ( "No<seq2seq4repair_space>DRPC<seq2seq4repair_space>servers<seq2seq4repair_space>configured<seq2seq4repair_space>for<seq2seq4repair_space>topology" ) ; } if ( numTasks < ( servers . size ( ) ) ) { for ( String s : servers ) { _clients . add ( new DRPCInvocationsClient ( s , port ) ) ; } } else { int i = index % ( servers . size ( ) ) ; _clients . add ( new DRPCInvocationsClient ( servers . get ( i ) , port ) ) ; } } } @ Override public void close ( ) { } @ Override public void nextTuple ( ) { } @ Override public void ack ( Object msgId ) { } @ Override public void fail ( Object msgId ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } }

Fix:
if ( ( servers == null ) || ( servers . isEmpty ( ) ) ) {
Buggy code:
public abstract class Openable extends JavaElement implements IBufferChangedListener , IOpenable { protected Openable ( int type , IJavaElement parent , String name ) { } public void bufferChanged ( BufferChangedEvent event ) { } protected void buildStructure ( OpenableElementInfo info , IProgressMonitor pm ) throws JavaModelException { } protected void closeBuffer ( OpenableElementInfo info ) { } protected void closing ( Object info ) throws JavaModelException { } protected void codeComplete ( ICompilationUnit cu , ICompilationUnit unitToSkip , int position , ICodeCompletionRequestor requestor ) throws JavaModelException { if ( requestor == null ) { throw new IllegalArgumentException ( Util . bind ( "codeAssist.nullRequestor" ) ) ; } IBuffer buffer = getBuffer ( ) ; if ( buffer == null ) { return ; } if ( ( position < ( - 1 ) ) || ( position > ( buffer . getLength ( ) ) ) ) { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . INDEX_OUT_OF_BOUNDS ) ) ; } SearchableEnvironment environment = ( ( SearchableEnvironment ) ( ( ( JavaProject ) ( getJavaProject ( ) ) ) . getSearchableNameEnvironment ( ) ) ) ; <START_BUG> INameLookup nameLookup = ( ( JavaProject ) ( getJavaProject ( ) ) ) . getNameLookup ( ) ; <END_BUG> environment . unitToSkip = unitToSkip ; CompletionEngine engine = new CompletionEngine ( environment , new CompletionRequestorWrapper ( requestor , nameLookup ) , JavaCore . getOptions ( ) ) ; engine . complete ( cu , position ) ; environment . unitToSkip = null ; } protected IJavaElement [ ] codeSelect ( ICompilationUnit cu , int offset , int length ) throws JavaModelException { } protected void codeSelect ( ICompilationUnit cu , int offset , int length , ISelectionRequestor requestor ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } protected abstract boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Hashtable newElements , IResource underlyingResource ) throws JavaModelException { } public IBuffer getBuffer ( ) throws JavaModelException { } protected IBufferManager getBufferManager ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IResource getUnderlyingResource ( ) throws JavaModelException { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean hasUnsavedChanges ( ) throws JavaModelException { } public boolean isConsistent ( ) throws JavaModelException { } public boolean isOpen ( ) { } protected boolean isSourceElement ( ) { } public void makeConsistent ( IProgressMonitor pm ) throws JavaModelException { } public void open ( IProgressMonitor pm ) throws JavaModelException { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { } protected void openWhenClosed ( IProgressMonitor pm ) throws JavaModelException { } public void save ( IProgressMonitor pm , boolean force ) throws JavaModelException { } public PackageFragmentRoot getPackageFragmentRoot ( ) { } }

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

Fix:
IClasspathEntry [ ] classpathEntries = ( ( JavaProject ) ( javaProject ) ) . getExpandedClasspath ( true ) ;
Buggy code:
public class GenericSignatureParser { private String [ ] tokenStream ; private int tokenIndex = 0 ; public ClassSignature parseAsClassSignature ( String sig ) { } public MethodTypeSignature parseAsMethodSignature ( String sig ) { } public FieldTypeSignature parseAsFieldSignature ( String sig ) { } private FormalTypeParameter parseFormalTypeParameter ( ) { FormalTypeParameter ftp = new FormalTypeParameter ( ) ; ftp . identifier = eatIdentifier ( ) ; eat ( ":" ) ; ftp . classBound = parseFieldTypeSignature ( true ) ; if ( ( ftp . classBound ) == null ) { <START_BUG> ftp . classBound = new ClassTypeSignature ( "Ljava//lang//Object;" , "Object" ) ; <END_BUG> } List optionalBounds = new ArrayList ( ) ; while ( maybeEat ( ":" ) ) { optionalBounds . add ( parseFieldTypeSignature ( false ) ) ; } ftp . interfaceBounds = new FieldTypeSignature [ optionalBounds . size ( ) ] ; optionalBounds . toArray ( ftp . interfaceBounds ) ; return ftp ; } private FieldTypeSignature parseFieldTypeSignature ( boolean isOptional ) { } private ArrayTypeSignature parseArrayTypeSignature ( ) { } private ClassTypeSignature parseClassTypeSignature ( ) { } private SimpleClassTypeSignature parseSimpleClassTypeSignature ( ) { } private TypeArgument parseTypeArgument ( ) { } private TypeArgument [ ] maybeParseTypeArguments ( ) { } private TypeVariableSignature parseTypeVariableSignature ( ) { } private boolean maybeEat ( String token ) { } private void eat ( String token ) { } private String eatIdentifier ( ) { } public String [ ] tokenize ( String signatureString ) { } }

Fix:
ftp . classBound = new ClassTypeSignature ( "Ljava//lang//Object;" , "Ljava//lang//Object" ) ;
Buggy code:
public class Checker extends ShadowMunger { private String msg ; private boolean isError ; public Checker ( DeclareErrorOrWarning deow ) { } public ShadowMunger concretize ( ResolvedTypeX fromType , World world , PerClause clause ) { } public void specializeOn ( Shadow shadow ) { } public void implementOn ( Shadow shadow ) { } public boolean match ( Shadow shadow , World world ) { if ( super . match ( shadow , world ) ) { <START_BUG> IMessage message = new Message ( msg , shadow . toString ( ) , ( isError ? IMessage . ERROR : IMessage . WARNING ) , shadow . getSourceLocation ( ) , null , new ISourceLocation [ ] { this . getSourceLocation ( ) } , true ) ; <END_BUG> world . getMessageHandler ( ) . handleMessage ( message ) ; if ( ( world . xrefHandler ) != null ) { world . xrefHandler . addCrossReference ( this . getSourceLocation ( ) , shadow . getSourceLocation ( ) , ( this . isError ? Kind . DECLARE_ERROR : Kind . DECLARE_WARNING ) , false ) ; } if ( ( world . getModel ( ) ) != null ) { AsmRelationshipProvider . checkerMunger ( world . getModel ( ) , shadow , this ) ; } } return false ; } public int compareTo ( Object other ) { } public Collection getThrownExceptions ( ) { } public boolean isError ( ) { } }

Fix:
IMessage message = new Message ( msg , shadow . toString ( ) , ( isError ? IMessage . ERROR : IMessage . WARNING ) , shadow . getSourceLocation ( ) , null , new ISourceLocation [ ] { this . getSourceLocation ( ) } , true , 0 ) ;
Buggy code:
public class ParentloginController { public Hyperlink goBack ; public void goBack ( ) { Stage stage = ( ( Stage ) ( goBack . getScene ( ) . getWindow ( ) ) ) ; <START_BUG> stage . hide ( ) ; <END_BUG> } }

Fix:
stage . close ( ) ;
Buggy code:
@ WebServlet ( name = "CreateAlert" , urlPatterns = { "//CreateAlert" } ) public class CreateAlert extends HttpServlet { private static final Logger logger = LoggerFactory . getLogger ( CreateAlert . class . getName ( ) ) ; public static final String PAGE_NAME = "Create<seq2seq4repair_space>Alert" ; @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) { } @ Override public String getServletInfo ( ) { } protected void processGetRequest ( HttpServletRequest request , HttpServletResponse response ) { } protected void processPostRequest ( HttpServletRequest request , HttpServletResponse response ) { } private String buildCreateAlertHtml ( Alert alert ) { } private String parseAndAlterAlert ( HttpServletRequest request ) { if ( request == null ) { return null ; } String returnString ; Alert alert = getAlertFromAlertParameters ( request ) ; String oldName = request . getParameter ( "Old_Name" ) ; if ( ( alert != null ) && ( ( alert . getName ( ) ) != null ) ) { AlertsLogic alertsLogic = new AlertsLogic ( ) ; <START_BUG> returnString = alertsLogic . alterRecordInDatabase ( alert , oldName ) ; <END_BUG> if ( ( ( GlobalVariables . alertInvokerThread ) != null ) && ( ( AlertsLogic . STATUS_CODE_SUCCESS ) == ( alertsLogic . getLastAlterRecordStatus ( ) ) ) ) { if ( ( GlobalVariables . alertInvokerThread ) != null ) alertInvokerThread . runAlertThread ( false , true ) ; } } else { returnString = "Failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>alert.<seq2seq4repair_space>Reason=\"Field<seq2seq4repair_space>validation<seq2seq4repair_space>failed.\"" ; CreateAlert . logger . warn ( returnString ) ; } return returnString ; } private Alert getAlertFromAlertParameters ( HttpServletRequest request ) { } }

Fix:
returnString = alertsLogic . alterRecordInDatabase ( alert , oldName , false ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; ImageList imageList ; boolean ignoreMouse ; static final int ButtonProc ; static final TCHAR ButtonClass = new TCHAR ( 0 , "BUTTON" , true ) ; static final char [ ] SCROLLBAR = new char [ ] { 'S' , 'C' , 'R' , 'O' , 'L' , 'L' , 'B' , 'A' , 'R' , 0 } ; static final int CheckWidth ; static final int CheckHeight ; public Button ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } void click ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } int defaultBackground ( ) { } int defaultForeground ( ) { } public int getAlignment ( ) { } boolean getDefault ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } boolean isTabItem ( ) { } boolean mnemonicHit ( char ch ) { } boolean mnemonicMatch ( char key ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void setDefault ( boolean value ) { } public void setImage ( Image image ) { } boolean setRadioFocus ( ) { } boolean setRadioSelection ( boolean value ) { } boolean setSavedFocus ( ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int widgetStyle ( ) { int bits = super . widgetStyle ( ) ; if ( ( ( style ) & ( SWT . FLAT ) ) != 0 ) bits |= OS . BS_FLAT ; if ( ( ( style ) & ( SWT . ARROW ) ) != 0 ) return bits | ( OS . BS_OWNERDRAW ) ; if ( ( ( style ) & ( SWT . LEFT ) ) != 0 ) bits |= OS . BS_LEFT ; if ( ( ( style ) & ( SWT . CENTER ) ) != 0 ) bits |= OS . BS_CENTER ; if ( ( ( style ) & ( SWT . RIGHT ) ) != 0 ) bits |= OS . BS_RIGHT ; if ( ( ( style ) & ( SWT . PUSH ) ) != 0 ) return ( bits | ( OS . BS_PUSHBUTTON ) ) | ( OS . WS_TABSTOP ) ; if ( ( ( style ) & ( SWT . CHECK ) ) != 0 ) return ( bits | ( OS . BS_CHECKBOX ) ) | ( OS . WS_TABSTOP ) ; if ( ( ( style ) & ( SWT . RADIO ) ) != 0 ) return bits | ( OS . BS_RADIOBUTTON ) ; if ( ( ( style ) & ( SWT . TOGGLE ) ) != 0 ) <START_BUG> return ( bits | ( OS . BS_PUSHLIKE ) ) | ( OS . BS_CHECKBOX ) ; <END_BUG> return ( bits | ( OS . BS_PUSHBUTTON ) ) | ( OS . WS_TABSTOP ) ; } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_LBUTTONUP ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT wmColorChild ( int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmDrawChild ( int wParam , int lParam ) { } }

Fix:
return ( ( bits | ( OS . BS_PUSHLIKE ) ) | ( OS . BS_CHECKBOX ) ) | ( OS . WS_TABSTOP ) ;
Buggy code:
public class EjbcHelper implements Ejbc . Helper { private File descriptorDirectory ; private File generatedFilesDirectory ; private File manifestFile ; private Path classpath ; private File sourceDirectory ; private String [ ] files ; private Ejbc ejbcTask ; String [ ] descriptors ; public EjbcHelper ( ) { } public void initialize ( Ejbc ejbcTask ) { } public void setDescriptorDir ( File dir ) { } public void setDest ( File dir ) { } public void setManifest ( File manifestFile ) { } public void setClasspath ( Path classpath ) { } public void setDescriptors ( String [ ] descriptors ) { } public void setSrc ( File dir ) { } public void execute ( ) throws BuildException { } private boolean isRegenRequired ( File descriptorFile ) throws IOException { } private void regenerateSupportClasses ( File descriptorFile ) { Project project = ejbcTask . getProject ( ) ; String javaHome = System . getProperty ( "java.home" ) ; String compiler = project . getProperty ( "build.compiler" ) ; String [ ] args = null ; <START_BUG> if ( compiler . equalsIgnoreCase ( "jikes" ) ) { <END_BUG> Path execClassPath = new Path ( project ) ; if ( ( Project . getJavaVersion ( ) ) == ( Project . JAVA_1_1 ) ) { execClassPath . addExisting ( new Path ( project , ( ( System . getProperty ( "java.home" ) ) + "//lib//classes.zip" ) ) ) ; } else { execClassPath . addExisting ( new Path ( project , ( ( System . getProperty ( "java.home" ) ) + "//lib//rt.jar" ) ) ) ; execClassPath . addExisting ( new Path ( project , ( ( System . getProperty ( "java.home" ) ) + "//jre//lib//rt.jar" ) ) ) ; } execClassPath . append ( classpath ) ; args = new String [ ] { "-noexit" , "-keepgenerated" , "-compiler" , "Jikes" , "-d" , generatedFilesDirectory . getPath ( ) , "-classpath" , execClassPath . toString ( ) , descriptorFile . getPath ( ) } ; } else { args = new String [ ] { "-noexit" , "-keepgenerated" , "-d" , generatedFilesDirectory . getPath ( ) , "-classpath" , classpath . toString ( ) , descriptorFile . getPath ( ) } ; } try { ejbc . main ( args ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new BuildException ( e ) ; } } }

Fix:
if ( ( compiler != null ) && ( compiler . equalsIgnoreCase ( "jikes" ) ) ) {
Buggy code:
public class WeatherFragmentAdapter extends FragmentStatePagerAdapter { CharSequence [ ] titles = new CharSequence [ ] { "Right<seq2seq4repair_space>Now" , "Week" } ; Bundle extras ; int numOfTabs ; public WeatherFragmentAdapter ( FragmentManager fm , Bundle extras , int numOfTabs ) { } @ Override public int getCount ( ) { <START_BUG> return 0 ; <END_BUG> } @ Override public Fragment getItem ( int position ) { } @ Override public CharSequence getPageTitle ( int position ) { } }

Fix:
return numOfTabs ;
Buggy code:
public class POP3MailCheckingAction extends AbstractMailCheckingAction { private int accountUid ; public POP3MailCheckingAction ( AccountItem accountItem ) { } public void check ( ) { } public boolean isCheckAll ( ) { POP3Server controller = popServerCollection . uidGet ( accountUid ) ; <START_BUG> return controller . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "exclude_from_checkall" , false ) ; <END_BUG> } }

Fix:
return ! ( controller . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "exclude_from_checkall" , false ) ) ;
Buggy code:
public class QualifiedTypeDeclarationPattern extends TypeDeclarationPattern implements IIndexConstants { public char [ ] qualification ; public int packageIndex ; public QualifiedTypeDeclarationPattern ( char [ ] qualification , char [ ] simpleName , char typeSuffix , int matchRule ) { } QualifiedTypeDeclarationPattern ( int matchRule ) { } public void decodeIndexKey ( char [ ] key ) { } public SearchPattern getBlankPattern ( ) { } public char [ ] getPackageName ( ) { if ( ( this . packageIndex ) == ( - 1 ) ) return this . qualification ; <START_BUG> return CharOperation . subarray ( this . qualification , 0 , this . packageIndex ) ; <END_BUG> } public char [ ] [ ] getEnclosingTypeNames ( ) { } public boolean matchesDecodedKey ( SearchPattern decodedPattern ) { } protected StringBuffer print ( StringBuffer output ) { } }

Fix:
return TypeDeclarationPattern . internedPackageNames . add ( CharOperation . subarray ( this . qualification , 0 , this . packageIndex ) ) ;
Buggy code:
public class Nysiis implements StringEncoder { private static final char [ ] CHARS_A = new char [ ] { 'A' } ; private static final char [ ] CHARS_AF = new char [ ] { 'A' , 'F' } ; private static final char [ ] CHARS_C = new char [ ] { 'C' } ; private static final char [ ] CHARS_FF = new char [ ] { 'F' , 'F' } ; private static final char [ ] CHARS_G = new char [ ] { 'G' } ; private static final char [ ] CHARS_N = new char [ ] { 'N' } ; private static final char [ ] CHARS_NN = new char [ ] { 'N' , 'N' } ; private static final char [ ] CHARS_S = new char [ ] { 'S' } ; private static final char [ ] CHARS_SSS = new char [ ] { 'S' , 'S' , 'S' } ; private static final char SPACE = '<seq2seq4repair_space>' ; private static final int TRUE_LENGTH = 6 ; private static boolean isVowel ( final char c ) { } private static char [ ] transcodeRemaining ( final char prev , final char curr , final char next , final char aNext ) { } private final boolean trueLength ; public Nysiis ( ) { } public Nysiis ( boolean trueLength ) { } public Object encode ( Object pObject ) throws EncoderException { } public String encode ( String pString ) { } public boolean isTrueLength ( ) { <START_BUG> return trueLength ; <END_BUG> } public String nysiis ( String str ) { } }

Fix:
return this . trueLength ;
Buggy code:
public final class DomainControllerService implements Service < DomainController > { private static final Logger log = Logger . getLogger ( "org.jboss.as.domain.controller" ) ; private final ExtensibleConfigurationPersister configurationPersister ; private final DeploymentRepository deploymentRepository ; private final FileRepository localFileRepository ; private final InjectedValue < ScheduledExecutorService > scheduledExecutorService = new InjectedValue < ScheduledExecutorService > ( ) ; private final InjectedValue < MasterDomainControllerClient > masterDomainControllerClient = new InjectedValue < MasterDomainControllerClient > ( ) ; private final InjectedValue < LocalHostModel > hostController = new InjectedValue < LocalHostModel > ( ) ; private final String localHostName ; private final boolean backupDomainFiles ; private final boolean useCachedDc ; private DomainController controller ; public DomainControllerService ( final ExtensibleConfigurationPersister configurationPersister , final String localHostName , final DeploymentRepository deploymentRepository , final FileRepository localFileRepository , final boolean backupDomainFiles , final boolean useCachedDc ) { } @ Override public synchronized void start ( final StartContext context ) throws StartException { } @ Override public synchronized void stop ( final StopContext context ) { } @ Override public synchronized DomainController getValue ( ) throws IllegalArgumentException , IllegalStateException { } public Injector < ScheduledExecutorService > getScheduledExecutorServiceInjector ( ) { } public Injector < LocalHostModel > getHostControllerServiceInjector ( ) { } public Injector < MasterDomainControllerClient > getMasterDomainControllerClientInjector ( ) { } private DomainController startMasterDomainController ( ) throws StartException { DomainControllerService . log . info ( "Starting<seq2seq4repair_space>Domain<seq2seq4repair_space>Controller" ) ; DomainModel domainModel = loadLocalDomainModel ( ) ; <START_BUG> return new DomainControllerImpl ( scheduledExecutorService . getValue ( ) , domainModel , localHostName , localFileRepository ) ; <END_BUG> } private DomainController startSlaveDomainController ( MasterDomainControllerClient masterClient ) throws StartException { } private DomainController startRemoteSlaveDomainController ( MasterDomainControllerClient masterClient ) throws StartException { } private DomainController startLocalCopySlaveDomainController ( MasterDomainControllerClient masterClient ) throws StartException { } private DomainModel loadLocalDomainModel ( ) throws StartException { } private void backupDomainFiles ( ) { } private void copyFile ( File src , File dest ) throws IOException { } }

Fix:
return new DomainControllerImpl ( scheduledExecutorService . getValue ( ) , domainModel , localHostName , localFileRepository , deploymentRepository ) ;
Buggy code:
@ Repository public class TaskDAOImpl implements TaskDAO { private static final Logger logger = LoggerFactory . getLogger ( TaskDAOImpl . class ) ; private SessionFactory sessionFactory ; private DAOHelper daoHelper = new DAOHelper ( ) ; public void setSessionFactory ( SessionFactory sessionFactory ) { } @ Override public void create ( Task task ) { } @ Override public Task getByID ( long id ) { } @ Override public Task getByIDWithAllCollections ( long id ) { } @ Override public void update ( Task task ) { } @ Override public void delete ( long id ) { } @ SuppressWarnings ( "unchecked" ) public List < Task > list ( Long companyID ) { } @ SuppressWarnings ( "unchecked" ) public List < Task > listWithAllCollections ( Long companyID ) { } @ Override public void assignStaffTask ( TaskStaffAssignment taskStaffAssign ) { } @ Override public void assignTeamTask ( TaskTeamAssignment taskTeamAssign ) { } @ Override public void unassignTeamTask ( long taskID , long teamID ) { } @ Override public void unassignAllTeamTasks ( long taskID ) { } @ Override public void unassignStaffTask ( long taskID , long staffID ) { } @ Override public void unassignAllStaffTasks ( long id ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < TaskFieldAssignment > getFieldsByTaskID ( long taskID ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < Staff > getStaffByTaskID ( long taskID ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < Team > getTeamByTaskID ( long taskID ) { } @ Override public void deleteAllTasksByProject ( long projectID ) { } @ Override public void merge ( Task task ) { } @ Override public String getTitleByID ( long taskID ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void unassignAllTasksByProject ( Project project ) { } @ Override public void unassignTaskByProject ( long taskID , Project project ) { } @ SuppressWarnings ( "unchecked" ) @ Override <START_BUG> @ Cacheable ( value = "searchTaskCache" , key = "#root.targetClass" ) <END_BUG> public List < Task > listFromCache ( Long companyID ) { Session session = this . sessionFactory . getCurrentSession ( ) ; List < Task > taskList = this . daoHelper . getSelectQueryFilterCompany ( session , Task . class . getName ( ) , companyID ) . list ( ) ; return taskList ; } }

Fix:
@ Cacheable ( value = "searchTaskCache" , key = "#root.methodName" )
Buggy code:
public class SwitchStatement extends Statement { private Expression expression = null ; private ASTNode . NodeList statements = new ASTNode . NodeList ( true , Statement . class ) ; SwitchStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { SwitchStatement result = new SwitchStatement ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . statements ( ) . addAll ( ASTNode . copySubtrees ( target , statements ( ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public List statements ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class PriorityBuffer < E > extends AbstractCollection < E > implements Serializable , Buffer < E > { private static final long serialVersionUID = 6891186490470027896L ; private static final int DEFAULT_CAPACITY = 13 ; protected E [ ] elements ; protected int size ; protected boolean ascendingOrder ; protected Comparator < ? super E > comparator ; public PriorityBuffer ( ) { } public PriorityBuffer ( Comparator < ? super E > comparator ) { } public PriorityBuffer ( boolean ascendingOrder ) { } public PriorityBuffer ( boolean ascendingOrder , Comparator < ? super E > comparator ) { } public PriorityBuffer ( int capacity ) { } public PriorityBuffer ( int capacity , Comparator < ? super E > comparator ) { } public PriorityBuffer ( int capacity , boolean ascendingOrder ) { } @ SuppressWarnings ( "unchecked" ) public PriorityBuffer ( int capacity , boolean ascendingOrder , Comparator < ? super E > comparator ) { } public boolean isAscendingOrder ( ) { } public Comparator < ? super E > comparator ( ) { } public int size ( ) { } @ SuppressWarnings ( "unchecked" ) public void clear ( ) { } public boolean add ( E element ) { } public E get ( ) { } public E remove ( ) { } protected boolean isAtCapacity ( ) { } protected void percolateDownMinHeap ( final int index ) { } protected void percolateDownMaxHeap ( final int index ) { } protected void percolateUpMinHeap ( final int index ) { } protected void percolateUpMinHeap ( final E element ) { } protected void percolateUpMaxHeap ( final int index ) { } protected void percolateUpMaxHeap ( final E element ) { } protected int compare ( E a , E b ) { } @ SuppressWarnings ( "unchecked" ) protected void grow ( ) { } public Iterator < E > iterator ( ) { } public String toString ( ) { <START_BUG> final StringBuffer sb = new StringBuffer ( ) ; <END_BUG> sb . append ( "[<seq2seq4repair_space>" ) ; for ( int i = 1 ; i < ( ( size ) + 1 ) ; i ++ ) { if ( i != 1 ) { sb . append ( ",<seq2seq4repair_space>" ) ; } sb . append ( elements [ i ] ) ; } sb . append ( "<seq2seq4repair_space>]" ) ; return sb . toString ( ) ; } }

Fix:
final StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class QuestionTemplates { static QuestionTemplate [ ] [ ] queries ; public static void initializeQueries ( ) { } public static QuestionTemplate getRandomQuestionTemplate ( int categoryID ) { int arraySize = 2 ; int randomNumber = ( ( int ) ( ( Math . random ( ) ) * arraySize ) ) ; <START_BUG> return QuestionTemplates . queries [ categoryID ] [ 3 ] ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return QuestionTemplates . queries [ categoryID ] [ 0 ] ;
Buggy code:
public class CreateFilterOnSubjectAction extends AbstractColumbaAction implements SelectionListener { public CreateFilterOnSubjectAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <START_BUG> CreateFilterOnMessageCommand c = new CreateFilterOnMessageCommand ( r , CreateFilterOnMessageCommand . FILTER_ON_SUBJECT ) ; <END_BUG> processor . addOp ( c ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
CreateFilterOnMessageCommand c = new CreateFilterOnMessageCommand ( getFrameMediator ( ) , r , CreateFilterOnMessageCommand . FILTER_ON_SUBJECT ) ;
Buggy code:
public class DistributableSessionManagerFactoryBuilder implements org . wildfly . extension . undertow . session . DistributableSessionManagerFactoryBuilder { private final SessionManagerFactoryBuilder builder ; public DistributableSessionManagerFactoryBuilder ( ) { } public DistributableSessionManagerFactoryBuilder ( SessionManagerFactoryBuilder builder ) { } @ Override public ServiceBuilder < SessionManagerFactory > build ( ServiceTarget target , ServiceName name , ServiceName deploymentServiceName , Module module , JBossWebMetaData metaData ) { <START_BUG> ServiceName clusteringServiceName = name . append ( "clustering" ) ; <END_BUG> this . builder . buildDeploymentDependency ( target , clusteringServiceName , deploymentServiceName , module , metaData ) . setInitialMode ( ON_DEMAND ) . install ( ) ; return DistributableSessionManagerFactoryService . build ( target , name , clusteringServiceName ) ; } }

Fix:
ServiceName clusteringServiceName = name . append ( "distributable" ) ;