nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ObjectValue extends Value { private static final Localizer _loc = Localizer . forPackage ( ObjectValue . class ) ; private Object _value = null ; public ObjectValue ( String prop ) { } public Object get ( ) { } public void set ( Object obj ) { } public void set ( Object obj , boolean derived ) { } public Object instantiate ( Class type , Configuration conf ) { } public Object instantiate ( Class type , Configuration conf , boolean fatal ) { } public Object newInstance ( String clsName , Class type , Configuration conf , boolean fatal ) { } public Class getValueType ( ) { } protected void objectChanged ( ) { } protected String getInternalString ( ) { } protected void setInternalString ( String str ) { if ( str == null ) set ( null ) ; else <START_BUG> throw new IllegalArgumentException ( ObjectValue . _loc . get ( "cant-set-string" , getProperty ( ) ) ) ; <END_BUG> } protected void setInternalObject ( Object obj ) { } }

Fix:
throw new IllegalArgumentException ( ObjectValue . _loc . get ( "cant-set-string" , getProperty ( ) ) . getMessage ( ) ) ;
Buggy code:
public class DirectionImage { public static void getDrawable ( final String geocode , final String code ) { if ( ( StringUtils . isBlank ( geocode ) ) || ( StringUtils . isBlank ( code ) ) ) { return ; } final HttpResponse httpResponse = cgBase . request ( "http:////www.geocaching.com//ImgGen//seek//CacheDir.ashx" , new Parameters ( "k" , code ) , false ) ; if ( httpResponse != null ) { <START_BUG> LocalStorage . saveEntityToFile ( httpResponse . getEntity ( ) , DirectionImage . getDirectionFile ( geocode , true ) ) ; <END_BUG> } } public static File getDirectionFile ( final String geocode , final boolean createDirs ) { } No newline ; at end ; of file ; }

Fix:
LocalStorage . saveEntityToFile ( httpResponse , DirectionImage . getDirectionFile ( geocode , true ) ) ;
Buggy code:
public class DefaultClassLoaderManager extends AbstractLogEnabled implements Initializable , Serviceable , ClassLoaderManager { private static final Resources REZ = ResourceManager . getPackageResources ( DefaultClassLoaderManager . class ) ; private final Map m_fileDeployers = new HashMap ( ) ; private PackageManager m_packageManager ; private ClassLoader m_commonClassLoader ; public void initialize ( ) throws Exception { } public void service ( final ServiceManager serviceManager ) throws ServiceException { } public void setCommonClassLoader ( final ClassLoader classLoader ) { } public ClassLoader getCommonClassLoader ( ) { } public ClassLoader createClassLoader ( final File file ) throws ClassLoaderException { } public ClassLoader createClassLoader ( final File [ ] files ) throws ClassLoaderException { } private ClassLoader buildClassLoader ( final ArrayList files ) throws Exception { } private URL [ ] buildClasspath ( final ArrayList files ) throws MalformedURLException { <START_BUG> final URL [ ] urls = new URL [ ( files . size ( ) ) + 1 ] ; <END_BUG> final int count = files . size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { final File file = ( ( File ) ( files . get ( i ) ) ) ; urls [ i ] = file . toURL ( ) ; } return urls ; } private void getOptionalPackagesFor ( final File jarFile , final List packages ) throws Exception { } private void checkFile ( final File file ) throws DeploymentException { } }

Fix:
final URL [ ] urls = new URL [ files . size ( ) ] ;
Buggy code:
public class DefaultHostContainerFinder extends AbstractContainerFinder implements IHostContainerFinder { public IRemoteServiceContainer [ ] findHostContainers ( ServiceReference serviceReference , String [ ] remoteInterfaces , String [ ] remoteConfigurationType , String [ ] remoteRequiresIntents ) { } protected Collection findRemoteContainersSatisfyingRequiredIntents ( String [ ] remoteRequiresIntents ) { List results = new ArrayList ( ) ; IContainer [ ] containers = Activator . getDefault ( ) . getContainerManager ( ) . getAllContainers ( ) ; if ( ( containers == null ) || ( ( containers . length ) == 0 ) ) <START_BUG> return null ; <END_BUG> for ( int i = 0 ; i < ( containers . length ) ; i ++ ) { IRemoteServiceContainerAdapter adapter = ( ( IRemoteServiceContainerAdapter ) ( containers [ i ] . getAdapter ( IRemoteServiceContainerAdapter . class ) ) ) ; if ( adapter == null ) continue ; ContainerTypeDescription description = Activator . getDefault ( ) . getContainerManager ( ) . getContainerTypeDescription ( containers [ i ] . getID ( ) ) ; if ( description == null ) continue ; List supportedIntents = Arrays . asList ( description . getSupportedIntents ( ) ) ; boolean hasIntents = true ; if ( remoteRequiresIntents != null ) { for ( int j = 0 ; j < ( remoteRequiresIntents . length ) ; j ++ ) { if ( ! ( supportedIntents . contains ( remoteRequiresIntents [ j ] ) ) ) hasIntents = false ; } } if ( hasIntents ) { trace ( "findRemoteContainersSatisfyingRequiredIntents" , ( "include<seq2seq4repair_space>containerID=" + ( containers [ i ] . getID ( ) ) ) ) ; results . add ( new org . eclipse . ecf . remoteservice . RemoteServiceContainer ( containers [ i ] , adapter ) ) ; } else { trace ( "findRemoteContainersSatisfyingRequiredIntents" , ( ( ( "exclude<seq2seq4repair_space>containerID=" + ( containers [ i ] . getID ( ) ) ) + "<seq2seq4repair_space>supported<seq2seq4repair_space>intents=" ) + supportedIntents ) ) ; } } return results ; } protected boolean includeContainer ( ServiceReference serviceReference , IRemoteServiceContainer rsContainer ) { } }

