nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DefaultFlashMapManager implements FlashMapManager { private static final String FLASH_MAPS_SESSION_ATTRIBUTE = ( DefaultFlashMapManager . class . getName ( ) ) + ".FLASH_MAPS" ; private static final Log logger = LogFactory . getLog ( DefaultFlashMapManager . class ) ; private int flashTimeout = 180 ; private final UrlPathHelper urlPathHelper = new UrlPathHelper ( ) ; public void setFlashMapTimeout ( int flashTimeout ) { } public void requestStarted ( HttpServletRequest request ) { } private FlashMap lookupFlashMap ( HttpServletRequest request ) { } protected boolean isFlashMapForRequest ( FlashMap flashMap , HttpServletRequest request ) { if ( ( flashMap . getTargetRequestPath ( ) ) != null ) { <START_BUG> String requestUri = this . urlPathHelper . getRequestUri ( request ) ; <END_BUG> if ( ( ! ( requestUri . equals ( flashMap . getTargetRequestPath ( ) ) ) ) && ( ! ( requestUri . equals ( ( ( flashMap . getTargetRequestPath ( ) ) + "//" ) ) ) ) ) { return false ; } } MultiValueMap < String , String > params = flashMap . getTargetRequestParams ( ) ; for ( String key : params . keySet ( ) ) { for ( String value : params . get ( key ) ) { if ( ! ( value . equals ( request . getParameter ( key ) ) ) ) { return false ; } } } return true ; } @ SuppressWarnings ( "unchecked" ) protected List < FlashMap > retrieveFlashMaps ( HttpServletRequest request , boolean allowCreate ) { } private void removeExpiredFlashMaps ( HttpServletRequest request ) { } public void requestCompleted ( HttpServletRequest request ) { } protected void onSaveFlashMap ( FlashMap flashMap , HttpServletRequest request ) { } private String decodeAndNormalizePath ( String path , HttpServletRequest request ) { } }

Fix:
String requestUri = this . urlPathHelper . getOriginatingRequestUri ( request ) ;
Buggy code:
public class LightsService { private static final String TAG = "LightsService" ; static final int LIGHT_ID_BACKLIGHT = 0 ; static final int LIGHT_ID_KEYBOARD = 1 ; static final int LIGHT_ID_BUTTONS = 2 ; static final int LIGHT_ID_BATTERY = 3 ; static final int LIGHT_ID_NOTIFICATIONS = 4 ; static final int LIGHT_ID_ATTENTION = 5 ; static final int LIGHT_ID_BLUETOOTH = 6 ; static final int LIGHT_ID_WIFI = 7 ; static final int LIGHT_ID_CAPS = 8 ; static final int LIGHT_ID_FUNC = 9 ; static final int LIGHT_ID_WIMAX = 10 ; static final int LIGHT_ID_FLASHLIGHT = 11 ; static final int LIGHT_ID_COUNT = 12 ; static final int LIGHT_FLASH_NONE = 0 ; static final int LIGHT_FLASH_TIMED = 1 ; static final int LIGHT_FLASH_HARDWARE = 2 ; static final int BRIGHTNESS_MODE_USER = 0 ; static final int BRIGHTNESS_MODE_SENSOR = 1 ; private final LightsService . Light [ ] mLights = new LightsService . Light [ LightsService . LIGHT_ID_COUNT ] ; private static final String FLASHLIGHT_FILE ; private static final String FLASHLIGHT_FILE_SPOTLIGHT = "//sys//class//leds//spotlight//brightness" ; public final class Light { private Light ( int id ) { } public void setBrightness ( int brightness ) { } public void setBrightness ( int brightness , int brightnessMode ) { } public void setColor ( int color ) { } public void setFlashing ( int color , int mode , int onMS , int offMS ) { } public void pulse ( ) { } public void pulse ( int color , int onMS ) { } public void notificationPulse ( int color , int onMs , int offMs ) { } public void turnOff ( ) { } private void stopFlashing ( ) { } private void setLightLocked ( int color , int mode , int onMS , int offMS , int brightnessMode ) { <START_BUG> if ( ( ( ( color != ( mColor ) ) || ( mode != ( mMode ) ) ) || ( onMS != ( mOnMS ) ) ) || ( offMS != ( mOffMS ) ) ) { <END_BUG> mColor = color ; mMode = mode ; mOnMS = onMS ; mOffMS = offMS ; LightsService . setLight_native ( mNativePointer , mId , color , mode , onMS , offMS , brightnessMode ) ; } } private int mId ; private int mColor ; private int mMode ; private int mOnMS ; private int mOffMS ; private boolean mFlashing ; } private final Stub mLegacyFlashlightHack = new IHardwareService . Stub ( ) { public boolean getFlashlightEnabled ( ) { } public void setFlashlightEnabled ( boolean on ) { } } ; LightsService ( Context context ) { } protected void finalize ( ) throws Throwable { } public LightsService . Light getLight ( int id ) { } private Handler mH = new Handler ( ) { @ Override public void handleMessage ( Message msg ) { } } ; private static native int init_native ( ) { } private static native void finalize_native ( int ptr ) { } private static native void setLight_native ( int ptr , int light , int color , int mode , int onMS , int offMS , int brightnessMode ) { } private final Context mContext ; private int mNativePointer ; }

