nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Konami implements OnTouchListener { public static final int LEFT = 0 ; public static final int RIGHT = 1 ; public static final int UP = 2 ; public static final int DOWN = 3 ; public static final int TAP = 4 ; private static final int SWIPE_MIN_DISTANCE = 0 ; private static final int SWIPE_THRESHOLD_VELOCITY = 500 ; private ItemList < Integer > mGestureList ; private int mCurrentPtr = 0 ; private GestureDetector mGestureScanner ; private int [ ] mCode = new int [ ] { Konami . UP , Konami . UP , Konami . DOWN , Konami . DOWN , Konami . LEFT , Konami . RIGHT , Konami . LEFT , Konami . RIGHT , Konami . TAP , Konami . TAP , Konami . TAP } ; private Konami . OnKonamiCodeListener mKonamiCodeListener ; public Konami ( ) { } public Konami ( Konami . OnKonamiCodeListener listener ) { } public Konami ( int [ ] konamiCode ) throws Exception { } public boolean onTouch ( View v , MotionEvent event ) { } public void setOnKonamiCodeListener ( Konami . OnKonamiCodeListener listener ) { } public void setCode ( int [ ] konamiCode ) throws Exception { } private class gestureDetector extends SimpleOnGestureListener { @ Override public boolean onSingleTapUp ( MotionEvent e ) { } @ Override public boolean onFling ( MotionEvent e1 , MotionEvent e2 , float velocityX , float velocityY ) { } private void checkCode ( ) { int totalCorrect = 0 ; <START_BUG> for ( int loop = 0 ; loop < ( mCurrentPtr ) ; loop ++ ) { <END_BUG> if ( ( mCode [ loop ] ) == ( mGestureList . get ( loop ) ) ) { totalCorrect ++ ; } else { mGestureList . clear ( ) ; break ; } } if ( totalCorrect == ( mCode . length ) ) { if ( ( mKonamiCodeListener ) != null ) { mKonamiCodeListener . OnSuccessfullCode ( ) ; } mGestureList . clear ( ) ; } } } public interface OnKonamiCodeListener { public void OnSuccessfullCode ( ) { } } }

