nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BindingKeyResolver extends BindingKeyParser { Compiler compiler ; Binding compilerBinding ; char [ ] [ ] compoundName ; int dimension ; LookupEnvironment environment ; ReferenceBinding genericType ; MethodBinding methodBinding ; CompilationUnitDeclaration parsedUnit ; BlockScope scope ; TypeBinding typeBinding ; TypeDeclaration typeDeclaration ; ArrayList types = new ArrayList ( ) ; int rank = 0 ; int wildcardRank ; BindingKeyResolver outerMostResolver ; private BindingKeyResolver ( BindingKeyParser parser , Compiler compiler , LookupEnvironment environment , int wildcardRank , BindingKeyResolver outerMostResolver ) { } public BindingKeyResolver ( String key ) { } public BindingKeyResolver ( String key , Compiler compiler , LookupEnvironment environment ) { } public char [ ] [ ] compoundName ( ) { } public void consumeArrayDimension ( char [ ] brakets ) { } public void consumeBaseType ( char [ ] baseTypeSig ) { } public void consumeCapture ( final int position ) { } public void consumeField ( char [ ] fieldName ) { } public void consumeParameterizedGenericMethod ( ) { } public void consumeLocalType ( char [ ] uniqueKey ) { } public void consumeLocalVar ( char [ ] varName ) { } public void consumeMethod ( char [ ] selector , char [ ] signature ) { } public void consumeMemberType ( char [ ] simpleTypeName ) { } public void consumePackage ( char [ ] pkgName ) { } public void consumeParameterizedType ( char [ ] simpleTypeName , boolean isRaw ) { } public void consumeParser ( BindingKeyParser parser ) { } public void consumeScope ( int scopeNumber ) { } public void consumeRawType ( ) { if ( ( this . typeBinding ) == null ) return ; <START_BUG> this . typeBinding = this . environment . createRawType ( ( ( ReferenceBinding ) ( this . typeBinding ) ) , null ) ; <END_BUG> } public void consumeSecondaryType ( char [ ] simpleTypeName ) { } public void consumeFullyQualifiedName ( char [ ] fullyQualifiedName ) { } public void consumeTopLevelType ( ) { } public void consumeKey ( ) { } public void consumeTypeVariable ( char [ ] position , char [ ] typeVariableName ) { } public void consumeTypeWithCapture ( ) { } public void consumeWildCard ( int kind ) { } private TypeBinding getArrayBinding ( int dim , TypeBinding binding ) { } private TypeBinding getBaseTypeBinding ( char [ ] signature ) { } private TypeBinding getBinaryBinding ( ) { } public CompilationUnitDeclaration getCompilationUnitDeclaration ( ) { } public Binding getCompilerBinding ( ) { } private TypeBinding getTypeBinding ( char [ ] simpleTypeName ) { } private TypeBinding [ ] getTypeBindingArguments ( ) { } public void malformedKey ( ) { } public BindingKeyParser newParser ( ) { } public String toString ( ) { } }

Fix:
this . typeBinding = this . environment . createRawType ( ( ( ReferenceBinding ) ( this . typeBinding ) ) , this . typeBinding . enclosingType ( ) ) ;
Buggy code:
public class CalendarDate extends Entity { public Service service ; public DateTime date ; public int exception_type ; public static class Loader extends Entity . Loader < CalendarDate > { public Loader ( GTFSFeed feed ) { } @ Override public void loadOneRow ( ) throws IOException { String service_id = getStringField ( "service_id" , true ) ; Service service = feed . getOrCreateService ( service_id ) ; DateTime date = getDateField ( "date" , true ) ; if ( service . calendar_dates . containsKey ( date ) ) { errors . add ( new com . conveyal . gtfs . error . DuplicateKeyError ( tableName , row , "(service_id,<seq2seq4repair_space>date)" ) ) ; } else { CalendarDate cd = new CalendarDate ( ) ; cd . service = service ; cd . date = date ; <START_BUG> cd . exception_type = getIntField ( "exception_type" , true , 0 , 1 ) ; <END_BUG> cd . feed = feed ; service . calendar_dates . put ( date , cd ) ; } } } public static class Writer extends Entity . Writer < CalendarDate > { public Writer ( GTFSFeed feed ) { } @ Override protected void writeHeaders ( ) throws IOException { } @ Override protected void writeOneRow ( CalendarDate d ) throws IOException { } @ Override protected Iterator < CalendarDate > iterator ( ) { } } }

Fix:
cd . exception_type = getIntField ( "exception_type" , true , 1 , 2 ) ;
Buggy code:
public class MapSelectTest { @ Test public void testGetSelectedReturnsMap ( ) { ParticleManager pm = new ParticleManager ( new Settings ( ) ) ; MapSelect ms = new MapSelect ( pm ) ; <START_BUG> assertTrue ( ( ( ms . getSelected ( ) ) instanceof Map ) ) ; <END_BUG> } @ Test public void testPressedSetsMapIfMapPressed ( ) { } @ Test public void testMapClickedSetsCorrectMap ( ) { } }

Fix:
assertTrue ( ( ( ms . getSelected ( ) ) != null ) ) ;
Buggy code:
public class Cache extends NameSet { private class CacheElement { RRset rrset ; byte credibility ; long timeIn ; int ttl ; int srcid ; public CacheElement ( int _ttl , byte cred , int src ) { } public CacheElement ( Record r , byte cred , int src ) { } public CacheElement ( RRset r , byte cred , int src ) { } public void update ( Record r ) { } public boolean expiredTTL ( ) { } public String toString ( ) { } } public Cache ( ) { } public Cache ( String file ) throws IOException { } public void addRecord ( Record r , byte cred , Object o ) { } public void addRRset ( RRset rrset , byte cred , Object o ) { } public void addNegative ( Name name , short type , int ttl , byte cred , Object o ) { } public CacheResponse lookupRecords ( Name name , short type , byte minCred ) { Cache . CacheElement element = ( ( Cache . CacheElement ) ( findSet ( name , type ) ) ) ; if ( element == null ) return new CacheResponse ( UNKNOWN ) ; if ( element . expiredTTL ( ) ) { <START_BUG> removeSet ( name , type ) ; <END_BUG> return new CacheResponse ( UNKNOWN ) ; } if ( ( element . credibility ) >= minCred ) { RRset rrset = element . rrset ; if ( rrset == null ) return new CacheResponse ( NEGATIVE ) ; if ( ( type != ( Type . CNAME ) ) && ( ( rrset . getType ( ) ) == ( Type . CNAME ) ) ) { CNAMERecord cname ; cname = ( ( CNAMERecord ) ( rrset . rrs ( ) . nextElement ( ) ) ) ; CacheResponse cr ; cr = lookupRecords ( cname . getTarget ( ) , type , minCred ) ; if ( ! ( cr . isUnknown ( ) ) ) return cr ; else return new CacheResponse ( PARTIAL , cname . getTarget ( ) ) ; } else return new CacheResponse ( SUCCESSFUL , rrset ) ; } else return new CacheResponse ( UNKNOWN ) ; } RRset findRecords ( Name name , short type , byte minCred ) { } public RRset findRecords ( Name name , short type ) { } public RRset findAnyRecords ( Name name , short type ) { } public void addMessage ( Message in ) { } }

