nus-yam/ex-repair huggingface dataset:
Buggy code:
InterfaceHosts . logger . log ( Level . INFO , "is:<seq2seq4repair_space>{0}host:<seq2seq4repair_space>{1}-{2}" , new Object [ ] { is . getName ( ) , host . getName ( ) , newName } ) ; try { String oldName = InterfaceHosts . getRealNodeName ( host ) ; boolean rename = false ; if ( ( newName != null ) && ( ( oldName . equals ( newName ) ) == false ) ) { rename = true ; } if ( newName == null ) { newName = oldName ; } Properties hostConfig = new Properties ( ) ; if ( host . isSecure ( ) ) { hostConfig . setProperty ( "type" , "sslsocket" ) ; } else { hostConfig . setProperty ( "type" , "socket" ) ; } if ( ( host . getStatus ( ) ) == ( Host . MAINTENANCE ) ) { hostConfig . setProperty ( "maintenance" , "true" ) ; } else { hostConfig . setProperty ( "maintenance" , "false" ) ; } <START_BUG> hostConfig . setProperty ( "host" , host . getInetSocketAddress ( ) . getAddress ( ) . getHostAddress ( ) ) ; <END_BUG>

Fix:
hostConfig . setProperty ( "host" , host . getInetAddress ( ) . getHostAddress ( ) ) ;
Buggy code:
public class Gold extends TextureObject implements Collideable { public static TextureRegion texture = null ; private boolean collected = false ; private static int amountOfGold = 0 ; public Gold ( int x , int y ) { } @ Override public TextureRegion getTexture ( ) { if ( ( Gold . texture ) == null ) <START_BUG> Gold . texture = new TextureRegion ( new com . badlogic . gdx . graphics . Texture ( files . internal ( "data//gold.png" ) ) , 0 , 0 , 20 , 20 ) ; <END_BUG> return Gold . texture ; } @ Override public boolean hasTexture ( ) { } public boolean isCollected ( ) { } @ Override public boolean canCache ( ) { } public void setCollected ( boolean collected ) { } public static int getAmountOfGold ( ) { } public static void addGold ( ) { } public static void clearAmountOfGold ( ) { } @ Override public void onCollideX ( SimpleMovingObject mto ) { } @ Override public void onCollideY ( SimpleMovingObject mto ) { } }

Fix:
Gold . texture = new TextureRegion ( new com . badlogic . gdx . graphics . Texture ( files . internal ( "data//gold.png" ) ) , 0 , 0 , 225 , 224 ) ;
Buggy code:
public class TestDirectoryReader extends LuceneTestCase { protected Directory dir ; private Document doc1 ; private Document doc2 ; protected SegmentReader [ ] readers = new SegmentReader [ 2 ] ; protected SegmentInfos sis ; public TestDirectoryReader ( String s ) { } @ Override protected void setUp ( ) throws Exception { } protected IndexReader openReader ( ) throws IOException { } public void test ( ) throws Exception { } public void doTestDocument ( ) throws IOException { } public void doTestUndeleteAll ( ) throws IOException { } public void _testTermVectors ( ) { } public void testIsCurrent ( ) throws IOException { } public void testMultiTermDocs ( ) throws IOException { } public void testAllTermDocs ( ) throws IOException { } private void addDoc ( RAMDirectory ramDir1 , String s , boolean create ) throws IOException { <START_BUG> IndexWriter iw = new IndexWriter ( ramDir1 , new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) , create , MaxFieldLength . LIMITED ) ; <END_BUG> Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "body" , s , Store . YES , Index . ANALYZED ) ) ; iw . addDocument ( doc ) ; iw . close ( ) ; } }

Fix:
IndexWriter iw = new IndexWriter ( ramDir1 , new org . apache . lucene . analysis . standard . StandardAnalyzer ( TEST_VERSION_CURRENT ) , create , MaxFieldLength . LIMITED ) ;
Buggy code:
public class URLRetrieveTest extends AbstractRetrieveTestCase { private static final String HTTP_RETRIEVE = "http:////www.eclipse.org//ecf//ip_log.html" ; protected static final String HTTPS_RETRIEVE = "https:////www.verisign.com" ; private static final String HTTP_404_FAIL_RETRIEVE = "http:////www.google.com//googleliciousafdasdfasdfasdf" ; private static final String FTP_RETRIEVE = "ftp:////ftp.osuosl.org//pub//eclipse//rt//ecf//org.eclipse.ecf.examples-1.0.3.v20070927-1821.zip" ; private static final String BUG_237936_URL = "http:////www.eclipse.org//downloads//download.php?file=//webtools//updates//site.xml&format=xml&countryCode=us&timeZone=-5&responseType=xml" ; File tmpFile = null ; protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } protected void handleStartEvent ( IIncomingFileTransferReceiveStartEvent event ) { } protected void testReceive ( String url ) throws Exception { } public void testReceiveFile ( ) throws Exception { } public void testFTPReceiveFile ( ) throws Exception { } public void testHttpsReceiveFile ( ) throws Exception { } public void testFailedReceive ( ) throws Exception { } public void testReceiveGzip ( ) throws Exception { } public void testReceiveGzipWithGZFile ( ) throws Exception { File f = File . createTempFile ( "foo" , "pascal.pack.gz" ) ; FileOutputStream fos = new FileOutputStream ( f ) ; System . out . println ( f ) ; <START_BUG> IStatus s = ECFTransport . getInstance ( ) . download ( "http:////download.eclipse.org//eclipse//updates//3.5-I-builds//plugins//javax.servlet.jsp_2.0.0.v200806031607.jar.pack.gz" , fos , new NullProgressMonitor ( ) ) ; <END_BUG> fos . close ( ) ; if ( f != null ) { System . out . println ( f . length ( ) ) ; assertTrue ( "4.0" , ( ( f . length ( ) ) < 50000 ) ) ; } } }

