nus-yam/ex-repair huggingface dataset:
Buggy code:
public class RemoveColumnFamilyTest extends CleanupHelper { @ Test public void testRemoveColumnFamily ( ) throws IOException , InterruptedException , ExecutionException { Table table = Table . open ( "Keyspace1" ) ; ColumnFamilyStore store = table . getColumnFamilyStore ( "Standard1" ) ; RowMutation rm ; DecoratedKey dk = Util . dk ( "key1" ) ; rm = new RowMutation ( "Keyspace1" , dk . key ) ; rm . add ( new QueryPath ( "Standard1" , null , "Column1" . getBytes ( ) ) , "asdf" . getBytes ( ) , new TimestampClock ( 0 ) ) ; rm . apply ( ) ; rm = new RowMutation ( "Keyspace1" , dk . key ) ; rm . delete ( new QueryPath ( "Standard1" ) , new TimestampClock ( 1 ) ) ; rm . apply ( ) ; ColumnFamily retrieved = store . getColumnFamily ( QueryFilter . getIdentityFilter ( dk , new QueryPath ( "Standard1" , null , "Column1" . getBytes ( ) ) ) ) ; assert retrieved . isMarkedForDelete ( ) ; Assert . assertNull ( retrieved . getColumn ( "Column1" . getBytes ( ) ) ) ; <START_BUG> Assert . assertNull ( ColumnFamilyStore . removeDeleted ( retrieved , Integer . MAX_VALUE ) ) ; <END_BUG> } }

Fix:
Assert . assertNull ( Util . cloneAndRemoveDeleted ( retrieved , Integer . MAX_VALUE ) ) ;
Buggy code:
public class ModuleEnvironment extends Environment { private final AModuleModules module ; public List < PDefinition > getDefinitions ( ) { } public ModuleEnvironment ( ITypeCheckerAssistantFactory af , AModuleModules module ) { } @ Override public String toString ( ) { } @ Override public PDefinition findName ( ILexNameToken name , NameScope scope ) { PDefinition def = af . createPDefinitionListAssistant ( ) . findName ( module . getDefs ( ) , name , scope ) ; <START_BUG> if ( def != null ) { <END_BUG> return def ; } def = af . createPDefinitionListAssistant ( ) . findName ( module . getImportdefs ( ) , name , scope ) ; if ( def != null ) { return def ; } return null ; } @ Override public PDefinition findType ( ILexNameToken name , String fromModule ) { } @ Override public Set < PDefinition > findMatches ( ILexNameToken name ) { } @ Override public void unusedCheck ( ) { } @ Override public AStateDefinition findStateDefinition ( ) { } @ Override public boolean isVDMPP ( ) { } @ Override public boolean isSystem ( ) { } @ Override public SClassDefinition findClassDefinition ( ) { } @ Override public boolean isStatic ( ) { } }

Fix:
if ( ( def != null ) && ( ! ( ExcludedDefinitions . isExcluded ( def ) ) ) ) {
Buggy code:
public class MarkupCache { private static final Log log = LogFactory . getLog ( MarkupCache . class ) ; private final Map < CharSequence , IMarkup > markupCache = new ConcurrentHashMap < CharSequence , IMarkup > ( ) ; private final Watcher afterLoadListeners = new Watcher ( ) ; private final Application application ; public MarkupCache ( final Application application ) { } public final MarkupStream getMarkupStream ( final MarkupContainer container ) { } public final MarkupStream getMarkupStream ( final MarkupContainer container , final boolean throwException ) { } public final boolean hasAssociatedMarkup ( final MarkupContainer container ) { } private final IMarkup getMarkup ( final MarkupContainer < ? > container , final Class < ? extends MarkupContainer > clazz ) { } protected IMarkupResourceStreamProvider getMarkupResourceStreamProvider ( final MarkupContainer container ) { } protected IMarkupCacheKeyProvider getMarkupCacheKeyProvider ( final MarkupContainer container ) { } private void removeMarkup ( final MarkupResourceStream markupResourceStream ) { } private final IMarkup loadMarkup ( final MarkupContainer container , final MarkupResourceStream markupResourceStream ) { try { <START_BUG> IMarkup markup = application . getMarkupSettings ( ) . getMarkupParserFactory ( ) . newMarkupParser ( ) . readAndParse ( markupResourceStream ) ; <END_BUG> markup = checkForMarkupInheritance ( container , markup ) ; if ( ( markupResourceStream . getCacheKey ( ) ) != null ) { markupCache . put ( markupResourceStream . getCacheKey ( ) , markup ) ; } afterLoadListeners . notifyListeners ( markupResourceStream ) ; return markup ; } catch ( final ResourceStreamNotFoundException e ) { MarkupCache . log . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>markup<seq2seq4repair_space>from<seq2seq4repair_space>" + markupResourceStream ) , e ) ; } catch ( final IOException e ) { MarkupCache . log . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>markup<seq2seq4repair_space>from<seq2seq4repair_space>" + markupResourceStream ) , e ) ; } synchronized ( markupCache ) { markupCache . remove ( markupResourceStream . getCacheKey ( ) ) ; afterLoadListeners . remove ( markupResourceStream ) ; } return IMarkup . NO_MARKUP ; } private final IMarkup loadMarkupAndWatchForChanges ( final MarkupContainer container , final MarkupResourceStream markupResourceStream ) { } public void clear ( ) { } @ SuppressWarnings ( "unchecked" ) private IMarkup checkForMarkupInheritance ( final MarkupContainer container , final IMarkup markup ) { } private int requiresBaseMarkup ( final IMarkup markup ) { } }

Fix:
IMarkup markup = application . getMarkupSettings ( ) . getMarkupParserFactory ( ) . newMarkupParser ( markupResourceStream ) . readAndParse ( ) ;
Buggy code:
public class WorkspaceSelectFieldIOHandler implements WorkspaceFieldIOHandler { @ Inject private WorkspaceMaterialFieldAnswerController workspaceMaterialFieldAnswerController ; @ Override public void store ( WorkspaceMaterialField field , WorkspaceMaterialReply reply , String value ) throws WorkspaceFieldIOException { } @ Override public String retrieve ( WorkspaceMaterialField field , WorkspaceMaterialReply reply ) throws WorkspaceFieldIOException { WorkspaceMaterialSelectFieldAnswer fieldAnswer = workspaceMaterialFieldAnswerController . findWorkspaceMaterialSelectFieldAnswerByFieldAndReply ( field , reply ) ; <START_BUG> if ( fieldAnswer != null ) { <END_BUG> return fieldAnswer . getValue ( ) . getName ( ) ; } return null ; } @ Override public String getType ( ) { } }