Fix:
removeSet ( name , type , element ) ;
Buggy code:
public class NioPathAwareCatalogResolver extends CatalogResolver { private static final Map < Object , ResolverRewriteDirective > urlRewriteDirectives = Maps . newHashMap ( ) ; public NioPathAwareCatalogResolver ( CatalogManager catMan ) { } @ Override public String getResolvedEntity ( String publicId , String systemId ) { } @ Override public InputSource resolveEntity ( String publicId , String systemId ) { } @ Override public Source resolve ( String href , String base ) throws TransformerException { for ( ResolverRewriteDirective urlRewrite : NioPathAwareCatalogResolver . urlRewriteDirectives . values ( ) ) { if ( urlRewrite . appliesTo ( href ) ) { href = urlRewrite . rewrite ( href ) ; break ; } } try { Path resolvedResource ; try { resolvedResource = IO . toPath ( new URI ( href ) ) ; } catch ( URISyntaxException | IllegalArgumentException e ) { final Path basePath = IO . toPath ( new URI ( base ) ) ; resolvedResource = basePath . getParent ( ) . resolve ( href ) ; } if ( Files . isRegularFile ( resolvedResource ) ) { <START_BUG> final PathInputSource pathInputSource = new PathInputSource ( resolvedResource ) ; <END_BUG> pathInputSource . setSystemId ( resolvedResource . toUri ( ) . toASCIIString ( ) ) ; return pathInputSource ; } } catch ( Exception e ) { } return super . resolve ( href , base ) ; } public static void addRewriteDirective ( ResolverRewriteDirective urlRewrite ) { } }

Fix:
final PathStreamSource pathInputSource = new PathStreamSource ( resolvedResource ) ;
Buggy code:
public interface DeploymentMountProvider { ServiceName SERVICE_NAME = JBOSS . append ( "deployment-mount-provider" ) ; Closeable mountDeploymentContent ( VirtualFile deploymentContents , VirtualFile mountPoint , MountType mountType ) throws IOException { } static class Factory { public static void addService ( final ServiceTarget serviceTarget ) { } private static class ServerDeploymentRepositoryImpl implements DeploymentMountProvider , Service < DeploymentMountProvider > { private volatile TempFileProvider tempFileProvider ; private ServerDeploymentRepositoryImpl ( ) { } @ Override public Closeable mountDeploymentContent ( final VirtualFile contents , VirtualFile mountPoint , MountType type ) throws IOException { } @ Override public void start ( StartContext context ) throws StartException { try { final JBossThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( "ServerDeploymentRepository-temp-threads" ) , Boolean . FALSE , null , "%G<seq2seq4repair_space>-<seq2seq4repair_space>%t" , null , null , AccessController . doPrivileged ( GetAccessControlContextAction . getInstance ( ) ) ) ; <START_BUG> tempFileProvider = TempFileProvider . create ( "temp" , Executors . newScheduledThreadPool ( 2 , threadFactory ) ) ; <END_BUG> } catch ( IOException e ) { throw MESSAGES . failedCreatingTempProvider ( ) ; } ROOT_LOGGER . debugf ( "%s<seq2seq4repair_space>started" , DeploymentMountProvider . class . getSimpleName ( ) ) ; } @ Override public void stop ( StopContext context ) { } @ Override public DeploymentMountProvider getValue ( ) throws IllegalStateException { } } } }

Fix:
tempFileProvider = TempFileProvider . create ( "temp" , Executors . newScheduledThreadPool ( 2 , threadFactory ) , true ) ;
Buggy code:
public class HtmlCompressingXmlPullParser implements IXmlPullParser { private final IXmlPullParser delegate ; private final HtmlCompressor compressor ; public HtmlCompressingXmlPullParser ( IXmlPullParser delegate , HtmlCompressor compressor ) { } public void parse ( CharSequence string ) throws IOException , ResourceStreamNotFoundException { } public void parse ( InputStream inputStream ) throws IOException , ResourceStreamNotFoundException { } public void parse ( InputStream inputStream , String encoding ) throws IOException { String markup ; if ( encoding != null ) markup = Streams . readString ( inputStream , encoding ) ; else markup = Streams . readString ( inputStream ) ; String compressed = compressor . compress ( markup ) ; byte [ ] bytes ; if ( encoding != null ) bytes = compressed . getBytes ( encoding ) ; else bytes = compressed . getBytes ( ) ; <START_BUG> delegate . parse ( new ByteArrayInputStream ( bytes ) , null ) ; <END_BUG> } public String getEncoding ( ) { } public CharSequence getDoctype ( ) { } public CharSequence getInputFromPositionMarker ( int toPos ) { } public CharSequence getInput ( int fromPos , int toPos ) { } public HttpTagType next ( ) throws ParseException { } public XmlTag getElement ( ) { } public CharSequence getString ( ) { } public void setPositionMarker ( ) { } public void setPositionMarker ( int pos ) { } public IXmlPullParser getDelegate ( ) { } public HtmlCompressor getCompressor ( ) { } }

Fix:
delegate . parse ( new ByteArrayInputStream ( bytes ) , encoding ) ;
Buggy code:
public class SignUp extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void clickFunction ( View v ) { <START_BUG> Intent intent = new Intent ( this , SignUp . class ) ; <END_BUG> switch ( v . getId ( ) ) { case id . login_button : startActivity ( intent ) ; break ; case id . already_member : startActivity ( intent ) ; break ; } } }

