nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class Constraint { private static final Logger LOGGER = Logger . getLogger ( Constraint . class . getName ( ) ) ; protected final String name ; protected boolean baked ; protected Space ownerSpace ; protected final ConstraintDefinition constraintDefinition ; protected Long ownerOMA ; protected Long targetOMA ; protected Space targetSpace ; protected String subtargetName ; protected final Ipo ipo ; protected final BlenderContext blenderContext ; protected final ConstraintHelper constraintHelper ; public Constraint ( Structure constraintStructure , Long ownerOMA , Ipo influenceIpo , BlenderContext blenderContext ) throws BlenderFileException { } public boolean isImplemented ( ) { } public String getConstraintTypeName ( ) { } public Set < Long > getAlteredOmas ( ) { } public abstract boolean validate ( ) { } public void apply ( int frame ) { Transform targetTransform = ( ( targetOMA ) != null ) ? constraintHelper . getTransform ( targetOMA , subtargetName , targetSpace ) : null ; <START_BUG> constraintDefinition . bake ( ownerSpace , targetSpace , targetTransform , ipo . calculateValue ( frame ) ) ; <END_BUG> } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } No newline ; at end ; of file ; }

Fix:
constraintDefinition . bake ( ownerSpace , targetSpace , targetTransform , ( ( float ) ( ipo . calculateValue ( frame ) ) ) ) ;
Buggy code:
public class ByteCodeField { private final String clsName ; private boolean staticField ; private String fieldName ; private List < String > dependentClasses = new ArrayList < String > ( ) ; private int arrayDimensions ; private String type ; private Class primitiveType ; private boolean finalField ; private Object value ; public ByteCodeField ( String clsName , int access , String name , String desc , String signature , Object value ) { } public String getFieldName ( ) { } public String getCDefinition ( ) { } public List < String > getDependentClasses ( ) { } public boolean isStaticField ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } public String getClsName ( ) { } public boolean isObjectType ( ) { } public boolean isFinal ( ) { } public boolean shouldRemoveFromHeapCollection ( ) { if ( ( finalField ) && ( isObjectType ( ) ) ) { if ( ( arrayDimensions ) < 2 ) { <START_BUG> if ( ( ( type ) == null ) || ( type . startsWith ( "java_lang_" ) ) ) { <END_BUG> return true ; } } } return false ; } public Object getValue ( ) { } public String getType ( ) { } }