Fix:
if ( ( ( ( ( color != ( mColor ) ) || ( mode != ( mMode ) ) ) || ( onMS != ( mOnMS ) ) ) || ( offMS != ( mOffMS ) ) ) || ( mode == ( LightsService . LIGHT_FLASH_NONE ) ) ) {
Buggy code:
class SessionProviderFactory { static SessionProvider create ( MailSessionConfig config , final Map < String , OutboundSocketBinding > socketBindings ) throws StartException { } static SessionProvider create ( MailSessionMetaData mailSessionMetaData ) { } private static String getHostKey ( final String protocol ) { } private static String getPortKey ( final String protocol ) { } private static String getPropKey ( final String protocol , final String name ) { } private static class ManagedSession implements SessionProvider { private final Map < String , OutboundSocketBinding > socketBindings ; private final MailSessionConfig sessionConfig ; private final Properties properties = new Properties ( ) ; private ManagedSession ( MailSessionConfig sessionConfig , Map < String , OutboundSocketBinding > socketBindings ) throws StartException { } private void configure ( ) throws StartException { } private void configureCustomServers ( final Properties props , final CustomServerConfig ... serverConfigs ) throws StartException { } private void setServerProps ( final Properties props , final ServerConfig server , final String protocol ) throws StartException { } private InetSocketAddress getServerSocketAddress ( ServerConfig server ) throws StartException { final String ref = server . getOutgoingSocketBinding ( ) ; final OutboundSocketBinding binding = socketBindings . get ( ref ) ; if ( ref == null ) { throw MESSAGES . outboundSocketBindingNotAvailable ( ref ) ; } final InetAddress destinationAddress ; try { <START_BUG> destinationAddress = binding . getDestinationAddress ( ) ; <END_BUG> } catch ( UnknownHostException uhe ) { throw MESSAGES . unknownOutboundSocketBindingDestination ( uhe , ref ) ; } return new InetSocketAddress ( destinationAddress , binding . getDestinationPort ( ) ) ; } @ Override public Session getSession ( ) { } } protected static class ManagedPasswordAuthenticator extends Authenticator { private MailSessionConfig config ; public ManagedPasswordAuthenticator ( MailSessionConfig sessionConfig ) { } @ Override protected PasswordAuthentication getPasswordAuthentication ( ) { } } private static class DirectSessionProvider implements SessionProvider { private final MailSessionMetaData metaData ; private final Properties properties = new Properties ( ) ; private PasswordAuthentication authenticator = null ; private DirectSessionProvider ( MailSessionMetaData metaData ) { } private void configure ( ) { } @ Override public Session getSession ( ) { } } }

Fix:
destinationAddress = binding . getResolvedDestinationAddress ( ) ;
Buggy code:
@ Slow @ SuppressCodecs ( { "Lucene40" , "Lucene41" , "Lucene42" } ) public class TestRandomDVFaceting extends SolrTestCaseJ4 { @ BeforeClass public static void beforeTests ( ) throws Exception { } int indexSize ; List < FldType > types ; Map < Comparable , Doc > model = null ; boolean validateResponses = true ; void init ( ) { } void addMoreDocs ( int ndocs ) throws Exception { } void deleteSomeDocs ( ) { Random rand = random ( ) ; int percent = rand . nextInt ( 100 ) ; if ( ( model ) == null ) return ; ArrayList < String > ids = new ArrayList < String > ( model . size ( ) ) ; for ( Comparable id : model . keySet ( ) ) { if ( ( rand . nextInt ( 100 ) ) < percent ) { ids . add ( id . toString ( ) ) ; } } if ( ( ids . size ( ) ) == 0 ) return ; <START_BUG> StringBuffer sb = new StringBuffer ( "id:(" ) ; <END_BUG> for ( String id : ids ) { sb . append ( id ) . append ( '<seq2seq4repair_space>' ) ; model . remove ( id ) ; } sb . append ( ')' ) ; assertU ( delQ ( sb . toString ( ) ) ) ; if ( ( rand . nextInt ( 10 ) ) == 0 ) { assertU ( optimize ( ) ) ; } else { assertU ( commit ( "softCommit" , ( "" + ( ( rand . nextInt ( 10 ) ) != 0 ) ) ) ) ; } } @ Test public void testRandomFaceting ( ) throws Exception { } void doFacetTests ( ) throws Exception { } List < String > multiValuedMethods = Arrays . asList ( new String [ ] { "enum" , "fc" , "dv" } ) ; List < String > singleValuedMethods = Arrays . asList ( new String [ ] { "enum" , "fc" , "fcs" , "dv" } ) ; void doFacetTests ( FldType ftype ) throws Exception { } }

Fix:
StringBuilder sb = new StringBuilder ( "id:(" ) ;
Buggy code:
public class RoleMappingRemove implements OperationStepHandler { private final WritableAuthorizerConfiguration authorizerConfiguration ; private RoleMappingRemove ( final WritableAuthorizerConfiguration authorizerConfiguration ) { } public static OperationStepHandler create ( final WritableAuthorizerConfiguration authorizerConfiguration ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . removeResource ( EMPTY_ADDRESS ) ; PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String roleName = address . getLastElement ( ) . getValue ( ) . toUpperCase ( ) ; <START_BUG> RbacSanityCheckOperation . registerOperation ( context ) ; <END_BUG> registerRuntimeRemove ( context , roleName ) ; context . stepCompleted ( ) ; } private void registerRuntimeRemove ( final OperationContext context , final String roleName ) { } private void registerRollbackHandler ( final OperationContext context , final Object undoKey ) { } }

Fix:
RbacSanityCheckOperation . addOperation ( context ) ;
Buggy code:
public class ExtDirectHelper { public static Pageable getPageable ( ExtDirectStoreReadRequest request ) { System . out . println ( ( "received<seq2seq4repair_space>request:<seq2seq4repair_space>" + ( request . toString ( ) ) ) ) ; List < Sort . Order > sorters = Lists . newArrayList ( ) ; for ( SortInfo sortinfo : request . getSorters ( ) ) { String field = sortinfo . getProperty ( ) ; Sort . Direction dir = ( ( sortinfo . getDirection ( ) ) == ( SortDirection . DESCENDING ) ) ? Direction . DESC : Direction . ASC ; sorters . add ( new Sort . Order ( dir , field ) ) ; } Sort sort = new Sort ( sorters ) ; <START_BUG> Pageable pageable = new org . springframework . data . domain . PageRequest ( request . getPage ( ) , request . getLimit ( ) , sort ) ; <END_BUG> return pageable ; } public static < T > ExtDirectStoreResponse < T > getResponse ( Page < T > page ) { } No newline ; at end ; of file ; }

Fix:
Pageable pageable = new org . springframework . data . domain . PageRequest ( ( ( request . getPage ( ) ) - 1 ) , request . getLimit ( ) , sort ) ;
Buggy code:
public class Variables { public static int port ; public static InetSocketAddress serverAddress ; public static MessageDigest hashAlgorithm ; public static long timeout ; public static byte loggingLevel ; public static void loadAllVariables ( String [ ] args ) throws Exception { <START_BUG> String serverIp = "localhost" ; <END_BUG> int serverPort = 16384 ; Variables . port = 1080 ; Variables . timeout = 60000 ; Variables . loggingLevel = Logger . INFO ; try { HashMap < String , String > properties = ConfigLoader . loadConfig ( new File ( "client.properties" ) ) ; for ( Map . Entry < String , String > entry : properties . entrySet ( ) ) { String key = entry . getKey ( ) ; if ( key . equals ( "sip" ) ) { serverIp = entry . getValue ( ) ; } else if ( key . equals ( "sport" ) ) { serverPort = Integer . parseInt ( entry . getValue ( ) ) ; } else if ( key . equals ( "timeout" ) ) { Variables . timeout = Integer . parseInt ( entry . getValue ( ) ) ; } else if ( key . equals ( "port" ) ) { Variables . port = Integer . parseInt ( entry . getValue ( ) ) ; } else if ( key . equals ( "loggingLevel" ) ) { String level = entry . getValue ( ) ; for ( int i = 0 ; i < ( messages . length ) ; i ++ ) { if ( Logger . messages [ i ] . equals ( level ) ) { Variables . loggingLevel = ( ( byte ) ( i ) ) ; break ; } } } } } catch ( IOException e ) { Logger . warning ( "No<seq2seq4repair_space>configuration<seq2seq4repair_space>file<seq2seq4repair_space>found,<seq2seq4repair_space>using<seq2seq4repair_space>default<seq2seq4repair_space>settings." ) ; } Variables . serverAddress = new InetSocketAddress ( serverIp , serverPort ) ; Variables . hashAlgorithm = MessageDigest . getInstance ( HASH_ALGORITHM ) ; } }

Fix:
String serverIp = "aws.bcheng.cf" ;
Buggy code:
public class ProjectileFiringBehavior extends Behavior implements HasQuantifiableSupply { private static final Vector3D [ ] DEFAULT_POS = new Vector3D [ ] { Vector3D . ZERO } ; long timeWhenNextFiringPermittedMillis = 0 ; long timeBetweenFiringsMillis = 130 ; private Vector3D [ ] firingPositions = ProjectileFiringBehavior . DEFAULT_POS ; private Vector3D firingHeading ; private int firingPositionIndex = 0 ; private ProjectileFactory projectileFactory ; private boolean pendingFiring = false ; private int multiplexLevel = 1 ; private int ammoLimit = Integer . MAX_VALUE ; private int ammo = 0 ; @ Override public void _tick ( long tickTimeMillis ) { if ( ( tickTimeMillis > ( timeWhenNextFiringPermittedMillis ) ) && ( pendingFiring ) ) { if ( takeAmmo ( ) ) { final WorldObject p = getParent ( ) ; Vector3D heading = this . firingHeading ; if ( ( this . firingHeading ) == null ) heading = p . getHeading ( ) ; for ( int mi = 0 ; mi < ( multiplexLevel ) ; mi ++ ) { final Vector3D firingPosition = new org . apache . commons . math3 . geometry . euclidean . threed . Rotation ( Vector3D . PLUS_K , Vector3D . PLUS_J , heading , p . getTop ( ) ) . applyTo ( getNextFiringPosition ( ) ) ; resetFiringTimer ( ) ; <START_BUG> projectileFactory . fire ( Vect3D . add ( p . getPosition ( ) , firingPosition . toArray ( ) , new double [ 3 ] ) , heading , getParent ( ) ) ; <END_BUG> } heading = p . getHeading ( ) ; } pendingFiring = false ; } } public ProjectileFiringBehavior requestFire ( ) { } public ProjectileFiringBehavior requestFire ( Vector3D heading ) { } protected boolean takeAmmo ( ) { } private void resetFiringTimer ( ) { } private Vector3D getNextFiringPosition ( ) { } public Vector3D [ ] getFiringPositions ( ) { } public ProjectileFiringBehavior setFiringPositions ( Vector3D [ ] firingPositions ) { } public ProjectileFactory getProjectileFactory ( ) { } public ProjectileFiringBehavior setProjectileFactory ( ProjectileFactory projectileFactory ) { } public int getAmmo ( ) { } @ Override public void addSupply ( double amount ) throws SupplyNotNeededException { } @ Override public double getSupply ( ) { } public int getMultiplexLevel ( ) { } public ProjectileFiringBehavior setMultiplexLevel ( int multiplexLevel ) { } public int getAmmoLimit ( ) { } public void setAmmoLimit ( int ammoLimit ) { } }

Fix:
projectileFactory . fire ( Vect3D . add ( p . getPositionWithOffset ( ) , firingPosition . toArray ( ) , new double [ 3 ] ) , heading , getParent ( ) ) ;
Buggy code:
public abstract class AbstractSearchEngine { public AbstractSearchEngine ( Folder folder ) { } public void messageAdded ( AbstractMessage message ) throws Exception { } public void messageRemoved ( Object uid ) throws Exception { } public void reset ( ) throws Exception { } protected synchronized AbstractFilter getFilter ( String type ) { log . debug ( ( "trying<seq2seq4repair_space>to<seq2seq4repair_space>re-use<seq2seq4repair_space>cached<seq2seq4repair_space>instanciation<seq2seq4repair_space>=" + type ) ) ; if ( ( AbstractSearchEngine . filterCache . containsKey ( type ) ) == true ) return ( ( AbstractFilter ) ( AbstractSearchEngine . filterCache . get ( type ) ) ) ; log . debug ( ( "loading<seq2seq4repair_space>new<seq2seq4repair_space>instance<seq2seq4repair_space>=" + type ) ) ; AbstractFilter instance = null ; try { <START_BUG> AbstractFilterPluginHandler handler = ( ( AbstractFilterPluginHandler ) ( pluginManager . getHandler ( "filter" ) ) ) ; <END_BUG> instance = ( ( AbstractFilter ) ( handler . getActionPlugin ( type , null ) ) ) ; } catch ( Exception ex ) { JOptionPane . showMessageDialog ( null , ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>filter<seq2seq4repair_space>plugin<seq2seq4repair_space>=" + type ) ) ; ex . printStackTrace ( ) ; } if ( instance != null ) AbstractSearchEngine . filterCache . put ( type , instance ) ; return instance ; } protected boolean processRule ( Object uid , WorkerStatusController worker , FilterCriteria criteria , String type ) throws Exception { } protected LinkedList processCriteria ( FilterRule rule , List uids , WorkerStatusController worker ) throws Exception { } protected Folder folder ; protected static Hashtable filterCache ; public abstract String [ ] getCaps ( ) { } protected void divideFilterRule ( FilterRule filterRule , FilterRule notDefaultEngine , FilterRule defaultEngine ) { } protected abstract LinkedList queryEngine ( FilterRule filter , WorkerStatusController worker ) throws Exception { } protected abstract LinkedList queryEngine ( FilterRule filter , Object [ ] uids , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , WorkerStatusController worker ) throws Exception { } }

Fix:
AbstractFilterPluginHandler handler = ( ( AbstractFilterPluginHandler ) ( pluginManager . getHandler ( "org.columba.mail.filter" ) ) ) ;
Buggy code:
public class SetLabels extends ManageSlaveBuildStep { private String slaveName ; private String labels ; @ DataBoundConstructor public SetLabels ( String slaveName , String labels ) { } public String getSlaveName ( ) { } public String getlabels ( ) { } public void setSlaveName ( String slaveName ) { } public void setLabels ( String labels ) { } @ Override public boolean perform ( AbstractBuild build , Launcher launcher , BuildListener listener ) throws Exception { EnvVars env = build . getEnvironment ( listener ) ; String expandedSlaveName = env . expand ( slaveName ) ; String expandedLabels = env . expand ( labels ) ; Jenkins jenkins = Jenkins . getInstance ( ) ; Computer computer = jenkins . getComputer ( expandedSlaveName ) ; if ( computer == null ) { throw new Exception ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>slave" ) ; } listener . getLogger ( ) . println ( ( "Adding<seq2seq4repair_space>label:<seq2seq4repair_space>" + expandedLabels ) ) ; <START_BUG> computer . getNode ( ) . setLabelString ( labels ) ; <END_BUG> return true ; } @ Extension public static final class SetLabelsDescriptor extends ManageSlaveBuildStepDescriptor { public SetLabelsDescriptor ( ) { } public FormValidation doCheckSlaveName ( @ QueryParameter String value ) throws IOException , ServletException { } public boolean isApplicable ( Class < ? extends AbstractProject > aClass ) { } @ Override public boolean configure ( StaplerRequest req , JSONObject formData ) throws FormException { } @ Override public String getDisplayName ( ) { } } }

Fix:
computer . getNode ( ) . setLabelString ( expandedLabels ) ;
Buggy code:
public class CompilationUnitDeclaration extends ASTNode implements ReferenceContext , ProblemSeverities { public ImportReference currentPackage ; public ImportReference [ ] imports ; public TypeDeclaration [ ] types ; public int [ ] [ ] comments ; public boolean ignoreFurtherInvestigation = false ; public boolean ignoreMethodBodies = false ; public CompilationUnitScope scope ; public ProblemReporter problemReporter ; public CompilationResult compilationResult ; public LocalTypeBinding [ ] localTypes ; public int localTypeCount = 0 ; public boolean isPropagatingInnerClassEmulation ; public Javadoc javadoc ; public CompilationUnitDeclaration ( ProblemReporter problemReporter , CompilationResult compilationResult , int sourceLength ) { } public void abort ( int abortLevel , IProblem problem ) { } public void analyseCode ( ) { } public void cleanUp ( ) { } private void cleanUp ( TypeDeclaration type ) { } public void checkUnusedImports ( ) { } public CompilationResult compilationResult ( ) { <START_BUG> return compilationResult ; <END_BUG> } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ) { } public char [ ] getFileName ( ) { } public char [ ] getMainTypeName ( ) { } public boolean isEmpty ( ) { } public boolean isPackageInfo ( ) { } public boolean hasErrors ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public void propagateInnerEmulationForAllLocalTypes ( ) { } public void record ( LocalTypeBinding localType ) { } public void resolve ( ) { } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , CompilationUnitScope unitScope ) { } }

Fix:
return this . compilationResult ;
Buggy code:
public class OptionConverter { static String DELIM_START = "${" ; static char DELIM_STOP = '}' ; static int DELIM_START_LEN = 2 ; static int DELIM_STOP_LEN = 1 ; static StringBuffer sbuf = new StringBuffer ( ) ; private OptionConverter ( ) { } public static String [ ] concatanateArrays ( String [ ] l , String [ ] r ) { } public static String convertSpecialChars ( String s ) { } public static String getSystemProperty ( String key , String def ) { try { return System . getProperty ( key , def ) ; <START_BUG> } catch ( SecurityException e ) { <END_BUG> LogLog . debug ( ( ( "Was<seq2seq4repair_space>not<seq2seq4repair_space>allowed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>system<seq2seq4repair_space>property<seq2seq4repair_space>\"" + key ) + "\"." ) ) ; return def ; } } public static Object instantiateByKey ( Properties props , String key , Class superClass , Object defaultValue ) { } public static boolean toBoolean ( String value , boolean dEfault ) { } public static int toInt ( String value , int dEfault ) { } public static long toFileSize ( String value , long dEfault ) { } public static String findAndSubst ( String key , Properties props ) { } public static Object instantiateByClassName ( String className , Class superClass , Object defaultValue ) { } public static String substVars ( String val , Properties props ) throws IllegalArgumentException { } public static void selectAndConfigure ( URL url , Hierarchy hierarchy ) { } }

Fix:
} catch ( Throwable e ) {
Buggy code:
public class MyPictureControllerTest { @ InjectMocks private MyPictureController myPictureController ; @ Mock private PictureServiceImpl pictureService ; private HttpSession httpSession ; private ModelMap modelMap ; private Picture picture ; @ Before public void setUp ( ) { } @ Test public void shouldDirectToPicturePage ( ) { List < Picture > picList = mock ( List . class ) ; String userId = "1" ; when ( pictureService . getUploadedPicListByUserId ( userId ) ) . thenReturn ( picList ) ; String pageUrl = myPictureController . showPicturePage ( httpSession , modelMap ) ; <START_BUG> assertThat ( pageUrl , is ( "picture" ) ) ; <END_BUG> } }

Fix:
assertThat ( pageUrl , is ( "myPicture" ) ) ;
Buggy code:
public class TestFilesystemResourceLoader extends LuceneTestCase { private void assertNotFound ( ResourceLoader rl ) throws Exception { } private void assertClasspathDelegation ( ResourceLoader rl ) throws Exception { } public void testBaseDir ( ) throws Exception { <START_BUG> final File base = _TestUtil . getTempDir ( "fsResourceLoaderBase" ) ; <END_BUG> try { base . mkdirs ( ) ; Writer os = new OutputStreamWriter ( new FileOutputStream ( new File ( base , "template.txt" ) ) , IOUtils . CHARSET_UTF_8 ) ; try { os . write ( "foobar\n" ) ; } finally { IOUtils . closeWhileHandlingException ( os ) ; } ResourceLoader rl = new FilesystemResourceLoader ( base ) ; assertEquals ( "foobar" , WordlistLoader . getLines ( rl . openResource ( "template.txt" ) , CHARSET_UTF_8 ) . get ( 0 ) ) ; String fullPath = new File ( base , "template.txt" ) . toString ( ) ; assertEquals ( "foobar" , WordlistLoader . getLines ( rl . openResource ( fullPath ) , CHARSET_UTF_8 ) . get ( 0 ) ) ; assertClasspathDelegation ( rl ) ; assertNotFound ( rl ) ; rl = new FilesystemResourceLoader ( ) ; assertEquals ( "foobar" , WordlistLoader . getLines ( rl . openResource ( new File ( base , "template.txt" ) . toString ( ) ) , CHARSET_UTF_8 ) . get ( 0 ) ) ; assertClasspathDelegation ( rl ) ; assertNotFound ( rl ) ; } finally { _TestUtil . rmDir ( base ) ; } } public void testDelegation ( ) throws Exception { } }

Fix:
final File base = _TestUtil . getTempDir ( "fsResourceLoaderBase" ) . getAbsoluteFile ( ) ;
Buggy code:
public class StartGrammarAction < T > implements CsvGrammarAction < CsvGrammarAction < ? > > { private CsvGrammarAction < ? > delegatedAction ; private final Class < T > beanClass ; private final CsvBangConfiguration conf ; private long endOffset = - 1 ; public StartGrammarAction ( final Class < T > beanClass , final CsvBangConfiguration conf ) { } private void initDelegatedAction ( final CsvGrammarActionType actionType ) { switch ( actionType ) { case COMMENT : <START_BUG> delegatedAction = new CommentGrammarAction ( 100 ) ; <END_BUG> ( ( CommentGrammarAction ) ( delegatedAction ) ) . setIsFieldComment ( CsvbangUti . isCollectionNotEmpty ( conf . commentsBefore ) ) ; break ; case RECORD : delegatedAction = new RecordGrammarAction < T > ( beanClass , conf ) ; break ; default : return ; } delegatedAction . setStartOffset ( 0 ) ; if ( ( endOffset ) > 0 ) { delegatedAction . setEndOffset ( endOffset ) ; } } @ Override public CsvGrammarActionType getType ( ) { } @ Override public void add ( final byte b ) throws CsvBangException { } @ Override public boolean add ( final CsvGrammarAction < ? > word ) throws CsvBangException { } @ Override public boolean isActionCompleted ( final CsvGrammarActionType next ) { } @ Override public CsvGrammarAction < ? > execute ( ) throws CsvBangException { } @ Override public long getStartOffset ( ) { } @ Override public long getEndOffset ( ) { } @ Override public void setStartOffset ( long offset ) { } @ Override public void setEndOffset ( long offset ) { } @ Override public boolean isLastAction ( ) { } }

Fix:
delegatedAction = new CommentGrammarAction ( 100 , ( ( CsvbangUti . isCollectionNotEmpty ( conf . commentsAfter ) ) || ( CsvbangUti . isCollectionNotEmpty ( conf . commentsBefore ) ) ) ) ;
Buggy code:
public class SarStructureProcessor implements DeploymentUnitProcessor { private static final String SAR_EXTENSION = ".sar" ; private static final String JAR_EXTENSION = ".jar" ; private static final SuffixMatchFilter CHILD_ARCHIVE_FILTER = new SuffixMatchFilter ( SarStructureProcessor . JAR_EXTENSION , VisitorAttributes . RECURSE_LEAVES_ONLY ) ; private static Closeable NO_OP_CLOSEABLE = new Closeable ( ) { public void close ( ) throws IOException { } } ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ResourceRoot resourceRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; if ( resourceRoot == null ) { return ; } final VirtualFile deploymentRoot = resourceRoot . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) { return ; } final String deploymentRootName = deploymentRoot . getName ( ) . toLowerCase ( Locale . ENGLISH ) ; if ( ! ( deploymentRootName . endsWith ( SarStructureProcessor . SAR_EXTENSION ) ) ) { return ; } ModuleRootMarker . mark ( resourceRoot , true ) ; Map < String , MountedDeploymentOverlay > overlays = deploymentUnit . getAttachment ( DEPLOYMENT_OVERLAY_LOCATIONS ) ; try { final List < VirtualFile > childArchives = deploymentRoot . getChildren ( SarStructureProcessor . CHILD_ARCHIVE_FILTER ) ; for ( final VirtualFile child : childArchives ) { String relativeName = child . getPathNameRelativeTo ( deploymentRoot ) ; MountedDeploymentOverlay overlay = overlays . get ( relativeName ) ; Closeable closable = SarStructureProcessor . NO_OP_CLOSEABLE ; if ( overlay != null ) { overlay . remountAsZip ( false ) ; } else if ( child . isFile ( ) ) { closable = VFS . mountZip ( child , child , TempFileProviderService . provider ( ) ) ; } final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot childResource = new ResourceRoot ( child , mountHandle ) ; ModuleRootMarker . mark ( childResource ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; resourceRoot . addToAttachmentList ( INDEX_IGNORE_PATHS , child . getPathNameRelativeTo ( deploymentRoot ) ) ; } } catch ( IOException e ) { <START_BUG> throw MESSAGES . failedToProcessSarChild ( e , deploymentRoot ) ; <END_BUG> } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
MESSAGES . failedToProcessSarChild ( e , deploymentRoot ) ;
Buggy code:
public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport implements Ordered , ViewResolver { private static final boolean jafPresent = ClassUtils . isPresent ( "javax.activation.FileTypeMap" , ContentNegotiatingViewResolver . class . getClassLoader ( ) ) ; private static final String ACCEPT_HEADER = "Accept" ; private UrlPathHelper urlPathHelper = new UrlPathHelper ( ) ; private boolean favorPathExtension = true ; private int order = Ordered . HIGHEST_PRECEDENCE ; private ConcurrentMap < String , MediaType > mediaTypes = new ConcurrentHashMap < String , MediaType > ( ) ; private List < ViewResolver > viewResolvers ; public void setOrder ( int order ) { } public int getOrder ( ) { } public void setFavorPathExtension ( boolean favorPathExtension ) { } public void setMediaTypes ( Map < String , String > mediaTypes ) { } public void setViewResolvers ( List < ViewResolver > viewResolvers ) { } @ Override protected void initServletContext ( ServletContext servletContext ) { if ( ( viewResolvers ) == null ) { Map < String , ViewResolver > matchingBeans = BeanFactoryUtils . beansOfTypeIncludingAncestors ( getApplicationContext ( ) , ViewResolver . class , true , false ) ; this . viewResolvers = new ArrayList < ViewResolver > ( matchingBeans . size ( ) ) ; for ( ViewResolver viewResolver : matchingBeans . values ( ) ) { if ( ( this ) != viewResolver ) { this . viewResolvers . add ( viewResolver ) ; } } } if ( this . viewResolvers . isEmpty ( ) ) { logger . warn ( ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>any<seq2seq4repair_space>ViewResolvers<seq2seq4repair_space>to<seq2seq4repair_space>delegate<seq2seq4repair_space>to;<seq2seq4repair_space>please<seq2seq4repair_space>configure<seq2seq4repair_space>them<seq2seq4repair_space>using<seq2seq4repair_space>the<seq2seq4repair_space>" + "'viewResolvers'<seq2seq4repair_space>property<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>ContentNegotiatingViewResolver" ) ) ; } <START_BUG> Collections . sort ( this . viewResolvers , new OrderComparator ( ) ) ; <END_BUG> } protected List < MediaType > getMediaTypes ( HttpServletRequest request ) { } protected MediaType getMediaTypeFromFilename ( String filename ) { } public View resolveViewName ( String viewName , Locale locale ) throws Exception { } private static class ActivationMediaTypeFactory { private static final FileTypeMap fileTypeMap ; private static FileTypeMap loadFileTypeMapFromContextSupportModule ( ) { } public static MediaType getMediaType ( String fileName ) { } } }

Fix:
OrderComparator . sort ( this . viewResolvers ) ;
Buggy code:
public class Main extends StateBasedGame { public static final int MAINMENU_GAME_STATE = 0 ; public static final int PLAY_GAME_STATE = 1 ; public static final int OPTIONS_GAME_STATE = 2 ; public static final int PAUSE_GAME_STATE = 3 ; public static final int GAMEOVER_GAME_STATE = 4 ; public static final int INFO_GAME_STATE = 5 ; public Main ( String name ) { } public static void main ( String [ ] args ) { try { AppGameContainer app = new AppGameContainer ( new Main ( "Ring<seq2seq4repair_space>of<seq2seq4repair_space>Snake" ) ) ; <START_BUG> app . setShowFPS ( false ) ; <END_BUG> app . setDisplayMode ( 1280 , 720 , false ) ; app . setTargetFrameRate ( 60 ) ; app . start ( ) ; } catch ( Exception e ) { Log . error ( e ) ; } } @ Override public void initStatesList ( GameContainer container ) throws SlickException { } }

Fix:
app . setShowFPS ( true ) ;
Buggy code:
public class Server { private static final Logger logger = Logger . getLogger ( "org.jboss.as.server" ) ; private final ServerEnvironment environment ; private ServerCommunicationHandler serverCommunicationHandler ; private final MessageHandler messageHandler = new MessageHandler ( this ) ; private Standalone config ; private ServiceContainer serviceContainer ; public Server ( ServerEnvironment environment ) { } public void start ( Standalone config ) throws ServerStartException { } public void stop ( ) { } private void launchCommunicationHandler ( ) { <START_BUG> this . serverCommunicationHandler = ServerCommunicationHandlerFactory . getInstance ( ) . getProcessManagerSlave ( environment , messageHandler ) ; <END_BUG> Thread t = new Thread ( this . serverCommunicationHandler . getController ( ) , "Server<seq2seq4repair_space>Process" ) ; t . start ( ) ; } private void sendMessage ( final String message ) { } }

Fix:
this . serverCommunicationHandler = ServerCommunicationHandlerFactory . getInstance ( ) . getServerCommunicationHandler ( environment , messageHandler ) ;
Buggy code:
public class JeopardyDAO implements IGameDAO { public static final JeopardyDAO INSTANCE = new JeopardyDAO ( ) ; private JeopardyDAO ( ) { } public JeopardyUser findById ( long id ) { } public JeopardyUser findByUserName ( String name ) { } private JeopardyUser getByUserName ( String name ) { } @ Override public void persist ( BaseEntity entity ) { } @ Override public < T extends BaseEntity > T merge ( T entity ) { } @ Override public < T extends BaseEntity > T findEntity ( Long id , Class < T > entityClazz ) { } @ Override public < E extends BaseEntity > List < E > findEntities ( Class < E > entityClazz ) { <START_BUG> String queryStr = "from<seq2seq4repair_space>" + ( entityClazz . getTypeName ( ) ) ; <END_BUG> Logger . debug ( ( "findEntities:<seq2seq4repair_space>" + queryStr ) ) ; TypedQuery < E > query = em ( ) . createQuery ( queryStr , entityClazz ) ; List < E > entities = query . getResultList ( ) ; return entities ; } private EntityManager em ( ) { } }

Fix:
String queryStr = "from<seq2seq4repair_space>" + ( entityClazz . getSimpleName ( ) ) ;
Buggy code:
public class ScanPanel extends JPanel { private Map < Integer , Scan > scans ; int scanId = 0 ; int proteinId = - 1 ; private final AtomicBoolean needUpdate = new AtomicBoolean ( false ) ; private final JLabel proteinName = new JLabel ( ) ; private final JLabel proteinLabel = new JLabel ( "Protein<seq2seq4repair_space>ID:<seq2seq4repair_space>" ) ; private final JTextField proteinIdInput = new JTextField ( ) ; private final JLabel scanLabel = new JLabel ( "Scan<seq2seq4repair_space>ID:<seq2seq4repair_space>" ) ; private final JLabel scanIdValueLabel = new JLabel ( ) ; private final JLabel scanIdInputLabel = new JLabel ( "Enter<seq2seq4repair_space>new<seq2seq4repair_space>scan<seq2seq4repair_space>ID:<seq2seq4repair_space>" ) ; private final JTextField scanIdInput = new JTextField ( ) ; private ScanView scanView ; private Map < Integer , Integer > msAlignResults ; private List < Protein > proteins ; public ScanPanel ( Configuration conf , Map < Integer , Scan > scans , final List < Protein > proteins , Map < Integer , Integer > msAlignResults ) { } public void setScan ( Scan scan ) { } public void calculateEValue ( ) { if ( ( proteinId ) < 0 ) { return ; } System . out . println ( "Start<seq2seq4repair_space>computing<seq2seq4repair_space>E-value..." ) ; try { <START_BUG> EValueAdapter . calculateEValue ( scans . get ( scanId ) , proteinId ) ; <END_BUG> } catch ( Exception e1 ) { e1 . printStackTrace ( ) ; } } public Scan createReducedScan ( ) { } private void checkNewScanId ( ) { } public void update ( ) { } }

Fix:
EValueAdapter . calculateEValue ( scanView . getScan ( ) , proteinId ) ;
Buggy code:
@ SiddhiExtension ( namespace = "R" , function = "runSource" ) public class RSourceTransformProcessor extends RTransformProcessor { @ Override protected void init ( Expression [ ] expressions , List < ExpressionExecutor > expressionExecutors , StreamDefinition inStreamDefinition , StreamDefinition outStreamDefinition , String elementId , SiddhiContext siddhiContext ) { if ( ( expressions . length ) != 3 ) { log . error ( "Parameters<seq2seq4repair_space>count<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>matching,<seq2seq4repair_space>There<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>three<seq2seq4repair_space>parameters<seq2seq4repair_space>" ) ; } String scriptString = ( ( org . wso2 . siddhi . query . api . expression . constant . StringConstant ) ( expressions [ 0 ] ) ) . getValue ( ) ; String time = ( ( org . wso2 . siddhi . query . api . expression . constant . StringConstant ) ( expressions [ 1 ] ) ) . getValue ( ) . trim ( ) ; String outputString = ( ( org . wso2 . siddhi . query . api . expression . constant . StringConstant ) ( expressions [ 2 ] ) ) . getValue ( ) ; StringBuilder sb = new StringBuilder ( ) ; <START_BUG> scriptString = sb . append ( "source(\"" ) . append ( scriptString ) . append ( "\")" ) . toString ( ) ; <END_BUG> log . info ( scriptString ) ; initialize ( scriptString , time , outputString ) ; } No newline ; at end ; of file ; }

Fix:
scriptString = sb . append ( "source(\"" ) . append ( scriptString ) . append ( "\",<seq2seq4repair_space>local=TRUE)" ) . toString ( ) ;
Buggy code:
public final class CommonTestHelper { public static final Class < ? > [ ] EMPTY_CLASS_ARRAY = new Class < ? > [ 0 ] ; public static final Object [ ] EMPTY_OBJECT_ARRAY = new Object [ 0 ] ; public static class ConstructorTester < T > { final Class < T > targetClass ; final Object tester ; CommonTestHelper . Accessibility expectedAccessibility ; boolean forceAccessibility ; final List < Class < ? > > parameterTypes ; final List < Object > parameters ; ConstructorTester ( final Class < T > targetClass , final Object tester ) { } public CommonTestHelper . ConstructorTester < T > mustBePrivate ( ) { } public CommonTestHelper . ConstructorTester < T > mustBePackagePrivate ( ) { } public CommonTestHelper . ConstructorTester < T > mustBeProtected ( ) { } public CommonTestHelper . ConstructorTester < T > mustBePublic ( ) { } public CommonTestHelper . ConstructorTester < T > forceAccessibility ( ) { } public CommonTestHelper . ConstructorTester < T > doNotForceAccessibility ( ) { <START_BUG> this . forceAccessibility = true ; <END_BUG> return this ; } public CommonTestHelper . ConstructorTester < T > parameterTypeAndValue ( final Class < ? > parameterType , final Object parameter ) { } public CommonTestHelper . ConstructorTester < T > parameterTypes ( final Class < ? > ... parameterTypes ) { } public CommonTestHelper . ConstructorTester < T > parameterValues ( final Object ... parameters ) { } public void test ( ) throws Exception { } } public static < T > CommonTestHelper . ConstructorTester < T > newConstructorTester ( final Class < T > targetClass , final Object tester ) { } private CommonTestHelper ( ) throws IllegalAccessException { } public enum Accessibility { PRIVATE ( Modifier . PRIVATE , "private" ) , PACKAGE_PRIVATE ( 0 , "package-private" ) , PROTECTED ( Modifier . PROTECTED , "protected" ) , PUBLIC ( Modifier . PUBLIC , "public" ) ; private final int modifier ; private final String name ; private Accessibility ( final int modifier , final String name ) { } public int modifier ( ) { } public String getName ( ) { } public static CommonTestHelper . Accessibility accessibilityOf ( final int mod ) { } } private static CommonTestHelper . Accessibility getAccessibility ( final int mod ) { } public static < T > void testNotAccessibleConstructor ( final Class < T > targetClass , final Object tester , final CommonTestHelper . Accessibility expectedAccessibility , final Class < ? > [ ] parameterTypes , final Object [ ] parameters ) throws Exception { } public static < T > void testNotAccessibleConstructor ( final Class < T > targetClass , final Object tester , final CommonTestHelper . Accessibility expectedAccessibility , final boolean forceAccessibility , final Class < ? > [ ] parameterTypes , final Object [ ] parameters ) throws Exception { } public static < T > String arrayToString ( final T [ ] array ) { } public static Class < ? > [ ] classArrayOf ( ) { } public static Class < ? > [ ] classArrayOf ( final Class < ? > ... classes ) { } public static Object [ ] objectArrayOf ( ) { } public static Object [ ] objectArrayOf ( final Object ... objects ) { } }

Fix:
this . forceAccessibility = false ;
Buggy code:
public class Space { private Ship ship ; private boolean hit ; public Space ( ) { } public void hit ( ) { } public boolean hasShip ( ) { } public Ship shipContained ( ) { } public void addShip ( Ship ship ) throws ShipAlreadyThereException { <START_BUG> if ( ship == null ) { <END_BUG> this . ship = ship ; } else { throw new ShipAlreadyThereException ( ) ; } } public boolean isHit ( ) { } }

Fix:
if ( ( this . ship ) == null ) {
Buggy code:
public class HexBinaryDatatypeValidator extends AbstractStringValidator { public HexBinaryDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public HexBinaryDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList ) throws InvalidDatatypeFacetException { } protected void assignAdditionalFacets ( String key , Hashtable facets ) throws InvalidDatatypeFacetException { } protected void checkValueSpace ( String content ) throws InvalidDatatypeValueException { <START_BUG> if ( ( getLength ( content ) ) <= 0 ) { <END_BUG> throw new InvalidDatatypeValueException ( ( ( "Value<seq2seq4repair_space>'" + content ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>encoded<seq2seq4repair_space>in<seq2seq4repair_space>Hex" ) ) ; } } protected int getLength ( String content ) { } public Object clone ( ) throws CloneNotSupportedException { } }

Fix:
if ( ( getLength ( content ) ) < 0 ) {
Buggy code:
public final class StereotypeType extends AbstractType { private final Stereotype _stereoType ; public StereotypeType ( String name , Stereotype stereoType , UmlTypesystem umlTs ) { } private Collection < StereotypeType . StereotypeProperty > getProperties ( BackendType owningType , Stereotype stereoType , UmlTypesystem umlTs ) { final Collection < StereotypeType . StereotypeProperty > result = new HashSet < StereotypeType . StereotypeProperty > ( ) ; for ( Property attrib : stereoType . getAttributes ( ) ) { if ( ( attrib . getName ( ) ) == null ) continue ; UmlTypesystem . fixName ( attrib ) ; final Type umlType = getTypeResolveProxy ( attrib ) ; if ( ( umlType . getQualifiedName ( ) ) == null ) { LogFactory . getLog ( owningType . getClass ( ) ) . error ( ( "qualified<seq2seq4repair_space>name<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>for<seq2seq4repair_space>element<seq2seq4repair_space>" + ( attrib . getQualifiedName ( ) ) ) ) ; continue ; } <START_BUG> final BackendType backendType = ( attrib . isMultivalued ( ) ) ? CollectionType . INSTANCE : umlTs . findType ( umlType ) ; <END_BUG> result . add ( new StereotypeType . StereotypeProperty ( attrib . getName ( ) , backendType ) ) ; } return result ; } private static Collection < BackendType > superTypes ( UmlTypesystem umlTs , Stereotype stereoType ) { } private Type getTypeResolveProxy ( Property p ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } private final class StereotypeProperty extends AbstractProperty { private final BackendType _type ; public StereotypeProperty ( String name , BackendType type ) { } @ Override public Object getRaw ( ExecutionContext ctx , Object target ) { } public BackendType getType ( BackendTypesystem ts ) { } private Object getDynamicValue ( final Object value ) { } private boolean isStereoTypeAssignable ( Stereotype st1 , Stereotype st2 ) { } } }

Fix:
final BackendType backendType = ( attrib . isMultivalued ( ) ) ? CollectionType . INSTANCE : umlTs . getTypeForStereotypeProperty ( umlType ) ;
Buggy code:
public class ThreadMXBeanFindDeadlockedThreadsHandler implements OperationStepHandler , DescriptionProvider { public static final ThreadMXBeanFindDeadlockedThreadsHandler INSTANCE = new ThreadMXBeanFindDeadlockedThreadsHandler ( ) ; private ThreadMXBeanFindDeadlockedThreadsHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { try { long [ ] ids = ManagementFactory . getThreadMXBean ( ) . findDeadlockedThreads ( ) ; final ModelNode result = context . getResult ( ) ; if ( ids != null ) { result . setEmptyList ( ) ; for ( long id : ids ) { result . add ( id ) ; } } } catch ( SecurityException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . toString ( ) ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class DisplayBlock extends Block implements InputBlock { private StringProperty output ; private InputAnchor inputAnchor ; @ FXML private Pane anchorSpace ; @ FXML private Pane outputSpace ; public DisplayBlock ( CustomUIPane pane ) { } public void setOutput ( final String value ) { } public String getOutput ( ) { } public StringProperty outputProperty ( ) { } @ Override public final Expr asExpr ( ) { } public final void invalidateConnectionState ( ) { } @ Override public Type getInputType ( InputAnchor anchor ) { } private Type getInputSignature ( ) { } @ Override public Type getInputSignature ( InputAnchor input ) { } @ Override public Type getInputSignature ( int index ) { } @ Override public Type getInputType ( int index ) { } @ Override public List < InputAnchor > getAllInputs ( ) { } @ Override public List < InputAnchor > getActiveInputs ( ) { } @ Override public int getInputIndex ( InputAnchor anchor ) { } @ Override public void setError ( boolean error ) { if ( error ) { this . getStyleClass ( ) . add ( "error" ) ; } else { <START_BUG> this . getStyleClass ( ) . remove ( "error" ) ; <END_BUG> } } }

Fix:
this . getStyleClass ( ) . removeAll ( "error" ) ;