Fix:
Intent intent = new Intent ( this , Login . class ) ;
Buggy code:
public class LocalDeclaration extends AbstractVariableDeclaration { public LocalVariableBinding binding ; public LocalDeclaration ( char [ ] name , int sourceStart , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { <START_BUG> if ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) == 0 ) { <END_BUG> this . bits |= ASTNode . IsLocalDeclarationReachable ; } if ( ( ( this . binding ) != null ) && ( ( this . type . resolvedType ) instanceof TypeVariableBinding ) ) { MethodScope methodScope = this . binding . declaringScope . methodScope ( ) ; AbstractMethodDeclaration methodDeclaration = methodScope . referenceMethod ( ) ; if ( ( ( methodDeclaration != null ) && ( ( ( methodDeclaration . bits ) & ( ASTNode . CanBeStatic ) ) != 0 ) ) && ( ( methodDeclaration . binding ) != null ) ) { TypeVariableBinding [ ] typeVariables = methodDeclaration . binding . typeVariables ( ) ; if ( typeVariables == ( Binding . NO_TYPE_VARIABLES ) ) { currentScope . resetEnclosingMethodStaticFlag ( ) ; } else { boolean usesEnclosingTypeVar = false ; for ( int i = 0 ; i < ( typeVariables . length ) ; i ++ ) { if ( ( typeVariables [ i ] ) == ( this . type . resolvedType ) ) { usesEnclosingTypeVar = true ; break ; } } if ( ! usesEnclosingTypeVar ) { currentScope . resetEnclosingMethodStaticFlag ( ) ; } } } } if ( ( this . initialization ) == null ) { return flowInfo ; } if ( ( ( this . initialization . implicitConversion ) & ( TypeIds . UNBOXING ) ) != 0 ) { this . initialization . checkNPE ( currentScope , flowContext , flowInfo ) ; } flowInfo = this . initialization . analyseCode ( currentScope , flowContext , flowInfo ) . unconditionalInits ( ) ; int nullStatus = this . initialization . nullStatus ( flowInfo ) ; if ( ! ( flowInfo . isDefinitelyAssigned ( this . binding ) ) ) { this . bits |= ASTNode . FirstAssignmentToLocal ; } else { this . bits &= ~ ( ASTNode . FirstAssignmentToLocal ) ; } flowInfo . markAsDefinitelyAssigned ( this . binding ) ; nullStatus = checkAgainstNullAnnotation ( currentScope , this . binding , nullStatus ) ; if ( ( ( this . binding . type . tagBits ) & ( TagBits . IsBaseType ) ) == 0 ) { flowInfo . markNullStatus ( this . binding , nullStatus ) ; } return flowInfo ; } public void checkModifiers ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public int getKind ( ) { } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE_OR_DEAD ) ) == 0 ) {
Buggy code:
public class ColumnSelector extends Selector { private static final long serialVersionUID = 1912743509341730253L ; private ColumnName name ; public ColumnSelector ( ColumnName name ) { } public ColumnName getName ( ) { } public void setName ( ColumnName name ) { } @ Override public SelectorType getType ( ) { } @ Override public ColumnName getColumnName ( ) { } @ Override public Set < TableName > getSelectorTables ( ) { } @ Override public TableName getTableName ( ) { } @ Override public String toString ( ) { } @ Override public String toSQLString ( boolean withAlias ) { <START_BUG> StringBuilder sb = new StringBuilder ( name . toString ( ) ) ; <END_BUG> if ( withAlias && ( ( this . alias ) != null ) ) { sb . append ( "<seq2seq4repair_space>AS<seq2seq4repair_space>" ) . append ( alias ) ; } return sb . toString ( ) ; } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } }

Fix:
StringBuilder sb = new StringBuilder ( name . toSQLString ( ) ) ;
Buggy code:
public class Seam2Processor implements DeploymentUnitProcessor { public static final String SEAM_PROPERTIES = "seam.properties" ; public static final String SEAM_PROPERTIES_META_INF = "META-INF//" + ( Seam2Processor . SEAM_PROPERTIES ) ; public static final String SEAM_PROPERTIES_WEB_INF = "WEB-INF//classes//" + ( Seam2Processor . SEAM_PROPERTIES ) ; public static final String SEAM_COMPONENTS = "components.xml" ; public static final String SEAM_COMPONENTS_META_INF = "META-INF//" + ( Seam2Processor . SEAM_COMPONENTS ) ; public static final String SEAM_COMPONENTS_WEB_INF = "WEB-INF//" + ( Seam2Processor . SEAM_COMPONENTS ) ; public static final String [ ] SEAM_FILES = new String [ ] { Seam2Processor . SEAM_PROPERTIES , Seam2Processor . SEAM_PROPERTIES_META_INF , Seam2Processor . SEAM_PROPERTIES_WEB_INF , Seam2Processor . SEAM_COMPONENTS_META_INF , Seam2Processor . SEAM_COMPONENTS_WEB_INF } ; public static final String SEAM_INT_JAR = "jboss-seam-int.jar" ; public static final ModuleIdentifier EXT_CONTENT_MODULE = ModuleIdentifier . create ( "org.jboss.integration.ext-content" ) ; public static final ModuleIdentifier VFS_MODULE = ModuleIdentifier . create ( "org.jboss.vfs" ) ; private ServiceTarget serviceTarget ; private ResourceLoaderSpec seamIntResourceLoader ; public Seam2Processor ( ServiceTarget serviceTarget ) { } protected synchronized ResourceLoaderSpec getSeamIntResourceLoader ( ) throws DeploymentUnitProcessingException { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ( deploymentUnit . getParent ( ) ) != null ) { return ; } final List < DeploymentUnit > deploymentUnits = new ArrayList < DeploymentUnit > ( ) ; deploymentUnits . add ( deploymentUnit ) ; deploymentUnits . addAll ( deploymentUnit . getAttachmentList ( SUB_DEPLOYMENTS ) ) ; for ( DeploymentUnit unit : deploymentUnits ) { final ResourceRoot mainRoot = unit . getAttachment ( DEPLOYMENT_ROOT ) ; if ( mainRoot == null ) continue ; VirtualFile root = mainRoot . getRoot ( ) ; for ( String path : Seam2Processor . SEAM_FILES ) { if ( root . getChild ( path ) . exists ( ) ) { final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , Seam2Processor . VFS_MODULE , false , false , false ) ) ; <END_BUG> moduleSpecification . addResourceLoader ( getSeamIntResourceLoader ( ) ) ; return ; } } } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , Seam2Processor . VFS_MODULE , false , false , false , false ) ) ;
Buggy code:
public class BundleResource implements Resource , RepositoryContent { private static BundleManifest computeManifest ( IDirectory directory ) { } private final List < Capability > capabilities = new ArrayList < Capability > ( ) ; private final IFile content ; private final BundleManifest manifest ; private final List < Requirement > requirements = new ArrayList < Requirement > ( ) ; public BundleResource ( IFile content ) throws ModellerException { } public List < Capability > getCapabilities ( String namespace ) { } public String getLocation ( ) { } @ Override public InputStream getContent ( ) { } public List < Requirement > getRequirements ( String namespace ) { } @ Override public String toString ( ) { } private void computeCapabilities ( ModelledResource resource ) { } private void computeGenericCapabilities ( ) { } private void computeGenericRequirements ( ) { } private void computeOsgiIdentityCapability ( ) { } private void computeOsgiServiceCapabilities ( ModelledResource resource ) { } private void computeOsgiServiceRequirements ( ModelledResource resource ) { Collection < ? extends ImportedService > services = resource . getImportedServices ( ) ; for ( ImportedService service : services ) { StringBuilder builder = new StringBuilder ( "(&(" ) . append ( CAPABILITY_OBJECTCLASS_ATTRIBUTE ) . append ( '=' ) . append ( service . getInterface ( ) ) . append ( ')' ) ; String filter = service . getFilter ( ) ; if ( filter != null ) <START_BUG> builder . append ( '(' ) . append ( filter ) . append ( ')' ) ; <END_BUG> builder . append ( ')' ) ; requirements . add ( new BasicRequirement . Builder ( ) . namespace ( SERVICE_NAMESPACE ) . directive ( Namespace . REQUIREMENT_FILTER_DIRECTIVE , builder . toString ( ) ) . directive ( Namespace . REQUIREMENT_RESOLUTION_DIRECTIVE , ( service . isOptional ( ) ? Namespace . RESOLUTION_OPTIONAL : Namespace . RESOLUTION_MANDATORY ) ) . directive ( Namespace . REQUIREMENT_CARDINALITY_DIRECTIVE , ( service . isMultiple ( ) ? Namespace . CARDINALITY_MULTIPLE : Namespace . CARDINALITY_SINGLE ) ) . resource ( this ) . build ( ) ) ; } } private void computeOsgiWiringBundleCapability ( ) { } private void computeOsgiWiringBundleRequirements ( ) { } private void computeOsgiWiringPackageCapabilities ( ) { } private void computeOsgiWiringPackageRequirements ( ) { } private void computeRequirements ( ModelledResource resource ) { } private String getFileName ( IFile file ) { } private ModelledResourceManager getModelledResourceManager ( ) { } private void jar ( JarOutputStream out , String prefix , IDirectory directory ) throws IOException { } }

Fix:
builder . append ( filter ) ;
Buggy code:
final class DeploymentUnitPhaseService < T > implements Service < T > { private final InjectedValue < DeployerChains > deployerChainsInjector = new InjectedValue < DeployerChains > ( ) ; private final InjectedValue < DeploymentUnit > deploymentUnitInjector = new InjectedValue < DeploymentUnit > ( ) ; private final Phase phase ; private final AttachmentKey < T > valueKey ; private Set < ServiceName > serviceNames ; private static final Logger log = Logger . getLogger ( "org.jboss.as.server.deployment" ) ; private DeploymentUnitPhaseService ( final Phase phase , final AttachmentKey < T > valueKey ) { } private static < T > DeploymentUnitPhaseService < T > create ( final Phase phase , AttachmentKey < T > valueKey ) { } static DeploymentUnitPhaseService < ? > create ( final Phase phase ) { } public synchronized void start ( final StartContext context ) throws StartException { } public synchronized void stop ( final StopContext context ) { context . asynchronous ( ) ; final DeploymentUnit deploymentUnitContext = deploymentUnitInjector . getValue ( ) ; final DeployerChains chains = deployerChainsInjector . getValue ( ) ; final List < DeploymentUnitProcessor > list = chains . getChain ( phase ) ; <START_BUG> final ListIterator < DeploymentUnitProcessor > iterator = list . listIterator ( ) ; <END_BUG> while ( iterator . hasPrevious ( ) ) { final DeploymentUnitProcessor prev = iterator . previous ( ) ; DeploymentUnitPhaseService . safeUndeploy ( deploymentUnitContext , phase , prev ) ; } final MultipleRemoveListener < LifecycleContext > listener = MultipleRemoveListener . create ( context ) ; final ServiceContainer container = context . getController ( ) . getServiceContainer ( ) ; for ( ServiceName serviceName : serviceNames ) { final ServiceController < ? > controller = container . getService ( serviceName ) ; if ( controller != null ) { controller . setMode ( REMOVE ) ; controller . addListener ( listener ) ; } } listener . done ( ) ; } private static void safeUndeploy ( final DeploymentUnit deploymentUnit , final Phase phase , final DeploymentUnitProcessor prev ) { } public synchronized T getValue ( ) throws IllegalArgumentException , IllegalStateException { } InjectedValue < DeployerChains > getDeployerChainsInjector ( ) { } Injector < DeploymentUnit > getDeploymentUnitInjector ( ) { } }