Fix:
IStatus s = ECFTransport . getInstance ( ) . download ( "http:////download.eclipse.org//eclipse//updates//3.4//plugins//javax.servlet.jsp_2.0.0.v200806031607.jar.pack.gz" , fos , new NullProgressMonitor ( ) ) ;
Buggy code:
public class OperationRequestHandler implements CommandHandler , OperationCommand { @ Override public boolean isBatchMode ( ) { } @ Override public void handle ( CommandContext ctx ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override public CommandLineCompleter getArgumentCompleter ( ) { } @ Override public ModelNode buildRequest ( CommandContext ctx ) throws OperationFormatException { <START_BUG> return ( ( org . jboss . as . cli . operation . impl . DefaultOperationCallbackHandler ) ( ctx . getParsedArguments ( ) ) ) . toOperationRequest ( ) ; <END_BUG> } @ Override public boolean hasArgument ( String name ) { } @ Override public boolean hasArgument ( int index ) { } }

Fix:
return ( ( org . jboss . as . cli . operation . impl . DefaultOperationCallbackHandler ) ( ctx . getParsedCommandLine ( ) ) ) . toOperationRequest ( ) ;
Buggy code:
public class SecondLevelCacheSessionStore extends HttpSessionStore { private static final class SecondLevelCachePageMap extends PageMap { private static final long serialVersionUID = 1L ; Page lastPage = null ; private SecondLevelCachePageMap ( String name , Session session ) { } @ Override protected void removeEntry ( IPageMapEntry entry ) { } @ Override protected void put ( Page page ) { <START_BUG> if ( ! ( page . isStateless ( ) ) ) { <END_BUG> String sessionId = getSession ( ) . getId ( ) ; if ( sessionId != null ) { if ( ( lastPage ) != page ) { lastPage = page ; dirty ( ) ; } getStore ( ) . storePage ( sessionId , page ) ; } } } @ Override protected Page get ( int id , int versionNumber ) { } private SecondLevelCacheSessionStore . IStore getStore ( ) { } } public interface IStore { void storePage ( String sessionId , Page page ) { } Page getPage ( String sessionId , int id , int versionNumber ) { } void removePage ( String sessionId , Page page ) { } void unbind ( String sessionId ) { } } private final SecondLevelCacheSessionStore . IStore cachingStore ; public SecondLevelCacheSessionStore ( final SecondLevelCacheSessionStore . IStore store ) { } @ Override public final void setAttribute ( Request request , String name , Object value ) { } @ Override protected void onUnbind ( String sessionId ) { } public SecondLevelCacheSessionStore . IStore getStore ( ) { } @ Override public PageMap createPageMap ( String name , Session session ) { } }

Fix:
if ( ! ( page . isPageStateless ( ) ) ) {
Buggy code:
public class PageWithCustomLoading extends WicketExamplePage implements IMarkupResourceStreamProvider { public PageWithCustomLoading ( ) { } <START_BUG> public IResourceStream getMarkupResourceStream ( final MarkupContainer container , Class < ? extends MarkupContainer > containerClass ) { <END_BUG> final URL url = PageWithCustomLoading . class . getResource ( "CustomLoadedTemplate.html" ) ; if ( url != null ) { return new UrlResourceStream ( url ) ; } return null ; } }

Fix:
public IResourceStream getMarkupResourceStream ( final MarkupContainer container , final Class < ? extends MarkupContainer > containerClass ) {
Buggy code:
public class XsltTransformer implements ITransformer { private static final String extension = "xsl" ; private final String xslFile ; public XsltTransformer ( ) { } public XsltTransformer ( final String xslFile ) { } public CharSequence transform ( final Component component , final String output ) throws Exception { } private IResourceStream getResourceStream ( final Component component ) { final IResourceStream resourceStream ; String filePath = this . xslFile ; if ( filePath == null ) { filePath = ( ( component . findParentWithAssociatedMarkup ( ) . getClass ( ) . getPackage ( ) . getName ( ) . replace ( '.' , '//' ) ) + "//" ) + ( component . getId ( ) ) ; } <START_BUG> resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamFactory ( ) . locate ( getClass ( ) , filePath , component . getStyle ( ) , component . getLocale ( ) , XsltTransformer . extension ) ; <END_BUG> return resourceStream ; } }

Fix:
resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamFactory ( ) . newResourceStream ( getClass ( ) , filePath , component . getStyle ( ) , component . getLocale ( ) , XsltTransformer . extension ) ;
Buggy code:
public class Configuration { File file ; HashMap < String , ConfigurationEntry > entries = new HashMap < String , ConfigurationEntry > ( ) ; HashMap < Integer , String > comments = new HashMap < Integer , String > ( ) ; public Configuration ( String file ) { } public void reloadConfig ( ) throws ConfigurationLoadException , ConfigurationParsingException { } private boolean isConfigEndTag ( String headerText , String input ) { } public void saveConfig ( ) { } public void addDefault ( String header , String key , Object value ) { } public List < String > getHeaders ( ) { } public List < String > getKeys ( String header ) { } public boolean existEntry ( String header , String key ) { } public boolean existHeader ( String header ) { } public void set ( String header , String key , Object value ) { } public Object get ( String header , String key ) { } public List < Object > getList ( String header , String key ) { List < Object > list = new ArrayList < Object > ( ) ; Object obj = get ( header , key ) ; String listString = ( ( String ) ( obj ) ) ; <START_BUG> if ( ( ( listString . startsWith ( "{\"" ) ) & ( listString . endsWith ( "\"}" ) ) ) & ( listString . contains ( "," ) ) ) { <END_BUG> listString = listString . substring ( 1 , ( ( listString . length ( ) ) - 1 ) ) ; for ( String value : listString . split ( ",(?=([^\"]*\"[^\"]*\")*[^\"]*$)" ) ) list . add ( ( ( Object ) ( value . substring ( 1 , ( ( value . length ( ) ) - 1 ) ) ) ) ) ; } else { new ConfigurationException ( ( ( "String<seq2seq4repair_space>\"" + listString ) + "\"<seq2seq4repair_space>is<seq2seq4repair_space>malformed!" ) ) . printStackTrace ( ) ; return null ; } return list ; } public List < String > getStringList ( String header , String key ) { } public List < Integer > getIntegerList ( String header , String key ) { } public boolean getBoolean ( String header , String key ) { } public String getString ( String header , String key ) { } public int getInt ( String header , String key ) { } public long getLong ( String header , String key ) { } public float getFloat ( String header , String key ) { } public double getDouble ( String header , String key ) { } public File getFile ( ) { } public void setFile ( File file ) { } public HashMap < String , ConfigurationEntry > getEntries ( ) { } public void setEntries ( HashMap < String , ConfigurationEntry > entries ) { } }

Fix:
if ( ( listString . startsWith ( "{\"" ) ) & ( listString . endsWith ( "\"}" ) ) ) {
Buggy code:
public class XSElementDecl implements XSElementDeclaration { public static final short SCOPE_ABSENT = 0 ; public static final short SCOPE_GLOBAL = 1 ; public static final short SCOPE_LOCAL = 2 ; public String fName = null ; public String fTargetNamespace = null ; public XSTypeDecl fType = null ; short fMiscFlags = 0 ; public short fScope = XSConstants . SCOPE_ABSENT ; XSComplexTypeDecl fEnclosingCT = null ; public short fBlock = XSConstants . DERIVATION_NONE ; public short fFinal = XSConstants . DERIVATION_NONE ; public ValidatedInfo fDefault = null ; public XSElementDecl fSubGroup = null ; static final int INITIAL_SIZE = 2 ; int fIDCPos = 0 ; IdentityConstraint [ ] fIDConstraints = new IdentityConstraint [ XSElementDecl . INITIAL_SIZE ] ; private static final short CONSTRAINT_MASK = 3 ; private static final short NILLABLE = 4 ; private static final short ABSTRACT = 8 ; public void setConstraintType ( short constraintType ) { } public void setIsNillable ( ) { } public void setIsAbstract ( ) { } public void setIsGlobal ( ) { } public void setIsLocal ( XSComplexTypeDecl enclosingCT ) { } public void addIDConstaint ( IdentityConstraint idc ) { } public IdentityConstraint [ ] getIDConstraints ( ) { } static final IdentityConstraint [ ] resize ( IdentityConstraint [ ] oldArray , int newSize ) { } private String fDescription = null ; public String toString ( ) { } public int hashCode ( ) { } public boolean equals ( Object o ) { } public void reset ( ) { } public short getType ( ) { } public String getName ( ) { } public String getNamespace ( ) { } public XSTypeDefinition getTypeDefinition ( ) { } public short getScope ( ) { } public XSComplexTypeDefinition getEnclosingCTDefinition ( ) { } public short getConstraintType ( ) { } public String getConstraintValue ( ) { <START_BUG> return ( getConstraintType ( ) ) == ( XSConstants . VC_NONE ) ? null : fDefault . normalizedValue ; <END_BUG> } public boolean getIsNillable ( ) { } public XSNamedMap getIdentityConstraints ( ) { } public XSElementDeclaration getSubstitutionGroupAffiliation ( ) { } public boolean getIsSubstitutionGroupExclusion ( short exclusion ) { } public short getSubstitutionGroupExclusions ( ) { } public boolean getIsDisallowedSubstition ( short disallowed ) { } public short getDisallowedSubstitutions ( ) { } public boolean getIsAbstract ( ) { } public XSAnnotation getAnnotation ( ) { } }

Fix:
return ( getConstraintType ( ) ) == ( XSConstants . VC_NONE ) ? null : fDefault . stringValue ( ) ;
Buggy code:
public class OptMap < E extends Enum < E > > implements Cloneable { private final Map < Arg < E , ? > , ArgList < E , ? > > opts = new LinkedHashMap < Arg < E , ? > , ArgList < E , ? > > ( ) ; public OptMap ( ) { } public < V > void setArgList ( ArgList < E , V > argList ) { } @ SuppressWarnings ( "unchecked" ) public < V > ArgList < E , V > getArgListOrNull ( Arg < E , V > arg ) { } public < V > ArgList < E , V > getArgList ( Arg < E , V > arg , boolean setIfEmpty ) { } public < V > void addArg ( Arg < E , V > arg , V value ) { } public < V > void addArgs ( Arg < E , V > arg , V ... values ) { } public < V > void addArgs ( Arg < E , V > arg , List < ? extends V > values ) { } public boolean isArgSet ( Arg < E , ? > arg ) { } public int getArgCount ( Arg < E , ? > arg ) { } public void setOpt ( Opt < E > opt ) { } public boolean isOptSet ( Opt < E > opt ) { } public OptMap < E > clone ( ) { final OptMap < E > clone = new OptMap < E > ( ) ; for ( final Map . Entry < Arg < E , ? > , ArgList < E , ? > > e : opts . entrySet ( ) ) { <START_BUG> clone . opts . put ( e . getKey ( ) , e . getValue ( ) . clone ( ) ) ; <END_BUG> } return clone ; } @ Override public String toString ( ) { } }

Fix:
clone . opts . put ( e . getKey ( ) , ( ( e . getValue ( ) ) == null ? null : e . getValue ( ) . clone ( ) ) ) ;
Buggy code:
public class MethodHolder { private Map < String , Object > instanceMap = new HashMap < String , Object > ( ) ; private Object instance ; private Method method ; public MethodHolder ( Method method ) { } public Method getMethod ( ) { } public void executeBefore ( Http http , DAO dao ) { } public void executeAfter ( Http http , DAO dao ) { } public void execute ( Http http , DAO dao ) { } public boolean needDAO ( ) { Class < ? > [ ] paramtypes = method . getParameterTypes ( ) ; for ( int i = 0 ; i < ( paramtypes . length ) ; i ++ ) { <START_BUG> if ( paramtypes . equals ( DAO . class ) ) <END_BUG> return true ; } if ( ! ( method . isAnnotationPresent ( Mapping . class ) ) ) return false ; String [ ] before = method . getAnnotation ( Mapping . class ) . before ( ) ; for ( int i = 0 ; i < ( before . length ) ; i ++ ) { if ( before [ i ] . equals ( "" ) ) continue ; if ( Mapper . getMethod ( before [ i ] , null ) . needDAO ( ) ) return true ; } String [ ] after = method . getAnnotation ( Mapping . class ) . after ( ) ; for ( int i = 0 ; i < ( after . length ) ; i ++ ) { if ( after [ i ] . equals ( "" ) ) continue ; if ( Mapper . getMethod ( after [ i ] , null ) . needDAO ( ) ) return true ; } return false ; } }

Fix:
if ( paramtypes [ i ] . equals ( DAO . class ) )
Buggy code:
public class ServiceDeploymentParsingProcessor implements DeploymentUnitProcessor { static final String SERVICE_DESCRIPTOR_PATH = "META-INF//jboss-service.xml" ; static final String SERVICE_DESCRIPTOR_SUFFIX = "-service.xml" ; private final XMLMapper xmlMapper = Factory . create ( ) ; private final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; public ServiceDeploymentParsingProcessor ( ) { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) return ; VirtualFile serviceXmlFile = null ; if ( deploymentRoot . isDirectory ( ) ) { serviceXmlFile = deploymentRoot . getChild ( ServiceDeploymentParsingProcessor . SERVICE_DESCRIPTOR_PATH ) ; } else <START_BUG> if ( deploymentRoot . getLowerCaseName ( ) . endsWith ( ServiceDeploymentParsingProcessor . SERVICE_DESCRIPTOR_SUFFIX ) ) { <END_BUG> serviceXmlFile = deploymentRoot ; } if ( ( serviceXmlFile == null ) || ( ! ( serviceXmlFile . exists ( ) ) ) ) return ; InputStream xmlStream = null ; try { xmlStream = serviceXmlFile . openStream ( ) ; final XMLStreamReader reader = inputFactory . createXMLStreamReader ( xmlStream ) ; final ParseResult < JBossServiceXmlDescriptor > result = new ParseResult < JBossServiceXmlDescriptor > ( ) ; xmlMapper . parseDocument ( result , reader ) ; final JBossServiceXmlDescriptor xmlDescriptor = result . getResult ( ) ; if ( xmlDescriptor != null ) phaseContext . getDeploymentUnit ( ) . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ; else throw MESSAGES . failedXmlParsing ( serviceXmlFile ) ; } catch ( Exception e ) { throw MESSAGES . failedXmlParsing ( e , serviceXmlFile ) ; } finally { VFSUtils . safeClose ( xmlStream ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
if ( deploymentRoot . getName ( ) . toLowerCase ( ) . endsWith ( ServiceDeploymentParsingProcessor . SERVICE_DESCRIPTOR_SUFFIX ) ) {
Buggy code:
@ SuppressWarnings ( "rawtypes" ) public class MetadataBuilder { private SessionFactory _sessionFactory ; private Configuration _configuration ; private RawMetadata _rawMetadata ; private List < HashMap < String , Object > > _typeList ; private HashMap < String , Object > _resourceMap ; private HashSet < String > _typeNames ; private HashMap < String , String > _fkMap ; public MetadataBuilder ( SessionFactory sessionFactory , Configuration configuration ) { } public MetadataBuilder ( SessionFactory sessionFactory ) { } Configuration getConfigurationFromRegistry ( SessionFactory sessionFactory ) { } public Metadata buildMetadata ( ) { } void initMap ( ) { } void addClass ( ClassMetadata meta ) { } void addClassProperties ( ClassMetadata meta , ArrayList < HashMap < String , Object > > dataArrayList , ArrayList < HashMap < String , Object > > navArrayList ) { } HashSet < String > getSuperProperties ( AbstractEntityPersister persister ) { } ArrayList < Selectable > getColumns ( Property pClassProp ) { } Column getColumn ( PersistentClass persistentClass , String propName ) { } boolean contains ( int [ ] array , int x ) { } boolean contains ( String [ ] array , String x ) { } String addComponent ( ComponentType compType , List < Selectable > propColumns ) { } private HashMap < String , Object > makeDataProperty ( String propName , Type type , Column col , boolean isNullable , boolean isKey , boolean isVersion ) { } static HashMap < String , String > newMap ( String key , String value ) { } static HashMap < String , String > newMap ( String key , String value , String key2 , String value2 ) { } private HashMap < String , Object > makeAssociationProperty ( AbstractEntityPersister containingPersister , AssociationType propType , String propName , ArrayList < HashMap < String , Object > > dataProperties , boolean isKey ) { } String getEntityTypeName ( Class clazz ) { } String [ ] getPropertyColumnNames ( AbstractEntityPersister persister , String propertyName , Type propType ) { } static String [ ] getPropertyNamesForColumns ( AbstractEntityPersister persister , String [ ] columnNames ) { } static String catColumnNames ( String [ ] columnNames , char delim ) { StringBuilder sb = new StringBuilder ( ) ; for ( String s : columnNames ) { if ( ( sb . length ( ) ) > 0 ) sb . append ( delim ) ; sb . append ( MetadataBuilder . unBracket ( s ) ) ; } <START_BUG> return sb . toString ( ) . toLowerCase ( ) ; <END_BUG> } static boolean namesEqual ( String [ ] a , String [ ] b ) { } static String unBracket ( String name ) { } static String [ ] unBracket ( String [ ] names ) { } static HashMap < String , Object > findPropertyByName ( ArrayList < HashMap < String , Object > > properties , String name ) { } Class getEntityType ( AssociationType propType ) { } static String pluralize ( String s ) { } static String getAssociationName ( String name1 , String name2 , String [ ] columnNames ) { } static final String ASSN = "AN_" ; static HashMap < String , String > BreezeTypeMap ; static HashMap < String , String > ValidationTypeMap ; static HashSet < String > NoLength ; }

Fix:
return sb . toString ( ) ;
Buggy code:
public class ContributorPagerAdapter extends PagerAdapter { private Activity mActivity ; private Contributor mContributor ; private int mMinSessionNumber ; private int mParentPosition ; public ContributorPagerAdapter ( Activity activity , Contributor contributor , int minSessionNumber , int parentPosition ) { } @ Override public int getCount ( ) { } @ Override public boolean isViewFromObject ( View view , Object object ) { } @ Override public Object instantiateItem ( ViewGroup container , int position ) { final View view = mActivity . getLayoutInflater ( ) . inflate ( item_contributor_slide , null ) ; TextView textView = ( ( TextView ) ( view . findViewById ( contributor_name ) ) ) ; textView . setGravity ( CENTER_VERTICAL ) ; int additionalPadding = 0 ; if ( position == 0 ) { textView . setText ( mContributor . getName ( ) ) ; textView . setBackgroundColor ( ContextCompat . getColor ( mActivity , transparent ) ) ; textView . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> ( ( com . morgane . painauchocolat . activities . MainActivity ) ( mActivity ) ) . editContributor ( mParentPosition ) ; <END_BUG> } } ) ; if ( ( mContributor . getSessionNumber ( ) ) <= ( mMinSessionNumber ) ) { textView . setCompoundDrawablesWithIntrinsicBounds ( ic_launcher , 0 , 0 , 0 ) ; } else { textView . setCompoundDrawablesWithIntrinsicBounds ( ic_check_mark , 0 , 0 , 0 ) ; } } else { textView . setText ( contributor_delete ) ; textView . setTextColor ( ContextCompat . getColor ( mActivity , white ) ) ; textView . setBackgroundColor ( ContextCompat . getColor ( mActivity , holo_red_light ) ) ; additionalPadding = textView . getPaddingRight ( ) ; } textView . setPadding ( ( ( textView . getPaddingLeft ( ) ) + additionalPadding ) , textView . getPaddingTop ( ) , textView . getPaddingRight ( ) , textView . getPaddingBottom ( ) ) ; container . addView ( textView ) ; return textView ; } @ Override public void destroyItem ( ViewGroup container , int position , Object object ) { } }

Fix:
( ( MainActivity ) ( mActivity ) ) . editContributor ( mParentPosition , ( ( ViewGroup ) ( v . getParent ( ) . getParent ( ) ) ) . getTop ( ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { <START_BUG> boolean gooey = false ; <END_BUG> GameEngine gE = new GameEngine ( ) ; if ( gooey ) { GraphicalUI gUI = new GraphicalUI ( gE ) ; gUI . start ( gE ) ; } else { TextUI tUI = new TextUI ( ) ; tUI . init ( ) ; } } }

Fix:
boolean gooey = true ;
Buggy code:
public abstract class AbstractComponentInstance implements ComponentInstance { private static final long serialVersionUID = - 8099216228976950066L ; private final AbstractComponent component ; private final Object instance ; private final List < Interceptor > preDestroyInterceptors ; private final InterceptorFactoryContext factoryContext ; private Map < Method , Interceptor > methodMap ; protected AbstractComponentInstance ( final AbstractComponent component , final Object instance , final List < Interceptor > preDestroyInterceptors , final InterceptorFactoryContext factoryContext ) { } public Component getComponent ( ) { } public Object getInstance ( ) { } @ Override public Iterable < Interceptor > getPreDestroyInterceptors ( ) { } public Interceptor getInterceptor ( final Method method ) throws IllegalStateException { Interceptor interceptor = methodMap . get ( method ) ; if ( interceptor == null ) { <START_BUG> throw new IllegalStateException ( "Method<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; <END_BUG> } return interceptor ; } public InterceptorFactoryContext getInterceptorFactoryContext ( ) { } void setMethodMap ( Map < Method , Interceptor > methodMap ) { } }

Fix:
throw new IllegalStateException ( ( "Method<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist<seq2seq4repair_space>" + method ) ) ;
Buggy code:
public class HudsonWalker { public static void traverse ( HudsonVisitor visitor ) { } public static void traverseProjectsAndBuilds ( HudsonVisitor visitor ) { } public static void traverseChain ( HudsonVisitor visitor , Run run ) { if ( run == null ) return ; HudsonWalker . traverse ( visitor , run ) ; Cause . UpstreamCause upstream = ( ( Cause . UpstreamCause ) ( run . getCause ( UpstreamCause . class ) ) ) ; if ( upstream != null ) { String project = upstream . getUpstreamProject ( ) ; int build = upstream . getUpstreamBuild ( ) ; AbstractProject item = ( ( AbstractProject ) ( Hudson . getInstance ( ) . getItem ( project ) ) ) ; Run r = ( ( Run ) ( item . getBuilds ( ) . get ( build ) ) ) ; <START_BUG> HudsonWalker . traverseChain ( visitor , run ) ; <END_BUG> } } public static void traverse ( HudsonVisitor visitor , Run run ) { } }

Fix:
HudsonWalker . traverseChain ( visitor , r ) ;
Buggy code:
public class Reflection { public static final Class [ ] MAIN_PARM_TYPES = new Class [ ] { String [ ] . class } ; private Reflection ( ) { } public static Object invokestatic ( Class class_ , String name ) { } public static Object invokestatic ( Class class_ , String name , Object arg1 ) { } public static Object invokestatic ( Class class_ , String name , Object arg1 , Object arg2 ) { } public static Object invokestatic ( Class class_ , String name , Object arg1 , Object arg2 , Object arg3 ) { } public static Object invokestaticN ( Class class_ , String name , Object [ ] args ) { } public static Object invoke ( Class class_ , Object target , String name , Object arg1 ) { } public static Object invoke ( Class class_ , Object target , String name , Object arg1 , Object arg2 ) { } public static Object invoke ( Class class_ , Object target , String name , Object arg1 , Object arg2 , Object arg3 ) { } public static Object invokeN ( Class class_ , String name , Object target , Object [ ] args ) { } public static Method getMatchingMethod ( Class class_ , String name , Object [ ] args ) { } private static boolean isCompatible ( Method meth , Object [ ] args ) { } public static Object getStaticField ( Class class_ , String name ) { } public static void runMainInSameVM ( String classpath , String className , String [ ] args ) throws ClassNotFoundException , IllegalAccessException , IllegalArgumentException , NoSuchMethodException , SecurityException , InvocationTargetException { LangUtil . throwIaxIfNull ( className , "class<seq2seq4repair_space>name" ) ; if ( LangUtil . isEmpty ( classpath ) ) { Class mainClass = Class . forName ( className ) ; Reflection . runMainInSameVM ( mainClass , args ) ; return ; } ArrayList dirs = new ArrayList ( ) ; ArrayList libs = new ArrayList ( ) ; ArrayList urls = new ArrayList ( ) ; String [ ] entries = LangUtil . splitClasspath ( classpath ) ; for ( int i = 0 ; i < ( entries . length ) ; i ++ ) { String entry = entries [ i ] ; URL url = Reflection . makeURL ( entry ) ; if ( null != url ) { urls . add ( url ) ; } File file = new File ( entries [ i ] ) ; <START_BUG> if ( FileUtil . hasZipSuffix ( file ) ) { <END_BUG> libs . add ( file ) ; } else if ( file . isDirectory ( ) ) { dirs . add ( file ) ; } else { } } File [ ] dirRa = ( ( File [ ] ) ( dirs . toArray ( new File [ 0 ] ) ) ) ; File [ ] libRa = ( ( File [ ] ) ( libs . toArray ( new File [ 0 ] ) ) ) ; URL [ ] urlRa = ( ( URL [ ] ) ( urls . toArray ( new URL [ 0 ] ) ) ) ; Reflection . runMainInSameVM ( urlRa , libRa , dirRa , className , args ) ; } public static void runMainInSameVM ( URL [ ] urls , File [ ] libs , File [ ] dirs , String className , String [ ] args ) throws ClassNotFoundException , IllegalAccessException , IllegalArgumentException , NoSuchMethodException , SecurityException , InvocationTargetException { } public static void runMainInSameVM ( Class mainClass , String [ ] args ) throws IllegalAccessException , IllegalArgumentException , NoSuchMethodException , SecurityException , InvocationTargetException { } private static URL makeURL ( String s ) { } }

Fix:
if ( FileUtil . isZipFile ( file ) ) {
Buggy code:
public class AggregateSummaryStatistics implements Serializable , StatisticalSummary { private static final long serialVersionUID = - 8207112444016386906L ; private final SummaryStatistics statisticsPrototype ; private final SummaryStatistics statistics ; public AggregateSummaryStatistics ( ) { } public AggregateSummaryStatistics ( SummaryStatistics prototypeStatistics ) { } public AggregateSummaryStatistics ( SummaryStatistics prototypeStatistics , SummaryStatistics initialStatistics ) { } public double getMax ( ) { } public double getMean ( ) { } public double getMin ( ) { } public long getN ( ) { } public double getStandardDeviation ( ) { } public double getSum ( ) { } public double getVariance ( ) { } public SummaryStatistics createContributingStatistics ( ) { } public static StatisticalSummaryValues aggregate ( Collection < SummaryStatistics > statistics ) { if ( statistics == null ) { return null ; } Iterator < SummaryStatistics > iterator = statistics . iterator ( ) ; if ( ! ( iterator . hasNext ( ) ) ) { return null ; } SummaryStatistics current = iterator . next ( ) ; long n = current . getN ( ) ; double min = current . getMin ( ) ; double sum = current . getSum ( ) ; double max = current . getMax ( ) ; double m2 = current . getSecondMoment ( ) ; double mean = current . getMean ( ) ; while ( iterator . hasNext ( ) ) { current = iterator . next ( ) ; if ( ( ( current . getMin ( ) ) < min ) || ( Double . isNaN ( min ) ) ) { min = current . getMin ( ) ; } if ( ( ( current . getMax ( ) ) > max ) || ( Double . isNaN ( max ) ) ) { max = current . getMax ( ) ; } sum += current . getSum ( ) ; final double oldN = n ; <START_BUG> final long curN = current . getN ( ) ; <END_BUG> n += curN ; final double meanDiff = ( current . getMean ( ) ) - mean ; mean = sum // n ; m2 = ( m2 + ( current . getSecondMoment ( ) ) ) + ( ( ( ( meanDiff * meanDiff ) * oldN ) * curN ) // n ) ; } final double variance ; if ( n == 0 ) { variance = Double . NaN ; } else if ( n == 1 ) { variance = 0.0 ; } else { variance = m2 // ( n - 1 ) ; } return new StatisticalSummaryValues ( mean , variance , n , max , min , sum ) ; } private static class AggregatingSummaryStatistics extends SummaryStatistics { private static final long serialVersionUID = 1L ; private final SummaryStatistics aggregateStatistics ; public AggregatingSummaryStatistics ( SummaryStatistics aggregateStatistics ) { } @ Override public void addValue ( double value ) { } @ Override public boolean equals ( Object object ) { } @ Override public int hashCode ( ) { } } }

Fix:
final double curN = current . getN ( ) ;
Buggy code:
@ DeclareRoles ( { PropagateIdentityServlet . ALLOWED_ROLE } ) @ ServletSecurity ( @ HttpConstraint ( rolesAllowed = { PropagateIdentityServlet . ALLOWED_ROLE } ) ) @ WebServlet ( PropagateIdentityServlet . SERVLET_PATH ) public class PropagateIdentityServlet extends HttpServlet { private static final long serialVersionUID = 1L ; private static Logger LOGGER = Logger . getLogger ( PropagateIdentityServlet . class ) ; public static final String SERVLET_PATH = "//PropagateIdentityServlet" ; public static final String ALLOWED_ROLE = "JBossAdmin" ; @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { <START_BUG> PropagateIdentityServlet . LOGGER . debug ( "New<seq2seq4repair_space>request<seq2seq4repair_space>comming." ) ; <END_BUG> final GSSCredential credential = DelegationCredentialContext . getDelegCredential ( ) ; if ( credential == null ) { resp . sendError ( SC_UNAUTHORIZED , "GSSCredential<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ; } else { resp . setContentType ( "text//plain" ) ; final PrintWriter writer = resp . getWriter ( ) ; final GSSTestClient client = new GSSTestClient ( StringUtils . strip ( req . getServerName ( ) , "[]" ) , GSSTestConstants . PORT , GSSTestConstants . PRINCIPAL ) ; PropagateIdentityServlet . LOGGER . info ( ( "Client<seq2seq4repair_space>for<seq2seq4repair_space>identity<seq2seq4repair_space>propagation<seq2seq4repair_space>created:<seq2seq4repair_space>" + client ) ) ; try { writer . print ( client . getName ( credential ) ) ; } catch ( GSSException e ) { throw new ServletException ( "Propagation<seq2seq4repair_space>failed." , e ) ; } } } }

Fix:
PropagateIdentityServlet . LOGGER . debug ( "New<seq2seq4repair_space>request<seq2seq4repair_space>coming." ) ;
Buggy code:
public class AuthServiceImpl implements AuthService { private static final Logger LOG = Logger . getLogger ( AuthServiceImpl . class ) ; private final KeyStoneAdminClient keyStoneAdminAuthClient ; private Configuration configuration ; public AuthServiceImpl ( Configuration cfg ) throws MalformedURLException , URISyntaxException , AuthException , KeyStoneException { } public AuthUser getUser ( String accountId ) throws URISyntaxException , AuthException , KeyStoneException { } public String getCloudFilesAuthUrl ( ) { <START_BUG> return configuration . getString ( cloud_files_auth_url ) ; <END_BUG> } }

Fix:
return configuration . getString ( auth_management_uri ) ;
Buggy code:
public class FolderComposite extends AbstractFileComponent { private static final Logger logger = LoggerFactory . getLogger ( FolderComposite . class ) ; private final SortedMap < Path , FileComponent > children ; private String structureHash ; private boolean isRoot = false ; public FolderComposite ( final Path path , boolean updateContentHash , boolean isRoot ) { } public FolderComposite ( final Path path , boolean updateContentHash ) { } @ Override public synchronized FileComponent getComponent ( Path remainingPath ) { } private Path stripOffPrefix ( Path path , final Path prefix ) { if ( path . startsWith ( prefix ) ) { <START_BUG> path = path . relativize ( prefix ) ; <END_BUG> } return path ; } @ Override public synchronized void putComponent ( Path remainingPath , FileComponent component ) { } private void addComponentToChildren ( final Path nextLevelPath , final FileComponent component ) { } private Path updateParentPathInChild ( final FileComponent child ) { } @ Override public FileComponent deleteComponent ( Path remainingPath ) { } private Path constructFullPath ( final Path name ) { } private boolean computeContentNamesHash ( ) { } private void bubbleContentNamesHashUpdate ( ) { } @ Override protected boolean updateContentHash ( ) { } private void propagatePathChangeToChildren ( ) { } @ Override public void getSynchronizedChildrenPaths ( Set < Path > synchronizedPaths ) { } @ Override public String getStructureHash ( ) { } @ Override public void setStructureHash ( String structureHash ) { } @ Override public void setIsSynchronized ( boolean isSynchronized ) { } @ Override public boolean isFile ( ) { } @ Override public boolean isReady ( ) { } public SortedMap < Path , FileComponent > getChildren ( ) { } }

Fix:
path = prefix . relativize ( path ) ;
Buggy code:
public class DialogUtil { private DialogUtil ( ) { } public static void openError ( Shell parent , String title , String message , PartInitException exception ) { CoreException nestedException = null ; IStatus status = exception . getStatus ( ) ; if ( ( status != null ) && ( ( status . getException ( ) ) instanceof CoreException ) ) { nestedException = ( ( CoreException ) ( status . getException ( ) ) ) ; } IStatus errorStatus = null ; if ( nestedException != null ) { errorStatus = StatusUtil . newStatus ( nestedException . getStatus ( ) , message ) ; } else { errorStatus = new Status ( IStatus . ERROR , WorkbenchPlugin . PI_WORKBENCH , message ) ; } <START_BUG> StatusManager . getManager ( ) . handle ( errorStatus , SHOW ) ; <END_BUG> } public static String removeAccel ( String label ) { } public static int availableRows ( Composite parent ) { } public static boolean inRegularFontMode ( Composite parent ) { } }

Fix:
StatusUtil . handleStatus ( errorStatus , SHOW , parent ) ;
Buggy code:
public class AlarmReceiver extends WakefulBroadcastReceiver { Context myContext ; Context onReceiveContext ; public AlarmReceiver ( Context context ) { } public AlarmReceiver ( ) { } private boolean workHoursOnly = false ; private boolean noWeekends = false ; @ Override public void onReceive ( final Context context , Intent intent ) { onReceiveContext = context ; Calendar calendar = Calendar . getInstance ( ) ; int currentHour = calendar . get ( Calendar . HOUR_OF_DAY ) ; int today = calendar . get ( Calendar . DAY_OF_WEEK ) ; boolean isWeekend = ( today == ( Calendar . SUNDAY ) ) || ( today == ( Calendar . SATURDAY ) ) ; boolean isOutsideWorkHours = ( currentHour < 9 ) || ( currentHour > 16 ) ; workHoursOnly = loadPrefs ( "workHoursOnlyKey" , workHoursOnly ) ; noWeekends = loadPrefs ( "noWeekendsKey" , noWeekends ) ; if ( isWeekend && ( noWeekends ) ) { try { Thread . sleep ( 1 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } else if ( isOutsideWorkHours && ( workHoursOnly ) ) { try { Thread . sleep ( 1 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } else { Intent myIntent = new Intent ( ) ; <START_BUG> myIntent . setClassName ( "com.joshbgold.movePT" , "com.joshbgold.moveRehab.main.ReminderActivity" ) ; <END_BUG> myIntent . setFlags ( FLAG_ACTIVITY_NEW_TASK ) ; context . startActivity ( myIntent ) ; } } private boolean loadPrefs ( String key , boolean value ) { } No newline ; at end ; of file ; }

Fix:
myIntent . setClassName ( "com.joshbgold.moveRehab" , "com.joshbgold.moveRehab.main.ReminderActivity" ) ;
Buggy code:
public class EditClaim extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ SuppressLint ( "SimpleDateFormat" ) public void editClaimAction ( View v ) { Toast . makeText ( this , "Editing<seq2seq4repair_space>Claim" , LENGTH_SHORT ) . show ( ) ; EditText claimCat = ( ( EditText ) ( findViewById ( editClaimCategoryEditText ) ) ) ; EditText claimTo = ( ( EditText ) ( findViewById ( editClaimToEditText ) ) ) ; EditText claimFrom = ( ( EditText ) ( findViewById ( editClaimFromEditText ) ) ) ; EditText claimStat = ( ( EditText ) ( findViewById ( editClaimStatEditText ) ) ) ; String cat = claimCat . getText ( ) . toString ( ) ; String to = claimTo . getText ( ) . toString ( ) ; String from = claimFrom . getText ( ) . toString ( ) ; String stat = claimStat . getText ( ) . toString ( ) ; Date toD = null ; Date fromD = null ; if ( ( ( to . length ( ) ) != 0 ) || ( ( from . length ( ) ) != 0 ) ) { String dateFormat = "DD//MM//yyyy" ; SimpleDateFormat format = new SimpleDateFormat ( dateFormat ) ; try { toD = format . parse ( to ) ; fromD = format . parse ( from ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; Toast . makeText ( this , "Ensure<seq2seq4repair_space>dates<seq2seq4repair_space>are<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>dd//mm//yyyy" , LENGTH_SHORT ) . show ( ) ; return ; } } Claim claim = GlobalClaim . claim ; if ( ( cat . length ( ) ) != 0 ) { claim . setCategory ( cat ) ; } if ( ( to . length ( ) ) != 0 ) { claim . setToDate ( toD ) ; } if ( ( from . length ( ) ) != 0 ) { claim . setToDate ( fromD ) ; } if ( ( stat . length ( ) ) != 0 ) { if ( ( ( stat . equals ( "Submitted" ) ) || ( stat . equals ( "Returned" ) ) ) || ( stat . equals ( "Approved" ) ) ) { <START_BUG> claim . setCategory ( stat ) ; <END_BUG> } else { Toast . makeText ( this , "Ensure<seq2seq4repair_space>status<seq2seq4repair_space>is<seq2seq4repair_space>Submitted<seq2seq4repair_space>or<seq2seq4repair_space>Returned<seq2seq4repair_space>or<seq2seq4repair_space>Approved" , LENGTH_SHORT ) . show ( ) ; } } ClaimController . saveClaimList ( ) ; GlobalClaim . claim = null ; } }

Fix:
claim . setStatus ( stat ) ;
Buggy code:
public class SleepTask extends AbstractTask { private static final Resources REZ = ResourceManager . getPackageResources ( SleepTask . class ) ; private int m_seconds ; private int m_hours ; private int m_minutes ; private int m_milliseconds ; public void setHours ( final int hours ) { } public void setMilliseconds ( final int milliseconds ) { } public void setMinutes ( final int minutes ) { } public void setSeconds ( final int seconds ) { } private void doSleep ( final long millis ) { try { <START_BUG> Thread . currentThread ( ) . sleep ( millis ) ; <END_BUG> } catch ( InterruptedException ie ) { } } public void execute ( ) throws TaskException { } private void validate ( ) throws TaskException { } private long getSleepTime ( ) { } }

Fix:
Thread . sleep ( millis ) ;
Buggy code:
public class CreateAliasNode extends DDLStatementNode { private String javaClassName ; private String methodName ; private char aliasType ; private boolean delimitedIdentifier ; private AliasInfo aliasInfo ; public void init ( Object aliasName , Object targetObject , Object methodName , Object aliasSpecificInfo , Object aliasType , Object delimitedIdentifier ) throws StandardException { } public String statementToString ( ) { } private boolean anyStringTypeDescriptor ( ) { } private TypeDescriptor typeDescriptorWithCorrectCollation ( TypeDescriptor changeTD ) throws StandardException { TypeId compTypeId = TypeId . getBuiltInTypeId ( changeTD . getTypeName ( ) ) ; if ( ( compTypeId != null ) && ( compTypeId . isStringTypeId ( ) ) ) { DataTypeDescriptor newTDWithCorrectCollation = new DataTypeDescriptor ( compTypeId , changeTD . isNullable ( ) , changeTD . getMaximumWidth ( ) ) ; <START_BUG> newTDWithCorrectCollation . setCollationType ( getSchemaDescriptor ( getObjectName ( ) . getSchemaName ( ) , false ) . getCollationType ( ) ) ; <END_BUG> newTDWithCorrectCollation . setCollationDerivation ( COLLATION_DERIVATION_IMPLICIT ) ; return newTDWithCorrectCollation ; } return changeTD ; } public void bindStatement ( ) throws StandardException { } public ConstantAction makeConstantAction ( ) throws StandardException { } }

Fix:
newTDWithCorrectCollation . setCollationType ( getSchemaDescriptor ( ) . getCollationType ( ) ) ;
Buggy code:
public class ClaimType { Database db = OpenTenureApplication . getInstance ( ) . getDatabase ( ) ; String type ; String description ; String displayValue ; @ Override public String toString ( ) { } public String getDescription ( ) { } public void setDescription ( String description ) { } public String getDisplayValue ( ) { } public void setDisplayValue ( String displayValue ) { } public String getType ( ) { } public void setType ( String type ) { } public int add ( ) { } public int addType ( ClaimType claimType ) { } public List < ClaimType > getClaimTypes ( ) { } public List < String > getClaimsTypesDisplayValues ( String localization ) { } public int getIndexByCodeType ( String code ) { } public String getTypebyDisplayValue ( String value ) { ResultSet rs = null ; Connection localConnection = null ; PreparedStatement statement = null ; try { localConnection = db . getConnection ( ) ; <START_BUG> statement = localConnection . prepareStatement ( "SELECT<seq2seq4repair_space>TYPE<seq2seq4repair_space>FROM<seq2seq4repair_space>CLAIM_TYPE<seq2seq4repair_space>CT<seq2seq4repair_space>WHERE<seq2seq4repair_space>DISPLAY_VALUE<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ; <END_BUG> statement . setString ( 1 , value ) ; rs = statement . executeQuery ( ) ; while ( rs . next ( ) ) { return rs . getString ( 1 ) ; } return null ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } catch ( Exception exception ) { exception . printStackTrace ( ) ; } finally { if ( rs != null ) { try { rs . close ( ) ; } catch ( SQLException e ) { } } if ( statement != null ) { try { statement . close ( ) ; } catch ( SQLException e ) { } } if ( localConnection != null ) { try { localConnection . close ( ) ; } catch ( SQLException e ) { } } } return null ; } public String getDisplayValueByType ( String value ) { } public static ClaimType getClaimType ( String value ) { } public int updadateClaimType ( ) { } }

Fix:
statement = localConnection . prepareStatement ( "SELECT<seq2seq4repair_space>TYPE<seq2seq4repair_space>FROM<seq2seq4repair_space>CLAIM_TYPE<seq2seq4repair_space>CT<seq2seq4repair_space>WHERE<seq2seq4repair_space>DISPLAY_VALUE<seq2seq4repair_space>LIKE<seq2seq4repair_space>'%'<seq2seq4repair_space>||<seq2seq4repair_space>?<seq2seq4repair_space>||<seq2seq4repair_space>'%'<seq2seq4repair_space>" ) ;
Buggy code:
public class DoStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( DoStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( DoStatement . class , "body" , Statement . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; private Statement body = null ; DoStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { DoStatement result = new DoStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . setBody ( ( ( Statement ) ( getBody ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public Statement getBody ( ) { } public void setBody ( Statement statement ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;