Fix:
return results ;
Buggy code:
final class JasperLiaison { Log log ; final int debug ; JasperLiaison ( Log log , int debug ) { } int processJspFile ( Request req , String jspFile , ServletHandler handler , Properties args ) { if ( ( debug ) > 10 ) log . log ( ( "Before<seq2seq4repair_space>compile<seq2seq4repair_space>sync<seq2seq4repair_space>" + jspFile ) ) ; synchronized ( handler ) { Dependency dep = handler . getServletInfo ( ) . getDependency ( ) ; if ( ( dep != null ) && ( ! ( dep . isExpired ( ) ) ) ) { return 0 ; } Context ctx = req . getContext ( ) ; JasperMangler mangler = new JasperMangler ( ctx . getWorkDir ( ) . getAbsolutePath ( ) , ctx . getAbsolutePath ( ) , jspFile ) ; if ( dep == null ) { dep = setDependency ( ctx , mangler , handler ) ; handler . setServletClassName ( mangler . getServletClassName ( ) ) ; if ( ! ( dep . isExpired ( ) ) ) return 0 ; } <START_BUG> log . log ( ( ( ( "Compiling:<seq2seq4repair_space>" + jspFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( mangler . getServletClassName ( ) ) ) ) ; <END_BUG> handler . setErrorException ( null ) ; handler . setState ( STATE_ADDED ) ; mangler . nextVersion ( ) ; dep . setLastModified ( System . currentTimeMillis ( ) ) ; if ( ( debug ) > 1 ) log . log ( ( "Update<seq2seq4repair_space>class<seq2seq4repair_space>Name<seq2seq4repair_space>" + ( mangler . getServletClassName ( ) ) ) ) ; handler . setServletClassName ( mangler . getServletClassName ( ) ) ; try { Options options = new JasperOptionsImpl ( args ) ; JspCompilationContext ctxt = createCompilationContext ( req , options , mangler ) ; JavaCompiler javaC = createJavaCompiler ( options ) ; jsp2java ( mangler , ctxt ) ; javac ( javaC , ctxt , mangler ) ; if ( ( debug ) > 0 ) log . log ( ( "Generated<seq2seq4repair_space>" + ( mangler . getClassFileName ( ) ) ) ) ; } catch ( Exception ex ) { if ( ctx != null ) ctx . log ( ( "compile<seq2seq4repair_space>error:<seq2seq4repair_space>req=" + req ) , ex ) ; else log . log ( ( "compile<seq2seq4repair_space>error:<seq2seq4repair_space>req=" + req ) , ex ) ; handler . setErrorException ( ex ) ; handler . setState ( STATE_DISABLED ) ; return 0 ; } dep . setExpired ( false ) ; } return 0 ; } void jsp2java ( JasperMangler mangler , JspCompilationContext ctxt ) throws Exception { } String javaEncoding = "UTF8" ; static String sep = System . getProperty ( "path.separator" ) ; void javac ( JavaCompiler javac , JspCompilationContext ctxt , Mangler mangler ) throws JasperException { } public JavaCompiler createJavaCompiler ( Options options ) throws JasperException { } private String computeClassPath ( Context ctx ) { } private JspCompilationContext createCompilationContext ( Request req , Options opt , Mangler mangler ) { } private Dependency setDependency ( Context ctx , JasperMangler mangler , ServletHandler handler ) { } }

Fix:
ctx . log ( ( ( ( "Compiling:<seq2seq4repair_space>" + jspFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( mangler . getServletClassName ( ) ) ) ) ;
Buggy code:
public class EpubActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; switch ( id ) { <START_BUG> case id . action_favorites : <END_BUG> new WidgetHelper ( this ) . showFavoriteDialog ( book ) ; break ; default : return super . onOptionsItemSelected ( item ) ; } return true ; } @ Override public void onBackPressed ( ) { } private Dzj book ; }

Fix:
case id . action_add_to_favorites :
Buggy code:
public class SelectFolderDialog implements ActionListener , TreeSelectionListener { private String name ; private boolean bool = false ; private JTree tree ; private JButton okButton ; private JButton newButton ; private FolderTreeNode selectedFolder ; protected JDialog dialog ; public SelectFolderDialog ( ) { } public void init ( ) { } public boolean success ( ) { } public Folder getSelectedFolder ( ) { } public void actionPerformed ( ActionEvent e ) { String action = e . getActionCommand ( ) ; if ( action . equals ( "OK" ) ) { bool = true ; dialog . dispose ( ) ; } else if ( action . equals ( "CANCEL" ) ) { bool = false ; dialog . dispose ( ) ; } else if ( action . equals ( "NEW" ) ) { CreateFolderDialog dialog = new CreateFolderDialog ( tree . getSelectionPath ( ) ) ; dialog . showDialog ( ) ; String name ; if ( dialog . success ( ) ) { name = dialog . getName ( ) ; } else { return ; } FolderCommandReference [ ] r = new FolderCommandReference [ 1 ] ; <START_BUG> r [ 0 ] = new FolderCommandReference ( getSelectedFolder ( ) ) ; <END_BUG> r [ 0 ] . setFolderName ( name ) ; processor . addOp ( new org . columba . mail . gui . tree . command . CreateSubFolderCommand ( r ) ) ; } } public void valueChanged ( TreeSelectionEvent e ) { } }

Fix:
r [ 0 ] = new FolderCommandReference ( dialog . getSelected ( ) ) ;
Buggy code:
public abstract class BaseTest extends SDFCompilerTest { private static final String COPYRIGHT_HEADER = "////<seq2seq4repair_space>Copyright<seq2seq4repair_space>(c)<seq2seq4repair_space>2014-2015<seq2seq4repair_space>K<seq2seq4repair_space>Team.<seq2seq4repair_space>All<seq2seq4repair_space>Rights<seq2seq4repair_space>Reserved." ; static final String ROOT = "src//test//resources//convertor-tests//" ; @ Rule public TestName name = new TestName ( ) ; public BaseTest ( ) { } protected void outerOnlyTest ( ) throws IOException { } protected void sdfTest ( ) throws IOException { } public static class DefintionWithContext { public final Definition definition ; public final Context context ; public DefintionWithContext ( Definition d , Context c ) { } } private static boolean forceFixAssertionFiles = false ; private void testConversion ( Function < File , BaseTest . DefintionWithContext > parse ) throws IOException { } protected abstract String convert ( BaseTest . DefintionWithContext defWithContext ) { } protected abstract String expectedFilePostfix ( ) { } private BaseTest . DefintionWithContext parseUsingSDF ( File definitionFile ) { } protected BaseTest . DefintionWithContext parseUsingOuter ( File definitionFile ) { } private String clean ( String definitionText ) { <START_BUG> return definitionText . replaceAll ( BaseTest . COPYRIGHT_HEADER , "" ) . replaceAll ( "<seq2seq4repair_space>*\n" , "\n" ) . trim ( ) ; <END_BUG> } }

Fix:
return definitionText . replace ( BaseTest . COPYRIGHT_HEADER , "" ) . replaceAll ( "<seq2seq4repair_space>*\n" , "\n" ) . trim ( ) ;
Buggy code:
public class AltasTest { Session session = new Session ( ) ; PlantaDao dao = new PlantaDao ( ) ; @ Test public void createPlanta ( ) throws Exception { String nombreComun = "Pehuen" ; String nombreCientifico = "Araucaria<seq2seq4repair_space>araucana" ; String familia = "Araucariaceae" ; String descripcion = "El<seq2seq4repair_space>nombre<seq2seq4repair_space>del<seq2seq4repair_space>género<seq2seq4repair_space>deriva<seq2seq4repair_space>de<seq2seq4repair_space>la<seq2seq4repair_space>región<seq2seq4repair_space>de<seq2seq4repair_space>Arauco." ; <START_BUG> PlantaDto planta = new PlantaDto ( nombreComun , nombreCientifico , descripcion , familia ) ; <END_BUG> dao . createPlanta ( planta ) ; } @ Test public void ListarPlantas ( ) { } @ Test public void getPlantaByCientificName ( ) { } @ Test public void getPlantaById ( ) { } @ Test public void deletePlanta ( ) throws Exception { } @ After public void exit ( ) { } }

Fix:
PlantaDto planta = new PlantaDto ( nombreComun , nombreCientifico , familia , descripcion ) ;
Buggy code:
final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes { private VisitorAttributes attributes ; WSVirtualFileFilter ( ) { } WSVirtualFileFilter ( final VisitorAttributes attributes ) { } public VisitorAttributes getAttributes ( ) { } public boolean accepts ( final VirtualFile file ) { if ( file == null ) { return false ; } <START_BUG> final String fileName = file . getLowerCaseName ( ) ; <END_BUG> final boolean hasWsdlSuffix = fileName . endsWith ( ".wsdl" ) ; final boolean hasXsdSuffix = fileName . endsWith ( ".xsd" ) ; final boolean hasXmlSuffix = fileName . endsWith ( ".xml" ) ; return ( hasWsdlSuffix || hasXsdSuffix ) || hasXmlSuffix ; } }

Fix:
final String fileName = file . getName ( ) . toLowerCase ( ) ;
Buggy code:
public final class PreferencesAdapter extends PropertyMapAdapter { private Preferences store ; private Preferences . IPropertyChangeListener listener = new Preferences . IPropertyChangeListener ( ) { public void propertyChange ( Preferences . PropertyChangeEvent event ) { } } ; public PreferencesAdapter ( Preferences toConvert ) { } protected void attachListener ( ) { } protected void detachListener ( ) { } public Set keySet ( ) { } public Object getValue ( String propertyId , Class propertyType ) { if ( propertyType . isAssignableFrom ( String . class ) ) { return store . getString ( propertyId ) ; } if ( propertyType == ( Boolean . class ) ) { <START_BUG> return new Boolean ( store . getBoolean ( propertyId ) ) ; <END_BUG> } if ( propertyType == ( Double . class ) ) { return new Double ( store . getDouble ( propertyId ) ) ; } if ( propertyType == ( Float . class ) ) { return new Float ( store . getFloat ( propertyId ) ) ; } if ( propertyType == ( Integer . class ) ) { return new Integer ( store . getInt ( propertyId ) ) ; } if ( propertyType == ( Long . class ) ) { return new Long ( store . getLong ( propertyId ) ) ; } return null ; } public boolean propertyExists ( String propertyId ) { } public void setValue ( String propertyId , Object newValue ) { } }

Fix:
return store . getBoolean ( propertyId ) ? Boolean . TRUE : Boolean . FALSE ;
Buggy code:
public class ECFCommandProvider implements CommandProvider { public static final String NEW_LINE = System . getProperty ( "line.separator" , "\n" ) ; private BundleContext context ; private ServiceTracker containerManagerTracker ; public ECFCommandProvider ( BundleContext context ) { } private IContainerManager getContainerManager ( ) { } private IContainerFactory getContainerFactory ( ) { } public void dispose ( ) { } private IContainer createContainer ( CommandInterpreter interpreter , String containerTypeDescriptionName , String [ ] args ) { } private void printException ( CommandInterpreter interpreter , String message , Throwable t ) { } private String [ ] getArgs ( CommandInterpreter interpreter ) { } private String [ ] getRemainingArgs ( String [ ] args , int startPosition ) { } public void _createcontainer ( CommandInterpreter interpreter ) { } private void printContainer ( CommandInterpreter interpreter , IContainer container , boolean verbose ) { } private void printDescription ( CommandInterpreter interpreter , ContainerTypeDescription desc ) { } public void _listcontainers ( CommandInterpreter interpreter ) { } public void _listfactories ( CommandInterpreter interpreter ) { } private void printID ( CommandInterpreter interpreter , ID id ) { } public void _destroycontainer ( CommandInterpreter interpreter ) { } private ID createID ( CommandInterpreter interpreter , String namespace , String val ) { } public String getHelp ( ) { StringBuffer help = new StringBuffer ( ) ; help . append ( ECFCommandProvider . NEW_LINE ) ; help . append ( "---" ) ; <START_BUG> help . append ( "ECF<seq2seq4repair_space>Commands" ) ; <END_BUG> help . append ( "---" ) ; help . append ( ECFCommandProvider . NEW_LINE ) ; help . append ( "\tlistfactories<seq2seq4repair_space>--<seq2seq4repair_space>List<seq2seq4repair_space>all<seq2seq4repair_space>container<seq2seq4repair_space>factories." ) ; help . append ( ECFCommandProvider . NEW_LINE ) ; help . append ( "\tlistcontainers<seq2seq4repair_space>[verbose]<seq2seq4repair_space>--<seq2seq4repair_space>List<seq2seq4repair_space>all<seq2seq4repair_space>existing<seq2seq4repair_space>containers." ) ; help . append ( ECFCommandProvider . NEW_LINE ) ; help . append ( "\tcreatecontainer<seq2seq4repair_space>[<containerFactoryName><seq2seq4repair_space>[<arg0><seq2seq4repair_space><arg1>...]]<seq2seq4repair_space>--<seq2seq4repair_space>Create<seq2seq4repair_space>new<seq2seq4repair_space>container." ) ; help . append ( ECFCommandProvider . NEW_LINE ) ; help . append ( "\tdestroycontainer<seq2seq4repair_space><namespace><seq2seq4repair_space><id><seq2seq4repair_space>--<seq2seq4repair_space>Remove<seq2seq4repair_space>and<seq2seq4repair_space>dispose<seq2seq4repair_space>container<seq2seq4repair_space>specified<seq2seq4repair_space>by<seq2seq4repair_space>namespace//id<seq2seq4repair_space>combination." ) ; help . append ( ECFCommandProvider . NEW_LINE ) ; return help . toString ( ) ; } }

Fix:
help . append ( "Eclipse<seq2seq4repair_space>Communication<seq2seq4repair_space>Framework<seq2seq4repair_space>(ECF)<seq2seq4repair_space>Commands" ) ;
Buggy code:
public class AuthentificationRequest { private String username ; private String password ; private String scope ; private String grant_type ; public AuthentificationRequest ( String username , String password , String scope , String grant_type ) { } @ Override public String toString ( ) { <START_BUG> return "password=Obama&username=Barack&scope=read%20write&grant_type=password" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( "username=" + ( this . username ) ) + "&password=" ) + ( this . password ) ) + "&scope=" ) + ( this . scope ) ) + "&grant_type=" ) + ( grant_type ) ;
Buggy code:
public class CompareScreenshot { final int threshold = 0 ; public int compare ( String file1 , String file2 ) { } private double compareImages ( Image imageA , Image imageB ) { } private double compareBufferedImagesNotSameScale ( BufferedImage img1 , BufferedImage img2 ) { if ( ( ( img1 . getWidth ( ) ) == ( img2 . getWidth ( ) ) ) & ( ( img1 . getHeight ( ) ) == ( img2 . getHeight ( ) ) ) ) { throw new IllegalArgumentException ( "Images<seq2seq4repair_space>have<seq2seq4repair_space>same<seq2seq4repair_space>Resolution!" ) ; } int area_img1 = ( img1 . getHeight ( ) ) * ( img1 . getWidth ( ) ) ; int area_img2 = ( img2 . getHeight ( ) ) * ( img2 . getWidth ( ) ) ; double area_diff = ( Math . min ( img1 . getHeight ( ) , img2 . getHeight ( ) ) ) * ( Math . min ( img1 . getWidth ( ) , img2 . getWidth ( ) ) ) ; double percentageAreaDiff = area_diff // ( Math . max ( area_img1 , area_img2 ) ) ; BufferedImage subimage ; double similarity ; <START_BUG> if ( area_img1 > area_img2 ) { <END_BUG> subimage = img1 . getSubimage ( img2 . getMinX ( ) , img2 . getMinY ( ) , img2 . getWidth ( ) , img2 . getHeight ( ) ) ; similarity = compareBufferedImages ( subimage , img2 ) ; } else { subimage = img2 . getSubimage ( img1 . getMinX ( ) , img1 . getMinY ( ) , img1 . getWidth ( ) , img1 . getHeight ( ) ) ; similarity = compareBufferedImages ( img1 , subimage ) ; } return percentageAreaDiff * similarity ; } private double compareBufferedImages ( BufferedImage img1 , BufferedImage img2 ) { } protected static BufferedImage imageToBufferedImage ( Image img ) { } protected static Image loadImage ( String filename ) { } private void checkPreconditions ( String fileA , String fileB ) { } }

Fix:
if ( ( ( img1 . getHeight ( ) ) > ( img2 . getHeight ( ) ) ) && ( ( img1 . getWidth ( ) ) > ( img2 . getWidth ( ) ) ) ) {
Buggy code:
public class AisMessage7 extends AisMessage { private int spare = 0 ; private long dest1 ; private int seq1 ; private long dest2 ; private int seq2 ; private long dest3 ; private int seq3 ; private long dest4 ; private int seq4 ; public AisMessage7 ( ) { } public AisMessage7 ( Vdm vdm ) throws SixbitException , AisMessageException { } public void parse ( ) throws SixbitException , AisMessageException { BinArray sixbit = vdm . getBinArray ( ) ; <START_BUG> if ( ( ( sixbit . getLength ( ) ) < 88 ) || ( ( sixbit . getLength ( ) ) > 1008 ) ) { <END_BUG> throw new AisMessageException ( ( ( ( "Message<seq2seq4repair_space>" + ( msgId ) ) + "<seq2seq4repair_space>wrong<seq2seq4repair_space>length:<seq2seq4repair_space>" ) + ( sixbit . getLength ( ) ) ) ) ; } super . parse ( sixbit ) ; this . spare = ( ( int ) ( sixbit . getVal ( 2 ) ) ) ; this . dest1 = sixbit . getVal ( 30 ) ; this . seq1 = ( ( int ) ( sixbit . getVal ( 2 ) ) ) ; this . dest2 = sixbit . getVal ( 30 ) ; this . seq2 = ( ( int ) ( sixbit . getVal ( 2 ) ) ) ; this . dest3 = sixbit . getVal ( 30 ) ; this . seq3 = ( ( int ) ( sixbit . getVal ( 2 ) ) ) ; this . dest4 = sixbit . getVal ( 30 ) ; this . seq4 = ( ( int ) ( sixbit . getVal ( 2 ) ) ) ; } @ Override public SixbitEncoder getEncoded ( ) { } public int getSpare ( ) { } public void setSpare ( int spare ) { } public long getDest1 ( ) { } public void setDest1 ( long dest1 ) { } public int getSeq1 ( ) { } public void setSeq1 ( int seq1 ) { } public long getDest2 ( ) { } public void setDest2 ( long dest2 ) { } public int getSeq2 ( ) { } public void setSeq2 ( int seq2 ) { } public long getDest3 ( ) { } public void setDest3 ( long dest3 ) { } public int getSeq3 ( ) { } public void setSeq3 ( int seq3 ) { } public long getDest4 ( ) { } public void setDest4 ( long dest4 ) { } public int getSeq4 ( ) { } public void setSeq4 ( int seq4 ) { } @ Override public String toString ( ) { } }

Fix:
if ( ( ( sixbit . getLength ( ) ) < 72 ) || ( ( sixbit . getLength ( ) ) > 168 ) ) {
Buggy code:
public class RotationLockToggler { private final Context context ; private final boolean showStatusToast ; private final RotationLockToggler . CompletionCallback callback ; public RotationLockToggler ( Context context , boolean showStatusToast , RotationLockToggler . CompletionCallback callback ) { } public void go ( ) { } private Boolean enabled ( ) { <START_BUG> return new ApplicationSettings ( context ) . enabled ( ) . getOr ( false ) ; <END_BUG> } private void toggle ( ) { } private void showNotEnabledMessage ( ) { } private final ServiceConnection connection = new ServiceConnection ( ) { @ Override public void onServiceConnected ( ComponentName name , IBinder service ) { } @ Override public void onServiceDisconnected ( ComponentName name ) { } } ; public interface CompletionCallback { void completed ( ) { } } }

Fix:
return new ApplicationSettings ( context ) . enabled ( ) . get ( ) ;
Buggy code:
public class AssetCategoriesAvailableTag < R > extends TagSupport { @ Override public int doStartTag ( ) throws JspException { try { _assetCategories = AssetCategoryServiceUtil . getCategories ( _className , _classPK ) ; <START_BUG> if ( _assetCategories . isEmpty ( ) ) { <END_BUG> return EVAL_BODY_INCLUDE ; } return SKIP_BODY ; } catch ( Exception e ) { throw new JspException ( e ) ; } finally { if ( ! ( ServerDetector . isResin ( ) ) ) { _className = null ; _classPK = 0 ; } } } public List < AssetCategory > getAssetCategories ( ) { } public void setClassName ( String className ) { } public void setClassPK ( long classPK ) { } private List < AssetCategory > _assetCategories = new ArrayList < > ( ) ; private String _className ; private long _classPK ; No newline ; at end ; of file ; }

Fix:
if ( ! ( _assetCategories . isEmpty ( ) ) ) {
Buggy code:
public class UIMAUpdateRequestProcessorFactory extends UpdateRequestProcessorFactory { private NamedList < Object > args ; @ SuppressWarnings ( "unchecked" ) @ Override public void init ( @ SuppressWarnings ( "rawtypes" ) NamedList args ) { } @ Override public UpdateRequestProcessor getInstance ( SolrQueryRequest req , SolrQueryResponse rsp , UpdateRequestProcessor next ) { <START_BUG> return new UIMAUpdateRequestProcessor ( next , req . getCore ( ) , new SolrUIMAConfigurationReader ( args ) . readSolrUIMAConfiguration ( ) ) ; <END_BUG> } }

Fix:
return new UIMAUpdateRequestProcessor ( next , req . getCore ( ) . getName ( ) , new SolrUIMAConfigurationReader ( args ) . readSolrUIMAConfiguration ( ) ) ;
Buggy code:
public abstract class Statement extends ASTNode { public abstract FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void branchChainTo ( Label label ) { } public boolean complainIfUnreachable ( FlowInfo flowInfo , BlockScope scope , boolean didAlreadyComplain ) { } public void generateArguments ( MethodBinding binding , Expression [ ] arguments , BlockScope currentScope , CodeStream codeStream ) { } public abstract void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public boolean isEmptyBlock ( ) { } public boolean isValidJavaStatement ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public abstract StringBuffer printStatement ( int indent , StringBuffer output ) { } public abstract void resolve ( BlockScope scope ) { } public Constant resolveCase ( BlockScope scope , TypeBinding testType , SwitchStatement switchStatement ) { resolve ( scope ) ; <START_BUG> return NotAConstant ; <END_BUG> } }

Fix:
return Constant . NotAConstant ;
Buggy code:
public class Main { StartMenu startMenu ; BattleField battleField ; PlayerController playerController ; public static void main ( String [ ] args ) { } private void start ( ) { } private void setPlayerName ( String name ) { <START_BUG> playerController . setPlayerName ( name ) ; <END_BUG> } }

Fix:
playerController . setName ( name ) ;
Buggy code:
public abstract class RestCallback < T > implements Callback < T > { public abstract void failure ( RestError error ) { } public abstract void success ( T response ) { } @ Override public void failure ( RetrofitError retrofitError ) { } @ Override public void success ( T type , Response response ) { try { JSONArray jsonArray = new JSONArray ( new Gson ( ) . toJson ( type ) ) ; Timber . d ( ( "Response:<seq2seq4repair_space>" + ( jsonArray . toString ( ) ) ) ) ; success ( ( ( T ) ( jsonArray ) ) ) ; } catch ( JSONException ignored ) { } try { JSONObject jsonResponse = new JSONObject ( new Gson ( ) . toJson ( type ) ) ; Timber . d ( ( "Response:<seq2seq4repair_space>" + ( jsonResponse . toString ( ) ) ) ) ; success ( ( ( T ) ( jsonResponse ) ) ) ; } catch ( JSONException ignored ) { } try { <START_BUG> success ( ( ( T ) ( new JSONObject ( "" ) ) ) ) ; <END_BUG> } catch ( JSONException ignored ) { } } }

Fix:
success ( ( ( T ) ( new JSONObject ( "{}" ) ) ) ) ;
Buggy code:
@ Deprecated public abstract class AbstractCachingLabeledEnumResolver implements LabeledEnumResolver { protected transient final Log logger = LogFactory . getLog ( getClass ( ) ) ; private final AbstractCachingLabeledEnumResolver . LabeledEnumCache labeledEnumCache = new AbstractCachingLabeledEnumResolver . LabeledEnumCache ( ) ; public Set < LabeledEnum > getLabeledEnumSet ( Class type ) throws IllegalArgumentException { } public Map < Comparable , LabeledEnum > getLabeledEnumMap ( Class type ) throws IllegalArgumentException { } public LabeledEnum getLabeledEnumByCode ( Class type , Comparable code ) throws IllegalArgumentException { } public LabeledEnum getLabeledEnumByLabel ( Class type , String label ) throws IllegalArgumentException { } protected abstract Set < LabeledEnum > findLabeledEnums ( Class type ) { } private class LabeledEnumCache extends CachingMapDecorator < Class , Map < Comparable , LabeledEnum > > { public LabeledEnumCache ( ) { } @ Override protected Map < Comparable , LabeledEnum > create ( Class key ) { } @ Override protected boolean useWeakValue ( Class key , Map < Comparable , LabeledEnum > value ) { if ( ! ( ClassUtils . isCacheSafe ( key , AbstractCachingLabeledEnumResolver . this . getClass ( ) . getClassLoader ( ) ) ) ) { <START_BUG> if ( logger . isDebugEnabled ( ) ) { <END_BUG> logger . debug ( ( ( "Not<seq2seq4repair_space>strongly<seq2seq4repair_space>caching<seq2seq4repair_space>class<seq2seq4repair_space>[" + ( key . getName ( ) ) ) + "]<seq2seq4repair_space>because<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>cache-safe" ) ) ; } return true ; } else { return false ; } } } }

Fix:
if ( ( ( logger ) != null ) && ( logger . isDebugEnabled ( ) ) ) {
Buggy code:
@ Stateless public class StampBean implements IStamp { @ EJB private IStampDAO stampDAO ; @ EJB private IUserDAO userDAO ; @ EJB private IRatingDAO ratingDAO ; @ Override public void saveStamp ( StampJson stampJson ) { } @ Override public void updateStamp ( StampJson stampJson ) { } @ Override public StampJson getStamp ( Long id ) { } @ Override public AvailableStampsJson getAvailableStamps ( ) { } @ Override public void setStampNotAvailable ( Long id ) { } @ Override public void setRating ( RatingJson ratingJson ) { Rating rating = ratingDAO . getRatingByStamp ( ratingJson . getStampId ( ) ) ; if ( rating != null ) { rating . setRatings ( ( ( rating . getRatings ( ) ) + 1 ) ) ; <START_BUG> rating . setAverageRating ( ( ( ( ( ( rating . getAverageRating ( ) ) * ( rating . getRatings ( ) ) ) - 1 ) + ( ratingJson . getCalification ( ) ) ) // ( rating . getRatings ( ) ) ) ) ; <END_BUG> ratingDAO . updateRating ( rating ) ; } else { rating = new Rating ( ) ; rating . setAverageRating ( ratingJson . getCalification ( ) ) ; rating . setRatings ( 1 ) ; rating . setStamp ( stampDAO . getStamp ( ratingJson . getStampId ( ) ) ) ; rating . getStamp ( ) . setRating ( rating ) ; ratingDAO . saveRating ( rating ) ; stampDAO . updateStamp ( rating . getStamp ( ) ) ; } } @ Override public AvailableStampsJson getByRatings ( Double lowerBound , Double upperBound ) { } @ Override public AvailableStampsJson getStampsByArtist ( Long id ) { } @ SuppressWarnings ( "unchecked" ) @ Override public Offer delegator ( OfferJson offerJson , boolean createPromo ) throws NoSuchMethodException , SecurityException { } @ Override @ OffersVariability public Offer saveOffer ( OfferJson offerJson ) { } @ Override @ OffersVariability public Offer updateOffer ( OfferJson offerJson ) { } }

Fix:
rating . setAverageRating ( ( ( ( ( rating . getAverageRating ( ) ) * ( ( rating . getRatings ( ) ) - 1 ) ) + ( ratingJson . getCalification ( ) ) ) // ( rating . getRatings ( ) ) ) ) ;
Buggy code:
public class UrlPathHelper { private final Log logger = LogFactory . getLog ( getClass ( ) ) ; private boolean alwaysUseFullPath = false ; private boolean urlDecode = true ; private String defaultEncoding = WebUtils . DEFAULT_CHARACTER_ENCODING ; public void setAlwaysUseFullPath ( boolean alwaysUseFullPath ) { } public void setUrlDecode ( boolean urlDecode ) { } public void setDefaultEncoding ( String defaultEncoding ) { } protected String getDefaultEncoding ( ) { } public String getLookupPathForRequest ( HttpServletRequest request ) { } public String getPathWithinServletMapping ( HttpServletRequest request ) { } public String getPathWithinApplication ( HttpServletRequest request ) { } public String getRequestUri ( HttpServletRequest request ) { } public String getContextPath ( HttpServletRequest request ) { } public String getServletPath ( HttpServletRequest request ) { } public String getOriginatingRequestUri ( HttpServletRequest request ) { } public String getOriginatingContextPath ( HttpServletRequest request ) { } public String getOriginatingQueryString ( HttpServletRequest request ) { } private String decodeAndCleanUriString ( HttpServletRequest request , String uri ) { } public String decodeRequestString ( HttpServletRequest request , String source ) { if ( this . urlDecode ) { String enc = determineEncoding ( request ) ; try { <START_BUG> return URLDecoder . decode ( source , enc ) ; <END_BUG> } catch ( UnsupportedEncodingException ex ) { if ( logger . isWarnEnabled ( ) ) { logger . warn ( ( ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>decode<seq2seq4repair_space>request<seq2seq4repair_space>string<seq2seq4repair_space>[" + source ) + "]<seq2seq4repair_space>with<seq2seq4repair_space>encoding<seq2seq4repair_space>'" ) + enc ) + "':<seq2seq4repair_space>falling<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>platform<seq2seq4repair_space>default<seq2seq4repair_space>encoding;<seq2seq4repair_space>exception<seq2seq4repair_space>message:<seq2seq4repair_space>" ) + ( ex . getMessage ( ) ) ) ) ; } return URLDecoder . decode ( source ) ; } } return source ; } protected String determineEncoding ( HttpServletRequest request ) { } }

Fix:
return UriUtils . decode ( source , enc ) ;
Buggy code:
public class ContainerInventoryItem extends Container { protected final InventoryContainerItemWrapper containerWrapper ; protected final EntityPlayer player ; protected final int containerIndex ; protected boolean valid = true ; public ContainerInventoryItem ( ItemStack stack , InventoryPlayer inventory ) { } public ItemStack getContainerStack ( ) { } public String getInventoryName ( ) { } @ Override public void detectAndSendChanges ( ) { } public void onSlotChanged ( ) { ItemStack item = player . inventory . mainInventory [ containerIndex ] ; <START_BUG> if ( ( valid ) && ( ( item == null ) || ( ( item . getItem ( ) ) != ( containerWrapper . getContainerStack ( ) . getItem ( ) ) ) ) ) { <END_BUG> player . inventory . mainInventory [ containerIndex ] = containerWrapper . getContainerStack ( ) ; } } @ Override public boolean canInteractWith ( EntityPlayer player ) { } @ Override public ItemStack transferStackInSlot ( EntityPlayer player , int slotIndex ) { } @ Override public ItemStack slotClick ( int slotIndex , int p_75144_2_ , int p_75144_3_ , EntityPlayer player ) { } @ Override protected boolean mergeItemStack ( ItemStack stack , int slotMin , int slotMax , boolean ascending ) { } }

Fix:
if ( ( ( valid ) && ( item != null ) ) && ( ( item . getItem ( ) ) == ( containerWrapper . getContainerStack ( ) . getItem ( ) ) ) ) {
Buggy code:
public class TestWebServer { public static void main ( String [ ] args ) throws Exception { WebServer ws = new WebServer ( ) ; <START_BUG> ws . addResource ( "//" , "//Users//yama//Documents//JavaWorkspace//DemoBossSystem//release//DemoBossSystem" ) ; <END_BUG> ws . init ( ) ; ws . start ( ) ; } }

Fix:
ws . addResource ( "//" , "//Users//yama//Documents//JavaWorkspace//ITCircleWebSystem//release//ITCircleWebSystem" ) ;
Buggy code:
public class BindingAddHandler extends SocketBindingAddHandler { public static final BindingAddHandler INSTANCE = new BindingAddHandler ( ) ; private static final InetAddress ANY_IPV6 ; private BindingAddHandler ( ) { } @ Override protected void populateModel ( final OperationContext context , final ModelNode operation , final Resource resource ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } @ Override protected boolean requiresRuntime ( OperationContext context ) { } @ Override protected boolean requiresRuntimeVerification ( ) { } public static ServiceController < SocketBinding > installBindingService ( OperationContext context , ModelNode config , String name ) throws UnknownHostException , OperationFailedException { final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final ModelNode intfNode = INTERFACE . resolveModelAttribute ( context , config ) ; final String intf = ( intfNode . isDefined ( ) ) ? intfNode . asString ( ) : null ; <START_BUG> final int port = PORT . resolveModelAttribute ( context , config ) . asInt ( 0 ) ; <END_BUG> final boolean fixedPort = FIXED_PORT . resolveModelAttribute ( context , config ) . asBoolean ( ) ; final ModelNode mcastNode = MULTICAST_ADDRESS . resolveModelAttribute ( context , config ) ; final String mcastAddr = ( mcastNode . isDefined ( ) ) ? mcastNode . asString ( ) : null ; final int mcastPort = MULTICAST_PORT . resolveModelAttribute ( context , config ) . asInt ( 0 ) ; final InetAddress mcastInet = ( mcastAddr == null ) ? null : InetAddress . getByName ( mcastAddr ) ; final ModelNode mappingsNode = config . get ( CLIENT_MAPPINGS ) ; final List < ClientMapping > clientMappings = ( mappingsNode . isDefined ( ) ) ? BindingAddHandler . parseClientMappings ( mappingsNode ) : null ; final SocketBindingService service = new SocketBindingService ( name , port , fixedPort , mcastInet , mcastPort , clientMappings ) ; final ServiceBuilder < SocketBinding > builder = serviceTarget . addService ( JBOSS_BINDING_NAME . append ( name ) , service ) ; if ( intf != null ) { builder . addDependency ( JBOSS_NETWORK_INTERFACE . append ( intf ) , NetworkInterfaceBinding . class , service . getInterfaceBinding ( ) ) ; } return builder . addDependency ( SOCKET_BINDING_MANAGER , SocketBindingManager . class , service . getSocketBindings ( ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; } public static List < ClientMapping > parseClientMappings ( ModelNode mappings ) throws OperationFailedException { } }

Fix:
final int port = PORT . resolveModelAttribute ( context , config ) . asInt ( ) ;
Buggy code:
public class JettyWebSocketHandlerAdapterTests { private JettyWebSocketHandlerAdapter adapter ; private WebSocketHandler webSocketHandler ; private JettyWebSocketSession webSocketSession ; private Session session ; @ Before public void setup ( ) { this . session = mock ( Session . class ) ; this . webSocketHandler = mock ( WebSocketHandler . class ) ; <START_BUG> this . webSocketSession = new JettyWebSocketSession ( null ) ; <END_BUG> this . adapter = new JettyWebSocketHandlerAdapter ( this . webSocketHandler , this . webSocketSession ) ; } @ Test public void onOpen ( ) throws Throwable { } @ Test public void onClose ( ) throws Throwable { } @ Test public void onError ( ) throws Throwable { } }

Fix:
this . webSocketSession = new JettyWebSocketSession ( null , null ) ;
Buggy code:
public class RecurringDurationDatatypeValidator extends AbstractDatatypeValidator { private static final boolean fDbug = false ; private Locale fLocale = null ; DatatypeValidator fBaseValidator = null ; String fPattern = null ; long fMaxInclusive = Long . MAX_VALUE ; long fMaxExclusive = ( Long . MAX_VALUE ) - 1 ; long fMinInclusive = 1L ; long fMinExclusive = 0L ; long fDuration = 0L ; long fPeriod = 0L ; long [ ] fEnumrecurringduration = null ; boolean isMaxExclusiveDefined = false ; boolean isMaxInclusiveDefined = false ; boolean isMinExclusiveDefined = false ; boolean isMinInclusiveDefined = false ; boolean isBaseTypeTimePeriod = false ; int fFacetsDefined = 0 ; boolean fDerivedByList = false ; Hashtable fFacets = null ; private DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider ( ) ; public RecurringDurationDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public RecurringDurationDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList ) throws InvalidDatatypeFacetException { } public Object validate ( String content , Object state ) throws InvalidDatatypeValueException { } public void setBasetype ( DatatypeValidator base ) { } public void setLocale ( Locale locale ) { } public int compare ( String content1 , String content2 ) { } public Hashtable getFacets ( ) { } private static long normalizeRecurringDuration ( char [ ] value , int start ) throws InvalidDatatypeValueException { } public static Calendar normalizeInstant ( char [ ] value , int start , int length ) throws InvalidDatatypeValueException { } public Object clone ( ) throws CloneNotSupportedException { } private void boundsCheck ( long f ) throws InvalidDatatypeFacetException { boolean inUpperBound = false ; boolean inLowerBound = false ; if ( isMaxInclusiveDefined ) { inUpperBound = f <= ( fMaxInclusive ) ; } else if ( isMaxExclusiveDefined ) { inUpperBound = f < ( fMaxExclusive ) ; } if ( isMinInclusiveDefined ) { inLowerBound = f >= ( fMinInclusive ) ; } else if ( isMinExclusiveDefined ) { inLowerBound = f > ( fMinExclusive ) ; } if ( ( inUpperBound == false ) || ( inLowerBound == false ) ) { <START_BUG> throw new InvalidDatatypeFacetException ( getErrorString ( OutOfBounds , MSG_NONE , new Object [ ] { new Long ( f ) } ) ) ; <END_BUG> } } private void enumCheck ( long d ) throws InvalidDatatypeValueException { } private String getErrorString ( int major , int minor , Object [ ] args ) { } private static final int indexOf ( char [ ] value , int start , char s ) { } private static final int indexOf ( char [ ] value , int start , char s , int max ) { } private static final int indexOneOf ( char [ ] value , int start , String s ) { } private static final int indexOneOf ( char [ ] value , int start , String s , int max ) { } private static final int parseInt ( char [ ] s , int start , int length ) throws NumberFormatException { } }

Fix:
throw new InvalidDatatypeFacetException ( getErrorString ( OutOfBounds , MSG_NONE , new Object [ ] { new Long ( f ) , "" , "" , "" , "" } ) ) ;
Buggy code:
public class Portfolio { public static enum ALGO_RECOMMENDATION { DO_NOTHING , BUY , SELL ; } private static final int MAX_PORTFOLIO_SIZE = 5 ; public String title ; private StockStatus [ ] stockStatus ; private int portfolioSize ; private int i ; private float balance ; private int stockStatusSize ; public Portfolio ( ) { } public Portfolio ( Portfolio portfolio ) { } public Stock [ ] getStocks ( ) { } public float getBalance ( ) { } public void setBalance ( float balance ) { } public void updateBalance ( float amount ) { } public float getStocksValue ( ) { } public float getTotalValue ( ) { } public void addStock ( Stock stock ) { } public boolean removeStock ( String stockSymbol ) { } public boolean buyStock ( String symbol , int quantity ) { } public boolean sellStock ( String symbol , int quantity ) { boolean symbolFound = false ; int i = 0 ; for ( ; i < ( portfolioSize ) ; i ++ ) { if ( stockStatus [ i ] . getStockSymbol ( ) . equals ( symbol ) ) { symbolFound = true ; break ; } } if ( symbolFound == true ) { if ( quantity == ( - 1 ) ) { balance = ( balance ) + ( ( stockStatus [ i ] . stockQuantity ) * ( stockStatus [ i ] . bid ) ) ; stockStatus [ i ] . stockQuantity = 0 ; return true ; } <START_BUG> if ( ( ( quantity == ( Portfolio . MAX_PORTFOLIO_SIZE ) ) || ( quantity > ( Portfolio . MAX_PORTFOLIO_SIZE ) ) ) || ( quantity < 0 ) ) { <END_BUG> System . out . println ( ( symbol + "<seq2seq4repair_space>hasn't<seq2seq4repair_space>been<seq2seq4repair_space>sold<seq2seq4repair_space>-<seq2seq4repair_space>Not<seq2seq4repair_space>enough<seq2seq4repair_space>stocks<seq2seq4repair_space>to<seq2seq4repair_space>sell" ) ) ; return false ; } else { stockStatus [ i ] . stockQuantity = ( stockStatus [ i ] . stockQuantity ) - quantity ; balance = ( balance ) + ( ( stockStatus [ i ] . bid ) * quantity ) ; return true ; } } else { System . out . println ( ( symbol + "<seq2seq4repair_space>hasn't<seq2seq4repair_space>been<seq2seq4repair_space>sold" ) ) ; return false ; } } public String getHtmlPortfolio ( ) { } }

Fix:
if ( ( quantity > ( stockStatus [ i ] . stockQuantity ) ) || ( quantity < 0 ) ) {
Buggy code:
public class ChunkedInput implements PackInput { private final ByteBuffer buffer ; private final ByteBuffer chunkHeaderBuffer = ByteBuffer . allocateDirect ( 2 ) ; private int unreadChunkSize = 0 ; private final ReadableByteChannel channel ; public ChunkedInput ( ReadableByteChannel ch ) { } public ChunkedInput ( int bufferCapacity , ReadableByteChannel channel ) { } @ Override public boolean hasMoreData ( ) throws IOException { } @ Override public byte readByte ( ) { } @ Override public short readShort ( ) { } @ Override public int readInt ( ) { attempt ( 4 ) ; if ( ( remainingData ( ) ) >= 4 ) { <START_BUG> return buffer . getShort ( ) ; <END_BUG> } else { return ( ( readShort ( ) ) << 16 ) & ( readShort ( ) ) ; } } @ Override public long readLong ( ) { } @ Override public double readDouble ( ) { } @ Override public PackInput readBytes ( byte [ ] into , int offset , int toRead ) { } @ Override public byte peekByte ( ) { } private int freeSpace ( ) { } private int remainingData ( ) { } private void attempt ( int toRead ) { } private void ensure ( int toRead ) { } private int readChunkSize ( ) throws IOException { } private void readChunk ( int chunkSize ) throws IOException { } private Runnable onMessageComplete = new Runnable ( ) { @ Override public void run ( ) { } } ; public Runnable messageBoundaryHook ( ) { } }

Fix:
return buffer . getInt ( ) ;
Buggy code:
public class Contexts { public static Contexts contexts ( ) { } private static LinkedList < Context > contexts = new LinkedList < Context > ( ) ; public static void addContext ( ) { } public static void setMinimalContexts ( ) { } public static void addSymbolToLastContext ( Symbol symbol , _Sexpr expression ) { } public static void removeLastFromContexts ( ) { } public static _Sexpr getSexprFromContexts ( Symbol symbol ) { } public static void changeSexprInContexts ( Symbol symbol , _Sexpr expression ) { } public static void addSymbolToFirstContext ( Symbol symbol , _Sexpr expression ) { } public static HashMap < Symbol , _Sexpr > getScope ( ) { } public static void printScope ( ) { HashMap < Symbol , _Sexpr > scope = Contexts . getScope ( ) ; Iterator < Map . Entry < Symbol , _Sexpr > > it = scope . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry < Symbol , _Sexpr > pair = ( ( Map . Entry < Symbol , _Sexpr > ) ( it . next ( ) ) ) ; if ( ( ( ( pair . getValue ( ) ) != null ) && ( ( pair . getKey ( ) ) != null ) ) && ( ( pair . getValue ( ) ) != ( Nil . nil ) ) ) { <START_BUG> System . out . println ( ( ( ( pair . getKey ( ) . toString ( ) ) + "<seq2seq4repair_space>---><seq2seq4repair_space>" ) + ( pair . getValue ( ) . toString ( ) ) ) ) ; <END_BUG> } } } }

Fix:
System . out . println ( ( ( ( pair . getKey ( ) . toString ( ) ) + "\t\t--->\t" ) + ( pair . getValue ( ) . toString ( ) ) ) ) ;
Buggy code:
class VersionAttachStrategy extends AttachStrategy implements DetachState { private static final Localizer _loc = Localizer . forPackage ( VersionAttachStrategy . class ) ; protected Object getDetachedObjectId ( AttachManager manager , Object toAttach ) { Broker broker = manager . getBroker ( ) ; <START_BUG> ClassMetaData meta = broker . getConfiguration ( ) . getMetaDataRepository ( ) . getMetaData ( toAttach . getClass ( ) , broker . getClassLoader ( ) , true ) ; <END_BUG> return ApplicationIds . create ( ( ( PersistenceCapable ) ( toAttach ) ) , meta ) ; } protected void provideField ( Object toAttach , StateManagerImpl sm , int field ) { } public Object attach ( AttachManager manager , Object toAttach , ClassMetaData meta , PersistenceCapable into , OpenJPAStateManager owner , ValueMetaData ownerMeta ) { } private void compareVersion ( StateManagerImpl sm , PersistenceCapable pc ) { } private void attachFieldsInPlace ( AttachManager manager , StateManagerImpl sm ) { } private Object attachInPlace ( AttachManager manager , StateManagerImpl sm , ValueMetaData vmd , Object pc ) { } private Object [ ] attachInPlace ( AttachManager manager , StateManagerImpl sm , FieldMetaData fmd , Object [ ] arr ) { } private Collection attachInPlace ( AttachManager manager , StateManagerImpl sm , FieldMetaData fmd , Collection coll ) { } private Map attachInPlace ( AttachManager manager , StateManagerImpl sm , FieldMetaData fmd , Map map ) { } }

Fix:
ClassMetaData meta = broker . getConfiguration ( ) . getMetaDataRepositoryInstance ( ) . getMetaData ( toAttach . getClass ( ) , broker . getClassLoader ( ) , true ) ;