Fix:
final ListIterator < DeploymentUnitProcessor > iterator = list . listIterator ( list . size ( ) ) ;
Buggy code:
public class BSFSamplerGui extends AbstractSamplerGui { private static final long serialVersionUID = 240L ; private JTextArea scriptField ; private JComboBox langField ; private JTextField filename ; private JTextField parameters ; public BSFSamplerGui ( ) { } @ Override public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement te ) { } @ Override public void clearGui ( ) { } public String getLabelResource ( ) { } private void init ( ) { } private JPanel createParameterPanel ( ) { } private JPanel createFilenamePanel ( ) { } private JPanel createLanguagePanel ( ) { JLabel label = new JLabel ( JMeterUtils . getResString ( "bsf_script_language" ) ) ; Properties p = JMeterUtils . loadProperties ( "org//apache//bsf//Languages.properties" ) ; p . put ( "jexl" , "" ) ; Set < Object > keySet = p . keySet ( ) ; <START_BUG> String [ ] items = keySet . toArray ( new String [ ] { } ) ; <END_BUG> Arrays . sort ( items ) ; langField = new JComboBox ( items ) ; langField . setEditable ( true ) ; label . setLabelFor ( langField ) ; JPanel langPanel = new JPanel ( new BorderLayout ( 5 , 0 ) ) ; langPanel . add ( label , BorderLayout . WEST ) ; langPanel . add ( langField , BorderLayout . CENTER ) ; return langPanel ; } private JPanel createScriptPanel ( ) { } }