Fix:
if ( ( ( type ) == null ) || ( ( ( type . startsWith ( "java_lang_" ) ) && ( ! ( type . endsWith ( "Builder" ) ) ) ) && ( ! ( type . endsWith ( "Buffer" ) ) ) ) ) {
Buggy code:
public class LispOutputVisitor implements IEval < String > , IVisitor { String output = "" ; public LispOutputVisitor ( ) { } public String getVal ( ) { } protected void visitToOpExpression ( OpExp e ) throws Exception { } public void visit ( PlusExp e ) throws Exception { } public void visit ( MinusExp e ) throws Exception { } public void visit ( MulExp e ) throws Exception { } public void visit ( DivExp e ) throws Exception { } public void visit ( NumExp e ) { } @ Override public void visit ( RealExp e ) { } @ Override public void visit ( FunExp funExp ) throws Exception { } @ Override public void visit ( UnaryMinusExp e ) throws Exception { } @ Override public void visit ( AssignExp assignExp ) throws Exception { } @ Override public void visit ( IdentExp e ) { } @ Override public void visit ( IdentValExp e ) { } @ Override public void visit ( SeqExp seqExp ) throws Exception { } @ Override public void visit ( FunDefineExp funDefineExp ) throws Exception { } @ Override public void visit ( FunSignExp funSignExp ) throws Exception { } @ Override public void visit ( FunCodeExp funCodeExp ) throws Exception { final StringBuffer sb = new StringBuffer ( ) ; int i = 0 ; for ( final ExpType p : funCodeExp . getParams ( ) ) { switch ( p ) { case RealExp : { sb . append ( ( "r" + i ) ) ; break ; } case NumExp : { sb . append ( ( "i" + i ) ) ; break ; } default : { throw new Exception ( "unknown<seq2seq4repair_space>type" ) ; } } sb . append ( "<seq2seq4repair_space>" ) ; i ++ ; } <START_BUG> output = ( ( "<seq2seq4repair_space>(call<seq2seq4repair_space>" + ( funCodeExp . jFunName ) ) + ( sb . toString ( ) ) ) + ")" ; <END_BUG> } @ Override public void visit ( Exp exp ) throws Exception { } @ Override public List < Pair < String , Object > > getResults ( ) { } }

Fix:
output = ( ( ( "<seq2seq4repair_space>(call<seq2seq4repair_space>" + ( funCodeExp . jFunName ) ) + "<seq2seq4repair_space>" ) + ( sb . toString ( ) ) ) + ")" ;
Buggy code:
public class SymptomsArrayAdapter extends ArrayAdapter < ListItemSymptomDetailsDTO > { public SymptomsArrayAdapter ( Context context , List < ListItemSymptomDetailsDTO > listOfSymptomDetails ) { } private class ViewHolder { TextView tv_dateTime ; TextView tv_bodyPart ; TextView tv_severityLevel ; } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { SymptomsArrayAdapter . ViewHolder viewHolder ; if ( convertView == null ) { convertView = LayoutInflater . from ( getContext ( ) ) . inflate ( list_item_symptoms , parent , false ) ; viewHolder = new SymptomsArrayAdapter . ViewHolder ( ) ; viewHolder . tv_dateTime = ( ( TextView ) ( convertView . findViewById ( list_item_symptom_date_time ) ) ) ; viewHolder . tv_bodyPart = ( ( TextView ) ( convertView . findViewById ( list_item_body_part ) ) ) ; viewHolder . tv_severityLevel = ( ( TextView ) ( convertView . findViewById ( list_item_severity_level ) ) ) ; convertView . setTag ( viewHolder ) ; } else { viewHolder = ( ( SymptomsArrayAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; } ListItemSymptomDetailsDTO symptomDetails = getItem ( position ) ; TextView tv_dateTime = ( ( TextView ) ( convertView . findViewById ( list_item_symptom_date_time ) ) ) ; viewHolder . tv_dateTime . setText ( symptomDetails . getDateTimeStamp ( ) ) ; TextView tv_bodyPart = ( ( TextView ) ( convertView . findViewById ( list_item_body_part ) ) ) ; viewHolder . tv_bodyPart . setText ( symptomDetails . getBodyPart ( ) ) ; TextView tv_severityLevel = ( ( TextView ) ( convertView . findViewById ( list_item_severity_level ) ) ) ; <START_BUG> viewHolder . tv_severityLevel . setText ( symptomDetails . getLevelOfSecurity ( ) ) ; <END_BUG> return convertView ; } }

Fix:
viewHolder . tv_severityLevel . setText ( symptomDetails . getLevelOfSeverity ( ) ) ;
Buggy code:
public class SizeAssertion extends AbstractTestElement implements Serializable , Assertion { private String comparatorErrorMessage = "ERROR!" ; public static final int EQUAL = 1 ; public static final int NOTEQUAL = 2 ; public static final int GREATERTHAN = 3 ; public static final int LESSTHAN = 4 ; public static final int GREATERTHANEQUAL = 5 ; public static final int LESSTHANEQUAL = 6 ; private static final String SIZE_KEY = "SizeAssertion.size" ; private static final String OPERATOR_KEY = "SizeAssertion.operator" ; byte [ ] resultData ; public AssertionResult getResult ( SampleResult response ) { <START_BUG> AssertionResult result = new AssertionResult ( ) ; <END_BUG> result . setFailure ( false ) ; resultData = response . getResponseData ( ) ; long resultSize = resultData . length ; if ( resultSize == 0 ) { return result . setResultForNull ( ) ; } if ( ( ! ( compareSize ( resultSize ) ) ) && ( ( getAllowedSize ( ) ) > 0 ) ) { result . setFailure ( true ) ; Object [ ] arguments = new Object [ ] { new Long ( resultSize ) , comparatorErrorMessage , new Long ( getAllowedSize ( ) ) } ; String message = MessageFormat . format ( JMeterUtils . getResString ( "size_assertion_failure" ) , arguments ) ; result . setFailureMessage ( message ) ; } return result ; } public long getAllowedSize ( ) { } public void setCompOper ( int operator ) { } public int getCompOper ( ) { } public void setAllowedSize ( long size ) throws IllegalArgumentException { } private boolean compareSize ( long resultSize ) { } }

Fix:
AssertionResult result = new AssertionResult ( getName ( ) ) ;
Buggy code:
public class AnalysisDBManager { private static final String METADATA_COLLECTION_NAME = "metadata" ; private static final String REPORT_COLLECTION_NAME = "reports" ; private static final String METRICS_COLLECTION_NAME = "metrics" ; private static final String CREATOR_COLLECTION_NAME = "creators" ; private static final String SOURCE_COLLECTION_NAME = "sources" ; private MongoDatabase db = null ; private MongoClient mongoClient ; private static String MONGOEXPORT_BIN = "" ; public static AnalysisDBManager getTestAnalysisDBManager ( ) { } public AnalysisDBManager ( String host , String dbName ) { } public void putMetadata ( Document doc ) { } public Document findMetadata ( int projectID ) { } public Document findSmellReport ( int projectID ) { } public Document findMetricsReport ( int projectID ) { <START_BUG> FindIterable < Document > iterable = db . getCollection ( AnalysisDBManager . REPORT_COLLECTION_NAME ) . find ( eq ( "_id" , projectID ) ) ; <END_BUG> if ( iterable == null ) { return null ; } else { return iterable . first ( ) ; } } public long removeMetadata ( int projectID ) { } public void clearMetadata ( ) { } public long getMetadataSize ( ) { } public void putAnalysisReport ( int projectID , Document report ) { } public void clearAnalysisReport ( ) { } public Document findAnalysisReport ( int projectID ) { } public long removeAnalysisReport ( int projectID ) { } public Document findCreatorRecord ( String creator ) { } public void addCreatorRecord ( Document creatorDoc ) { } public void putCreatorRecord ( Document creatorDoc ) { } public void deleteCreator ( String creatorName ) { } public String lookUpCreator ( int projectID ) { } public long getReportSize ( ) { } public void clearCreatorRecords ( ) { } public long getCreatorsSize ( ) { } public void setDBName ( String DBName ) { } public void putSource ( int projectID , String src ) { } private Document findSource ( int projectID ) { } public long getSourcesSize ( ) { } public void clearSources ( ) { } public void export ( String host , String db , String collection , int skip , int limit , String outputDir ) throws InterruptedException { } public void setMongoExportPath ( String mongoexport ) { } public void exportWithLimitPerFile ( String host , String db , String collection , String outputPath , int limit ) throws InterruptedException { } public void putMetricsReport ( int projectID , Document metricsRecord ) { } public void clearMetrics ( ) { } public long getMetricsSize ( ) { } }

Fix:
FindIterable < Document > iterable = db . getCollection ( AnalysisDBManager . METRICS_COLLECTION_NAME ) . find ( eq ( "_id" , projectID ) ) ;
Buggy code:
public class TwitterPorukaTest { private TwitterPoruka por ; @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testSetKorisnikOkV1 ( ) { } @ Test public void testSetKorisnikOkV2 ( ) { } @ Test ( expected = RuntimeException . class ) public void testSetKorisnikNull ( ) { } @ Test ( expected = RuntimeException . class ) public void testSetKorisnikEmpty ( ) { } @ Test public void testSetPorukaOkV1 ( ) { } @ Test public void testSetPorukaOkV2 ( ) { } @ Test ( expected = RuntimeException . class ) public void testSetPorukaLong ( ) { <START_BUG> por . setPoruka ( "twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!<seq2seq4repair_space>twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!<seq2seq4repair_space>twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!" ) ; <END_BUG> } @ Test ( expected = RuntimeException . class ) public void testSetPorukaNull ( ) { } @ Test public void testToString ( ) { } }

Fix:
por . setPoruka ( "twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!<seq2seq4repair_space>twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!<seq2seq4repair_space>twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!<seq2seq4repair_space>twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!<seq2seq4repair_space>twitter<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>social<seq2seq4repair_space>network!" ) ;
Buggy code:
class MailSessionDefinition extends SimpleResourceDefinition { public static MailSessionDefinition INSTANCE = new MailSessionDefinition ( ) ; private MailSessionDefinition ( ) { } protected static final SimpleAttributeDefinition JNDI_NAME = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( MailSubsystemModel . JNDI_NAME , org . jboss . dmr . ModelType . STRING , false ) . setAllowExpression ( true ) . setRestartAllServices ( ) . build ( ) ; protected static final SimpleAttributeDefinition FROM = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( MailSubsystemModel . FROM , org . jboss . dmr . ModelType . STRING , true ) . setRestartAllServices ( ) . setAllowExpression ( true ) . setAllowNull ( true ) . build ( ) ; protected static final SimpleAttributeDefinition DEBUG = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( MailSubsystemModel . DEBUG , org . jboss . dmr . ModelType . BOOLEAN , true ) . setAllowExpression ( true ) . setDefaultValue ( new ModelNode ( false ) ) . setRestartAllServices ( ) . build ( ) ; private static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { MailSessionDefinition . DEBUG , MailSessionDefinition . JNDI_NAME , MailSessionDefinition . FROM } ; @ Override public void registerAttributes ( final ManagementResourceRegistration rootResourceRegistration ) { for ( AttributeDefinition attr : MailSessionDefinition . ATTRIBUTES ) { <START_BUG> rootResourceRegistration . registerReadWriteAttribute ( attr , null , ReloadRequiredRemoveStepHandler . INSTANCE ) ; <END_BUG> } } private static class SessionAttributeWriteHandler extends AbstractWriteAttributeHandler { protected static MailSessionDefinition . SessionAttributeWriteHandler INSTANCE = new MailSessionDefinition . SessionAttributeWriteHandler ( ) ; private SessionAttributeWriteHandler ( ) { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode resolvedValue , ModelNode currentValue , HandbackHolder handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Object handback ) throws OperationFailedException { } } }

Fix:
rootResourceRegistration . registerReadWriteAttribute ( attr , null , MailSessionDefinition . SessionAttributeWriteHandler . INSTANCE ) ;
Buggy code:
public final class Locator { private static final int NIBBLE = 4 ; private static final int NIBBLE_MASK = 15 ; private static final int ASCII_SIZE = 128 ; private static final int BYTE_SIZE = 256 ; private static final int WORD = 16 ; private static final int SPACE = 32 ; private static final int DEL = 127 ; public static final String URI_ENCODING = "UTF-8" ; private static boolean [ ] gNeedEscaping = new boolean [ Locator . ASCII_SIZE ] ; private static char [ ] gAfterEscaping1 = new char [ Locator . ASCII_SIZE ] ; private static char [ ] gAfterEscaping2 = new char [ Locator . ASCII_SIZE ] ; private static char [ ] gHexChs = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' } ; public static final String ERROR_NOT_FILE_URI = "Can<seq2seq4repair_space>only<seq2seq4repair_space>handle<seq2seq4repair_space>valid<seq2seq4repair_space>file:<seq2seq4repair_space>URIs,<seq2seq4repair_space>not<seq2seq4repair_space>" ; private Locator ( ) { } public static File getClassSource ( Class c ) { } public static File getResourceSource ( ClassLoader c , String resource ) { } public static String fromURI ( String uri ) { } private static String fromURIJava13 ( String uri ) { } public static String fromJarURI ( String uri ) { <START_BUG> int pling = uri . indexOf ( '!' ) ; <END_BUG> String jarName = uri . substring ( "jar:" . length ( ) , pling ) ; return Locator . fromURI ( jarName ) ; } public static String decodeUri ( String uri ) throws UnsupportedEncodingException { } public static String encodeURI ( String path ) throws UnsupportedEncodingException { } public static URL fileToURL ( File file ) throws MalformedURLException { } public static File getToolsJar ( ) { } public static URL [ ] getLocationURLs ( File location ) throws MalformedURLException { } public static URL [ ] getLocationURLs ( File location , final String [ ] extensions ) throws MalformedURLException { } }

Fix:
int pling = uri . indexOf ( "!//" ) ;
Buggy code:
public abstract class Link extends AbstractLink implements ILinkListener { private final class AnchorChange extends Change { private static final long serialVersionUID = 1L ; private Component anchor ; public AnchorChange ( Component anchor ) { } public final void undo ( ) { } } private static final long serialVersionUID = 1L ; private Component anchor ; private boolean autoEnable = false ; private PopupSettings popupSettings = null ; public Link ( final String id ) { } public Link ( final String id , IModel object ) { } public Component getAnchor ( ) { } public final boolean getAutoEnable ( ) { } public PopupSettings getPopupSettings ( ) { } public boolean isEnabled ( ) { } protected boolean getStatelessHint ( ) { } public abstract void onClick ( ) { } public final void onLinkClicked ( ) { } public Link setAnchor ( Component anchor ) { } public final Link setAutoEnable ( final boolean autoEnable ) { } public final Link setPopupSettings ( final PopupSettings popupSettings ) { } protected CharSequence appendAnchor ( final ComponentTag tag , CharSequence url ) { } protected CharSequence getOnClickScript ( final CharSequence url ) { } protected String getOnClickScript ( final String url ) { } protected CharSequence getURL ( ) { } protected boolean linksTo ( final Page page ) { } protected void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; CharSequence url = getURL ( ) ; url = appendAnchor ( tag , url ) ; <START_BUG> if ( ! ( isEnabled ( ) ) ) { <END_BUG> disableLink ( tag ) ; } else { if ( ( ( tag . getName ( ) . equalsIgnoreCase ( "a" ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "link" ) ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "area" ) ) ) { tag . put ( "href" , Strings . replaceAll ( url , "&" , "&amp;" ) ) ; if ( ( popupSettings ) != null ) { tag . put ( "onclick" , popupSettings . getPopupJavaScript ( ) ) ; } } else if ( ( tag . getName ( ) . equalsIgnoreCase ( "script" ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "style" ) ) ) { tag . put ( "src" , Strings . replaceAll ( url , "&" , "&amp;" ) ) ; } else { if ( ( popupSettings ) != null ) { popupSettings . setTarget ( ( ( "'" + url ) + "'" ) ) ; String popupScript = popupSettings . getPopupJavaScript ( ) ; tag . put ( "onclick" , popupScript ) ; } else { tag . put ( "onclick" , ( ( "window.location.href='" + url ) + "';return<seq2seq4repair_space>false;" ) ) ; } } final CharSequence onClickJavaScript = getOnClickScript ( url ) ; if ( onClickJavaScript != null ) { tag . put ( "onclick" , onClickJavaScript ) ; } if ( ( popupSettings ) != null ) { IPageMap popupPageMap = popupSettings . getPageMap ( this ) ; if ( ( popupPageMap != null ) && ( ( popupPageMap . getName ( ) ) != null ) ) { tag . put ( "target" , popupPageMap . getName ( ) ) ; } } } } }

Fix:
if ( ! ( isLinkEnabled ( ) ) ) {
Buggy code:
@ Transactional ( propagation = Propagation . MANDATORY ) public class DbUserImpl extends DbAccessBase < User > implements DbUser { public DbUserImpl ( ) { } @ Override public List < User > getAll ( ) { } @ Override public User getByUsername ( String username ) { } @ Override public User getByExtId ( String extid ) { <START_BUG> final String stringQuery = "SELECT<seq2seq4repair_space>e<seq2seq4repair_space>FROM<seq2seq4repair_space>User<seq2seq4repair_space>e<seq2seq4repair_space>WHERE<seq2seq4repair_space>:extid<seq2seq4repair_space>MEMBER<seq2seq4repair_space>OF<seq2seq4repair_space>e.externalIdentifiers" ; <END_BUG> TypedQuery < User > query = createTypedQuery ( stringQuery ) ; query . setParameter ( "extid" , extid ) ; return execute ( query ) ; } }

Fix:
final String stringQuery = "SELECT<seq2seq4repair_space>e<seq2seq4repair_space>FROM<seq2seq4repair_space>User<seq2seq4repair_space>e<seq2seq4repair_space>WHERE<seq2seq4repair_space>e.externalIdentifier<seq2seq4repair_space>=<seq2seq4repair_space>:extid" ;
Buggy code:
public class Crawler implements Runnable { private Logger logger = LoggerFactory . getLogger ( Crawler . class ) ; private CrawlRequest request ; public Crawler ( CrawlRequest request ) { } public void run ( ) { logger . info ( "#<seq2seq4repair_space>Start<seq2seq4repair_space>crawl<seq2seq4repair_space>page<seq2seq4repair_space>{}" , request . url ) ; AngularSEOConfig config = AngularSEOConfig . getConfig ( ) ; WebDriver driver = new org . openqa . selenium . phantomjs . PhantomJSDriver ( DesiredCapabilities . phantomjs ( ) ) ; driver . manage ( ) . window ( ) . setSize ( new Dimension ( 1280 , 2024 ) ) ; driver . manage ( ) . timeouts ( ) . implicitlyWait ( config . waitForPageLoad , TimeUnit . SECONDS ) ; driver . get ( request . url ) ; waitForLoad ( ) ; if ( ( request . depth ) > 0 ) { driver = calculateSubLinks ( driver ) ; } String pageSource = driver . getPageSource ( ) ; String currentUrl = driver . getCurrentUrl ( ) ; String escapeUrl = URLUtils . escapeHashBang ( currentUrl ) ; CachePageManager . save ( escapeUrl , pageSource , config . encoding ) ; if ( ! ( request . url . equals ( currentUrl ) ) ) { <START_BUG> CachePageManager . save ( URLUtils . escapeHashBang ( request . url ) , pageSource , config . encoding ) ; <END_BUG> } driver . quit ( ) ; logger . info ( "#<seq2seq4repair_space>Finished<seq2seq4repair_space>page<seq2seq4repair_space>{}" , request . url ) ; } private WebDriver calculateSubLinks ( WebDriver driver ) { } public String getTrueLink ( WebDriver driver , WebElement ele ) { } public void waitForLoad ( ) { } public WebDriver restoreDriver ( WebDriver driver ) { } public static void setAttribute ( JavascriptExecutor driver , WebElement element , String attName , String attValue ) { } public static String getAbsoluteXPath ( JavascriptExecutor driver , WebElement element ) { } }

Fix:
CachePageManager . save ( request . url , pageSource , config . encoding ) ;
Buggy code:
public class CommandlineJava implements Cloneable { private Commandline vmCommand = new Commandline ( ) ; private Commandline javaCommand = new Commandline ( ) ; private CommandlineJava . SysProperties sysProperties = new CommandlineJava . SysProperties ( ) ; private Path classpath = null ; private String vmVersion ; public static class SysProperties extends Environment implements Cloneable { Properties sys = null ; public String [ ] getVariables ( ) throws BuildException { } public int size ( ) { } public void setSystem ( ) throws BuildException { } public void restoreSystem ( ) throws BuildException { } public Object clone ( ) { } } public CommandlineJava ( ) { } public Argument createArgument ( ) { } public Argument createVmArgument ( ) { } public void addSysproperty ( Environment . Variable sysp ) { } public void setVm ( String vm ) { } public void setVmversion ( String value ) { } public void setClassname ( String classname ) { } public String getClassname ( ) { } public Path createClasspath ( Project p ) { } public String getVmversion ( ) { } public String [ ] getCommandline ( ) { int size = ( ( vmCommand . size ( ) ) + ( javaCommand . size ( ) ) ) + ( sysProperties . size ( ) ) ; if ( ( ( classpath ) != null ) && ( ( classpath . size ( ) ) > 0 ) ) { size += 2 ; } String [ ] result = new String [ size ] ; System . arraycopy ( vmCommand . getCommandline ( ) , 0 , result , 0 , vmCommand . size ( ) ) ; int pos = vmCommand . size ( ) ; if ( ( sysProperties . size ( ) ) > 0 ) { System . arraycopy ( sysProperties . getVariables ( ) , 0 , result , pos , sysProperties . size ( ) ) ; pos += sysProperties . size ( ) ; } if ( ( ( classpath ) != null ) && ( ( classpath . size ( ) ) > 0 ) ) { result [ ( pos ++ ) ] = "-classpath" ; <START_BUG> result [ ( pos ++ ) ] = classpath . toString ( ) ; <END_BUG> } System . arraycopy ( javaCommand . getCommandline ( ) , 0 , result , pos , javaCommand . size ( ) ) ; return result ; } public String toString ( ) { } public int size ( ) { } public Commandline getJavaCommand ( ) { } public Commandline getVmCommand ( ) { } public Path getClasspath ( ) { } public void setSystemProperties ( ) throws BuildException { } public void restoreSystemProperties ( ) throws BuildException { } public CommandlineJava . SysProperties getSystemProperties ( ) { } public Object clone ( ) { } public void clearJavaArgs ( ) { } }

Fix:
result [ ( pos ++ ) ] = classpath . concatSystemClasspath ( ) . toString ( ) ;
Buggy code:
public abstract class CompressorFactory { private final String name ; private static List compressors ; public static void registerCompressor ( String className ) throws ClassNotFoundException , CompressException { } public static void registerCompressor ( Class clazz ) throws CompressException { } private CompressorFactory ( String name ) { } public abstract Compressor getInstance ( ) { } public static Compressor getInstance ( String compressorName ) throws CompressException { } public static Compressor getInstance ( File file ) throws CompressException { <START_BUG> if ( ( file == null ) && ( ! ( file . isFile ( ) ) ) ) { <END_BUG> throw new CompressException ( "CompressorFactory<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>instance<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>file" ) ; } PackableObject packable = null ; try { packable = PackableObject . identifyByHeader ( file , CompressorFactory . compressors ) ; if ( packable == null ) { return null ; } Compressor compressor = ( ( Compressor ) ( packable . getClass ( ) . newInstance ( ) ) ) ; return compressor ; } catch ( SecurityException e ) { throw new CompressException ( "A<seq2seq4repair_space>security<seq2seq4repair_space>violation<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>reading<seq2seq4repair_space>the<seq2seq4repair_space>field<seq2seq4repair_space>ARCHIVER_NAME" , e ) ; } catch ( IllegalArgumentException e ) { throw new CompressException ( "Internal<seq2seq4repair_space>factory<seq2seq4repair_space>exception" , e ) ; } catch ( Exception e ) { throw new CompressException ( "CompressorFactory<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>instance" , e ) ; } } public static CompressorFactory BZIP2 = new CompressorFactory ( "BZIP2" ) { public Compressor getInstance ( ) { } } ; public String toString ( ) { } }

Fix:
if ( ( file == null ) || ( ! ( file . isFile ( ) ) ) ) {
Buggy code:
public final class FileLanguageService { private final LanguageEndpoint languageEndpoint ; private final String fileName ; private final String serviceKey ; private FileLanguageService ( LanguageEndpoint languageEndpoint , String serviceKey , String fileName ) { } public void dispose ( ) { } public void editFile ( int offset , int length , String replacementText ) { } public List < ReferenceEntryEx > findReferences ( int position ) { } public List < RenameLocation > findRenameLocations ( int position , boolean findInStrings , boolean findInComments ) { } public List < TextSpan > getBraceMatchingAtPosition ( int position ) { } public CompletionInfoEx getCompletionsAtPosition ( int position ) { } public List < DefinitionInfo > getDefinitionAtPosition ( int position ) { } public List < DiagnosticEx > getDiagnostics ( ) { } public List < TextChange > getFormattingEditsForRange ( int start , int end , FormatCodeOptions options ) { } public int getIndentationAtPosition ( int position , EditorOptions options ) { } public TextSpan getNameOrDottedNameSpan ( int startPos , int endPos ) { } public List < NavigationBarItem > getNavigationBarItems ( ) { } public List < ReferenceEntry > getOccurrencesAtPosition ( int position ) { } public QuickInfo getQuickInfoAtPosition ( int position ) { } public static FileLanguageService create ( LanguageEndpoint languageEndpoint , IProject project , String fileName ) { } public static FileLanguageService create ( LanguageEndpoint languageEndpoint , String documentText ) { Preconditions . checkNotNull ( languageEndpoint ) ; Preconditions . checkNotNull ( documentText ) ; String serviceKey = UUID . randomUUID ( ) . toString ( ) ; <START_BUG> String fileName = serviceKey ; <END_BUG> languageEndpoint . initializeIsolatedLanguageService ( serviceKey , fileName , documentText ) ; languageEndpoint . setFileOpen ( fileName , true ) ; return new FileLanguageService ( languageEndpoint , serviceKey , fileName ) ; } }

Fix:
String fileName = serviceKey + ".ts" ;
Buggy code:
public final class Utils { public static int copy ( final InputStream pInput , final OutputStream pOutput ) throws IOException { } public static String toHex ( final byte [ ] pBytes ) { } public static String stripPath ( final int p , final String s ) { if ( p <= 0 ) { return s ; } int x = 0 ; for ( int i = 0 ; i < p ; i ++ ) { <START_BUG> x = s . indexOf ( '//' , x ) ; <END_BUG> if ( x < 0 ) { return s ; } } return s . substring ( ( x + 1 ) ) ; } public static String stripLeadingSlash ( final String s ) { } public static String replaceVariables ( final VariableResolver pResolver , final String pExpression , final String pOpen , final String pClose ) throws ParseException { } }

Fix:
x = s . indexOf ( '//' , ( x + 1 ) ) ;
Buggy code:
public class AuthManager extends ConfigTestElement implements Serializable , ConfigElement { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String AUTH_LIST = "AuthManager.auth_list" ; private static final int columnCount = 3 ; private static final String [ ] columnNames = new String [ ] { JMeterUtils . getResString ( "auth_base_url" ) , JMeterUtils . getResString ( "username" ) , JMeterUtils . getResString ( "password" ) } ; public AuthManager ( ) { } public void clear ( ) { } public void set ( int index , String url , String user , String pass ) { } public void setName ( String newName ) { } public CollectionProperty getAuthObjects ( ) { } public int getColumnCount ( ) { } public String getColumnName ( int column ) { } public Class getColumnClass ( int column ) { } public Authorization getAuthObjectAt ( int row ) { } public boolean isEditable ( ) { } public String getClassLabel ( ) { } public Class getGuiClass ( ) { } public Collection getAddList ( ) { } public Authorization get ( int i ) { } public String getAuthHeaderForURL ( URL url ) { Authorization auth = getAuthForURL ( url ) ; if ( auth == null ) return null ; <START_BUG> return "Basic<seq2seq4repair_space>" + ( Base64Encoder . encode ( ( ( ( auth . getUser ( ) ) + ":" ) + ( auth . getPass ( ) ) ) ) ) ; <END_BUG> } public Authorization getAuthForURL ( URL url ) { } public String getName ( ) { } public void addConfigElement ( ConfigElement config ) { } public void addAuth ( Authorization auth ) { } public void addAuth ( ) { } public boolean expectsModification ( ) { } public void uncompile ( ) { } public void save ( String authFile ) throws IOException { } public void addFile ( String authFile ) throws IOException { } public void remove ( int index ) { } public int getAuthCount ( ) { } private static boolean isSupportedProtocol ( URL url ) { } public static class Test extends JMeterTestCase { public Test ( String name ) { } public void testHttp ( ) throws Exception { } public void testHttps ( ) throws Exception { } public void testFile ( ) throws Exception { } } }

Fix:
return auth . toBasicHeader ( ) ;
Buggy code:
public class ServletContainerInitializerDeploymentProcessor implements DeploymentUnitProcessor { public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } public void undeploy ( final DeploymentUnit context ) { } private ServletContainerInitializer loadSci ( ClassLoader classLoader , VirtualFile sci , String jar , boolean error ) throws DeploymentUnitProcessingException { } private Set < ClassInfo > processHandlesType ( DotName typeName , Class < ? > type , CompositeIndex index ) throws DeploymentUnitProcessingException { Set < ClassInfo > classes = new HashSet < ClassInfo > ( ) ; if ( type . isAnnotation ( ) ) { List < AnnotationInstance > instances = index . getAnnotations ( typeName ) ; for ( AnnotationInstance instance : instances ) { AnnotationTarget annotationTarget = instance . target ( ) ; if ( annotationTarget instanceof ClassInfo ) { classes . add ( ( ( ClassInfo ) ( annotationTarget ) ) ) ; } else if ( annotationTarget instanceof FieldInfo ) { classes . add ( ( ( FieldInfo ) ( annotationTarget ) ) . declaringClass ( ) ) ; } else if ( annotationTarget instanceof MethodInfo ) { classes . add ( ( ( MethodInfo ) ( annotationTarget ) ) . declaringClass ( ) ) ; } else if ( annotationTarget instanceof MethodParameterInfo ) { classes . add ( ( ( MethodParameterInfo ) ( annotationTarget ) ) . method ( ) . declaringClass ( ) ) ; } } } else { <START_BUG> classes . addAll ( index . getKnownSubclasses ( typeName ) ) ; <END_BUG> } return classes ; } private Set < Class < ? > > loadClassInfoSet ( Set < ClassInfo > classInfos , ClassLoader classLoader ) throws DeploymentUnitProcessingException { } }

Fix:
classes . addAll ( index . getAllKnownSubclasses ( typeName ) ) ;
Buggy code:
public class NSTextContainer extends NSObject { public NSTextContainer ( ) { } public NSTextContainer ( int id ) { } public NSSize containerSize ( ) { NSSize result = new NSSize ( ) ; <START_BUG> OS . objc_msgSend_stret ( result , this . id , sel_containerSize ) ; <END_BUG> return result ; } public boolean containsPoint ( NSPoint point ) { } public boolean heightTracksTextView ( ) { } public id initWithContainerSize ( NSSize size ) { } public boolean isSimpleRectangularTextContainer ( ) { } public NSLayoutManager layoutManager ( ) { } public float lineFragmentPadding ( ) { } public NSRect lineFragmentRectForProposedRect ( NSRect proposedRect , int sweepDirection , int movementDirection , int remainingRect ) { } public void replaceLayoutManager ( NSLayoutManager newLayoutManager ) { } public void setContainerSize ( NSSize size ) { } public void setHeightTracksTextView ( boolean flag ) { } public void setLayoutManager ( NSLayoutManager layoutManager ) { } public void setLineFragmentPadding ( float pad ) { } public void setTextView ( NSTextView textView ) { } public void setWidthTracksTextView ( boolean flag ) { } public NSTextView textView ( ) { } public boolean widthTracksTextView ( ) { } }

Fix:
OS . objc_msgSend_struct ( result , this . id , sel_containerSize ) ;
Buggy code:
@ Controller @ RequestMapping ( "//audit" ) public class AuditController extends BasicController { @ Autowired private PageurlinfoService pageurlinfoService ; @ Autowired private PagedatainfoService pagedatainfoService ; @ Autowired private AuditService auditService ; @ RequestMapping ( value = "urlCount" , method = RequestMethod . GET ) public String urlCount ( Model model , ServletRequest request ) { } @ RequestMapping ( value = "urlInfo//{id}" , method = RequestMethod . GET ) public String urlInfo ( Model model , ServletRequest request , @ PathVariable ( "id" ) String id ) { } @ RequestMapping ( value = "findLogList" , method = RequestMethod . POST ) @ ResponseBody public DataGrid findLogList ( @ RequestParam ( value = "sort" , defaultValue = "auto" ) String sortType , @ RequestParam ( value = "order" , defaultValue = "desc" ) String order , @ RequestParam ( value = "page" , defaultValue = "1" ) int pageNumber , @ RequestParam ( value = "rows" , defaultValue = ROWS ) int rows , Model model , ServletRequest request ) { } <START_BUG> @ RequestMapping ( value = "getUrlInfo" , method = RequestMethod . GET ) <END_BUG> @ ResponseBody public DataGrid getUrlInfo ( @ RequestParam ( value = "sort" , defaultValue = "auto" ) String sortType , @ RequestParam ( value = "order" , defaultValue = "desc" ) String order , @ RequestParam ( value = "page" , defaultValue = "1" ) int pageNumber , @ RequestParam ( value = "rows" , defaultValue = ROWS ) int rows , @ RequestParam ( "id" ) Long id , Model model , ServletRequest request ) { DataGrid dataGrid = new DataGrid ( ) ; try { ShiroUser su = super . getLoginUser ( ) ; User user = accountService . findUserByLoginName ( su . getLoginName ( ) ) ; if ( user != null ) { Map < String , Object > searchParams = Servlets . getParametersStartingWith ( request , "search_" ) ; model . addAttribute ( "searchParams" , Servlets . encodeParameterStringWithPrefix ( searchParams , "search_" ) ) ; Pageurlinfo pageurlinfo = pageurlinfoService . get ( id ) ; dataGrid = auditService . dataGridForUrlInfo ( searchParams , pageNumber , rows , sortType , order , pageurlinfo . getUrl ( ) ) ; } else { logger . log ( this . getClass ( ) , ERROR_INT , "登陆帐号无效!" , "" , null ) ; } } catch ( Exception ex ) { logger . log ( this . getClass ( ) , ERROR_INT , ex . getMessage ( ) , super . getLoginUser ( ) . getLoginName ( ) , null ) ; } return dataGrid ; } }

Fix:
@ RequestMapping ( value = "getUrlInfo" , method = RequestMethod . POST )
Buggy code:
public interface DefaultAncestors < T extends DefaultVertex < T > > extends IVertex < T > { @ Override default boolean isRoot ( ) { } @ Override default int getLevel ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override default DefaultRoot < T > getRoot ( ) { } @ Override default boolean isMeta ( ) { } @ Override default boolean isStructural ( ) { } @ Override default boolean isConcrete ( ) { } default boolean isDirectAncestorOf ( T vertex ) { <START_BUG> return ( ( equals ( vertex . getMeta ( ) ) ) || ( vertex . getSupers ( ) . contains ( this ) ) ) || ( vertex . getComponents ( ) . contains ( this ) ) ; <END_BUG> } @ Override default boolean inheritsFrom ( T superVertex ) { } @ Override default boolean isInstanceOf ( T metaVertex ) { } @ Override default boolean isSpecializationOf ( T supra ) { } @ Override default boolean isCompositeOf ( T vertex ) { } @ Override default T getComponent ( int pos ) { } @ Override default T getBaseComponent ( ) { } @ Override default T getTargetComponent ( ) { } @ Override default T getTernaryComponent ( ) { } }

Fix:
return ( ! ( equals ( vertex ) ) ) && ( ( ( equals ( vertex . getMeta ( ) ) ) || ( vertex . getSupers ( ) . contains ( this ) ) ) || ( vertex . getComponents ( ) . contains ( this ) ) ) ;
Buggy code:
@ Configuration public abstract class AbstractAsyncConfiguration implements ImportAware { protected Map < String , Object > enableAsync ; protected Executor executor ; public void setImportMetadata ( AnnotationMetadata importMetadata ) { } public abstract Object asyncAdvisor ( ) { } @ Autowired ( required = false ) void setConfigurers ( Collection < AsyncConfigurer > configurers ) { if ( ( configurers == null ) || ( configurers . isEmpty ( ) ) ) { return ; } if ( ( configurers . size ( ) ) > 1 ) { throw new IllegalStateException ( "only<seq2seq4repair_space>one<seq2seq4repair_space>AsyncConfigurer<seq2seq4repair_space>may<seq2seq4repair_space>exist" ) ; } AsyncConfigurer configurer = configurers . iterator ( ) . next ( ) ; <START_BUG> this . executor = configurer . getExecutor ( ) ; <END_BUG> } }

Fix:
this . executor = configurer . getAsyncExecutor ( ) ;
Buggy code:
public class RModuleIssueType extends org . tigris . scarab . om . BaseRModuleIssueType implements Persistent { public ScarabModule getScarabModule ( ) { } public void setScarabModule ( ScarabModule module ) { } public void setModule ( Module me ) throws TorqueException { } public Module getModule ( ) throws TorqueException { } public void delete ( ScarabUser user ) throws Exception { Module module = getModule ( ) ; if ( user . hasPermission ( MODULE__EDIT , module ) ) { List attGroups = module . getAttributeGroups ( getIssueType ( ) ) ; for ( int j = 0 ; j < ( attGroups . size ( ) ) ; j ++ ) { AttributeGroup attGroup = ( ( AttributeGroup ) ( attGroups . get ( j ) ) ) ; attGroup . delete ( user ) ; } Criteria c = new Criteria ( ) . add ( MODULE_ID , getModuleId ( ) ) . add ( ISSUE_TYPE_ID , getIssueTypeId ( ) ) ; RModuleIssueTypePeer . doDelete ( c ) ; <START_BUG> save ( ) ; <END_BUG> List rmits = module . getRModuleIssueTypes ( ) ; rmits . remove ( this ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } public String getDisplayName ( ) { } public String getDisplayText ( ) { } public String getDisplayDescription ( ) { } public RModuleIssueType copy ( ) throws TorqueException { } }

Fix:
RModuleIssueTypeManager . removeFromCache ( this ) ;
Buggy code:
public class SettingsActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void setTexts ( ) { DwDbHelper dh = new DwDbHelper ( this ) ; ( ( Switch ) ( findViewById ( btn_settings_replay ) ) ) . setChecked ( ( ( dh . get ( "mp3.replay" , Boolean . class ) ) == ( Boolean . TRUE ) ) ) ; ( ( TextView ) ( findViewById ( tv_setting_store ) ) ) . setText ( getString ( tv_store_path , new CacheFile ( this , "//" ) . getRealFile ( ) ) ) ; ( ( TextView ) ( findViewById ( tv_setting_sync ) ) ) . setText ( date2string ( tv_last_sync , dh . get ( "sync.last" , Date . class ) ) ) ; <START_BUG> ( ( TextView ) ( findViewById ( tv_setting_import ) ) ) . setText ( date2string ( tv_last_import , dh . get ( "sync.last" , Date . class ) ) ) ; <END_BUG> } private String date2string ( int rid , Date date ) { } private void initEvents ( ) { } private void initHosts ( ) { } }

Fix:
( ( TextView ) ( findViewById ( tv_setting_import ) ) ) . setText ( date2string ( tv_last_import , dh . get ( "import.last" , Date . class ) ) ) ;
Buggy code:
public abstract class ACSElement extends ElementNode { public static final String XML_STRING = "xmlString" ; private PropertyChangeSupport _propSupport = null ; protected ACSElement ( ) { } public String getDisplayName ( ) { } public String getXMLString ( ) { } public void setAttribute ( String name , String value ) { <START_BUG> if ( ( value == null ) || ( ( value . length ( ) ) == 0 ) ) { <END_BUG> removeAttribute ( name ) ; } else { super . setAttribute ( name , value ) ; } } public void addPropertyChangeListener ( PropertyChangeListener l ) { } public void removePropertyChangeListener ( PropertyChangeListener l ) { } protected void firePropertyChange ( String propName , Object oldValue , Object newValue ) { } }

Fix:
if ( ( value == null ) && ( ( getAttribute ( name ) . length ( ) ) != 0 ) ) {
Buggy code:
public class ClassFile extends Openable implements IClassFile { protected BinaryType fBinaryType = null ; protected ClassFile ( IPackageFragment parent , String name ) { } public void codeComplete ( int offset , ICompletionRequestor requestor ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } protected IJavaElement findElement ( IJavaElement elt , int position , SourceMapper mapper ) { } <START_BUG> protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource , IProblemRequestor problemRequestor ) throws JavaModelException { <END_BUG> IBinaryType typeInfo = getBinaryTypeInfo ( ( ( IFile ) ( underlyingResource ) ) ) ; if ( typeInfo == null ) { info . setChildren ( new IJavaElement [ ] { } ) ; return false ; } IType type = new BinaryType ( this , new String ( ClassFile . simpleName ( typeInfo . getName ( ) ) ) ) ; info . addChild ( type ) ; newElements . put ( type , typeInfo ) ; return true ; } private IBinaryType getBinaryTypeInfo ( IFile file ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } public IPath getPath ( ) { } public IResource getResource ( ) { } public String getSource ( ) throws JavaModelException { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public IType getType ( ) throws JavaModelException { } public IJavaElement getWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory ) throws JavaModelException { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { } public IJavaElement rootedAt ( IJavaProject project ) { } static char [ ] simpleName ( char [ ] className ) { } public static char [ ] translatedName ( char [ ] name ) { } static char [ ] [ ] translatedNames ( char [ ] [ ] names ) { } static char [ ] unqualifiedName ( char [ ] className ) { } public void codeComplete ( int offset , final ICodeCompletionRequestor requestor ) throws JavaModelException { } }

Fix:
protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException {
Buggy code:
public class CDbwEvaluator { private static final Logger log = LoggerFactory . getLogger ( CDbwEvaluator . class ) ; private final Map < Integer , List < VectorWritable > > representativePoints ; private final Map < Integer , Double > stDevs = new HashMap < Integer , Double > ( ) ; private final List < Cluster > clusters ; private final DistanceMeasure measure ; private boolean pruned ; public CDbwEvaluator ( Map < Integer , List < VectorWritable > > representativePoints , List < Cluster > clusters , DistanceMeasure measure ) { } public CDbwEvaluator ( Configuration conf , Path clustersIn ) throws IOException , ClassNotFoundException , IllegalAccessException , InstantiationException { } private static List < Cluster > loadClusters ( Configuration conf , Path clustersIn ) throws IOException , IllegalAccessException , InstantiationException { } private void computeStd ( int cI ) { List < VectorWritable > repPts = representativePoints . get ( cI ) ; GaussianAccumulator accumulator = new RunningSumsGaussianAccumulator ( ) ; for ( VectorWritable vw : repPts ) { <START_BUG> accumulator . observe ( vw . get ( ) , 1 ) ; <END_BUG> } accumulator . compute ( ) ; double d = accumulator . getAverageStd ( ) ; stDevs . put ( cI , d ) ; } private boolean invalidCluster ( Cluster clusterI ) { } private void pruneInvalidClusters ( ) { } double interDensity ( Vector uIJ , int cI , int cJ ) { } public double getCDbw ( ) { } public double intraClusterDensity ( ) { } public double separation ( ) { } public double interClusterDensity ( ) { } }

Fix:
accumulator . observe ( vw . get ( ) ) ;