Fix:
for ( int loop = 0 ; loop < ( mGestureList . size ( ) ) ; loop ++ ) {
Buggy code:
public class DomainOptions extends BaseHttpRequestOptions { public static class Builder { public static DomainOptions primaryNameServer ( String primaryNameServer ) { } public static DomainOptions responsiblePerson ( String responsiblePerson ) { } public static DomainOptions ttl ( int ttl ) { } public static DomainOptions refresh ( int refresh ) { } public static DomainOptions retry ( int retry ) { } public static DomainOptions expire ( int expire ) { DomainOptions options = new DomainOptions ( ) ; return options . expire ( expire ) ; } public static DomainOptions minimum ( int minimum ) { } } public DomainOptions primaryNameServer ( String primaryNameServer ) { } public DomainOptions responsiblePerson ( String responsiblePerson ) { } public DomainOptions ttl ( int ttl ) { } public DomainOptions refresh ( int refresh ) { } public DomainOptions retry ( int retry ) { } public DomainOptions expire ( int expire ) { <START_BUG> formParameters . put ( "primary_ns" , Integer . toString ( expire ) ) ; <END_BUG> return this ; } public DomainOptions minimum ( int minimum ) { } No newline ; at end ; of file ; }

Fix:
formParameters . put ( "expire" , Integer . toString ( expire ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class DeployedXmlJMSTestCase { private static ServerDeploymentManager manager ; public static final String TEST_JMS_XML = "test-jms.xml" ; @ Deployment public static Archive < ? > deploy ( ) { <START_BUG> return ShrinkWrap . create ( JavaArchive . class , "testDsXmlDeployment.jar" ) . addPackage ( DeployedXmlDataSourceTestCase . class . getPackage ( ) ) . addAsManifestResource ( DeployedXmlDataSourceTestCase . class . getPackage ( ) , "MANIFEST.MF" , "MANIFEST.MF" ) ; <END_BUG> } @ ArquillianResource private InitialContext initialContext ; private static ModelControllerClient client ; @ BeforeClass public static void deployJms ( ) throws Throwable { } @ AfterClass public static void undeployJms ( ) throws IOException { } @ Test public void testDeployedQueue ( ) throws Throwable { } @ Test public void testDeployedTopic ( ) throws Throwable { } }

Fix:
return ShrinkWrap . create ( JavaArchive . class , "testDsXmlDeployment.jar" ) . addClass ( DeployedXmlJMSTestCase . class ) . addAsManifestResource ( DeployedXmlDataSourceTestCase . class . getPackage ( ) , "MANIFEST.MF" , "MANIFEST.MF" ) ;
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 DomainController controller ; public DomainControllerService ( final ExtensibleConfigurationPersister configurationPersister ) { } @ Override public synchronized void start ( final StartContext context ) throws StartException { DomainControllerService . log . info ( "Starting<seq2seq4repair_space>Domain<seq2seq4repair_space>Controller" ) ; final DomainController controller = new DomainControllerImpl ( configurationPersister ) ; final List < ModelNode > updates ; try { updates = configurationPersister . load ( ) ; } catch ( final Exception e ) { DomainControllerService . log . error ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>domain<seq2seq4repair_space>controller" , e ) ; throw new StartException ( e ) ; } final AtomicInteger count = new AtomicInteger ( 1 ) ; final ResultHandler resultHandler = new ResultHandler ( ) { @ Override public void handleResultFragment ( final String [ ] location , final ModelNode result ) { } @ Override <START_BUG> public void handleResultComplete ( final ModelNode compensatingOperation ) { <END_BUG> if ( ( count . decrementAndGet ( ) ) == 0 ) { } } @ Override public void handleFailed ( final ModelNode failureDescription ) { if ( ( count . decrementAndGet ( ) ) == 0 ) { } } @ Override public void handleCancellation ( ) { if ( ( count . decrementAndGet ( ) ) == 0 ) { } } } ; for ( ModelNode update : updates ) { count . incrementAndGet ( ) ; controller . execute ( update , resultHandler ) ; } if ( ( count . decrementAndGet ( ) ) == 0 ) { } this . controller = controller ; } @ Override public synchronized void stop ( final StopContext context ) { } @ Override public synchronized DomainController getValue ( ) throws IllegalArgumentException , IllegalStateException { } }

Fix:
public void handleResultComplete ( ) {
Buggy code:
class MethodBinding implements IMethodBinding { private static final int VALID_MODIFIERS = ( ( ( ( ( ( ( ( Modifier . PUBLIC ) | ( Modifier . PROTECTED ) ) | ( Modifier . PRIVATE ) ) | ( Modifier . ABSTRACT ) ) | ( Modifier . STATIC ) ) | ( Modifier . FINAL ) ) | ( Modifier . SYNCHRONIZED ) ) | ( Modifier . NATIVE ) ) | ( Modifier . STRICTFP ) ; private static final ITypeBinding [ ] NO_TYPE_BINDINGS = new ITypeBinding [ 0 ] ; private org . eclipse . jdt . internal . compiler . lookup . MethodBinding binding ; private BindingResolver resolver ; private ITypeBinding [ ] parameterTypes ; private ITypeBinding [ ] exceptionTypes ; private String name ; private ITypeBinding declaringClass ; private ITypeBinding returnType ; private String key ; private ITypeBinding [ ] typeParameters ; private ITypeBinding [ ] typeArguments ; MethodBinding ( BindingResolver resolver , org . eclipse . jdt . internal . compiler . lookup . MethodBinding binding ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public String getName ( ) { } public ITypeBinding getDeclaringClass ( ) { } public ITypeBinding [ ] getParameterTypes ( ) { } public ITypeBinding getReturnType ( ) { } public ITypeBinding [ ] getExceptionTypes ( ) { } public IJavaElement getJavaElement ( ) { } private JavaElement getUnresolvedJavaElement ( ) { } public int getKind ( ) { } public int getModifiers ( ) { } public boolean isDeprecated ( ) { } public boolean isSynthetic ( ) { } public boolean isVarargs ( ) { } public String getKey ( ) { } public boolean isEqualTo ( IBinding other ) { } public ITypeBinding [ ] getTypeParameters ( ) { } public boolean isGenericMethod ( ) { } public ITypeBinding [ ] getTypeArguments ( ) { } public boolean isParameterizedMethod ( ) { } public boolean isRawMethod ( ) { } public boolean isSubsignature ( IMethodBinding otherMethod ) { org . eclipse . jdt . internal . compiler . lookup . MethodBinding other = ( ( MethodBinding ) ( otherMethod ) ) . binding ; if ( ! ( CharOperation . equals ( this . binding . selector , other . selector ) ) ) return false ; <START_BUG> return this . binding . areParameterErasuresEqual ( other ) ; <END_BUG> } public IMethodBinding getMethodDeclaration ( ) { } public boolean overrides ( IMethodBinding overridenMethod ) { } public String toString ( ) { } }

Fix:
return ( this . binding . areParameterErasuresEqual ( other ) ) && ( this . binding . areTypeVariableErasuresEqual ( other ) ) ;
Buggy code:
public class EjbJar extends MatchingTask { protected class DescriptorHandler extends HandlerBase { private static final String HOME_INTERFACE = "home" ; private static final String REMOTE_INTERFACE = "remote" ; private static final String BEAN_CLASS = "ejb-class" ; private static final String PK_CLASS = "prim-key-class" ; private String currentAttribute = null ; private Hashtable ejbFiles = null ; public Hashtable getFiles ( ) { } public void startDocument ( ) throws SAXException { } public void startElement ( String name , AttributeList attrs ) throws SAXException { } public void endElement ( String name ) throws SAXException { } public void characters ( char [ ] ch , int start , int length ) throws SAXException { } } private static final String META_DIR = "META-INF//" ; private static final String EJB_DD = "ejb-jar.xml" ; private static final String WL_DD = "weblogic-ejb-jar.xml" ; private static final String WL_CMP_DD = "weblogic-cmp-rdbms-jar.xml" ; private File srcdir = null ; private File destdir = null ; private boolean flatdestdir = false ; private boolean generateweblogic = false ; private boolean keepgeneric = true ; private String basenameterminator = "-" ; private String genericjarsuffix = "-generic.jar" ; private String weblogicjarsuffix = "-wl.jar" ; public void setSrcdir ( String inDir ) { } public void setDestdir ( String inDir ) { } public void setFlatdestdir ( String inValue ) { } public void setGenericjarsuffix ( String inString ) { } public void setWeblogicjarsuffix ( String inString ) { } public void setGenerateweblogic ( String inValue ) { } public void setKeepgeneric ( String inValue ) { } public void setBasenameterminator ( String inValue ) { } protected void addFileToJar ( JarOutputStream jStream , FileInputStream iStream , String filename ) throws BuildException { } public void writeJar ( File jarfile , Hashtable files ) throws BuildException { } public void buildWeblogicJar ( File sourceJar , File destJar ) { org . apache . tools . ant . taskdefs . Java javaTask = null ; try { String args = ( ( "-noexit<seq2seq4repair_space>" + sourceJar ) + "<seq2seq4repair_space>" ) + destJar ; javaTask = ( ( Java ) ( this . project . createTask ( "java" ) ) ) ; javaTask . setClassname ( "weblogic.ejbc" ) ; javaTask . setArgs ( args ) ; <START_BUG> javaTask . setFork ( "false" ) ; <END_BUG> this . log ( ( "Calling<seq2seq4repair_space>weblogic.ejbc<seq2seq4repair_space>for<seq2seq4repair_space>" + ( sourceJar . toString ( ) ) ) , MSG_INFO ) ; javaTask . execute ( ) ; } catch ( Exception e ) { String msg = "Exception<seq2seq4repair_space>while<seq2seq4repair_space>calling<seq2seq4repair_space>ejbc.<seq2seq4repair_space>Details:<seq2seq4repair_space>" + ( e . toString ( ) ) ; throw new BuildException ( msg , e ) ; } } public void execute ( ) throws BuildException { } }

Fix:
javaTask . setFork ( false ) ;
Buggy code:
public class DisplayCommand extends Command { private static final String CONSTANT_HASHTAG = "#" ; private static final String KEYWORD_FLOATING = "floating" ; private static final String KEYWORD_DONE = "done" ; private static final String KEYWORD_ALL = "all" ; private String keyword ; private ArrayList < Task > taskList = Database . getInstance ( ) . getTaskList ( ) ; private ArrayList < Task > resultTasklist = new ArrayList < Task > ( ) ; public DisplayCommand ( ) { } public DisplayCommand ( String keyword ) { } public ArrayList < Task > execute ( ) { } private ArrayList < Task > displayAll ( ) { } private boolean isDisplayWithTag ( ) { <START_BUG> return ( keyword . substring ( 0 , 0 ) ) == ( DisplayCommand . CONSTANT_HASHTAG ) ; <END_BUG> } private boolean isDisplayDone ( ) { } private boolean isDisplayFloating ( ) { } private boolean isDisplayUndone ( ) { } private boolean isDisplayAll ( ) { } private ArrayList < Task > displayWithKeyword ( ) { } private ArrayList < Task > displayWithTag ( ) { } private ArrayList < Task > displayFloating ( ) { } private ArrayList < Task > displayDone ( ) { } private ArrayList < Task > displayUndone ( ) { } }

Fix:
return keyword . startsWith ( DisplayCommand . CONSTANT_HASHTAG ) ;
Buggy code:
public class IMAPRootFolder extends Folder implements ActionListener { protected static final ImageIcon imapRootIcon = ImageLoader . getSmallImageIcon ( "remotehost.png" ) ; private IMAPProtocol imap ; private boolean fetch = false ; private Imap4Parser parser ; private StringBuffer cache ; private int state ; private Vector lsubList ; private static final int ONE_SECOND = 1000 ; private Timer timer ; private AccountItem accountItem ; private IMAPStore store ; public IMAPRootFolder ( FolderItem folderItem ) { } public IMAPRootFolder ( AccountItem accountItem ) { } public ImageIcon getCollapsedIcon ( ) { } public ImageIcon getExpandedIcon ( ) { } public String getDefaultChild ( ) { } protected FolderTreeNode addIMAPChildFolder ( FolderTreeNode folder , ListInfo info , String subchild ) throws Exception { } protected void addIMAPSubFolder ( FolderTreeNode folder , String name , ListInfo info ) throws Exception { } public void createChildren ( WorkerStatusController worker ) { } public IMAPStore getStore ( ) { } public void restartTimer ( ) { } public void actionPerformed ( ActionEvent e ) { } public static XmlElement getDefaultProperties ( ) { } public Object addMessage ( AbstractMessage message , WorkerStatusController worker ) throws Exception { } public Object addMessage ( String source , WorkerStatusController worker ) throws Exception { } public boolean exists ( Object uid , WorkerStatusController worker ) throws Exception { } <START_BUG> public void expungeFolder ( Object [ ] uids , WorkerStatusController worker ) throws Exception { <END_BUG> } public HeaderList getHeaderList ( WorkerStatusController worker ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid , WorkerStatusController worker ) throws Exception { } public String getMessageSource ( Object uid , WorkerStatusController worker ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address , WorkerStatusController worker ) throws Exception { } public MimePartTree getMimePartTree ( Object uid , WorkerStatusController worker ) throws Exception { } public void markMessage ( Object [ ] uids , int variant , WorkerStatusController worker ) throws Exception { } public void removeMessage ( Object uid , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , WorkerStatusController worker ) throws Exception { } public AccountItem getAccountItem ( ) { } }

Fix:
public void expungeFolder ( WorkerStatusController worker ) throws Exception {
Buggy code:
public class Subscriber { private static final short KEEP_ALIVE = 30 ; private String host ; private String username ; private String password ; private ApiType apiType ; private QoS qoSType ; public Subscriber ( ConfigBO config ) { } public void sub ( TopicBO topic ) { } private void blocking ( TopicBO topic , MQTT mqtt ) { } private void future ( TopicBO topic , MQTT mqtt ) { } <START_BUG> private void callback ( TopicBO topic , MQTT mqtt ) { <END_BUG> final CallbackConnection connection = mqtt . callbackConnection ( ) ; final CountDownLatch finished = new CountDownLatch ( 1 ) ; connection . connect ( new CallbackImpl ( ) { @ Override public void onSuccess ( Object value ) { Topic destination = new Topic ( topic . getDestination ( ) , QoS . AT_MOST_ONCE ) ; connection . subscribe ( new Topic [ ] { destination } , new CallbackImpl ( ) { @ Override public void onSuccess ( Object value ) { System . out . println ( "Subscription<seq2seq4repair_space>successful.<seq2seq4repair_space>Waiting<seq2seq4repair_space>for<seq2seq4repair_space>messages..." ) ; } } ) ; } } ) ; connection . listener ( new ConnectionListenerImpl ( ) { @ Override public void onPublish ( UTF8Buffer topic , Buffer body , Runnable ack ) { String payload = ( ( body . length ( ) ) > 0 ) ? body . utf8 ( ) . toString ( ) : "Unavailable:<seq2seq4repair_space>ERROR" ; System . out . println ( ( "Received<seq2seq4repair_space>message:<seq2seq4repair_space>" + payload ) ) ; if ( payload . trim ( ) . equalsIgnoreCase ( "END" ) ) { finished . countDown ( ) ; } ack . run ( ) ; } } ) ; try { finished . await ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } }

Fix:
private void callback ( final TopicBO topic , MQTT mqtt ) {
Buggy code:
public class BaseActionEnvironmentLoaderTest { @ Mock private RhinoScriptRunner rhinoScriptRunner ; @ Mock private Session session ; @ Mock private SahiProxyProperties sahiProxyProperties ; @ Mock private TestSuite testSuite ; @ Mock private SakuliExceptionHandler exceptionHandler ; @ InjectMocks private BaseActionLoaderImpl testling ; @ BeforeMethod public void init ( ) { } @ Test public void testInit ( ) throws Exception { } @ Test public void testInitNoSahiDelay ( ) throws Exception { } @ SuppressWarnings ( "ThrowableResultOfMethodCallIgnored" ) @ Test public void testInitNoSahiSession ( ) throws Exception { } @ Test public void testInitTCNull ( ) throws Exception { } @ Test public void testInitImagePathNull ( ) throws Exception { String testCaseId = "xyz" ; when ( testSuite . getTestCase ( testCaseId ) ) . thenReturn ( new TestCase ( "test" , testCaseId ) ) ; <START_BUG> testling . init ( testCaseId ) ; <END_BUG> verify ( exceptionHandler , times ( 1 ) ) . handleException ( any ( IOException . class ) ) ; } @ Test public void testInitImagePathEmpty ( ) throws Exception { } }

Fix:
testling . init ( testCaseId , new String [ ] { } ) ;
Buggy code:
public class AjbrowserModuleTests extends TestCase { <START_BUG> public static Test suite ( ) { <END_BUG> TestSuite suite = new TestSuite ( AjbrowserModuleTests . class . getName ( ) ) ; suite . addTest ( AjbrowserTests . suite ( ) ) ; return suite ; } public AjbrowserModuleTests ( String name ) { } }

Fix:
public static TestSuite suite ( ) {
Buggy code:
public class SelectionStrategyConverter implements IStringConverter < SelectionStrategy > { @ Override public SelectionStrategy convert ( String value ) { if ( value == null ) { return SelectionStrategy . OUR ; } try { return SelectionStrategy . valueOf ( value . toUpperCase ( ) ) ; } catch ( IllegalArgumentException e ) { <START_BUG> throw new ParameterException ( "--select<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>'ours',<seq2seq4repair_space>'theirs',<seq2seq4repair_space>or<seq2seq4repair_space>'prompt'" ) ; <END_BUG> } } }

Fix:
throw new ParameterException ( "--select<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>'our',<seq2seq4repair_space>'their',<seq2seq4repair_space>or<seq2seq4repair_space>'prompt'" ) ;
Buggy code:
public final class EditorDescriptor implements Serializable , IEditorDescriptor , IPluginContribution { private static final long serialVersionUID = 3905241225668998961L ; public static final int OPEN_INTERNAL = 1 ; public static final int OPEN_INPLACE = 2 ; public static final int OPEN_EXTERNAL = 4 ; private String editorName ; private String imageFilename ; private transient ImageDescriptor imageDesc ; private boolean testImage = true ; private String className ; private String launcherName ; private String fileName ; private String id = Util . ZERO_LENGTH_STRING ; private boolean matchingStrategyChecked = false ; private IEditorMatchingStrategy matchingStrategy ; private Program program ; private String pluginIdentifier ; private int openMode = 0 ; private transient IConfigurationElement configurationElement ; private IPartDescriptor partInfo = new IPartDescriptor ( ) { public String getId ( ) { } public String getLabel ( ) { } public ImageDescriptor getImage ( ) { } } ; EditorDescriptor ( String id2 , IConfigurationElement element ) { } EditorDescriptor ( ) { } public static EditorDescriptor createForProgram ( String filename ) { } private static Program findProgram ( String programName ) { } public IEditorActionBarContributor createActionBarContributor ( ) { } public String getClassName ( ) { } public IConfigurationElement getConfigurationElement ( ) { } public IEditorPart createEditor ( ) throws CoreException { } public String getFileName ( ) { } public String getId ( ) { } public ImageDescriptor getImageDescriptor ( ) { } private void verifyImage ( ) { } public String getImageFilename ( ) { } public String getLabel ( ) { } public String getLauncher ( ) { } public String getPluginID ( ) { } public Program getProgram ( ) { } public boolean isInternal ( ) { } public boolean isOpenInPlace ( ) { } public boolean isOpenExternal ( ) { } protected boolean loadValues ( IMemento memento ) { } protected void saveValues ( IMemento memento ) { } private int getOpenMode ( ) { } void setClassName ( String newClassName ) { } void setConfigurationElement ( IConfigurationElement newConfigurationElement ) { } void setFileName ( String aFileName ) { } void setID ( String anID ) { } void setImageDescriptor ( ImageDescriptor desc ) { } void setImageFilename ( String aFileName ) { } void setLauncher ( String newLauncher ) { } void setName ( String newName ) { } public void setOpenMode ( int mode ) { } void setPluginIdentifier ( String anID ) { } void setProgram ( Program newProgram ) { } public String toString ( ) { <START_BUG> return ( "EditorDescriptor(" + ( editorName ) ) + ")" ; <END_BUG> } public String getLocalId ( ) { } public String getPluginId ( ) { } public IPartDescriptor getPartDescriptor ( ) { } public IEditorMatchingStrategy getEditorMatchingStrategy ( ) { } }

Fix:
return ( ( ( "EditorDescriptor(id=" + ( getId ( ) ) ) + ",<seq2seq4repair_space>label=" ) + ( getLabel ( ) ) ) + ")" ;
Buggy code:
public class ObjectActionContributorManager extends ObjectContributorManager { private static ObjectActionContributorManager sharedInstance ; public ObjectActionContributorManager ( ) { } private List computeCombinedOrder ( Class inputClass ) { } public boolean contributeObjectActions ( IWorkbenchPart part , IMenuManager popupMenu , ISelectionProvider selProv ) { } private Class getCommonClass ( Class class1 , Class class2 ) { } private Class getCommonClass ( List objects ) { } private List getCommonClasses ( List objects ) { } public static ObjectActionContributorManager getManager ( ) { } private void loadContributors ( ) { } private Class getCommonResourceClass ( List objects ) { if ( ( objects == null ) || ( ( objects . size ( ) ) == 0 ) ) { return null ; } <START_BUG> Class resourceClass = ObjectContributorManager . getResourceClass ( ) ; <END_BUG> if ( resourceClass == null ) { return null ; } List testList = new ArrayList ( ) ; for ( int i = 0 ; i < ( objects . size ( ) ) ; i ++ ) { Object object = objects . get ( i ) ; if ( object instanceof IAdaptable ) { if ( resourceClass . isInstance ( object ) ) { continue ; } Object resource = getAdaptedResource ( ( ( IAdaptable ) ( object ) ) ) ; if ( resource == null ) { return null ; } testList . add ( resource ) ; } else { return null ; } } return getCommonClass ( testList ) ; } }

Fix:
Class resourceClass = LegacyResourceSupport . getResourceClass ( ) ;
Buggy code:
public interface BaseMultivariateSimpleBoundsOptimizer < FUNC extends MultivariateFunction > extends BaseMultivariateOptimizer < FUNC > { <START_BUG> RealPointValuePair optimize ( int maxEval , FUNC f , GoalType goalType , double [ ] startPoint , double [ ] lowerBound , double [ ] upperBound ) ; <END_BUG> }

Fix:
PointValuePair optimize ( int maxEval , FUNC f , GoalType goalType , double [ ] startPoint , double [ ] lowerBound , double [ ] upperBound ) ;
Buggy code:
public class ViewSashContainer extends PartSashContainer { public ViewSashContainer ( WorkbenchPage page ) { } public ViewSashContainer getRootContainer ( ) { } protected Composite createParent ( Composite parentWidget ) { } protected void disposeParent ( ) { } public Control getControl ( ) { } public IStatus restoreState ( IMemento memento ) { } public IStatus saveState ( IMemento memento ) { } protected float getDockingRatio ( LayoutPart dragged , LayoutPart target ) { } public boolean isStackType ( LayoutPart toTest ) { } public boolean isPaneType ( LayoutPart toTest ) { } protected PartStack createStack ( ) { } protected void setVisiblePart ( ILayoutContainer container , LayoutPart visiblePart ) { } protected LayoutPart getVisiblePart ( ILayoutContainer container ) { <START_BUG> return ( ( ViewStack ) ( container ) ) . getVisiblePart ( ) ; <END_BUG> } protected void derefPart ( LayoutPart sourcePart ) { } protected void addChild ( RelationshipInfo info ) { } public void replace ( LayoutPart oldChild , LayoutPart newChild ) { } }

Fix:
return ( ( ViewStack ) ( container ) ) . getSelection ( ) ;
Buggy code:
public class LookCommandHandler implements CommandHandler < LookCommand > { @ Override public void handle ( Player player , LookCommand cmd ) throws IOException { assert player != null ; assert cmd != null ; Location . Direction dir = cmd . getDirection ( ) ; cmd . respondf ( "In<seq2seq4repair_space>the<seq2seq4repair_space>%s<seq2seq4repair_space>there<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>%s." , dir , player . get ( dir ) . getClass ( ) . getSimpleName ( ) ) ; <START_BUG> cmd . respondf ( "This<seq2seq4repair_space>would<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>Location<seq2seq4repair_space>at<seq2seq4repair_space>(%s//%s)." , player . getPosition ( ) . getX ( ) , player . getPosition ( ) . getY ( ) ) ; <END_BUG> } }

Fix:
cmd . respondf ( "This<seq2seq4repair_space>would<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>Location<seq2seq4repair_space>at<seq2seq4repair_space>%s." , player . getPosition ( ) . get ( dir ) ) ;
Buggy code:
public class WebMvcConfigurationSupportTests { private WebMvcConfigurationSupportTests . TestWebMvcConfiguration mvcConfiguration ; @ Before public void setUp ( ) { } @ Test public void requestMappingHandlerMapping ( ) throws Exception { } @ Test public void emptyViewControllerHandlerMapping ( ) { } @ Test public void beanNameHandlerMapping ( ) throws Exception { } @ Test public void emptyResourceHandlerMapping ( ) { } @ Test public void emptyDefaultServletHandlerMapping ( ) { } @ Test public void requestMappingHandlerAdapter ( ) throws Exception { RequestMappingHandlerAdapter adapter = mvcConfiguration . requestMappingHandlerAdapter ( ) ; List < HttpMessageConverter < ? > > expectedConverters = new ArrayList < HttpMessageConverter < ? > > ( ) ; mvcConfiguration . addDefaultHttpMessageConverters ( expectedConverters ) ; assertEquals ( expectedConverters . size ( ) , adapter . getMessageConverters ( ) . size ( ) ) ; ConfigurableWebBindingInitializer initializer = ( ( ConfigurableWebBindingInitializer ) ( adapter . getWebBindingInitializer ( ) ) ) ; assertNotNull ( initializer ) ; ConversionService conversionService = initializer . getConversionService ( ) ; assertNotNull ( conversionService ) ; assertTrue ( ( conversionService instanceof FormattingConversionService ) ) ; Validator validator = initializer . getValidator ( ) ; assertNotNull ( validator ) ; assertTrue ( ( validator instanceof LocalValidatorFactoryBean ) ) ; <START_BUG> assertEquals ( true , new org . springframework . beans . DirectFieldAccessor ( adapter ) . getPropertyValue ( "ignoreDefaultModelOnRedirect" ) ) ; <END_BUG> } @ Test public void handlerExceptionResolver ( ) throws Exception { } @ Test public void webMvcConfigurerExtensionHooks ( ) throws Exception { } @ Controller private static class TestController { @ SuppressWarnings ( "unused" ) @ RequestMapping ( "//" ) public void handle ( ) { } } private static class TestWebMvcConfiguration extends WebMvcConfigurationSupport { } private class WebConfig extends WebMvcConfigurationSupport implements WebMvcConfigurer { @ Override public void addFormatters ( FormatterRegistry registry ) { } @ Override public void configureMessageConverters ( List < HttpMessageConverter < ? > > converters ) { } @ Override public Validator getValidator ( ) { } @ Override public void addArgumentResolvers ( List < HandlerMethodArgumentResolver > argumentResolvers ) { } @ Override public void addReturnValueHandlers ( List < HandlerMethodReturnValueHandler > returnValueHandlers ) { } @ Override public void configureHandlerExceptionResolvers ( List < HandlerExceptionResolver > exceptionResolvers ) { } @ Override public void addInterceptors ( InterceptorRegistry registry ) { } @ Override public void addViewControllers ( ViewControllerRegistry registry ) { } @ Override public void addResourceHandlers ( ResourceHandlerRegistry registry ) { } @ Override public void configureDefaultServletHandling ( DefaultServletHandlerConfigurer configurer ) { } } }

Fix:
assertEquals ( false , new org . springframework . beans . DirectFieldAccessor ( adapter ) . getPropertyValue ( "ignoreDefaultModelOnRedirect" ) ) ;
Buggy code:
final class ModuleIdentityArtifactProvider extends AbstractService < Void > implements ArtifactProviderPlugin { public static final ServiceName SERVICE_NAME = OSGiConstants . SERVICE_BASE_NAME . append ( "artifact.provider" ) ; private final InjectedValue < BundleContext > injectedSystemContext = new InjectedValue < BundleContext > ( ) ; private final InjectedValue < ServerEnvironment > injectedEnvironment = new InjectedValue < ServerEnvironment > ( ) ; private ServiceRegistration registration ; private File modulesDir ; private File bundlesDir ; static ServiceController < ? > addService ( final ServiceTarget target ) { } private ModuleIdentityArtifactProvider ( ) { } @ Override public void start ( StartContext context ) throws StartException { BundleContext syscontext = injectedSystemContext . getValue ( ) ; Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; props . put ( SERVICE_RANKING , Integer . MAX_VALUE ) ; registration = syscontext . registerService ( ArtifactProviderPlugin . class . getName ( ) , this , props ) ; ServerEnvironment serverEnvironment = injectedEnvironment . getValue ( ) ; <START_BUG> modulesDir = new File ( ( ( ( serverEnvironment . getHomeDir ( ) ) + ( File . separator ) ) + "modules" ) ) ; <END_BUG> bundlesDir = serverEnvironment . getBundlesDir ( ) ; } @ Override public void stop ( StopContext context ) { } @ Override public Collection < Capability > findProviders ( Requirement req ) { } static File getRepositoryEntry ( File rootDir , ModuleIdentifier identifier ) throws IOException { } @ Override public String toString ( ) { } }

Fix:
modulesDir = serverEnvironment . getModulesDir ( ) ;
Buggy code:
public class BurnAction extends BaseSpellAction { public SpellResult perform ( CastContext context ) { Block block = context . getTargetBlock ( ) ; if ( ( ( ( ( block == null ) || ( ( block . getType ( ) ) == ( Material . AIR ) ) ) || ( ( block . getType ( ) ) == ( Material . FIRE ) ) ) || ( ( block . getType ( ) ) == ( Material . WATER ) ) ) || ( ( block . getType ( ) ) == ( Material . STATIONARY_WATER ) ) ) { return SpellResult . NO_TARGET ; } Material material = Material . FIRE ; if ( ( ( block . getType ( ) ) == ( Material . ICE ) ) || ( ( block . getType ( ) ) == ( Material . SNOW ) ) ) { material = Material . AIR ; } else { block = block . getRelative ( UP ) ; } if ( ( ( ( block . getType ( ) ) == ( Material . FIRE ) ) || ( ( block . getType ( ) ) == ( Material . WATER ) ) ) || ( ( block . getType ( ) ) == ( Material . STATIONARY_WATER ) ) ) { return SpellResult . NO_TARGET ; } if ( ! ( context . isDestructible ( block ) ) ) { return SpellResult . NO_TARGET ; } <START_BUG> context . registerForUndo ( block , true ) ; <END_BUG> MaterialAndData applyMaterial = new MaterialAndData ( material ) ; applyMaterial . modify ( block ) ; return SpellResult . CAST ; } @ Override public boolean isUndoable ( ) { } @ Override public boolean requiresBuildPermission ( ) { } @ Override public boolean requiresTarget ( ) { } }

Fix:
context . registerForUndo ( block ) ;
Buggy code:
public class TransactionScopedEntityManager extends AbstractEntityManager implements Serializable { private static final long serialVersionUID = 455498112L ; private final String puScopedName ; private final Map properties ; private transient EntityManagerFactory emf ; private transient boolean isJPA21 = true ; private final SynchronizationType synchronizationType ; public TransactionScopedEntityManager ( String puScopedName , Map properties , EntityManagerFactory emf , SynchronizationType synchronizationType ) { } @ Override protected EntityManager getEntityManager ( ) { } @ Override protected boolean isExtendedPersistenceContext ( ) { } @ Override protected boolean isInTx ( ) { } @ Override public void close ( ) { } private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } private static ServiceContainer currentServiceContainer ( ) { } @ Override public SynchronizationType getSynchronizationType ( ) { } private EntityManager getOrCreateTransactionScopedEntityManager ( final EntityManagerFactory emf , final String scopedPuName , final Map properties , final SynchronizationType synchronizationType ) { EntityManager entityManager = TransactionUtil . getTransactionScopedEntityManager ( puScopedName ) ; if ( entityManager == null ) { entityManager = createEntityManager ( emf , properties , synchronizationType ) ; if ( JPA_LOGGER . isDebugEnabled ( ) ) JPA_LOGGER . debugf ( "%s:<seq2seq4repair_space>created<seq2seq4repair_space>entity<seq2seq4repair_space>manager<seq2seq4repair_space>session<seq2seq4repair_space>%s" , TransactionUtil . getEntityManagerDetails ( entityManager ) , TransactionUtil . getTransaction ( ) . toString ( ) ) ; TransactionUtil . registerSynchronization ( entityManager , scopedPuName ) ; TransactionUtil . putEntityManagerInTransactionRegistry ( scopedPuName , entityManager ) ; } else { TransactionScopedEntityManager . testForMixedSyncronizationTypes ( entityManager , puScopedName , synchronizationType ) ; if ( JPA_LOGGER . isDebugEnabled ( ) ) { <START_BUG> JPA_LOGGER . debugf ( "%s:<seq2seq4repair_space>reuse<seq2seq4repair_space>entity<seq2seq4repair_space>manager<seq2seq4repair_space>session<seq2seq4repair_space>already<seq2seq4repair_space>in<seq2seq4repair_space>tx<seq2seq4repair_space>%s" , TransactionUtil . getEntityManagerDetails ( entityManager ) , getTransaction ( ) . toString ( ) ) ; <END_BUG> } } return entityManager ; } private EntityManager createEntityManager ( EntityManagerFactory emf , Map properties , final SynchronizationType synchronizationType ) { } private boolean isJPA21 ( ) { } private void setJPA21 ( boolean value ) { } private static void testForMixedSyncronizationTypes ( EntityManager entityManager , String scopedPuName , final SynchronizationType targetSynchronizationType ) { } }

Fix:
JPA_LOGGER . debugf ( "%s:<seq2seq4repair_space>reuse<seq2seq4repair_space>entity<seq2seq4repair_space>manager<seq2seq4repair_space>session<seq2seq4repair_space>already<seq2seq4repair_space>in<seq2seq4repair_space>tx<seq2seq4repair_space>%s" , TransactionUtil . getEntityManagerDetails ( entityManager ) , TransactionUtil . getTransaction ( ) . toString ( ) ) ;
Buggy code:
public class PrototypeVerifierTest { @ Test public void canProduceMessageForList ( ) { try { final List < String > expectedValue = Arrays . asList ( "AB" ) ; final List < String > differentValue = Arrays . asList ( "ABC" ) ; ListReturnType expected = Expectamundo . prototype ( ListReturnType . class ) ; Expectamundo . expect ( expected . getValue ( ) . get ( 0 ) ) . isEqualTo ( expectedValue . get ( 0 ) ) ; new PrototypeVerifier ( new ListReturnType ( differentValue ) ) . matches ( expected ) ; } catch ( AssertionError e ) { <START_BUG> MatcherAssert . assertThat ( e . getMessage ( ) , Matchers . equalTo ( "\nExpected<seq2seq4repair_space>a<seq2seq4repair_space>ListReturnType<seq2seq4repair_space>containing<seq2seq4repair_space>properties<seq2seq4repair_space>:\n\tgetValue().get(0)<seq2seq4repair_space>is<seq2seq4repair_space>is<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>AB\nbut<seq2seq4repair_space>actual<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>ListReturnType<seq2seq4repair_space>containing<seq2seq4repair_space>properties<seq2seq4repair_space>:\n\tgetValue().get(0)<seq2seq4repair_space>is<seq2seq4repair_space>ABC\n" ) ) ; <END_BUG> } } }

Fix:
MatcherAssert . assertThat ( e . getMessage ( ) , Matchers . equalTo ( "\nExpected<seq2seq4repair_space>a<seq2seq4repair_space>ListReturnType<seq2seq4repair_space>containing<seq2seq4repair_space>properties:\n\tgetValue().get(0)<seq2seq4repair_space>is<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>AB\nbut<seq2seq4repair_space>actual<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>ListReturnType<seq2seq4repair_space>containing<seq2seq4repair_space>properties:\n\tgetValue().get(0)<seq2seq4repair_space>is<seq2seq4repair_space>ABC" ) ) ;
Buggy code:
public class MethodAnnotationChecker { private final Method methodToCheck ; public MethodAnnotationChecker ( Method method ) { } public boolean containsAnnotation ( String annotation ) { } private boolean annotationMatches ( Annotation antFromMethod , String antFromUser ) { } private String extractAnnotationNameFromMethod ( Annotation antFromMethod ) { int endOfAnnotationName = antFromMethod . toString ( ) . indexOf ( "(" ) ; String upToAnnotationName = antFromMethod . toString ( ) . substring ( 0 , endOfAnnotationName ) ; <START_BUG> return upToAnnotationName . substring ( ( ( upToAnnotationName . indexOf ( "." ) ) + 1 ) ) ; <END_BUG> } private String extractAnnotationNameFromUserInput ( String antFromUser ) { } }

Fix:
return upToAnnotationName . substring ( ( ( upToAnnotationName . lastIndexOf ( "." ) ) + 1 ) ) ;
Buggy code:
public class PromptPasswordState implements State { private final ConsoleWrapper theConsole ; private final StateValues stateValues ; private final boolean rePrompt ; public PromptPasswordState ( ConsoleWrapper theConsole , StateValues stateValues , boolean rePrompt ) { } @ Override public State execute ( ) { if ( ( stateValues . isSilentOrNonInteractive ( ) ) == false ) { if ( ( rePrompt ) == false ) { RestrictionLevel level = stateValues . getOptions ( ) . getCheckUtil ( ) . getRestrictionLevel ( ) ; if ( ! ( RELAX . equals ( level ) ) ) { final List < PasswordRestriction > passwordRestrictions = stateValues . getOptions ( ) . getCheckUtil ( ) . getPasswordRestrictions ( ) ; if ( ( passwordRestrictions . size ( ) ) > 0 ) { if ( level == ( RestrictionLevel . REJECT ) ) { theConsole . printf ( ROOT_LOGGER . passwordRequirements ( ) ) ; } else { theConsole . printf ( ROOT_LOGGER . passwordRecommendations ( ) ) ; } theConsole . printf ( AddUser . NEW_LINE ) ; for ( PasswordRestriction passwordRestriction : passwordRestrictions ) { final String message = passwordRestriction . getRequirementMessage ( ) ; if ( ( message != null ) && ( ! ( message . isEmpty ( ) ) ) ) { theConsole . printf ( "<seq2seq4repair_space>-<seq2seq4repair_space>" ) ; theConsole . printf ( message ) ; theConsole . printf ( AddUser . NEW_LINE ) ; } } } } theConsole . printf ( ROOT_LOGGER . passwordPrompt ( ) ) ; char [ ] tempChar = theConsole . readPassword ( "<seq2seq4repair_space>:<seq2seq4repair_space>" ) ; if ( ( tempChar == null ) || ( ( tempChar . length ) == 0 ) ) { <START_BUG> return new ErrorState ( theConsole , ROOT_LOGGER . noPasswordExiting ( ) , stateValues ) ; <END_BUG> } stateValues . setPassword ( new String ( tempChar ) ) ; return new ValidatePasswordState ( theConsole , stateValues ) ; } else { theConsole . printf ( ROOT_LOGGER . passwordConfirmationPrompt ( ) ) ; char [ ] secondTempChar = theConsole . readPassword ( "<seq2seq4repair_space>:<seq2seq4repair_space>" ) ; if ( secondTempChar == null ) { secondTempChar = new char [ 0 ] ; } if ( ( Arrays . equals ( stateValues . getPassword ( ) . toCharArray ( ) , secondTempChar ) ) == false ) { return new ErrorState ( theConsole , ROOT_LOGGER . passwordMisMatch ( ) , new PromptPasswordState ( theConsole , stateValues , false ) ) ; } return stateValues . groupPropertiesFound ( ) ? new PromptGroupsState ( theConsole , stateValues ) : new PreModificationState ( theConsole , stateValues ) ; } } return new ValidatePasswordState ( theConsole , stateValues ) ; } }

Fix:
return new ErrorState ( theConsole , ROOT_LOGGER . noPasswordExiting ( ) ) ;
Buggy code:
public final class SingleMemberAnnotation extends Annotation { public static final ChildPropertyDescriptor TYPE_NAME_PROPERTY = Annotation . internalTypeNamePropertyFactory ( SingleMemberAnnotation . class ) ; public static final ChildPropertyDescriptor VALUE_PROPERTY = new ChildPropertyDescriptor ( SingleMemberAnnotation . class , "value" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression value = null ; SingleMemberAnnotation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final ChildPropertyDescriptor internalTypeNameProperty ( ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getValue ( ) { if ( ( this . value ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . value ) == null ) { preLazyInit ( ) ; this . value = new SimpleName ( this . ast ) ; postLazyInit ( this . value , SingleMemberAnnotation . VALUE_PROPERTY ) ; } } } return this . value ; } public void setValue ( Expression value ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class FeatureModelJPFBDD implements IFeatureModelClass { private static final String HEAD = "//**\r\n<seq2seq4repair_space>*<seq2seq4repair_space>Variability<seq2seq4repair_space>encoding<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>feature<seq2seq4repair_space>model<seq2seq4repair_space>for<seq2seq4repair_space>JPF-BDD.\r\n<seq2seq4repair_space>*<seq2seq4repair_space>Auto-generated<seq2seq4repair_space>class.\r\n<seq2seq4repair_space>*//\r\npublic<seq2seq4repair_space>class<seq2seq4repair_space>FeatureModel<seq2seq4repair_space>{\n\n" ; private static final String FIELD_MODIFIER = "\tpublic<seq2seq4repair_space>static<seq2seq4repair_space>boolean<seq2seq4repair_space>" ; private static final String ANNOTATION = "\t@gov.nasa.jpf.bdd.TrackWithBDD\r\n" ; private static final String SELECTFEATURES = "\tpublic<seq2seq4repair_space>static<seq2seq4repair_space>void<seq2seq4repair_space>select_features()<seq2seq4repair_space>{\r\n" ; private FeatureModel featureModel ; public FeatureModelJPFBDD ( FeatureModel featureModel ) { } @ Override public String getImports ( ) { } @ Override public String getHead ( ) { } @ Override public String getFeatureFields ( ) { } @ Override public String getFormula ( ) { <START_BUG> final Node nodes = NodeCreator . createNodes ( featureModel . clone ( ) ) . eliminateNotSupportedSymbols ( javaSymbols ) ; <END_BUG> String formula = nodes . toString ( javaSymbols ) . toLowerCase ( Locale . ENGLISH ) ; if ( formula . contains ( "<seq2seq4repair_space>&&<seq2seq4repair_space>true<seq2seq4repair_space>&&<seq2seq4repair_space>!<seq2seq4repair_space>false" ) ) { formula = formula . substring ( 0 , formula . indexOf ( "<seq2seq4repair_space>&&<seq2seq4repair_space>true<seq2seq4repair_space>&&<seq2seq4repair_space>!<seq2seq4repair_space>false" ) ) ; } return ( ( ( VALID ) + "return<seq2seq4repair_space>" ) + formula ) + ";\r\n\t}\r\n" ; } @ Override public String getGetter ( ) { } @ Override public String getSelection ( ) { } }

Fix:
final Node nodes = NodeCreator . createNodes ( featureModel . clone ( ) ) . toCNF ( ) ;
Buggy code:
class TextTab extends ScrollableTab { Text text ; Group textGroup ; Button wrapButton ; Button readOnlyButton ; Button leftButton ; Button centerButton ; Button rightButton ; TextTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "DoubleClickEnabled" , "EchoChar" , "Editable" , "Orientation" , "Selection" , "Tabs" , "Text" , "TextLimit" , "TopIndex" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "DoubleClickEnabled" , "EchoChar" , "Editable" , "Orientation" , "Selection" , "Tabs" , "Text" , "TextLimit" , "ToolTipText" , "TopIndex" } ;
Buggy code:
@ Repository ( "fastaDbDao" ) public final class FastaDbDaoHibernate extends BulkDaoBase implements FastaDbDao { public static final int IDS_AT_A_TIME = 1000 ; private static final Logger LOGGER = Logger . getLogger ( FastaDbDaoHibernate . class ) ; public static final long REPORT_FREQUENCY = 100L ; private static final String HBM_HOME = "edu//mayo//mprc//fastadb//" ; private CurationDao curationDao ; public FastaDbDaoHibernate ( ) { } public FastaDbDaoHibernate ( final CurationDao curationDao ) { } public FastaDbDaoHibernate ( final Database database ) { } @ Override public ProteinSequence getProteinSequence ( final Curation database , final String accessionNumber ) { } @ Override public Map < String , ProteinSequence > getProteinSequences ( final Curation database , final Collection < String > accessionNumbers ) { } @ Override public String getProteinDescription ( final Curation database , final String accessionNumber ) { } @ Override public ProteinSequence addProteinSequence ( final ProteinSequence proteinSequence ) { } private ProteinSequence addProteinSequence ( final StatelessSession session , final ProteinSequence proteinSequence ) { if ( null == ( proteinSequence . getId ( ) ) ) { <START_BUG> return saveStateless ( session , proteinSequence , nullSafeEq ( "sequence" , proteinSequence . getSequence ( ) ) , false ) ; <END_BUG> } return proteinSequence ; } private ProteinAccnum addAccessionNumber ( final StatelessSession session , final ProteinAccnum accessionNumber ) { } private ProteinDescription addDescription ( final StatelessSession session , final ProteinDescription description ) { } @ Override public ProteinSequence getProteinSequence ( final int proteinId ) { } @ Override public long countDatabaseEntries ( final Curation database ) { } @ Override public void addFastaDatabase ( final Curation database , @ Nullable final UserProgressReporter progressReporter ) { } @ Override public void addProteinSequences ( final Collection < ProteinSequence > proteinSequences ) { } private void addSequences ( final Collection < ? extends Sequence > sequences , final String table ) { } @ Override public Collection < String > getHibernateMappings ( ) { } @ Override public String check ( ) { } @ Override public void install ( final Map < String , String > params ) { } public CurationDao getCurationDao ( ) { } @ Resource ( name = "curationDao" ) public void setCurationDao ( final CurationDao curationDao ) { } }

Fix:
return saveStateless ( session , proteinSequence , nullSafeTextEq ( "sequence" , proteinSequence . getSequence ( ) ) , false ) ;
Buggy code:
public class ViewToolbarAction extends CheckBoxAction implements Observer { public ViewToolbarAction ( AbstractFrameController controller ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> frameController . getView ( ) . showToolbar ( ) ; <END_BUG> } public void update ( Observable o , Object arg ) { } }

Fix:
frameMediator . getView ( ) . showToolbar ( ) ;