Fix:
String [ ] items = keySet . toArray ( new String [ keySet . size ( ) ] ) ;
Buggy code:
public class ThreadMXBeanDumpAllThreadsHandler implements OperationStepHandler , DescriptionProvider { public static final ThreadMXBeanDumpAllThreadsHandler INSTANCE = new ThreadMXBeanDumpAllThreadsHandler ( ) ; private final ParametersValidator lockedValidator = new ParametersValidator ( ) ; private ThreadMXBeanDumpAllThreadsHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { lockedValidator . validate ( operation ) ; ThreadMXBean mbean = ManagementFactory . getThreadMXBean ( ) ; try { ThreadInfo [ ] infos = mbean . dumpAllThreads ( operation . require ( LOCKED_MONITORS ) . asBoolean ( ) , operation . require ( LOCKED_SYNCHRONIZERS ) . asBoolean ( ) ) ; final ModelNode result = context . getResult ( ) ; if ( infos != null ) { result . setEmptyList ( ) ; for ( ThreadInfo info : infos ) { result . add ( PlatformMBeanUtil . getDetypedThreadInfo ( info , mbean . isThreadCpuTimeSupported ( ) ) ) ; } } } catch ( SecurityException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . toString ( ) ) ) ; } catch ( UnsupportedOperationException 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 JMSTopicAdd extends AbstractJMSSubsystemUpdate < Void > { private static final long serialVersionUID = 3528505591156292231L ; private final String name ; private Set < String > bindings ; static JMSTopicAdd create ( final JMSTopicElement topic ) { } public JMSTopicAdd ( final String name ) { } protected void applyUpdate ( JMSSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > handler , P param ) { final JMSTopicService service = new JMSTopicService ( name , jndiBindings ( ) ) ; final ServiceName serviceName = JMS_TOPIC_BASE . append ( name ) ; <START_BUG> context . getBatchBuilder ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ; <END_BUG> } public AbstractSubsystemUpdate < JMSSubsystemElement , ? > getCompensatingUpdate ( JMSSubsystemElement original ) { } public Set < String > getBindings ( ) { } public void setBindings ( Set < String > bindings ) { } public String getName ( ) { } private String [ ] jndiBindings ( ) { } }

Fix:
context . getServiceTarget ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ;
Buggy code:
public final class FeedbackPanel extends Panel implements IValidationFeedback { private static final long serialVersionUID = - 3385823935971399988L ; private final FeedbackPanel . MessageListView messageListView ; private static final class MessageListView extends ListView { public MessageListView ( final String name ) { } protected void populateItem ( final ListItem listItem ) { } } public FeedbackPanel ( final String componentName ) { } public void setMaxMessages ( int maxMessages ) { } public void updateValidationFeedback ( final Form form ) { <START_BUG> messageListView . setModel ( getPage ( ) . getFeedbackMessages ( ) . model ( form ) ) ; <END_BUG> messageListView . modelChangedStructure ( ) ; } }

Fix:
messageListView . setModelObject ( getPage ( ) . getFeedbackMessages ( ) . messages ( form ) ) ;
Buggy code:
@ Service public class EmailServiceImpl extends AbstractServiceImpl < EmailServiceImpl > implements EmailService { @ Inject private JavaMailSenderImpl javaMailSender ; @ Inject private GroupRepository groupRepository ; @ Inject private Properties properties ; public void sendErrorEmail ( String errorMessage , String nhsNo , String unitCode ) { String centralSupportEmail = properties . getProperty ( "central.support.contact.email" ) ; Group group = groupRepository . findByCode ( unitCode ) ; Email email = new Email ( ) ; email . setSenderEmail ( properties . getProperty ( "smtp.sender.email" ) ) ; email . setSenderName ( properties . getProperty ( "smtp.sender.name" ) ) ; email . setSubject ( "PatientView<seq2seq4repair_space>-<seq2seq4repair_space>Importer<seq2seq4repair_space>Error" ) ; String recipientNameText = "PatientView<seq2seq4repair_space>Support" ; List < String > recipientEmails = new ArrayList < > ( ) ; if ( group != null ) { for ( ContactPoint contactPoint : group . getContactPoints ( ) ) { if ( contactPoint . getContactPointType ( ) . getValue ( ) . equals ( PV_ADMIN_EMAIL ) ) { recipientEmails . add ( contactPoint . getContent ( ) ) ; recipientNameText = "PatientView<seq2seq4repair_space>Admin" ; } } } if ( recipientEmails . isEmpty ( ) ) { recipientEmails . add ( centralSupportEmail ) ; } <START_BUG> email . setRecipients ( new String [ ] { recipientEmails . toString ( ) } ) ; <END_BUG> StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Dear<seq2seq4repair_space>" ) ; sb . append ( recipientNameText ) ; sb . append ( ",<seq2seq4repair_space><br//><br//>There<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>importing<seq2seq4repair_space>patient<seq2seq4repair_space>data:<br//>" ) ; if ( ( group == null ) && ( nhsNo == null ) ) { recipientEmails . add ( centralSupportEmail ) ; sb . append ( "<br//>Could<seq2seq4repair_space>not<seq2seq4repair_space>convert<seq2seq4repair_space>incoming<seq2seq4repair_space>data." ) ; } if ( StringUtils . isNotEmpty ( nhsNo ) ) { sb . append ( "<br//>Identifier:<seq2seq4repair_space>" ) ; sb . append ( nhsNo ) ; } sb . append ( "<br//>Message:<seq2seq4repair_space>" ) ; sb . append ( errorMessage ) ; email . setBody ( sb . toString ( ) ) ; try { sendEmail ( email ) ; } catch ( MailException | MessagingException me ) { LOG . error ( "Cannot<seq2seq4repair_space>send<seq2seq4repair_space>email:<seq2seq4repair_space>{}" , me ) ; } } private boolean sendEmail ( Email email ) throws MessagingException , MailException { } }

Fix:
email . setRecipients ( recipientEmails . toArray ( new String [ recipientEmails . size ( ) ] ) ) ;
Buggy code:
public class signOn extends ActionBarActivity { Helper helper = new Helper ( ) ; public class AuthenticateTask extends AsyncTask < Void , String , Boolean > { @ Override protected Boolean doInBackground ( Void ... nullValue ) { RequestPackage requestPackage = new RequestPackage ( ) ; requestPackage . setMethod ( "POST" ) ; requestPackage . setUri ( "user//Authenticate" ) ; requestPackage . setParam ( "email" , ( ( android . widget . EditText ) ( findViewById ( R . id . email ) ) ) . getText ( ) . toString ( ) ) ; requestPackage . setParam ( "password" , ( ( android . widget . EditText ) ( findViewById ( R . id . password ) ) ) . getText ( ) . toString ( ) ) ; String jsonString = helper . getData ( requestPackage ) ; <START_BUG> if ( jsonString == null ) <END_BUG> return false ; else { User user = helper . parseUser ( jsonString ) ; helper . savePreferences ( "id" , Integer . toString ( user . id ) , signOn . this . getApplicationContext ( ) ) ; helper . savePreferences ( "name" , user . name , signOn . this . getApplicationContext ( ) ) ; helper . savePreferences ( "phone" , user . phone , signOn . this . getApplicationContext ( ) ) ; helper . savePreferences ( "email" , user . email , signOn . this . getApplicationContext ( ) ) ; helper . savePreferences ( "token" , user . token , signOn . this . getApplicationContext ( ) ) ; return true ; } } @ Override protected void onPostExecute ( Boolean response ) { } } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void signOn ( View view ) { } }

Fix:
if ( ( jsonString == null ) || ( jsonString . equals ( "null\n" ) ) )
Buggy code:
public class EqualExpression extends BinaryExpression { public EqualExpression ( Expression left , Expression right , int operator ) { } private void checkNullComparison ( BlockScope scope , FlowContext flowContext , FlowInfo flowInfo , FlowInfo initsWhenTrue , FlowInfo initsWhenFalse ) { } private void checkVariableComparison ( BlockScope scope , FlowContext flowContext , FlowInfo flowInfo , FlowInfo initsWhenTrue , FlowInfo initsWhenFalse , LocalVariableBinding local , int nullStatus , Expression reference ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public final void computeConstant ( TypeBinding leftType , TypeBinding rightType ) { if ( ( ( this . left . constant ) != ( Constant . NotAConstant ) ) && ( ( this . right . constant ) != ( Constant . NotAConstant ) ) ) { this . constant = Constant . computeConstantOperationEQUAL_EQUAL ( left . constant , leftType . id , right . constant , rightType . id ) ; if ( ( ( ( this . bits ) & ( ASTNode . OperatorMASK ) ) > > ( ASTNode . OperatorSHIFT ) ) == ( OperatorIds . NOT_EQUAL ) ) <START_BUG> constant = Constant . fromValue ( ( ! ( constant . booleanValue ( ) ) ) ) ; <END_BUG> } else { this . constant = Constant . NotAConstant ; } } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBoolean ( BlockScope currentScope , CodeStream codeStream , BranchLabel trueLabel , BranchLabel falseLabel , boolean valueRequired ) { } public void generateBooleanEqual ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBooleanEqual ( BlockScope currentScope , CodeStream codeStream , BranchLabel trueLabel , BranchLabel falseLabel , boolean valueRequired ) { } public void generateNonBooleanEqual ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedNonBooleanEqual ( BlockScope currentScope , CodeStream codeStream , BranchLabel trueLabel , BranchLabel falseLabel , boolean valueRequired ) { } public boolean isCompactableOperation ( ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
constant = BooleanConstant . fromValue ( ( ! ( constant . booleanValue ( ) ) ) ) ;
Buggy code:
public class MotorManager extends Manager { private DoubleProperty data ; public MotorManager ( EData2015 dataType ) { } public DoubleProperty getData ( ) { } public Node [ ] buildWidgets ( int width , int height ) { Node [ ] nodes = new Node [ 2 ] ; <START_BUG> Stop [ ] stops = new Stop [ ] { new Stop ( 0.7 , Color . RED ) , new Stop ( 1.0 , Color . BLUE ) } ; <END_BUG> nodes [ 0 ] = new Gauge ( data , height , 0.0 , 1.0 , stops ) ; nodes [ 1 ] = new ScrollingChart ( data , ( ( width - height ) - 10 ) , height , 0 , 1 ) ; ( ( ScrollingChart ) ( nodes [ 1 ] ) ) . addPoint ( 0 , 1.0 ) ; ( ( ScrollingChart ) ( nodes [ 1 ] ) ) . addPoint ( 0 , 0.0 ) ; setData ( 0.5 ) ; return nodes ; } public String getName ( ) { } public String getDesc ( ) { } @ Override public void setData ( Double newData ) { } }

Fix:
Stop [ ] stops = new Stop [ ] { new Stop ( 0.33 , Color . GREEN ) , new Stop ( 0.66 , Color . YELLOW ) , new Stop ( 1.0 , Color . RED ) } ;
Buggy code:
public final class NOPClosure < E > implements Serializable , Closure < E > { private static final long serialVersionUID = 3518477308466486130L ; public static final Closure < Object > INSTANCE = new NOPClosure < Object > ( ) ; @ SuppressWarnings ( "unchecked" ) public static < E > Closure < E > nopClosure ( ) { } private NOPClosure ( ) { } <START_BUG> public void execute ( E input ) { <END_BUG> } private Object readResolve ( ) { } }

Fix:
public void execute ( final E input ) {
Buggy code:
public class UploadPage extends WicketExamplePage { private static Log log = LogFactory . getLog ( UploadPage . class ) ; private List files = new ArrayList ( ) ; private UploadPage . FileListView fileListView ; private Folder uploadFolder ; public UploadPage ( final PageParameters parameters ) { } private void refreshFiles ( ) { files . clear ( ) ; files . addAll ( Arrays . asList ( uploadFolder . listFiles ( ) ) ) ; <START_BUG> fileListView . invalidateModel ( ) ; <END_BUG> } private class SimpleUploadForm extends FileUploadForm { public SimpleUploadForm ( String name ) { } protected void onSubmit ( ) { } } private class MultipleFilesUploadForm extends FileUploadForm { private UploadModel model1 ; private UploadModel model2 ; public MultipleFilesUploadForm ( String name , IValidationFeedback feedback ) { } protected void onSubmit ( ) { } } private class FileListView extends ListView { public FileListView ( String name , final List files ) { } protected void populateItem ( ListItem listItem ) { } } }

Fix:
fileListView . modelChangedStructure ( ) ;
Buggy code:
class BatchSubsystemDefinition extends SimpleResourceDefinition { public static final String NAME = "batch" ; static final PathElement SUBSYSTEM_PATH = PathElement . pathElement ( SUBSYSTEM , BatchSubsystemDefinition . NAME ) ; static final PathElement THREAD_POOL_PATH = PathElement . pathElement ( THREAD_POOL , THREAD_POOL_NAME ) ; private static final String RESOURCE_NAME = ( BatchSubsystemExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String ... prefixes ) { } static final SimpleAttributeDefinition JOB_REPOSITORY_TYPE = SimpleAttributeDefinitionBuilder . create ( "job-repository-type" , STRING , true ) . setAllowExpression ( false ) . setAttributeMarshaller ( new DefaultAttributeMarshaller ( ) { @ Override public void marshallAsElement ( final AttributeDefinition attribute , final ModelNode resourceModel , final XMLStreamWriter writer ) throws XMLStreamException { } @ Override public void marshallAsElement ( final AttributeDefinition attribute , final ModelNode resourceModel , final boolean marshallDefault , final XMLStreamWriter writer ) throws XMLStreamException { } } ) . setDefaultValue ( new ModelNode ( IN_MEMORY . toString ( ) ) ) . setValidator ( new org . jboss . as . controller . operations . validation . EnumValidator ( JobRepositoryType . class , true , true ) ) . setRestartJVM ( ) . build ( ) ; public static final BatchSubsystemDefinition INSTANCE = new BatchSubsystemDefinition ( ) ; private BatchSubsystemDefinition ( ) { } @ Override public void registerOperations ( final ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerChildren ( final ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } private static class BatchThreadFactoryResolver extends ThreadFactoryResolver . SimpleResolver { static final BatchSubsystemDefinition . BatchThreadFactoryResolver INSTANCE = new BatchSubsystemDefinition . BatchThreadFactoryResolver ( ) ; private BatchThreadFactoryResolver ( ) { } @ Override protected String getThreadGroupName ( String threadPoolName ) { <START_BUG> return "Batch<seq2seq4repair_space>Thread" ; <END_BUG> } } static class BatchSubsystemAdd extends AbstractAddStepHandler { static final BatchSubsystemDefinition . BatchSubsystemAdd INSTANCE = new BatchSubsystemDefinition . BatchSubsystemAdd ( ) ; private BatchSubsystemAdd ( ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { } } }

Fix:
return "batch-" + threadPoolName ;
Buggy code:
public class BooleanProperty extends AbstractProperty { private static final long serialVersionUID = 233L ; private boolean value ; private transient boolean savedValue ; public BooleanProperty ( String name , boolean v ) { } public BooleanProperty ( ) { } public void setObjectValue ( Object v ) { if ( v instanceof Boolean ) { value = ( ( Boolean ) ( v ) ) . booleanValue ( ) ; } else { <START_BUG> value = Boolean . valueOf ( v . toString ( ) ) . booleanValue ( ) ; <END_BUG> } } public String getStringValue ( ) { } public Object getObjectValue ( ) { } @ Override public BooleanProperty clone ( ) { } @ Override public boolean getBooleanValue ( ) { } @ Override public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } }

Fix:
value = Boolean . parseBoolean ( v . toString ( ) ) ;
Buggy code:
public class TrimContributionManager extends ContributionManager { private class ToolBarTrimProxy implements IWindowTrim { private String id ; private String uriSpec ; private WorkbenchMenuService menuService ; private WorkbenchWindow wbw ; private ToolBar tb = null ; private ToolBarManager tbm = null ; ToolBarTrimProxy ( String id , WorkbenchWindow wbw ) { } public void dock ( int dropSide ) { } public Control getControl ( ) { } public String getDisplayName ( ) { } public int getHeightHint ( ) { } public String getId ( ) { } public int getValidSides ( ) { } public int getWidthHint ( ) { } public void handleClose ( ) { } public boolean isCloseable ( ) { } public boolean isResizeable ( ) { } public void dispose ( ) { } } private String [ ] trimAreaURIs = new String [ ] { MenuUtil . TRIM_COMMAND1 , MenuUtil . TRIM_COMMAND2 , MenuUtil . TRIM_VERTICAL1 , MenuUtil . TRIM_VERTICAL2 , MenuUtil . TRIM_STATUS } ; private int [ ] swtSides = new int [ ] { SWT . TOP , SWT . TOP , SWT . LEFT , SWT . RIGHT , SWT . BOTTOM } ; private WorkbenchWindow wbWindow ; TrimLayout layout ; private InternalMenuService menuService ; List contributedTrim = new ArrayList ( ) ; List contributedLists = new ArrayList ( ) ; private Expression restrictionExpression ; public TrimContributionManager ( WorkbenchWindow window ) { } public void update ( boolean force ) { } public void update ( boolean force , boolean hideTopTrim ) { teardown ( ) ; for ( int i = 0 ; i < ( trimAreaURIs . length ) ; i ++ ) { if ( hideTopTrim && ( ( swtSides [ i ] ) == ( SWT . TOP ) ) ) continue ; List contribs = menuService . getAdditionsForURI ( new MenuLocationURI ( trimAreaURIs [ i ] ) ) ; for ( Iterator cacheIter = contribs . iterator ( ) ; cacheIter . hasNext ( ) ; ) { AbstractContributionFactory cache = ( ( AbstractContributionFactory ) ( cacheIter . next ( ) ) ) ; <START_BUG> ContributionRoot ciList = new ContributionRoot ( menuService , restrictionExpression , cache . getNamespace ( ) ) ; <END_BUG> cache . createContributionItems ( wbWindow , ciList ) ; contributedLists . add ( ciList ) ; for ( Iterator ciIter = ciList . getItems ( ) . iterator ( ) ; ciIter . hasNext ( ) ; ) { IContributionItem ci = ( ( IContributionItem ) ( ciIter . next ( ) ) ) ; if ( ci instanceof IToolBarContributionItem ) { TrimContributionManager . ToolBarTrimProxy tbProxy = new TrimContributionManager . ToolBarTrimProxy ( ci . getId ( ) , wbWindow ) ; tbProxy . dock ( swtSides [ i ] ) ; IWindowTrim insertBefore = null ; if ( i == 0 ) { insertBefore = layout . getTrim ( "org.eclipse.ui.internal.WorkbenchWindow.topBar" ) ; } layout . addTrim ( swtSides [ i ] , tbProxy , insertBefore ) ; contributedTrim . add ( tbProxy ) ; } } } } } private void teardown ( ) { } public void dispose ( ) { } public void updateLocations ( List knownIds ) { } }

Fix:
ContributionRoot ciList = new ContributionRoot ( menuService , restrictionExpression , this , cache ) ;
Buggy code:
@ Component public interface PointRepository extends GraphRepository < ServicePoint > { @ Query ( "start<seq2seq4repair_space>zone=node({0})<seq2seq4repair_space>match<seq2seq4repair_space>zone-[zp:ZONE_POINT]->(point:ServicePoint)<-[c:CATEGORY]<seq2seq4repair_space>-<seq2seq4repair_space>(cat:ServicePointCategory)<seq2seq4repair_space>" + "where<seq2seq4repair_space>cat.name<seq2seq4repair_space>in<seq2seq4repair_space>{1}<seq2seq4repair_space>return<seq2seq4repair_space>point" ) Iterable < ServicePoint > getAllZonesPoints ( Zone zone , String categoryName ) { } <START_BUG> @ Query ( "start<seq2seq4repair_space>zone=node({0})<seq2seq4repair_space>match<seq2seq4repair_space>zone-[zp:ZONE_POINT]->(point:ServicePoint)<-[c:CATEGORY]<seq2seq4repair_space>-<seq2seq4repair_space>(cat:ServicePointCategory)<seq2seq4repair_space>" + "<seq2seq4repair_space>where<seq2seq4repair_space>id(cat)={1}<seq2seq4repair_space>return<seq2seq4repair_space>point" ) <END_BUG> Iterable < ServicePoint > getAllZonesPoints ( Zone zone , ServicePointCategory category ) ; @ Query ( "match<seq2seq4repair_space>(cat:ServicePointCategory)<seq2seq4repair_space>-<seq2seq4repair_space>[sc:<seq2seq4repair_space>SUB_CATEGORY*0..]<seq2seq4repair_space>-><seq2seq4repair_space>(subcat:ServicePointCategory)<seq2seq4repair_space>-<seq2seq4repair_space>" + ( "<seq2seq4repair_space>[cp2:CATEGORY_POINTS]<seq2seq4repair_space>-<seq2seq4repair_space>(p2:Point)<seq2seq4repair_space>" + "<seq2seq4repair_space>where<seq2seq4repair_space>cat.name<seq2seq4repair_space>=<seq2seq4repair_space>{0}<seq2seq4repair_space>return<seq2seq4repair_space>p2" ) ) List < ServicePoint > findByCategoryName ( String categoryName , Pageable pageable ) { } }

Fix:
@ Query ( "start<seq2seq4repair_space>zone=node({0})<seq2seq4repair_space>match<seq2seq4repair_space>zone-[zp:ZONE_POINT]->(point:Point)<-[c:CATEGORY_POINTS]<seq2seq4repair_space>-<seq2seq4repair_space>(cat:ServicePointCategory)<seq2seq4repair_space>" + "<seq2seq4repair_space>where<seq2seq4repair_space>id(cat)={1}<seq2seq4repair_space>return<seq2seq4repair_space>point" )
Buggy code:
public class MangelDetailController implements Initializable { ClientWS client = null ; RootController rootController = null ; DateFormat formatDatum = null ; DateTimeFormatter dateFormatter = null ; public void setRootController ( RootController rootController ) { } Mangel mangel = null ; List < Mangelstatus > mangelstatusl = null ; Mangelstatus mangelstatus = null ; @ FXML public Label lblMangelId ; @ FXML public TextArea txtMangelBeschreibung ; @ FXML public TextField txtMangelDatumanfang ; @ FXML public Label lblMangelFaellig ; @ FXML public DatePicker dateMangelDatumende ; @ FXML public Label lblMangelStatus ; @ FXML public Label lblMangelBezeichung ; public void initialize ( URL location , ResourceBundle resources ) { } public void init ( Integer MangelId ) { } @ FXML private void mangelClose ( ) { mangel . setFkMangelstatus ( mangelstatus ) ; if ( ( dateMangelDatumende . getValue ( ) ) != null ) { <START_BUG> mangel . setAbschlussZeit ( new GregorianCalendar ( dateMangelDatumende . getValue ( ) . getDayOfMonth ( ) , dateMangelDatumende . getValue ( ) . getMonthValue ( ) , dateMangelDatumende . getValue ( ) . getYear ( ) ) ) ; <END_BUG> } lblMangelStatus . setText ( "Abgeschlossen" ) ; client . proxy . updateMangel ( mangel ) ; } @ FXML public void mangelCancel ( ) { } }

Fix:
mangel . setAbschlussZeit ( new GregorianCalendar ( dateMangelDatumende . getValue ( ) . getYear ( ) , ( ( dateMangelDatumende . getValue ( ) . getMonthValue ( ) ) - 1 ) , dateMangelDatumende . getValue ( ) . getDayOfMonth ( ) ) ) ;