Fix:
if ( ( fieldAnswer != null ) && ( ( fieldAnswer . getValue ( ) ) != null ) ) {
Buggy code:
public class ShapeCreator { public static Shape createRectangle ( float posX , float posY , float width , float height ) { } public static Shape createRectangle ( float posX , float posY , float witdh , float heigth , float [ ] color ) { } public static Shape createPolygon ( float posX , float posY , int nVertex , float radius ) { } public static Shape createPolygon ( float posX , float posY , int nVertex , float radius , float [ ] color ) { } public static Shape createCircle ( float posX , float posY , float radius ) { <START_BUG> int num_vertices = ( ( int ) ( radius // 4.0F ) ) ; <END_BUG> return ShapeCreator . createShape ( ShapeCreator . createPolygon ( posX , posY , num_vertices , radius ) ) ; } public static Shape createCircle ( float posX , float posY , float radius , float [ ] color ) { } private static Shape createShape ( Shape shape ) { } }

Fix:
int num_vertices = ( ( int ) ( radius // 4.0F ) ) * 10 ;
Buggy code:
public class Assignment extends Expression { public Reference lhs ; public Expression expression ; public Assignment ( Expression lhs , Expression expression , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; lhs . generateAssignment ( currentScope , codeStream , this , valueRequired ) ; <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding resolveType ( BlockScope scope ) { } public String toString ( int tab ) { } public String toStringExpression ( ) { } public String toStringExpressionNoParenthesis ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class OpenCLBackProjectorStreakReduction extends VOIBasedReconstructionFilter implements Citeable , Runnable { private static final long serialVersionUID = - 8615490043940236889L ; private boolean forceSmallVolume = false ; static int [ ] bpBlockSize = new int [ ] { 32 , 16 } ; private static boolean debug = true ; protected CLContext context ; private CLProgram program ; private CLDevice device ; private CLKernel kernelFunction ; protected CLCommandQueue commandQueue ; private CLImage2d < FloatBuffer > projectionTex = null ; protected float [ ] h_volume ; private int gat_ign = 3 ; protected CLBuffer < FloatBuffer > projectionMatrix = null ; private CLBuffer < IntBuffer > volStride = null ; private CLBuffer < FloatBuffer > volumePointer = null ; private CLBuffer < FloatBuffer > projectionArray = null ; private CLBuffer < FloatBuffer > destBuffer = null ; protected ImageGridBuffer projections ; protected ArrayList < Integer > projectionsAvailable ; protected ArrayList < Integer > projectionsDone ; private boolean largeVolumeMode = false ; private int nSteps = 1 ; private int subVolumeZ = 0 ; private boolean initialized = false ; public OpenCLBackProjectorStreakReduction ( ) { } @ Override public void prepareForSerialization ( ) { } @ Override public void configure ( ) throws Exception { } public void configure ( boolean forceSmallVolumeMode ) throws Exception { } protected void init ( ) { } private synchronized void unload ( ) { } protected synchronized void initProjectionMatrix ( int projectionNumber ) { } private synchronized void initProjectionData ( Grid2D projection ) { } @ Override public String getName ( ) { } @ Override public String getBibtexCitation ( ) { } @ Override public String getMedlineCitation ( ) { } public void waitForResult ( ) { } @ Override public void backproject ( Grid2D projection , int projectionNumber ) { } private void appendProjection ( Grid2D projection , int projectionNumber ) { } private synchronized void projectSingleProjection ( int projectionNumber , int dimz ) { } public void OpenCLRun ( ) { } private synchronized void workOnProjectionData ( ) { } private synchronized void checkProjectionData ( ) { } public void reconstructOffline ( ImagePlus imagePlus ) throws Exception { } @ Override protected void reconstruct ( ) throws Exception { } @ Override public String getToolName ( ) { <START_BUG> return "OpenCL<seq2seq4repair_space>Backprojector" ; <END_BUG> } public boolean isForceSmallVolume ( ) { } public void setForceSmallVolume ( boolean forceSmallVolume ) { } }

Fix:
return "OpenCL<seq2seq4repair_space>Backprojector<seq2seq4repair_space>with<seq2seq4repair_space>Streak<seq2seq4repair_space>Reduction" ;
Buggy code:
public abstract class FindAction extends SelectionDispatchAction { private AbstractXtendXpandEditor editor ; protected FindAction ( IWorkbenchSite site ) { } protected FindAction ( AbstractXtendXpandEditor editor ) { } abstract void init ( ) { } protected IXtendXpandProject getXtendXpandProject ( ) { } protected IFile getActiveFile ( ) { } public AbstractXtendXpandEditor getEditor ( ) { } @ Override public void run ( ITextSelection selection ) { String selectedText = selection . getText ( ) ; IXtendXpandProject project = getXtendXpandProject ( ) ; ISearchQuery query = createSearchQuery ( selectedText , project ) ; <START_BUG> NewSearchUI . runQuery ( query ) ; <END_BUG> } protected abstract ISearchQuery createSearchQuery ( String selectedText , IXtendXpandProject project ) { } }

Fix:
NewSearchUI . runQueryInBackground ( query ) ;
Buggy code:
public class Main implements AntMain { public static final String DEFAULT_BUILD_FILENAME = "build.xml" ; private int msgOutputLevel = Project . MSG_INFO ; private File buildFile ; private static PrintStream out = System . out ; private static PrintStream err = System . err ; private Vector targets = new Vector ( ) ; private Properties definedProps = new Properties ( ) ; private Vector listeners = new Vector ( 1 ) ; private Vector propertyFiles = new Vector ( 1 ) ; private boolean allowInput = true ; private boolean keepGoingMode = false ; private String loggerClassname = null ; private String inputHandlerClassname = null ; private boolean emacsMode = false ; private boolean readyToRun = false ; private boolean projectHelp = false ; private static boolean isLogFileUsed = false ; private Integer threadPriority = null ; private static void printMessage ( Throwable t ) { } public static void start ( String [ ] args , Properties additionalUserProperties , ClassLoader coreLoader ) { } public void startAnt ( String [ ] args , Properties additionalUserProperties , ClassLoader coreLoader ) { } private static void handleLogfile ( ) { } public static void main ( String [ ] args ) { } public Main ( ) { } protected Main ( String [ ] args ) throws BuildException { } private void processArgs ( String [ ] args ) { } private File getParentFile ( File file ) { } private File findBuildFile ( String start , String suffix ) throws BuildException { } private void runBuild ( ClassLoader coreLoader ) throws BuildException { } protected void addBuildListeners ( Project project ) { } private void addInputHandler ( Project project ) throws BuildException { } private BuildLogger createLogger ( ) { } private static void printUsage ( ) { } private static void printVersion ( ) throws BuildException { } private static String antVersion = null ; public static synchronized String getAntVersion ( ) throws BuildException { } private static void printDescription ( Project project ) { } private static void printTargets ( Project project , boolean printSubTargets ) { } private static int findTargetPosition ( Vector names , String name ) { } private static void printTargets ( Project project , Vector names , Vector descriptions , String heading , int maxlen ) { String lSep = System . getProperty ( "line.separator" ) ; String spaces = "<seq2seq4repair_space>" ; while ( ( spaces . length ( ) ) <= maxlen ) { spaces += spaces ; } StringBuffer msg = new StringBuffer ( ) ; msg . append ( ( ( heading + lSep ) + lSep ) ) ; for ( int i = 0 ; i < ( names . size ( ) ) ; i ++ ) { msg . append ( "<seq2seq4repair_space>" ) ; msg . append ( names . elementAt ( i ) ) ; if ( descriptions != null ) { msg . append ( spaces . substring ( 0 , ( ( maxlen - ( ( ( String ) ( names . elementAt ( i ) ) ) . length ( ) ) ) + 2 ) ) ) ; msg . append ( descriptions . elementAt ( i ) ) ; } msg . append ( lSep ) ; } <START_BUG> project . log ( msg . toString ( ) ) ; <END_BUG> } }

Fix:
project . log ( msg . toString ( ) , MSG_WARN ) ;
Buggy code:
public class PropertyPopulator implements ICellPopulator { private static final long serialVersionUID = 1L ; private String property ; public PropertyPopulator ( String property ) { } public void populateItem ( Item cellItem , String componentId , IModel rowModel ) { <START_BUG> cellItem . add ( new wicket . markup . html . basic . Label ( cellItem , componentId , new wicket . model . PropertyModel ( rowModel , property ) ) ) ; <END_BUG> } }

Fix:
cellItem . add ( new Label ( componentId , new wicket . model . PropertyModel ( rowModel , property ) ) ) ;
Buggy code:
public class BlockedJobsDialog extends IconAndMessageDialog { protected static BlockedJobsDialog singleton ; private NewProgressViewer viewer ; private String blockedTaskName = null ; private Job blockingJob ; private Button cancelSelected ; private Cursor arrowCursor ; private Cursor waitCursor ; private IProgressMonitor blockingMonitor ; private JobTreeElement blockedElement = new BlockedJobsDialog . BlockedUIElement ( ) ; private class BlockedUIElement extends JobTreeElement { Object [ ] getChildren ( ) { } String getDisplayString ( ) { } public Image getDisplayImage ( ) { } Object getParent ( ) { } boolean hasChildren ( ) { } boolean isActive ( ) { } boolean isJobInfo ( ) { } public void cancel ( ) { } public boolean isCancellable ( ) { } } public static BlockedJobsDialog createBlockedDialog ( Shell parentShell , IProgressMonitor blockedMonitor , IStatus reason , String taskName ) { if ( ( BlockedJobsDialog . singleton ) != null ) return BlockedJobsDialog . singleton ; BlockedJobsDialog . singleton = new BlockedJobsDialog ( parentShell , blockedMonitor , reason ) ; if ( taskName == null ) { if ( ( BlockedJobsDialog . singleton . getParentShell ( ) ) != null ) BlockedJobsDialog . singleton . setBlockedTaskName ( BlockedJobsDialog . singleton . getParentShell ( ) . getText ( ) ) ; } else BlockedJobsDialog . singleton . setBlockedTaskName ( taskName ) ; if ( parentShell == null ) { WorkbenchJob dialogJob = new WorkbenchJob ( WorkbenchMessages . getString ( "EventLoopProgressMonitor.OpenDialogJobName" ) ) { public IStatus runInUIThread ( IProgressMonitor monitor ) { if ( ( BlockedJobsDialog . singleton ) == null ) return Status . CANCEL_STATUS ; <START_BUG> if ( ProgressManagerUtil . rescheduleIfModalShellOpen ( this ) ) <END_BUG> return Status . CANCEL_STATUS ; BlockedJobsDialog . singleton . open ( ) ; return Status . OK_STATUS ; } } ; dialogJob . setSystem ( true ) ; dialogJob . schedule ( PlatformUI . getWorkbench ( ) . getProgressService ( ) . getLongOperationTime ( ) ) ; } else BlockedJobsDialog . singleton . open ( ) ; return BlockedJobsDialog . singleton ; } public static void clear ( IProgressMonitor monitor ) { } private BlockedJobsDialog ( Shell parentShell , IProgressMonitor blocking , IStatus blockingStatus ) { } protected Control createDialogArea ( Composite parent ) { } void showJobDetails ( Composite parent ) { } private ProgressTreeContentProvider getContentProvider ( ) { } private void clearCursors ( ) { } private void clearCursor ( Control control ) { } protected void configureShell ( Shell shell ) { } private void setMessage ( String messageString ) { } protected Image getImage ( ) { } public IProgressMonitor getProgressMonitor ( ) { } public boolean close ( IProgressMonitor monitor ) { } public boolean close ( ) { } protected Control createButtonBar ( Composite parent ) { } void setBlockedTaskName ( String taskName ) { } }

Fix:
if ( ProgressManagerUtil . rescheduleIfModalShellOpen ( this , null ) )
Buggy code:
public class Utilities { public static String [ ] navigationItemsArray = new String [ ] { App . getContext ( ) . getResources ( ) . getString ( shopping_list ) , App . getContext ( ) . getResources ( ) . getString ( recipies_list ) , App . getContext ( ) . getResources ( ) . getString ( callendar ) , App . getContext ( ) . getResources ( ) . getString ( help ) } ; public static String formatDateforDB ( Date date ) { } public static ArrayList < Date > getDates ( Date date1 , Date date2 ) { } public static ArrayList < Date > getAllDatesForMonth ( int month ) { } public static ArrayList < ShoppingItem > removeDuplicatesFormShoppingItemsList ( ArrayList < ShoppingItem > shoppingItems ) { final ArrayList < ShoppingItem > shoppingItemsWithoutDuplicates = new ArrayList < ShoppingItem > ( ) ; while ( ( shoppingItems . size ( ) ) > 0 ) { ShoppingItem firstItem = shoppingItems . get ( 0 ) ; for ( int i = 1 ; i < ( shoppingItems . size ( ) ) ; i ++ ) { ShoppingItem iteratedItem = shoppingItems . get ( i ) ; if ( ( iteratedItem . getItem ( ) . equals ( firstItem . getItem ( ) ) ) && ( iteratedItem . getUnit ( ) . equals ( firstItem . getUnit ( ) ) ) ) { <START_BUG> Float f = ( Float . parseFloat ( firstItem . getQuantity ( ) ) ) + ( Float . parseFloat ( iteratedItem . getQuantity ( ) ) ) ; <END_BUG> if ( ( f % 1 ) == 0 ) firstItem . setQuantity ( Integer . valueOf ( f . intValue ( ) ) . toString ( ) ) ; else firstItem . setQuantity ( f . toString ( ) ) ; shoppingItems . remove ( iteratedItem ) ; } } shoppingItemsWithoutDuplicates . add ( firstItem ) ; shoppingItems . remove ( firstItem ) ; } return shoppingItemsWithoutDuplicates ; } }

Fix:
Float f = Float . parseFloat ( ( ( ( firstItem . getQuantity ( ) . length ( ) ) > 0 ? firstItem . getQuantity ( ) : "0" ) + ( Float . parseFloat ( ( ( iteratedItem . getQuantity ( ) . length ( ) ) > 0 ? iteratedItem . getQuantity ( ) : "0" ) ) ) ) ) ;
Buggy code:
public class WebRequestCycle extends RequestCycle { private static final Log log = LogFactory . getLog ( WebRequestCycle . class ) ; public WebRequestCycle ( final WebSession session , final WebRequest request , final Response response ) { } public IRequestCycleProcessor getProcessor ( ) { } public WebRequest getWebRequest ( ) { } public WebResponse getWebResponse ( ) { } public WebSession getWebSession ( ) { } public final void redirectTo ( final Page page ) { String redirectUrl = null ; <START_BUG> IRequestCycleSettings settings = application . getSettings ( ) ; <END_BUG> if ( ( ( settings . getRenderStrategy ( ) ) == ( Settings . REDIRECT_TO_BUFFER ) ) && ( ( application ) instanceof WebApplication ) ) { final Response currentResponse = getResponse ( ) ; try { final BufferedResponse redirectResponse = new BufferedResponse ( ) { public String encodeURL ( String url ) { return currentResponse . encodeURL ( url ) ; } } ; redirectResponse . setCharacterEncoding ( currentResponse . getCharacterEncoding ( ) ) ; setResponse ( redirectResponse ) ; page . doRender ( ) ; setResponse ( currentResponse ) ; final String responseRedirect = redirectResponse . getRedirectUrl ( ) ; if ( responseRedirect != null ) { redirectUrl = responseRedirect ; } else if ( ( redirectResponse . getContentLength ( ) ) > 0 ) { redirectResponse . setCharacterEncoding ( currentResponse . getCharacterEncoding ( ) ) ; redirectResponse . filter ( ) ; redirectResponse . close ( ) ; redirectUrl = page . urlFor ( page , IRedirectListener . class ) ; String sessionId = getWebRequest ( ) . getHttpServletRequest ( ) . getSession ( true ) . getId ( ) ; ( ( WebApplication ) ( application ) ) . addBufferedResponse ( sessionId , redirectUrl , redirectResponse ) ; } } catch ( RuntimeException ex ) { setResponse ( currentResponse ) ; WebRequestCycle . log . error ( ex . getMessage ( ) , ex ) ; IRequestCycleProcessor processor = getProcessor ( ) ; processor . respond ( ex , this ) ; return ; } } else { session . touch ( page ) ; page . internalEndRequest ( ) ; } if ( redirectUrl == null ) { redirectUrl = page . urlFor ( page , IRedirectListener . class ) ; } response . redirect ( redirectUrl ) ; } protected ClientInfo newClientInfo ( ) { } }

Fix:
IRequestCycleSettings settings = application . getRequestCycleSettings ( ) ;
Buggy code:
public class CoarseSSOCacheEntryExternalizer extends AbstractSimpleExternalizer < CoarseSSOCacheEntry < ? > > { private static final long serialVersionUID = 4667240286133879206L ; public CoarseSSOCacheEntryExternalizer ( ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) private CoarseSSOCacheEntryExternalizer ( Class targetClass ) { } @ Override public void writeObject ( ObjectOutput output , CoarseSSOCacheEntry < ? > entry ) throws IOException { } @ Override public CoarseSSOCacheEntry < ? > readObject ( ObjectInput input ) throws IOException , ClassNotFoundException { <START_BUG> CoarseSSOCacheEntry < ? > entry = new CoarseSSOCacheEntry < Object > ( ) ; <END_BUG> entry . setAuthenticationType ( AuthenticationType . values ( ) [ input . readByte ( ) ] ) ; entry . setUser ( input . readUTF ( ) ) ; entry . setPassword ( input . readUTF ( ) ) ; int size = input . readInt ( ) ; for ( int i = 0 ; i < size ; ++ i ) { entry . getSessions ( ) . put ( new WebApplication ( input . readUTF ( ) , input . readUTF ( ) ) , input . readUTF ( ) ) ; } return entry ; } }

Fix:
CoarseSSOCacheEntry < ? > entry = new CoarseSSOCacheEntry ( ) ;
Buggy code:
public class LargeVolumeEmbeddedTest extends LargeVolumeTestBase { SolrServer server ; @ Override public void setUp ( ) throws Exception { } @ Override protected SolrServer getSolrServer ( ) { } @ Override protected SolrServer createNewSolrServer ( ) { <START_BUG> return new EmbeddedSolrServer ( h . getCore ( ) ) ; <END_BUG> } }

Fix:
return new EmbeddedSolrServer ( h . getCoreContainer ( ) , "" ) ;
Buggy code:
if ( ch > ( range [ middle ] ) ) first = middle ; else last = middle ; } <START_BUG> return ( ( first // 2 ) * 2 ) == first ; <END_BUG> }

Fix:
return ( first % 2 ) == 0 ;
Buggy code:
public class UrlDecoder { private final boolean decodePlus ; public static final UrlDecoder QUERY_INSTANCE = new UrlDecoder ( true ) ; public static final UrlDecoder PATH_INSTANCE = new UrlDecoder ( false ) ; private UrlDecoder ( boolean decodePlus ) { } public String decode ( String s , Charset enc ) { } public String decode ( String s , String enc ) { if ( s == null ) { return null ; } boolean needToChange = false ; int numChars = s . length ( ) ; <START_BUG> StringBuffer sb = new StringBuffer ( ( numChars > 500 ? numChars // 2 : numChars ) ) ; <END_BUG> int i = 0 ; if ( ( enc . length ( ) ) == 0 ) { throw new RuntimeException ( new UnsupportedEncodingException ( "URLDecoder:<seq2seq4repair_space>empty<seq2seq4repair_space>string<seq2seq4repair_space>enc<seq2seq4repair_space>parameter" ) ) ; } char c ; byte [ ] bytes = null ; while ( i < numChars ) { c = s . charAt ( i ) ; switch ( c ) { case '+' : sb . append ( ( decodePlus ? '<seq2seq4repair_space>' : '+' ) ) ; i ++ ; needToChange = true ; break ; case '%' : try { if ( bytes == null ) { bytes = new byte [ ( numChars - i ) // 3 ] ; } int pos = 0 ; while ( ( ( i + 2 ) < numChars ) && ( c == '%' ) ) { bytes [ ( pos ++ ) ] = ( ( byte ) ( Integer . parseInt ( s . substring ( ( i + 1 ) , ( i + 3 ) ) , 16 ) ) ) ; i += 3 ; if ( i < numChars ) { c = s . charAt ( i ) ; } } if ( ( i < numChars ) && ( c == '%' ) ) { throw new IllegalArgumentException ( "URLDecoder:<seq2seq4repair_space>Incomplete<seq2seq4repair_space>trailing<seq2seq4repair_space>escape<seq2seq4repair_space>(%)<seq2seq4repair_space>pattern" ) ; } try { sb . append ( new String ( bytes , 0 , pos , enc ) ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } } catch ( NumberFormatException e ) { throw new IllegalArgumentException ( ( "URLDecoder:<seq2seq4repair_space>Illegal<seq2seq4repair_space>hex<seq2seq4repair_space>characters<seq2seq4repair_space>in<seq2seq4repair_space>escape<seq2seq4repair_space>(%)<seq2seq4repair_space>pattern<seq2seq4repair_space>-<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } needToChange = true ; break ; default : sb . append ( c ) ; i ++ ; break ; } } return needToChange ? sb . toString ( ) : s ; } }

Fix:
StringBuilder sb = new StringBuilder ( ( numChars > 500 ? numChars // 2 : numChars ) ) ;
Buggy code:
@ Entity @ Table ( name = "savinginterestrate" ) public class SavingInterestRate { @ Id @ NotNull private Integer id ; @ NotNull private Integer period ; @ NotNull private double interestRate ; @ OneToMany ( mappedBy = "interestRate" ) private Set < SavingAccount > savingAccounts = new HashSet < SavingAccount > ( ) ; public SavingInterestRate ( Integer id , Integer period , double interestRate ) { } public Set < SavingAccount > getSavingAccounts ( ) { } public void setSavingAccounts ( Set < SavingAccount > savingAccounts ) { } public SavingInterestRate ( ) { } public Integer getId ( ) { } public void setId ( Integer id ) { } <START_BUG> public double getPeriod ( ) { <END_BUG> return period ; } public void setPeriod ( Integer period ) { } public double getInterestRate ( ) { } public void setInterestRate ( double interestRate ) { } }

Fix:
public Integer getPeriod ( ) {
Buggy code:
public class Content extends AbstractNode { public enum UiKey implements PropertyKey { name , tag , elements , content , contentType , size ; } @ Override public String getIconSrc ( ) { } @ Override public Object getPropertyForIndexing ( final String key ) { if ( key . equals ( Content . UiKey . content . name ( ) ) ) { String value = getStringProperty ( key ) ; <START_BUG> return Search . clean ( value ) ; <END_BUG> } else { return getProperty ( key ) ; } } }

Fix:
return Search . escapeForLucene ( value ) ;
Buggy code:
public class MethodRefParameter extends ASTNode { public static final ChildPropertyDescriptor TYPE_PROPERTY = new ChildPropertyDescriptor ( MethodRefParameter . class , "type" , Type . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( MethodRefParameter . class , "name" , SimpleName . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Type type = null ; private SimpleName optionalParameterName = null ; MethodRefParameter ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Type getType ( ) { if ( ( this . type ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . type ) == null ) { preLazyInit ( ) ; this . type = this . ast . newPrimitiveType ( PrimitiveType . INT ) ; postLazyInit ( this . type , MethodRefParameter . TYPE_PROPERTY ) ; } } } return this . type ; } public void setType ( Type type ) { } public SimpleName getName ( ) { } public void setName ( SimpleName name ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class ChildRedirectTestCase { private static PathElement PATH = PathElement . pathElement ( "toto" , "testSubsystem" ) ; private static PathElement CHILD = PathElement . pathElement ( "child" ) ; private static PathElement CHILD_ONE = PathElement . pathElement ( "child" , "one" ) ; private static PathElement CHILD_TWO = PathElement . pathElement ( "child" , "two" ) ; private static PathElement NEW_CHILD = PathElement . pathElement ( "new-child" ) ; private Resource resourceRoot = Factory . create ( ) ; private TransformerRegistry registry = TransformerRegistry . Factory . create ( null ) ; private ManagementResourceRegistration resourceRegistration = ManagementResourceRegistration . Factory . create ( ChildRedirectTestCase . ROOT ) ; private TransformersSubRegistration transformersSubRegistration ; @ Before public void setUp ( ) { } @ Test public void testWildcardRedirect ( ) throws Exception { } @ Test public void testFixedRedirect ( ) throws Exception { } private Resource transformResource ( ) throws OperationFailedException { } private ResourceTransformationContext createContext ( final TransformationTarget target ) { <START_BUG> return Transformers . Factory . create ( target , resourceRoot , resourceRegistration , TEST_RESOLVER , NORMAL , STANDALONE_SERVER ) ; <END_BUG> } private Transformers getTransfomers ( final TransformationTarget target ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version , TransformationTarget . TransformationTargetType type ) { } private static final ResourceDefinition ROOT = new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "test" ) , new NonResolvingResourceDescriptionResolver ( ) ) ; }

Fix:
return Transformers . Factory . create ( target , resourceRoot , resourceRegistration , DEFAULT , NORMAL , STANDALONE_SERVER ) ;
Buggy code:
@ Repository ( "getTechnologyIdDao" ) public class GetTechnologyIdDaoImpl extends BaseJDBCDaoImpl implements GetTechnologyIdDao { @ Override @ TransactionAttribute ( TransactionAttributeType . NOT_SUPPORTED ) public List < String > getCurrentTechnologyIds ( List < Technology > technologies ) { } @ Override @ TransactionAttribute ( TransactionAttributeType . NOT_SUPPORTED ) public Map < String , Long > getTechnologyIdMap ( List < Technology > technologies ) { StringBuilder query = new StringBuilder ( "" ) ; StringBuilder techList = new StringBuilder ( "" ) ; for ( int a = 0 ; a < ( technologies . size ( ) ) ; a ++ ) { techList . append ( ( ( "'" + ( technologies . get ( a ) . getName ( ) ) ) + "'" ) ) ; if ( a != ( ( technologies . size ( ) ) - 1 ) ) { techList . append ( "," ) ; } } System . out . println ( techList . toString ( ) ) ; query . append ( "SELECT<seq2seq4repair_space>id,<seq2seq4repair_space>technology<seq2seq4repair_space>\n" ) ; query . append ( "FROM<seq2seq4repair_space>technology<seq2seq4repair_space>\n" ) ; query . append ( "WHERE<seq2seq4repair_space>technology<seq2seq4repair_space>in<seq2seq4repair_space>(" ) ; query . append ( ( ( techList . toString ( ) ) + ")" ) ) ; RowMapper < String > mapper = new RowMapper < String > ( ) { @ Override public String mapRow ( ResultSet resultSet , int i ) throws SQLException { String idNameStr = "" ; <START_BUG> idNameStr = ( ( resultSet . getString ( "id" ) ) + "," ) + ( resultSet . getString ( "technology" ) . toLowerCase ( ) ) ; <END_BUG> return idNameStr ; } } ; List < String > techIds = null ; try { techIds = getNamedParameterJdbcTemplate ( ) . query ( query . toString ( ) , mapper ) ; System . out . println ( techIds . size ( ) ) ; } catch ( NullPointerException e ) { System . out . println ( "Null<seq2seq4repair_space>Pointer<seq2seq4repair_space>Exception" ) ; } Map < String , Long > techIdMap = new HashMap < String , Long > ( ) ; for ( String techId : techIds ) { String [ ] idAndName = techId . trim ( ) . split ( "," ) ; techIdMap . put ( idAndName [ 1 ] , Long . parseLong ( idAndName [ 0 ] ) ) ; } return techIdMap ; } @ Override @ TransactionAttribute ( TransactionAttributeType . NOT_SUPPORTED ) public Map < Integer , Double > getCompanyTechnologyScoreMap ( Long candidateId ) { } @ Override @ TransactionAttribute ( TransactionAttributeType . NOT_SUPPORTED ) public Map < Integer , Double > getCandidateTechnologyScoreMap ( Long candidateId ) { } }

Fix:
idNameStr = ( ( resultSet . getString ( "id" ) ) + "," ) + ( resultSet . getString ( "technology" ) . toLowerCase ( ) . trim ( ) ) ;
Buggy code:
public class GraphQLObjectMapper_CollectionsTest { @ Mock ITypeFactory objectMapper ; GraphQLObjectMapper graphQLObjectMapper ; GraphQLObjectType expectedObjectType ; private enum TestEnum { KEY1 , KEY2 , KEY3 ; } private class CollectionsTestObject { String field1 ; Integer field2 ; } @ Before public void setup ( ) { } private void assertGenericListTypeMapping ( String name , GraphQLOutputType expectedWrappedType , GraphQLOutputType graphQLOutputType ) { } private void assertGenericMapTypeMapping ( String name , GraphQLOutputType expectedValueType , GraphQLOutputType graphQLOutputType ) { } @ Test public void testGenericCollectionsMapping ( ) { } @ Test public void testGenericListMappings ( ) { } @ Test public void testGenericSetMappings ( ) { } @ Test public void testGenericArrayListMapping ( ) { } @ Test public void testGenericLinkedListMapping ( ) { } @ Test public void testGenericHashSetMapping ( ) { } @ Test public void testGenericTreeSetMapping ( ) { } @ Test public void testGenericVectorMapping ( ) { } private class GenericMapTestObject { Map < String , String > mapField ; } @ Test public void testGenericMapTypeMapping ( ) { } @ Test public void testRecursiveTypes ( ) { GraphQLList listType = ( ( GraphQLList ) ( graphQLObjectMapper . getOutputType ( new TypeToken < Map < GraphQLObjectMapper_CollectionsTest . TestEnum , List < List < List < List < List < List < String > > > > > > > > ( ) { } . getType ( ) ) ) ) ; GraphQLObjectType outputType = ( ( GraphQLObjectType ) ( listType . getWrappedType ( ) ) ) ; <START_BUG> assertEquals ( "Map_TestEnum_List" , outputType . getName ( ) ) ; <END_BUG> GraphQLEnumType keyType = ( ( GraphQLEnumType ) ( outputType . getFieldDefinition ( KEY_NAME ) . getType ( ) ) ) ; GraphQLType valueType = outputType . getFieldDefinition ( VALUE_NAME ) . getType ( ) ; int depth = 0 ; while ( ( valueType . getClass ( ) ) == ( GraphQLList . class ) ) { depth ++ ; valueType = ( ( GraphQLList ) ( valueType ) ) . getWrappedType ( ) ; } assertEquals ( 6 , depth ) ; assertEquals ( GraphQLString , valueType ) ; } }

Fix:
assertEquals ( "Map_TestEnum_List_List_List_List_List_List_String" , outputType . getName ( ) ) ;
Buggy code:
public class ValueMapDiscriminatorStrategy extends InValueDiscriminatorStrategy { public static final String ALIAS = "value-map" ; private static final Localizer _loc = Localizer . forPackage ( ValueMapDiscriminatorStrategy . class ) ; private Map _vals = null ; public String getAlias ( ) { } protected int getJavaType ( ) { } protected Object getDiscriminatorValue ( ClassMapping cls ) { } protected Class getClass ( Object val , JDBCStore store ) throws ClassNotFoundException { if ( ( _vals ) == null ) { ClassMapping cls = disc . getClassMapping ( ) ; ClassMapping [ ] subs = cls . getJoinablePCSubclassMappings ( ) ; Map map = new HashMap ( ( ( int ) ( ( ( ( subs . length ) + 1 ) * 1.33 ) + 1 ) ) ) ; ValueMapDiscriminatorStrategy . mapDiscriminatorValue ( cls , map ) ; for ( int i = 0 ; i < ( subs . length ) ; i ++ ) ValueMapDiscriminatorStrategy . mapDiscriminatorValue ( subs [ i ] , map ) ; _vals = map ; } String str = ( val == null ) ? null : val . toString ( ) ; Class cls = ( ( Class ) ( _vals . get ( str ) ) ) ; if ( cls != null ) return cls ; <START_BUG> throw new ClassNotFoundException ( ValueMapDiscriminatorStrategy . _loc . get ( "unknown-discrim-value" , new Object [ ] { str , disc . getClassMapping ( ) . getDescribedType ( ) . getName ( ) , new TreeSet ( _vals . keySet ( ) ) } ) ) ; <END_BUG> } private static void mapDiscriminatorValue ( ClassMapping cls , Map map ) { } public void map ( boolean adapt ) { } }

Fix:
throw new ClassNotFoundException ( ValueMapDiscriminatorStrategy . _loc . get ( "unknown-discrim-value" , new Object [ ] { str , disc . getClassMapping ( ) . getDescribedType ( ) . getName ( ) , new TreeSet ( _vals . keySet ( ) ) } ) . getMessage ( ) ) ;
Buggy code:
abstract class AbstractSecurityMetaDataAccessorEJB implements SecurityMetaDataAccessorEJB { public String getSecurityDomain ( final Deployment dep ) { String securityDomain = null ; for ( final EJBEndpoint ejbEndpoint : getEjbEndpoints ( dep ) ) { String nextSecurityDomain = ejbEndpoint . getSecurityDomain ( ) ; <START_BUG> if ( nextSecurityDomain . isEmpty ( ) ) { <END_BUG> nextSecurityDomain = null ; } securityDomain = getDomain ( securityDomain , nextSecurityDomain ) ; } if ( securityDomain == null ) { final DeploymentUnit unit = WSHelper . getRequiredAttachment ( dep , DeploymentUnit . class ) ; if ( ( unit . getParent ( ) ) != null ) { final EarMetaData jbossAppMD = unit . getParent ( ) . getAttachment ( EAR_METADATA ) ; return jbossAppMD instanceof JBossAppMetaData ? ( ( JBossAppMetaData ) ( jbossAppMD ) ) . getSecurityDomain ( ) : null ; } } return securityDomain ; } public SecurityRolesMetaData getSecurityRoles ( final Deployment dep ) { } protected abstract List < EJBEndpoint > getEjbEndpoints ( final Deployment dep ) { } public String getAuthMethod ( final Endpoint endpoint ) { } public boolean isSecureWsdlAccess ( final Endpoint endpoint ) { } public String getTransportGuarantee ( final Endpoint endpoint ) { } private EJBSecurityMetaData getEjbSecurityMetaData ( final Endpoint endpoint ) { } private String getDomain ( final String oldSecurityDomain , final String nextSecurityDomain ) { } private void ensureSameDomains ( final String oldSecurityDomain , final String newSecurityDomain ) { } }

Fix:
if ( ( nextSecurityDomain == null ) || ( nextSecurityDomain . isEmpty ( ) ) ) {
Buggy code:
public class UndeployHandler extends BatchModeCommandHandler { private final ArgumentWithoutValue l ; private final ArgumentWithValue name ; private final ArgumentWithValue serverGroups ; private final ArgumentWithoutValue allRelevantServerGroups ; private final ArgumentWithoutValue keepContent ; public UndeployHandler ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { final ModelControllerClient client = ctx . getModelControllerClient ( ) ; final ParsedCommandLine args = ctx . getParsedCommandLine ( ) ; final boolean l = this . l . isPresent ( args ) ; if ( ( ! ( args . hasProperties ( ) ) ) || l ) { printList ( ctx , Util . getDeployments ( client ) , l ) ; return ; } final String name = this . name . getValue ( ctx . getParsedCommandLine ( ) ) ; if ( name == null ) { printList ( ctx , Util . getDeployments ( client ) , l ) ; return ; } <START_BUG> final ModelNode request = buildRequest ( ctx ) ; <END_BUG> addHeaders ( ctx , request ) ; final ModelNode result ; try { result = client . execute ( request ) ; } catch ( Exception e ) { throw new CommandFormatException ( ( "Undeploy<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; } if ( ! ( Util . isSuccess ( result ) ) ) { throw new CommandFormatException ( ( "Undeploy<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( Util . getFailureDescription ( result ) ) ) ) ; } } @ Override public ModelNode buildRequestWithoutHeaders ( CommandContext ctx ) throws CommandFormatException { } }

Fix:
final ModelNode request = buildRequestWOValidation ( ctx ) ;
Buggy code:
public class MainActivity extends AppCompatActivity implements NavigationView . OnNavigationItemSelectedListener { private View headerLayout ; private TextView tv_email ; private TextView tv_name ; private TextView tv_logout ; private ImageView iv_image ; private static final int PLAY_SERVICES_RESOLUTION_REQUEST = 9000 ; private static final String TAG = "MainActivity" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { } @ Override protected void onRestart ( ) { } @ Override public void onBackPressed ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ SuppressWarnings ( "StatementWithEmptyBody" ) @ Override public boolean onNavigationItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; Intent goToActivity = null ; switch ( id ) { case id . nav_home : goToActivity = new Intent ( getApplicationContext ( ) , MainActivity . class ) ; break ; case id . nav_rewards : goToActivity = new Intent ( getApplicationContext ( ) , RewardsActivity . class ) ; break ; case id . nav_appliances : goToActivity = new Intent ( getApplicationContext ( ) , AppliancesActivity . class ) ; break ; case id . nav_profile : if ( ( UserInfo . getInstance ( ) . getIsLoggedIn ( ) ) || ( UserInfo . getInstance ( ) . isGoogleLoggedIn ( ) ) ) { goToActivity = new Intent ( getApplicationContext ( ) , ProfileActivity . class ) ; } else { goToActivity = new Intent ( getApplicationContext ( ) , LogInActivity . class ) ; } break ; case id . nav_reminder : goToActivity = new Intent ( getApplicationContext ( ) , ReminderActivity . class ) ; break ; case id . nav_detection : goToActivity = new Intent ( getApplicationContext ( ) , DetectionBaseActivity . class ) ; break ; case id . nav_prevention : goToActivity = new Intent ( getApplicationContext ( ) , PreventionActivity . class ) ; break ; case id . nav_settings : goToActivity = new Intent ( getApplicationContext ( ) , SettingsActivity . class ) ; break ; <START_BUG> case id . nav_header_main_logout : <END_BUG> if ( UserInfo . getInstance ( ) . getIsLoggedIn ( ) ) { UserInfo . getInstance ( ) . logOutUser ( this ) ; this . recreate ( ) ; } else if ( UserInfo . getInstance ( ) . isGoogleLoggedIn ( ) ) { UserInfo . getInstance ( ) . signOutWithGoogle ( ) ; this . recreate ( ) ; } break ; default : break ; } if ( goToActivity != null ) { startActivity ( goToActivity ) ; overridePendingTransition ( 0 , 0 ) ; } DrawerLayout drawer = ( ( DrawerLayout ) ( findViewById ( drawer_layout ) ) ) ; drawer . closeDrawer ( START ) ; return true ; } private boolean checkPlayServices ( ) { } private List < Object > createCardList ( ) { } }

Fix:
case id . nav_logout :
Buggy code:
public final class RemotingSubsystemAdd extends AbstractSubsystemAdd < RemotingSubsystemElement > { private static final long serialVersionUID = - 3368184946165491737L ; private final String threadPoolName ; protected RemotingSubsystemAdd ( final String threadPoolName ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { final EndpointService endpointService = new EndpointService ( ) ; endpointService . setOptionMap ( EMPTY ) ; final BatchServiceBuilder < Endpoint > endpointBuilder = updateContext . getBatchBuilder ( ) . addService ( ENDPOINT , endpointService ) ; final Injector < Executor > executorInjector = endpointService . getExecutorInjector ( ) ; endpointBuilder . addDependency ( ThreadsServices . executorName ( threadPoolName ) , new org . jboss . msc . inject . CastingInjector < Executor > ( executorInjector , Executor . class ) ) ; <START_BUG> endpointBuilder . setInitialMode ( IMMEDIATE ) ; <END_BUG> } protected RemotingSubsystemElement createSubsystemElement ( ) { } }

Fix:
endpointBuilder . setInitialMode ( ACTIVE ) ;
Buggy code:
class ManagedServerSocketBinding extends ServerSocket implements ManagedBinding { private final SocketBindingManager socketBindings ; ManagedServerSocketBinding ( final SocketBindingManager socketBindings ) throws IOException { } public InetSocketAddress getBindAddress ( ) { <START_BUG> return InetSocketAddress . class . cast ( getLocalPort ( ) ) ; <END_BUG> } public void bind ( SocketAddress endpoint , int backlog ) throws IOException { } public Socket accept ( ) throws IOException { } public void close ( ) throws IOException { } }

Fix:
return InetSocketAddress . class . cast ( getLocalSocketAddress ( ) ) ;
Buggy code:
public class TestSynchronizedList < E > extends AbstractTestList < E > { public TestSynchronizedList ( String testName ) { } @ Override public List < E > makeConfirmedCollection ( ) { } @ Override public List < E > makeObject ( ) { <START_BUG> return SynchronizedList . decorate ( new ArrayList < E > ( ) ) ; <END_BUG> } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return SynchronizedList . synchronizedList ( new ArrayList < E > ( ) ) ;
Buggy code:
public abstract class AbstractLink extends WebMarkupContainer { private static final long serialVersionUID = 1L ; public AbstractLink ( String id , IModel < ? > model ) { } public AbstractLink ( String id ) { } private String beforeDisabledLink ; private String afterDisabledLink ; public AbstractLink setAfterDisabledLink ( final String afterDisabledLink ) { } public String getAfterDisabledLink ( ) { } public AbstractLink setBeforeDisabledLink ( final String beforeDisabledLink ) { } @ Override protected void onBeforeRender ( ) { } public String getBeforeDisabledLink ( ) { } protected final boolean isLinkEnabled ( ) { <START_BUG> return ( isEnabled ( ) ) && ( isEnableAllowed ( ) ) ; <END_BUG> } @ Override protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void disableLink ( final ComponentTag tag ) { } }

Fix:
return isEnabledInHierarchy ( ) ;
Buggy code:
public class Jar extends Zip { private File manifest ; public void setJarfile ( String jarFilename ) { } public void setManifest ( String manifestFilename ) { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { if ( ( manifest ) != null ) { super . zipDir ( new File ( manifest . getParent ( ) ) , zOut , "META-INF//" ) ; super . zipFile ( manifest , zOut , "META-INF//MANIFEST.MF" ) ; } else { String s = "//org//apache//tools//ant//defaultManifest.mf" ; InputStream in = this . getClass ( ) . getResourceAsStream ( s ) ; if ( in == null ) throw new BuildException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find:<seq2seq4repair_space>" + s ) ) ; <START_BUG> zipFile ( in , zOut , "META-INF//MANIFEST.MF" ) ; <END_BUG> } } protected void zipDir ( File dir , ZipOutputStream zOut , String vPath ) throws IOException { } protected void zipFile ( File file , ZipOutputStream zOut , String vPath ) throws IOException { } }

Fix:
zipFile ( in , zOut , "META-INF//MANIFEST.MF" , System . currentTimeMillis ( ) ) ;